diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index daa61fb2a..5ee65dde0 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,14 +1,23 @@
## Description of the change
-> Description here
+> Please include a summary of the change and which issues are fixed.
+> Please also include relevant motivation and context.
+
## Type of change
+
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
+- [ ] Maintenance
+- [ ] New release
## Related issues
-> Fix [#1]()
+> Shortcut stories and GitHub issues (delete irrelevant)
+
+- Fix [SC-]
+- Fix #1
+
## Checklists
### Development
@@ -17,9 +26,9 @@
- [ ] The code changed/added as part of this pull request has been covered with tests
- [ ] All tests related to the changed code pass in development
-### Code review
+### Code review
-- [ ] This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
-- [ ] "Ready for review" label attached to the PR and reviewers mentioned in a comment
+- [ ] This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
+- [ ] "Ready for review" label attached to the PR and reviewers assigned
+- [ ] Issue from task tracker has a link to this pull request
- [ ] Changes have been reviewed by at least one other engineer
-- [ ] Issue from task tracker has a link to this pull request
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c964db2bc..68e16bf0f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -2,30 +2,52 @@ name: Rollbar.js CI
on:
push:
- branches: [ master ]
- tags: [ v* ]
+ branches: [master]
+ tags: [v*]
pull_request:
- branches: [ master ]
+ branches: [master]
jobs:
build:
- runs-on: ubuntu-16.04
+ runs-on: ubuntu-20.04
+
strategy:
matrix:
- node-version: [8, 10, 12, 14, 16]
+ include:
+ - node: 14
+ npm: ^8
+ - node: 16
+ npm: ^8
+ - node: 18
+ npm: ^9
+ - node: 20
+ npm: ^10
+ - node: latest
+ npm: latest
steps:
- - uses: actions/checkout@v2
- with:
- submodules: recursive
+ - name: Checkout
+ uses: actions/checkout@v4
- - name: Install node.js
- uses: actions/setup-node@v2-beta
+ - name: Set up node ${{ matrix.node }}
+ uses: actions/setup-node@v4
with:
- node-version: ${{ matrix.node-version }}
+ node-version: ${{ matrix.node }}
+
+ - name: Update npm
+ run: npm install -g npm@${{ matrix.npm }}
- name: npm install
run: npm install
+ - name: Lint
+ uses: wearerequired/lint-action@v2
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ prettier: true
+ eslint: true
+ eslint_args: '--max-warnings 0'
+ eslint_extensions: js
+
- name: Run tests
run: npm run test_ci
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index 9426ba67f..000000000
--- a/.gitmodules
+++ /dev/null
@@ -1,3 +0,0 @@
-[submodule "vendor/JSON-js"]
- path = vendor/JSON-js
- url = https://github.com/rollbar/JSON-js.git
diff --git a/.lgtm.yml b/.lgtm.yml
index 061c733f4..e72db1933 100644
--- a/.lgtm.yml
+++ b/.lgtm.yml
@@ -1,8 +1,8 @@
path_classifiers:
- generated:
- - release
- - dist
- docs:
- - examples
- test:
- - test
+ generated:
+ - release
+ - dist
+ docs:
+ - examples
+ test:
+ - test
diff --git a/.npmignore b/.npmignore
index 9f61da936..260cb5c97 100644
--- a/.npmignore
+++ b/.npmignore
@@ -2,7 +2,6 @@ node_modules
bower_components
.idea
vendor/*.min.js
-vendor/JSON-js/.git
test/*.bundle.js*
sauce_connect.log
release
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 000000000..f5e7ca462
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,18 @@
+.github
+.next
+.yalc
+build
+bundles
+coverage
+dist
+lib
+node_modules
+out
+public
+release
+vendor
+
+# ignore prettifying examples for now due to
+# 1. there being minified snippets all over the place and
+# 2. some tests fail cause they depend on some sources being exactly as they are
+examples
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 000000000..9c5e96fe7
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,39 @@
+{
+ "[github-actions-workflow]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
+ "editor.formatOnSave": true
+ },
+ "[javascript]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
+ "editor.formatOnSave": true
+ },
+ "[javascriptreact]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
+ "editor.formatOnSave": true
+ },
+ "[json5]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
+ "editor.formatOnSave": true
+ },
+ "[jsonc]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
+ "editor.formatOnSave": true
+ },
+ "[typescript]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
+ "editor.formatOnSave": true
+ },
+ "[typescriptreact]": {
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
+ "editor.formatOnSave": true
+ },
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
+ "editor.formatOnSave": true,
+ "editor.formatOnSaveMode": "file",
+ "editor.tabSize": 2,
+ "editor.codeActionsOnSave": {
+ "source.fixAll.eslint": "explicit"
+ },
+ "files.trimTrailingWhitespace": true,
+ "prettier.useEditorConfig": false
+}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d1b9e8f98..d716945f0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,7 +24,6 @@ The change log has moved to this repo's [GitHub Releases Page](https://github.co
The boolean configuration options `captureEmail` and `captureUsername` can be used to change
this behaviour.
-
## v2.3.6
- Updates for React Native
@@ -46,26 +45,26 @@ The change log has moved to this repo's [GitHub Releases Page](https://github.co
## v2.3.2
-- Be defensive about navigator not existing on window
-[#514](https://github.com/rollbar/rollbar.js/pull/514)
+- Be defensive about navigator not existing on window
+ [#514](https://github.com/rollbar/rollbar.js/pull/514)
-- Proper scrubbing
-[#510](https://github.com/rollbar/rollbar.js/pull/510)
+- Proper scrubbing
+ [#510](https://github.com/rollbar/rollbar.js/pull/510)
-- Be defensive when accessing event properties
-[#503](https://github.com/rollbar/rollbar.js/pull/503)
+- Be defensive when accessing event properties
+ [#503](https://github.com/rollbar/rollbar.js/pull/503)
- Add environment to options type enhancement
-[#499](https://github.com/rollbar/rollbar.js/pull/499)
+ [#499](https://github.com/rollbar/rollbar.js/pull/499)
-- call the transform in the options on the server side too
-[#498](https://github.com/rollbar/rollbar.js/pull/498)
+- call the transform in the options on the server side too
+ [#498](https://github.com/rollbar/rollbar.js/pull/498)
-- fixes errMsg.match is not a function error
-[#492](https://github.com/rollbar/rollbar.js/pull/492)
+- fixes errMsg.match is not a function error
+ [#492](https://github.com/rollbar/rollbar.js/pull/492)
-- Call callback even if logging same as last error
-[#490](https://github.com/rollbar/rollbar.js/pull/490)
+- Call callback even if logging same as last error
+ [#490](https://github.com/rollbar/rollbar.js/pull/490)
## v2.3.1
@@ -105,16 +104,20 @@ The change log has moved to this repo's [GitHub Releases Page](https://github.co
- 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
## v2.2.6
+
- Fix blacklist issue
## v2.2.5
+
- Revert `isNative` check for replacing JSON functions
## v2.2.4
+
- Fix a "race" condition in how wait works
- Add two options to control scrubbing of telemetry input events: `scrubTelemetryInputs` and
`telemetryScrubber`.
@@ -126,9 +129,11 @@ The change log has moved to this repo's [GitHub Releases Page](https://github.co
rather than an integer.
## v2.2.3
+
- Actually make collecting network telemetry on by default
## v2.2.2
+
- Fix bug in network telemetry that was wrapping onreadystatechage in correctly
- Enable collecting network telemetry by default
- Fix stack overflow issue due to scrubbing of self-referential objects
@@ -137,43 +142,48 @@ The change log has moved to this repo's [GitHub Releases Page](https://github.co
- Make the typescript type declarations better
## v2.2.1
+
- Disable collection of network telemetry data by default
## v2.2.0
+
- Telemetry data is now collected by default in the browser. See
[README.md](https://github.com/rollbar/rollbar.js#telemetry)
for information and configuration details.
- Fix some typos in the typescript declarations
## v2.1.3
+
- Actually change version number in package.json and build all relevant files
## v2.1.2
+
- Actually send the client-side UUID with the item
- Fix typos in typescript declaration
## v2.1.1
-- Allow more flexibility of request objects
-[#346](https://github.com/rollbar/rollbar.js/pull/346)
-- Address issue with handleItemWithError possible not calling the callback
-[#345](https://github.com/rollbar/rollbar.js/pull/345)
-- Fixed a typo in README.md
-[#343](https://github.com/rollbar/rollbar.js/pull/343)
-- unify configuration options
-[#341](https://github.com/rollbar/rollbar.js/pull/341)
-- add some intervals to keep the event loop running when wait is called
-[#338](https://github.com/rollbar/rollbar.js/pull/338)
-- [Fixes #336] Propagate message
-[#337](https://github.com/rollbar/rollbar.js/pull/337)
-- [Fixes #269] get rid of rollbar wrapper stack frames
-[#335](https://github.com/rollbar/rollbar.js/pull/335)
-- first pass at a typescript declaration file
-[#334](https://github.com/rollbar/rollbar.js/pull/334)
-- Fix #331 Verbose logging was using the wrong key structure
-[#332](https://github.com/rollbar/rollbar.js/pull/332)
+- Allow more flexibility of request objects
+ [#346](https://github.com/rollbar/rollbar.js/pull/346)
+- Address issue with handleItemWithError possible not calling the callback
+ [#345](https://github.com/rollbar/rollbar.js/pull/345)
+- Fixed a typo in README.md
+ [#343](https://github.com/rollbar/rollbar.js/pull/343)
+- unify configuration options
+ [#341](https://github.com/rollbar/rollbar.js/pull/341)
+- add some intervals to keep the event loop running when wait is called
+ [#338](https://github.com/rollbar/rollbar.js/pull/338)
+- [Fixes #336] Propagate message
+ [#337](https://github.com/rollbar/rollbar.js/pull/337)
+- [Fixes #269] get rid of rollbar wrapper stack frames
+ [#335](https://github.com/rollbar/rollbar.js/pull/335)
+- first pass at a typescript declaration file
+ [#334](https://github.com/rollbar/rollbar.js/pull/334)
+- Fix #331 Verbose logging was using the wrong key structure
+ [#332](https://github.com/rollbar/rollbar.js/pull/332)
## v2.1.0
+
- Use the upstream version of console-polyfill: [#306](https://github.com/rollbar/rollbar.js/pull/306)
- The verbose option still existed but didn't do anything, this adds back the functionality to
output some information to the console: [#311](https://github.com/rollbar/rollbar.js/pull/311)
@@ -197,10 +207,12 @@ The change log has moved to this repo's [GitHub Releases Page](https://github.co
match what we allow in the browser: [#329](https://github.com/rollbar/rollbar.js/pull/329)
## v2.0.4
+
- Fixes a small typo in the unhandled rejection handler. (pr#303)
-- Updated the no-conflict example to use the new noconflict bundle and updated docs.
+- Updated the no-conflict example to use the new noconflict bundle and updated docs.
## v2.0.3
+
- Decreased NPM package size by removing examples and coverage directories. (pr#276)
- Handle unordered params on the server side. (pr#286)
- Fixes a server-side bug which failed to report an error if the request did not contain a `headers` key. (pr#288)
@@ -210,13 +222,16 @@ The change log has moved to this repo's [GitHub Releases Page](https://github.co
- Added a no-conflict bundle for the browser. (pr#295)
## v2.0.2
+
- Added/updated docs on how to use rollbar.js with React, Angular 1 & 2, Ember, Backbone.js
- Fixed a bug which was not respecting the `enabled` flag. (pr#280)
## v2.0.1
+
- Maintenance release - No new features or bugfixes
## v2.0.0
+
This release is the first where the library supports both browser and node environments from the
same package. We decided to deprecate the `rollbar-browser` npm package in favor of using the
`rollbar` npm package for all javascript environments. This single codebase now handles both
@@ -247,6 +262,7 @@ be noticable. However, there are a few cases where one might run in to trouble.
the convenience instance located at `window.Rollbar` will be setup as this handler.
**v1.9.4**
+
- Updated to the newest version of console-polyfill (pr#244)
- Log functions now return an object with the uuid as one of the keys (pr#236)
- Fix issue related to Object.assign which caused problems on IE8 (pr#246)
@@ -255,16 +271,20 @@ be noticable. However, there are a few cases where one might run in to trouble.
`[object Object]` (pr#249)
**v1.9.3**
+
- Serve rollbar.js from CDNJS
**v1.9.2**
+
- Fix bug which would break `Rollbar.wrap()` if a string was thrown. (pr#222)
**v1.9.1**
+
- Re-add rollbar.snippet.js to the Bower distribution. (pr#196)
- This re-adds `dist/rollbar.snippet.js` to be backwards compatible with v1.8.5
**v1.9.0**
+
- Added support for arrays as custom data. (pr#194)
- Documentation added for disabling Rollbar in the presence of ad blockers. (pr#190)
- Added support for unhandled rejections from Promises. (pr#192)
@@ -278,21 +298,27 @@ be noticable. However, there are a few cases where one might run in to trouble.
- `src`
**v1.8.5**
+
- Support retrying after being in offline mode. (pr#186)
**v1.8.4**
+
- Check messages body for ignored messages. (pr#180)
**v1.8.3**
+
- Fix a bug introduced in 1.8.0 where payload options were being removed by calls to `configure()`. (pr#176)
**v1.8.2**
+
- Using the latest error-stack-parser from NPM. (pr#171)
**v1.8.1**
+
- Changed the error-stack-parser dependency to use git+https. (pr#168)
**v1.8.0**
+
- Fixed a few bugs in IE9, IE8 which were not recognozing `Error` instances properly. (pr#164)
- Changed the behavior of `.global()` to only store options that we know how to process. (pr#164)
- Refactored the code to remove custom polyfills. (pr#164)
@@ -300,24 +326,30 @@ be noticable. However, there are a few cases where one might run in to trouble.
- Fixed a bug in the jQuery plugin which would cause an error to be thrown in the internal `checkIgnore()` function. (pr#161)
**v1.7.5**
+
- Fix bug when checking window.onerror.belongsToShim.
**v1.7.4**
+
- Don't save shim's onerror when we are building globalnotifier.
This fixes tests using window.onerror on a browser console
- Fix Default endpoint on docs/configuration.md
**v1.7.3**
+
- Added a named AMD module to the list of build targets. (pr#151)
**v1.7.2**
+
- Bumped version so that NPM lists 1.7.2 as the latest, (was pointing to 1.6.0) (issue#148)
**v1.7.1**
+
- Integrated karma tests. (pr#130)
- Added warning message for common issue with `loadFull()`
**v1.7.0**
+
- Fixed a bug that was not recognizing custom Error subclasses as valid errors. (pr#142)
- Added documentation for the `hostWhiteList` option. (pr#138)
- Changed the default uncaught error level to "error" instead of "warning".
@@ -326,14 +358,17 @@ be noticable. However, there are a few cases where one might run in to trouble.
asynchronously. This option is set to `true` by default.
**v1.6.1**
+
- Updated bower.json to contain only a single .js entry. (issue#126)
**v1.6.0**
+
- Fixed a bug that caused IE 8 to not properly initialize `window.Rollbar`. (pr#129)
- Fixed the `XDomainRequest` code to work properly in IE 8.
- Updated error parsing to provide more useful information for IE 8 errors
**v1.5.0**
+
- Published rollbar.js to npmjs.com as rollbar-browser. (pr#127)
- Fixes a bug where thrown non-error objects were not properly handled. (pr#125)
- Fixes a bug that was logging an incorrect message when the notifier was disabled. (pr#124)
@@ -341,158 +376,204 @@ be noticable. However, there are a few cases where one might run in to trouble.
- Lots of code cleanup and smaller minified file size.
**v1.4.4**
+
- Remove the `window.onload` event handler from the snippet and just create the script tag for the full rollbar.js source directly. (pr#120)
**v1.4.3**
+
- Fixed a bug that would cause the notifier to crash when run in a Selenium test. (pr#117)
- Force the notifier to always use HTTPS when communicating with api.rollbar.com. (pr#116)
**v1.4.2**
+
- Fixed a bug that occurred in FF when Rollbar logged an internal error or if verbose mode was turned on. (pr#105)
**v1.4.1**
+
- Fixed a bug that would load the wrong AMD module if a custom "rollbar" module was already defined.
- Customers should copy and paste the new snippet into their code.
**v1.4.0**
+
- Fix a bug, (introduced in v1.3) that caused Rollbar to generate an error when used with RequireJS.
- Customers should copy and paste the new snippet into their code.
**v1.3.0**
+
- Add more strict JSHint options and fix errors/warnings.
**v1.3.0-rc.4**
+
- Fixes IE8 bug where JSON was not defined.
**v1.3.0-rc.3**
+
- Remove polyfill.
**v1.3.0-rc.2**
+
- Fix main values in bower.json.
**v1.3.0-rc.1**
+
- Fixes for IE8+
**v1.3.0-alpha.5**
+
- Fix rollbar.umd.min.js URL in the snippet
- Remove sourceMappingURL comment due to browser bug concerns
**v1.3.0-alpha.4**
+
- Update CHANGELOG.md.
**v1.3.0-alpha.3**
+
- Remove repeated timer to send enqueued payloads.
- Change argument name in Stack() to fix uglify bug.
-- Change __DEFAULT_ROLLBARJS_URL__ to use https.
-- Set window._globalRollbarOptions when calling .configure().
+- Change **DEFAULT_ROLLBARJS_URL** to use https.
+- Set window.\_globalRollbarOptions when calling .configure().
**v1.3.0-alpha.2**
+
- Update missing dist/ files.
**v1.3.0-alpha.1**
+
- Build the library using webpack.
- Replace tracekit and use error-stack-parser.
**1.2.2**
+
- Added `nojson` distribution, for use on sites with a Content Security Policy that disallows `unsafe-eval`. (The standard distributions ship with a built-in JSON implementation, since external libraries, such as MooTools, sometimes break the brower's built-in JSON.) If you know that the built-in JSON is not being modified in your application, or you are disallowing `unsafe-eval`, use this distribution.
**1.2.1**
+
- Fixed bug where the global notifier not being used to atch event listener exceptions. (pr#70)
**1.2.0**
+
- Fixed AMD build to now return the notifier instance from the `init()` method.
**1.1.16 - EDIT: This version has been removed due to finding a bug that broke backward compatibility.**
+
- Optimized the AMD build to not create a Notifier instance until the `init()` method is called.
**1.1.15**
+
- Fix a bug where custom context functions that returned `undefined` were causing `Rollbar.wrap()` to throw an error.
**1.1.14**
+
- Fix a bug in IE8 where DOMException was being used even though it's not defined, (#62).
**1.1.13**
+
- Add `responseText` and `statusText` to the data reported by the jQuery ajax plugin, (pr#61).
**1.1.12**
+
- Fixes a bug where `DOMException` objects were not recognized as error objects. (#55).
**1.1.11**
+
- Fixes a bug where wrapped functions were crashing when a `null` callback was given to `removeEventListener()`, (pr#50).
**1.1.10**
+
- Pulls in the latest JSON-js changes that do not call `.toJSON()` if the method exists already. This was breaking because MooTools v1.2.4 sets `.toJSON()` to use a broken JSON stringify implementation.
**1.1.9**
+
- Always use the custom JSON implementation since some users are initializing a library that will overwrite a working `JSON.stringify()` with a broken one after Rollbar has checked for `JSON.stringify()` correctness.
**1.1.8**
+
- Added a callback function to `loadFull()` to support Segment.io's plugin model.
**1.1.7**
+
- Added `verbose` and `logFunction` options, (pr#42).
**1.1.6**
+
- Added a `_wrappedSource` key to exceptions caught by the `wrap()` method to record the source of the wrapped function.
**1.1.5**
+
- Added a `context` parameter to `Rollbar.wrap()`, (#26).
- Added a `transform` option to allow the user to read/modify the payload before we send it to Rollbar, (#41 #43).
**1.1.4**
+
- Added the `enabled` flag to determine when we should enqueue payloads to be sent, (#28).
**1.1.3**
+
- Fixed a bug that was causing a stack overflow error in IE8, (#38).
- Shaved off a few bytes from the snippet's size.
**1.1.2**
+
- Fixed a bug that was causing `Rollbar.configure()` to incorrectly handle overwriting array configuration.
- Added in support for a `ignoredMessages` configuration option, (pr#35).
- Fixed a bug that was causing some `EventListener` objects to not be unbound, (pr#33).
- Updated the snippet with fixes.
**1.1.1**
+
- Fixed a bug with default rate limits. The defaults were not applied unless Rollbar.global() was called.
**1.1.0**
+
- Add support for AMD JS loaders and refactor rollbar.require.js into rollbar.amd.js and rollbar.commonjs.js.
**1.0.0-rc.11**
+
- Add support for whitelisting host names/domains, (pr#31).
**1.0.0-rc.10**
+
- Add support for using rollbar with Webpack/Browserify via `require("rollbar.require.min.js")` with examples.
**1.0.0-rc.9**
+
- Fixed a bug that caused a wrapped async handler to break if there was no callback provided.
**1.0.0-rc.8**
+
- Fixed a bug that created/used a global variable.
**1.0.0-rc.7**
+
- Change default reportLevel to `debug`. Previously, calls to `Rollbar.info` and `Rollbar.debug` were filtered out under the default configuration; now they are let through.
**1.0.0-rc.6**
+
- Fixed a bug where items were sent in reverse order when queued
- Add `maxItems` global option. If defined, at most this many items per pageview will be sent. Default `0`, meaning "no limit".
**1.0.0-rc.5**
+
- Fix invalid payload generated when a non-Error object is passed as the error (#20)
- Pass correct window.onerror args to original onerror (#23)
- jQuery plugin: ignore status 0 events (#22)
- Fix issue where callbacks to `.debug()`, etc. were not called if reportLevel filters the item (#24)
**1.0.0-rc.4**
+
- Fix snippet in IE8 (change `map` to a for loop)
**1.0.0-rc.3**
+
- Remove source maps from build process (no user-facing changes)
**1.0.0-rc.2**
+
- Send access token as a request header in browsers that support XMLHttpRequest
**1.0.0-rc.1**
+
- Fix bug where we were attempting to wrap an object instead of a function.
- https://github.com/rollbar/rollbar.js/pull/17
- Fix bug in jQuery plugin that wasn't passing along the jQuery object.
@@ -501,17 +582,21 @@ be noticable. However, there are a few cases where one might run in to trouble.
- https://github.com/rollbar/rollbar.js/blob/master/docs/migration_v0_to_v1.md
**1.0.0-beta9**
+
- Fix api response JSON parsing on older browsers
**1.0.0-beta8**
+
- Fix uncaught errors being ignored in some browsers
- Default uncaught error level now `warning` instead of `error`, also configurable
- Wrap `addEventListener` to get more rich stack trace info for uncaught exceptions
**1.0.0-beta7**
+
- Use a custom JSON.stringify method if the existing one does not work properly.
**1.0.0-beta4**
+
- Fix some documentation bugs
- Changes made to the snippet to put `environment` in the `payload` key.
- Remove the default `context` value and associated logic around it being either a string or a function.
@@ -519,4 +604,5 @@ be noticable. However, there are a few cases where one might run in to trouble.
## Upgrade Instructions
### v1.0.x to v1.1.x
+
1. Replace your rollbar snippet with the latest from the [rollbar.js quickstart docs](https://rollbar.com/docs/notifier/rollbar.js/) or from [the GitHub repo](https://github.com/rollbar/rollbar.js/blob/master/dist/rollbar.snippet.js).
diff --git a/Gruntfile.js b/Gruntfile.js
index e16571600..5a12cffa6 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,12 +1,7 @@
/**
* Build and test rollbar.js
- *
- * Test with browserstack:
- * $> BROWSER_STACK_USERNAME=username BROWSER_STACK_ACCESS_KEY=12345asdf grunt test --browsers=bs_ie_latest
- *
*/
-
'use strict';
var glob = require('glob');
@@ -15,8 +10,6 @@ var pkg = require('./package.json');
var fs = require('fs');
var webpackConfig = require('./webpack.config.js');
-var browserStackBrowsers = require('./browserstack.browsers');
-
function findTests(context) {
if (context !== 'browser') {
@@ -25,7 +18,7 @@ function findTests(context) {
var files = glob.sync('test/**/!(server.)*.test.js');
var mapping = {};
- files.forEach(function(file) {
+ files.forEach(function (file) {
var testName = path.basename(file, '.test.js');
mapping[testName] = file;
});
@@ -33,7 +26,7 @@ function findTests(context) {
return mapping;
}
-function buildGruntKarmaConfig(singleRun, browsers, tests, reporters) {
+function buildGruntKarmaConfig(singleRun, tests, reporters) {
var config = {
options: {
configFile: './karma.conf.js',
@@ -44,19 +37,19 @@ function buildGruntKarmaConfig(singleRun, browsers, tests, reporters) {
pattern: 'dist/**/*.js',
included: false,
served: true,
- watched: false
+ watched: false,
},
{
pattern: 'src/**/*.js',
included: false,
served: true,
- watched: false
+ watched: false,
},
{
pattern: 'examples/**/*.js',
included: false,
served: true,
- watched: false
+ watched: false,
},
// Examples HTML, set `included: true`, but they won't be executed or added
@@ -65,36 +58,30 @@ function buildGruntKarmaConfig(singleRun, browsers, tests, reporters) {
pattern: 'examples/**/*.html',
included: true,
served: true,
- watched: false
- }
- ]
+ watched: false,
+ },
+ ],
},
};
- if (browsers && browsers.length) {
- config.options.browsers = browsers;
- }
-
if (reporters && reporters.length) {
config.options.reporters = reporters;
}
for (var testName in tests) {
var testFile = tests[testName];
- var testConfig = config[testName] = {};
+ var testConfig = (config[testName] = {});
// Special case for testing requirejs integration.
// Include the requirejs module as a framework so
// Karma will inclue it in the web page.
if (testName === 'requirejs') {
- testConfig.files = [
- {src: './dist/rollbar.umd.js', included: false}
- ];
+ testConfig.files = [{ src: './dist/rollbar.umd.js', included: false }];
// NOTE: requirejs should go first in case the subsequent libraries
// check for the existence of `define()`
testConfig.frameworks = ['requirejs', 'expect', 'mocha'];
} else {
- testConfig.files = [{src: [testFile]}];
+ testConfig.files = [{ src: [testFile] }];
}
// Special config for BrowserStack IE tests
@@ -107,32 +94,10 @@ function buildGruntKarmaConfig(singleRun, browsers, tests, reporters) {
return config;
}
-
-module.exports = function(grunt) {
+module.exports = function (grunt) {
require('time-grunt')(grunt);
var browserTests = findTests('browser');
- var browsers = grunt.option('browsers');
- if (browsers) {
- browsers = browsers.split(',');
-
- var browserStackAliases = [];
- var nonBrowserStackAliases = [];
- browsers.forEach(function(browserName) {
- if (browserName.slice(0, 3) === 'bs_') {
- browserStackAliases.push(browserName);
- } else {
- nonBrowserStackAliases.push(browserName);
- }
- });
-
- var expandedBrowsers = browserStackBrowsers.filter.apply(null, browserStackAliases);
- var expandedBrowserNames = [];
- expandedBrowsers.forEach(function(browser) {
- expandedBrowserNames.push(browser._alias);
- });
- browsers = nonBrowserStackAliases.concat(expandedBrowserNames);
- }
var singleRun = grunt.option('singleRun');
if (singleRun === undefined) {
@@ -149,7 +114,6 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-text-replace');
grunt.loadNpmTasks('grunt-vows');
-
var rollbarJsSnippet = fs.readFileSync('dist/rollbar.snippet.js');
var rollbarjQuerySnippet = fs.readFileSync('dist/plugins/jquery.min.js');
@@ -159,46 +123,62 @@ module.exports = function(grunt) {
vows: {
all: {
options: {
- reporter: 'spec'
+ reporter: 'spec',
},
- src: ['test/server.*.test.js']
- }
+ src: ['test/server.*.test.js'],
+ },
},
- karma: buildGruntKarmaConfig(singleRun, browsers, browserTests, reporters),
+ karma: buildGruntKarmaConfig(singleRun, browserTests, reporters),
replace: {
snippets: {
- src: ['*.md', 'src/**/*.js', 'examples/*.+(html|js)', 'examples/*/*.+(html|js)', 'docs/**/*.md'],
+ src: [
+ '*.md',
+ 'src/**/*.js',
+ 'examples/*.+(html|js)',
+ 'examples/*/*.+(html|js)',
+ 'docs/**/*.md',
+ ],
overwrite: true,
replacements: [
// Main rollbar snippet
{
- from: new RegExp('^(.*// Rollbar Snippet)[\n\r]+(.*[\n\r])*(.*// End Rollbar Snippet)', 'm'), // eslint-disable-line no-control-regex
- to: function(match, index, fullText, captures) {
+ from: new RegExp(
+ /* eslint-disable-next-line no-control-regex */
+ '^(.*// Rollbar Snippet)[\n\r]+(.*[\n\r])*(.*// End Rollbar Snippet)',
+ 'm',
+ ),
+ to: function (match, index, fullText, captures) {
captures[1] = rollbarJsSnippet;
return captures.join('\n');
- }
+ },
},
// jQuery rollbar plugin snippet
{
- from: new RegExp('^(.*// Rollbar jQuery Snippet)[\n\r]+(.*[\n\r])*(.*// End Rollbar jQuery Snippet)', 'm'), // eslint-disable-line no-control-regex
- to: function(match, index, fullText, captures) {
+ from: new RegExp(
+ /* eslint-disable-next-line no-control-regex */
+ '^(.*// Rollbar jQuery Snippet)[\n\r]+(.*[\n\r])*(.*// End Rollbar jQuery Snippet)',
+ 'm',
+ ),
+ to: function (match, index, fullText, captures) {
captures[1] = rollbarjQuerySnippet;
return captures.join('\n');
- }
+ },
},
- // README travis link
+ // README CI link
{
- from: new RegExp('(https://github\\.com/rollbar/rollbar\\.js/workflows/Rollbar\\.js%20CI/badge\\.svg\\?branch=v)([0-9a-zA-Z.-]+)'),
- to: function(match, index, fullText, captures) {
+ from: new RegExp(
+ '(https://github\\.com/rollbar/rollbar\\.js/workflows/Rollbar\\.js%20CI/badge\\.svg\\?branch=v)([0-9a-zA-Z.-]+)',
+ ),
+ to: function (match, index, fullText, captures) {
captures[1] = pkg.version;
return captures.join('');
- }
- }
- ]
- }
- }
+ },
+ },
+ ],
+ },
+ },
});
grunt.registerTask('build', ['webpack', 'replace:snippets']);
@@ -206,12 +186,12 @@ module.exports = function(grunt) {
grunt.registerTask('test', ['test-server', 'test-browser']);
grunt.registerTask('release', ['build', 'copyrelease']);
- grunt.registerTask('test-server', function(_target) {
+ grunt.registerTask('test-server', function (_target) {
var tasks = ['vows'];
grunt.task.run.apply(grunt.task, tasks);
});
- grunt.registerTask('test-browser', function(target) {
+ grunt.registerTask('test-browser', function (target) {
var karmaTask = 'karma' + (target ? ':' + target : '');
var tasks = [karmaTask];
grunt.task.run.apply(grunt.task, tasks);
@@ -226,11 +206,11 @@ module.exports = function(grunt) {
var minJs = 'dist/rollbar' + buildName + '.min.js';
var releaseJs = 'release/rollbar' + buildName + '-' + version + '.js';
- var releaseMinJs = 'release/rollbar' + buildName + '-' + version + '.min.js';
+ var releaseMinJs =
+ 'release/rollbar' + buildName + '-' + version + '.min.js';
grunt.file.copy(js, releaseJs);
grunt.file.copy(minJs, releaseMinJs);
});
});
-
};
diff --git a/README.md b/README.md
index 18ecd3431..2d229de6c 100644
--- a/README.md
+++ b/README.md
@@ -1,16 +1,31 @@
-# Rollbar.js
+
+
+
+Rollbar.js
+
+
+ Proactively discover, predict, and resolve errors in real-time with Rollbar’s error monitoring platform. Start tracking errors today !
+
![Build Status](https://github.com/rollbar/rollbar.js/workflows/Rollbar.js%20CI/badge.svg?tag=latest)
[![Code Quality: Javascript](https://img.shields.io/lgtm/grade/javascript/g/rollbar/rollbar.js.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/rollbar/rollbar.js/context:javascript)
[![Total Alerts](https://img.shields.io/lgtm/alerts/g/rollbar/rollbar.js.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/rollbar/rollbar.js/alerts)
-Rollbar.js is the Javascript SDK for [Rollbar](https://rollbar.com). It supports both Node.js and client-side Javascript, including frameworks such as React, Angular, Ember, and more.
+---
+
+## Key benefits of using Rollbar.js are:
+
+- **Cross platform:** Rollbar.js supports both server-side and client-side Javascript, including frameworks such as React , Angular , Express , Next.js and more.
+- **Telemetry:** The telemetry timeline provides a list of “breadcrumbs” events that can help developers understand and fix problems in their client-side javascript. Learn more about telemetry .
+- **Automatic error grouping:** Rollbar aggregates Occurrences caused by the same error into Items that represent application issues. Learn more about reducing log noise .
+- **Advanced search:** Filter items by many different properties. Learn more about search .
+- **Customizable notifications:** Rollbar supports several messaging and incident management tools where your team can get notified about errors and important events by real-time alerts. Learn more about Rollbar notifications .
## Setup Instructions
1. [Sign up for a Rollbar account](https://rollbar.com/signup).
-2. For client-side Javascript, follow the [Browser Quick Start](https://docs.rollbar.com/docs/javascript#section-quick-start-browser) instructions. For Node.js, follow the [Server Quick Start](https://docs.rollbar.com/docs/javascript#section-quick-start-server).
+2. For client-side Javascript, follow the [Browser Quick Start](https://docs.rollbar.com/docs/javascript#section-quick-start-browser) instructions. For Node.js, follow the [Server Quick Start](https://docs.rollbar.com/docs/javascript#section-quick-start-server).
## Usage and Reference
@@ -30,7 +45,6 @@ For bug reports, please [open an issue on GitHub](https://github.com/rollbar/rol
To set up a development environment, you'll need Node.js and npm.
-1. `git submodule update --init`
2. `npm install -D`
3. `make`
diff --git a/bower.json b/bower.json
index 3277d005f..1dcfc3c43 100644
--- a/bower.json
+++ b/bower.json
@@ -1,9 +1,7 @@
{
"name": "rollbar",
"dependencies": {},
- "main": [
- "dist/rollbar.umd.js"
- ],
+ "main": ["dist/rollbar.umd.js"],
"ignore": [
"dist/*.nojson*",
"dist/*.named-amd*",
diff --git a/browserstack.browsers.js b/browserstack.browsers.js
deleted file mode 100644
index 6d50c84ea..000000000
--- a/browserstack.browsers.js
+++ /dev/null
@@ -1,153 +0,0 @@
-var request = require('request');
-
-var BROWSERSTACK_BROWSERS_ENDPOINT = 'https://www.browserstack.com/automate/browsers.json'
-
-
-function annotate(browserList) {
- return browserList.map(function(browser) {
- browser.base = 'BrowserStack';
- browser._alias = 'bs_' + browser.browser;
- browser._version = parseFloat(browser.browser_version || '0');
- browser._id = [
- browser.browser,
- browser.browser_version,
- browser.device,
- browser.os,
- browser.os_version
- ].join('-').replace(/\s/g, '_');
-
- return browser;
- });
-}
-
-
-function versionAliases(browserList) {
- var ret = [];
- browserList.forEach(function(browser) {
- if (browser._version) {
- var copy = simpleCopy(browser);
- copy._alias = 'bs_' + browser.browser + '_' + browser._version;
- ret.push(copy);
- }
- });
- return ret;
-}
-
-
-var browsers = [];
-var sortedByBrowser = {};
-try {
- loadBrowsers(require('./browserstack.browsers.json'));
-} catch (e) {
- console.error('Could not read ./browserstack.browsers.json. Ignoring.', e); // eslint-disable-line no-console
-}
-
-
-function simpleCopy(obj) {
- return JSON.parse(JSON.stringify(obj));
-}
-
-
-function loadBrowsers(browserListFromBrowserStack) {
- browsers = annotate(browserListFromBrowserStack);
- browsers = browsers.concat(versionAliases(browsers));
-
- sortedByBrowser = {};
-
- browsers.forEach(function(browser) {
- var browserList = sortedByBrowser[browser._alias] = sortedByBrowser[browser._alias] || [];
- browserList.push(browser);
- });
-
- // Sort all of the browsers by browser, _version
- for (var browser in sortedByBrowser) {
- var browserList = sortedByBrowser[browser];
- var numBrowsers = browserList.length;
- browserList.sort(function(a, b) {
- return a._version - b._version;
- });
-
- // Store a reference in the global browsers array to the oldest, previous and latest of
- // each browser.
- if (numBrowsers > 0) {
- var browserName = browser;
- var oldest = simpleCopy(browserList[0]);
- var latest = simpleCopy(browserList[browserList.length - 1]);
- var previous;
-
- oldest._alias = browserName + '_oldest';
- latest._alias = browserName + '_latest';
-
- browsers.push(oldest);
- browsers.push(latest);
-
- if (numBrowsers > 1) {
- previous = simpleCopy(browserList[browserList.length - 2]);
- previous._alias = browserName + '_previous';
- browsers.push(previous);
- }
- }
- }
-}
-
-
-function download(username, accessKey, callback) {
- var auth = 'Basic ' + new Buffer(username + ':' + accessKey).toString('base64');
- var req = {
- url: BROWSERSTACK_BROWSERS_ENDPOINT,
- headers: {
- Authorization: auth
- },
- json: true
- };
-
- request.get(req, function(err, resp, body) {
- if (err || resp.statusCode != 200) {
- return callback(err || new Error('Received non 200 response from BrowserStack: ' + resp.statusCode));
- }
-
- // Save the downloaded browsers in memory
- loadBrowsers(body);
-
- // TODO: Fix? fs is not defined here.
- // fs.writeFile('./browserstack.browsers.json', JSON.stringify(body, null, ' '), callback);
- });
-}
-
-
-/**
- * Returns an array of Objects that match the requested filters.
- * If no arguments are provided, an empty array is returned.
- *
- * E.g.
- *
- * filter('bs_latest') - Will return the latest browser Objects for each browser.
- * filter('bs_latest', 'bs_previous') - Will return the latest and previous browser Objects for each browser.
- * filter('bs_ie_latest', 'bs_oldest') - Will return the latest IE browser and all of the oldest browsers.
- * filter('bs_all') - Will return the all of the browser Objects.
- *
- * @returns {Array}
- */
-function filter() {
- var ret = [];
- var labels = Array.prototype.slice.call(arguments);
-
- labels.forEach(function(label) {
- browsers.forEach(function(browser) {
- if (label === 'bs_all') {
- ret.push(browser);
- } else if (browser._alias.match(new RegExp(label.slice(2) + '$'))) {
- ret.push(browser);
- }
- });
- });
-
- return ret;
-}
-
-
-module.exports = {
- _browsers: browsers,
- download: download,
- filter: filter,
-};
diff --git a/browserstack.browsers.json b/browserstack.browsers.json
deleted file mode 100644
index 25447fbc9..000000000
--- a/browserstack.browsers.json
+++ /dev/null
@@ -1,4384 +0,0 @@
-[
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "22.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "23.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "24.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "25.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "26.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "27.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "28.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "29.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "30.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "31.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "32.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "33.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "34.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "35.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "36.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "37.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "38.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "39.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "40.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "41.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "42.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "43.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "44.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "16.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "17.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "18.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "19.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "20.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "21.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "22.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "23.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "24.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "25.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "26.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "27.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "28.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "29.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "30.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "31.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "32.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "33.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "34.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "35.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "36.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "37.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "38.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "39.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "40.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "opera",
- "device": null,
- "browser_version": "12.15",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "opera",
- "device": null,
- "browser_version": "12.16",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "safari",
- "device": null,
- "browser_version": "5.1",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "ie",
- "device": null,
- "browser_version": "11.0",
- "os": "Windows",
- "os_version": "8.1"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "16.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "17.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "18.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "19.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "20.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "21.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "22.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "23.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "24.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "25.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "26.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "27.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "28.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "29.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "30.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "31.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "32.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "33.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "34.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "35.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "36.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "37.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "38.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "39.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "40.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "22.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "23.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "24.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "25.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "26.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "27.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "28.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "29.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "30.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "31.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "32.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "33.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "34.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "35.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "36.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "37.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "38.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "39.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "40.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "41.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "42.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "43.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "44.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "opera",
- "device": null,
- "browser_version": "12.15",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "opera",
- "device": null,
- "browser_version": "12.16",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "safari",
- "device": null,
- "browser_version": "5.1",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "ie",
- "device": null,
- "browser_version": "10.0",
- "os": "Windows",
- "os_version": "8"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "14.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "15.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "16.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "17.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "18.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "19.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "20.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "21.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "22.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "23.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "24.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "25.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "26.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "27.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "28.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "29.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "30.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "31.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "32.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "33.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "34.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "35.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "36.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "37.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "38.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "39.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "40.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "41.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "42.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "43.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "44.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "3.6",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "4.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "5.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "6.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "7.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "8.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "9.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "10.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "11.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "12.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "13.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "14.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "15.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "16.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "17.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "18.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "19.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "20.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "21.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "22.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "23.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "24.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "25.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "26.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "27.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "28.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "29.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "30.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "31.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "32.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "33.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "34.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "35.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "36.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "37.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "38.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "39.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "40.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "opera",
- "device": null,
- "browser_version": "12.15",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "opera",
- "device": null,
- "browser_version": "12.16",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "safari",
- "device": null,
- "browser_version": "5.1",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "ie",
- "device": null,
- "browser_version": "8.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "ie",
- "device": null,
- "browser_version": "9.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "ie",
- "device": null,
- "browser_version": "10.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "ie",
- "device": null,
- "browser_version": "11.0",
- "os": "Windows",
- "os_version": "7"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "14.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "15.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "16.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "17.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "18.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "19.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "20.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "21.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "22.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "23.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "24.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "25.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "26.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "27.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "28.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "29.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "30.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "31.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "32.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "33.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "34.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "35.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "36.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "37.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "38.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "39.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "40.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "41.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "42.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "43.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "44.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "3.6",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "4.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "5.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "6.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "7.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "8.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "9.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "10.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "11.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "12.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "13.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "14.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "15.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "16.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "17.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "18.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "19.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "20.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "21.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "22.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "23.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "24.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "25.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "26.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "27.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "28.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "29.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "30.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "31.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "32.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "33.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "34.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "35.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "36.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "37.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "38.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "40.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "opera",
- "device": null,
- "browser_version": "12.15",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "opera",
- "device": null,
- "browser_version": "12.16",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "safari",
- "device": null,
- "browser_version": "5.1",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "ie",
- "device": null,
- "browser_version": "6.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "ie",
- "device": null,
- "browser_version": "7.0",
- "os": "Windows",
- "os_version": "XP"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "14.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "16.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "17.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "18.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "19.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "20.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "21.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "22.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "23.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "24.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "25.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "26.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "27.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "28.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "29.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "30.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "31.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "32.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "33.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "34.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "35.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "36.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "37.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "38.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "39.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "40.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "41.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "42.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "43.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "44.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "3.6",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "4.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "5.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "6.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "7.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "8.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "9.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "10.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "11.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "12.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "13.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "14.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "15.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "16.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "17.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "18.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "19.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "20.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "21.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "22.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "23.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "24.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "25.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "26.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "27.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "28.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "29.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "30.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "31.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "32.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "33.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "34.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "35.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "36.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "37.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "38.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "39.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "40.0",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "opera",
- "device": null,
- "browser_version": "12.15",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "safari",
- "device": null,
- "browser_version": "7.1",
- "os": "OS X",
- "os_version": "Mavericks"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "14.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "16.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "17.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "18.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "19.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "20.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "21.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "22.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "23.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "24.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "25.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "26.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "27.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "28.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "29.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "30.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "31.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "32.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "33.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "34.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "35.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "36.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "37.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "38.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "39.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "40.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "41.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "42.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "43.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "44.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "3.6",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "4.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "5.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "6.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "7.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "8.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "9.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "10.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "11.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "12.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "13.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "14.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "15.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "16.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "17.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "18.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "19.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "20.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "21.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "22.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "23.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "24.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "25.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "26.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "27.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "28.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "29.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "30.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "31.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "32.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "33.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "34.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "35.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "36.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "37.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "38.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "39.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "40.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "opera",
- "device": null,
- "browser_version": "12.15",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "safari",
- "device": null,
- "browser_version": "8.0",
- "os": "OS X",
- "os_version": "Yosemite"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "3.6",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "4.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "5.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "6.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "7.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "8.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "9.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "10.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "11.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "12.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "13.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "14.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "15.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "16.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "17.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "18.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "19.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "20.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "21.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "22.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "23.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "24.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "25.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "26.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "27.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "28.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "29.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "30.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "31.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "32.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "33.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "34.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "35.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "36.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "37.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "38.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "40.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "14.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "16.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "17.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "18.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "19.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "20.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "21.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "22.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "23.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "24.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "25.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "26.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "27.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "28.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "29.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "30.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "31.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "32.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "33.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "34.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "35.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "36.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "37.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "39.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "40.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "41.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "42.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "43.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "44.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "opera",
- "device": null,
- "browser_version": "12.15",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "safari",
- "device": null,
- "browser_version": "6.0",
- "os": "OS X",
- "os_version": "Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "14.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "16.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "17.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "18.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "19.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "20.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "21.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "22.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "23.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "24.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "25.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "26.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "27.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "28.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "29.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "30.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "31.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "32.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "33.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "34.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "35.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "36.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "37.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "38.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "39.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "40.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "41.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "42.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "43.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "44.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "3.6",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "4.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "5.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "6.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "7.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "8.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "9.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "10.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "11.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "12.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "13.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "14.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "15.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "16.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "17.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "18.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "19.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "20.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "21.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "22.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "23.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "24.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "25.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "26.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "27.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "28.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "29.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "30.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "31.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "32.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "33.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "34.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "35.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "36.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "37.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "38.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "39.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "40.0",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "opera",
- "device": null,
- "browser_version": "12.15",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "safari",
- "device": null,
- "browser_version": "6.2",
- "os": "OS X",
- "os_version": "Mountain Lion"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "4.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "5.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "6.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "7.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "8.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "9.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "10.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "11.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "12.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "13.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "14.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "15.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "16.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "17.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "18.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "19.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "20.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "21.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "22.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "23.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "24.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "25.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "26.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "27.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "28.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "29.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "30.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "31.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "32.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "33.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "34.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "35.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "36.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "37.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "38.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "39.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "firefox",
- "device": null,
- "browser_version": "40.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "14.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "16.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "17.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "18.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "19.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "20.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "21.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "22.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "23.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "24.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "25.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "26.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "27.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "28.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "29.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "30.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "31.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "32.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "33.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "34.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "35.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "36.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "37.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "38.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "39.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "40.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "41.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "42.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "43.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "chrome",
- "device": null,
- "browser_version": "44.0",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "opera",
- "device": null,
- "browser_version": "12.15",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "safari",
- "device": null,
- "browser_version": "5.1",
- "os": "OS X",
- "os_version": "Snow Leopard"
- },
- {
- "browser": "android",
- "device": "Google Nexus 4",
- "browser_version": null,
- "os": "android",
- "os_version": "4.2"
- },
- {
- "browser": "android",
- "device": "HTC One X",
- "browser_version": null,
- "os": "android",
- "os_version": "4.0"
- },
- {
- "browser": "android",
- "device": "Motorola Razr",
- "browser_version": null,
- "os": "android",
- "os_version": "4.0"
- },
- {
- "browser": "android",
- "device": "Sony Xperia Tipo",
- "browser_version": null,
- "os": "android",
- "os_version": "4.0"
- },
- {
- "browser": "android",
- "device": "Google Nexus",
- "browser_version": null,
- "os": "android",
- "os_version": "4.0"
- },
- {
- "browser": "android",
- "device": "Amazon Kindle Fire 2",
- "browser_version": null,
- "os": "android",
- "os_version": "4.0"
- },
- {
- "browser": "android",
- "device": "Amazon Kindle Fire HD 8.9",
- "browser_version": null,
- "os": "android",
- "os_version": "4.0"
- },
- {
- "browser": "android",
- "device": "Samsung Galaxy Note 10.1",
- "browser_version": null,
- "os": "android",
- "os_version": "4.0"
- },
- {
- "browser": "android",
- "device": "Samsung Galaxy S3",
- "browser_version": null,
- "os": "android",
- "os_version": "4.1"
- },
- {
- "browser": "android",
- "device": "Samsung Galaxy Note 2",
- "browser_version": null,
- "os": "android",
- "os_version": "4.1"
- },
- {
- "browser": "android",
- "device": "Motorola Razr Maxx HD",
- "browser_version": null,
- "os": "android",
- "os_version": "4.1"
- },
- {
- "browser": "android",
- "device": "Google Nexus 7",
- "browser_version": null,
- "os": "android",
- "os_version": "4.1"
- },
- {
- "browser": "android",
- "device": "Samsung Galaxy S4",
- "browser_version": null,
- "os": "android",
- "os_version": "4.3"
- },
- {
- "browser": "android",
- "device": "Samsung Galaxy Note 3",
- "browser_version": null,
- "os": "android",
- "os_version": "4.3"
- },
- {
- "browser": "android",
- "device": "Amazon Kindle Fire HDX 7",
- "browser_version": null,
- "os": "android",
- "os_version": "4.3"
- },
- {
- "browser": "android",
- "device": "Samsung Galaxy S5",
- "browser_version": null,
- "os": "android",
- "os_version": "4.4"
- },
- {
- "browser": "android",
- "device": "Samsung Galaxy S5 Mini",
- "browser_version": null,
- "os": "android",
- "os_version": "4.4"
- },
- {
- "browser": "android",
- "device": "HTC One M8",
- "browser_version": null,
- "os": "android",
- "os_version": "4.4"
- },
- {
- "browser": "android",
- "device": "Samsung Galaxy Tab 4 10.1",
- "browser_version": null,
- "os": "android",
- "os_version": "4.4"
- },
- {
- "browser": "android",
- "device": "Google Nexus 5",
- "browser_version": null,
- "os": "android",
- "os_version": "5.0"
- },
- {
- "browser": "iphone",
- "device": "iPhone 5C",
- "browser_version": null,
- "os": "ios",
- "os_version": "7.0"
- },
- {
- "browser": "iphone",
- "device": "iPhone 5S",
- "browser_version": null,
- "os": "ios",
- "os_version": "7.0"
- },
- {
- "browser": "ipad",
- "device": "iPad 4th Gen",
- "browser_version": null,
- "os": "ios",
- "os_version": "7.0"
- },
- {
- "browser": "ipad",
- "device": "iPad Air",
- "browser_version": null,
- "os": "ios",
- "os_version": "7.0"
- },
- {
- "browser": "ipad",
- "device": "iPad mini Retina",
- "browser_version": null,
- "os": "ios",
- "os_version": "7.0"
- },
- {
- "browser": "iphone",
- "device": "iPhone 5",
- "browser_version": null,
- "os": "ios",
- "os_version": "6.1"
- }
-]
\ No newline at end of file
diff --git a/defaults.js b/defaults.js
index 5b79ee295..c11950703 100644
--- a/defaults.js
+++ b/defaults.js
@@ -5,13 +5,25 @@ var version = pkg.version;
module.exports = {
__NOTIFIER_VERSION__: JSON.stringify(pkg.version),
__JQUERY_PLUGIN_VERSION__: JSON.stringify(pkg.plugins.jquery.version),
- __DEFAULT_SERVER_SCRUB_FIELDS__: JSON.stringify(pkg.defaults.server.scrubFields),
- __DEFAULT_SERVER_SCRUB_HEADERS__: JSON.stringify(pkg.defaults.server.scrubHeaders),
+ __DEFAULT_SERVER_SCRUB_FIELDS__: JSON.stringify(
+ pkg.defaults.server.scrubFields,
+ ),
+ __DEFAULT_SERVER_SCRUB_HEADERS__: JSON.stringify(
+ pkg.defaults.server.scrubHeaders,
+ ),
__DEFAULT_ENDPOINT__: JSON.stringify(pkg.defaults.endpoint),
__DEFAULT_LOG_LEVEL__: JSON.stringify(pkg.defaults.logLevel),
__DEFAULT_REPORT_LEVEL__: JSON.stringify(pkg.defaults.reportLevel),
- __DEFAULT_UNCAUGHT_ERROR_LEVEL: JSON.stringify(pkg.defaults.uncaughtErrorLevel),
- __DEFAULT_ROLLBARJS_URL__: JSON.stringify('https://' + pkg.cdn.host + '/rollbarjs/refs/tags/v' + version + '/rollbar.min.js'),
+ __DEFAULT_UNCAUGHT_ERROR_LEVEL: JSON.stringify(
+ pkg.defaults.uncaughtErrorLevel,
+ ),
+ __DEFAULT_ROLLBARJS_URL__: JSON.stringify(
+ 'https://' +
+ pkg.cdn.host +
+ '/rollbarjs/refs/tags/v' +
+ version +
+ '/rollbar.min.js',
+ ),
__DEFAULT_MAX_ITEMS__: pkg.defaults.maxItems,
- __DEFAULT_ITEMS_PER_MIN__: pkg.defaults.itemsPerMin
+ __DEFAULT_ITEMS_PER_MIN__: pkg.defaults.itemsPerMin,
};
diff --git a/dist/plugins/jquery.min.js b/dist/plugins/jquery.min.js
index 4cdc6a561..4b59ad9eb 100644
--- a/dist/plugins/jquery.min.js
+++ b/dist/plugins/jquery.min.js
@@ -1 +1 @@
-!function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){"use strict";!function(e,r,t){var n=r.Rollbar;if(n){n.configure({payload:{notifier:{plugins:{jquery:{version:"0.0.8"}}}}});var o=function(e){if(n.error(e),r.console){var t="[reported to Rollbar]";n.options&&!n.options.enabled&&(t="[Rollbar not enabled]"),r.console.log(e.message+" "+t)}};e(t).ajaxError((function(e,r,t,o){var u=r.status,a=t.url,i=t.type;if(u){var l={status:u,url:a,type:i,isAjax:!0,data:t.data,jqXHR_responseText:r.responseText,jqXHR_statusText:r.statusText},f=o||"jQuery ajax error for "+i;n.warning(f,l)}}));var u=e.fn.ready;e.fn.ready=function(e){return u.call(this,(function(r){try{e(r)}catch(e){o(e)}}))};var a=e.event.add;e.event.add=function(r,t,n,u,i){var l,f=function(e){return function(){try{return e.apply(this,arguments)}catch(e){o(e)}}};return n.handler?(l=n.handler,n.handler=f(n.handler)):(l=n,n=f(n)),l.guid?n.guid=l.guid:n.guid=l.guid=e.guid++,a.call(this,r,t,n,u,i)}}}(jQuery,window,document)}]);
\ No newline at end of file
+(()=>{"use strict";!function(r,t,n){var e=t.Rollbar;if(e){e.configure({payload:{notifier:{plugins:{jquery:{version:"0.0.8"}}}}});var a=function(r){if(e.error(r),t.console){var n="[reported to Rollbar]";e.options&&!e.options.enabled&&(n="[Rollbar not enabled]"),t.console.log(r.message+" "+n)}};r(n).ajaxError((function(r,t,n,a){var o=t.status,i=n.url,u=n.type;if(o){var s={status:o,url:i,type:u,isAjax:!0,data:n.data,jqXHR_responseText:t.responseText,jqXHR_statusText:t.statusText},d=a||"jQuery ajax error for "+u;e.warning(d,s)}}));var o=r.fn.ready;r.fn.ready=function(r){return o.call(this,(function(t){try{r(t)}catch(r){a(r)}}))};var i=r.event.add;r.event.add=function(t,n,e,o,u){var s,d=function(r){return function(){try{return r.apply(this,arguments)}catch(r){a(r)}}};return e.handler?(s=e.handler,e.handler=d(e.handler)):(s=e,e=d(e)),s.guid?e.guid=s.guid:e.guid=s.guid=r.guid++,i.call(this,t,n,e,o,u)}}}(jQuery,window,document)})();
\ No newline at end of file
diff --git a/dist/rollbar.js b/dist/rollbar.js
index 676715f82..cbb174961 100644
--- a/dist/rollbar.js
+++ b/dist/rollbar.js
@@ -1,5744 +1,6785 @@
-/******/ (function(modules) { // webpackBootstrap
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {}
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
-/******/ }
-/******/ };
-/******/
-/******/ // define __esModule on exports
-/******/ __webpack_require__.r = function(exports) {
-/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
-/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
-/******/ }
-/******/ Object.defineProperty(exports, '__esModule', { value: true });
-/******/ };
-/******/
-/******/ // create a fake namespace object
-/******/ // mode & 1: value is a module id, require it
-/******/ // mode & 2: merge all properties of value into the ns
-/******/ // mode & 4: return value when already ns object
-/******/ // mode & 8|1: behave like require
-/******/ __webpack_require__.t = function(value, mode) {
-/******/ if(mode & 1) value = __webpack_require__(value);
-/******/ if(mode & 8) return value;
-/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
-/******/ var ns = Object.create(null);
-/******/ __webpack_require__.r(ns);
-/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
-/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
-/******/ return ns;
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/
-/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 6);
-/******/ })
-/************************************************************************/
-/******/ ([
-/* 0 */
+/******/ (() => { // webpackBootstrap
+/******/ var __webpack_modules__ = ({
+
+/***/ 276:
+/***/ (function() {
+
+// Console-polyfill. MIT license.
+// https://github.com/paulmillr/console-polyfill
+// Make it safe to do console.log() always.
+(function(global) {
+ 'use strict';
+ if (!global.console) {
+ global.console = {};
+ }
+ var con = global.console;
+ var prop, method;
+ var dummy = function() {};
+ var properties = ['memory'];
+ var methods = ('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(',');
+ while (prop = properties.pop()) if (!con[prop]) con[prop] = {};
+ while (method = methods.pop()) if (!con[method]) con[method] = dummy;
+ // Using `this` for web workers & supports Browserify / Webpack.
+})(typeof window === 'undefined' ? this : window);
+
+
+/***/ }),
+
+/***/ 180:
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {
+ 'use strict';
+ // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
+ /* istanbul ignore next */
+ if (true) {
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(124)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
+ (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else {}
+}(this, function ErrorStackParser(StackFrame) {
+ 'use strict';
-var merge = __webpack_require__(11);
+ var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\S+:\d+/;
+ var CHROME_IE_STACK_REGEXP = /^\s*at .*(\S+:\d+|\(native\))/m;
+ var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\[native code])?$/;
-var RollbarJSON = {};
-function setupJSON(polyfillJSON) {
- if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {
- return;
- }
+ return {
+ /**
+ * Given an Error object, extract the most information from it.
+ *
+ * @param {Error} error object
+ * @return {Array} of StackFrames
+ */
+ parse: function ErrorStackParser$$parse(error) {
+ if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {
+ return this.parseOpera(error);
+ } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {
+ return this.parseV8OrIE(error);
+ } else if (error.stack) {
+ return this.parseFFOrSafari(error);
+ } else {
+ throw new Error('Cannot parse given Error object');
+ }
+ },
- if (isDefined(JSON)) {
- // If polyfill is provided, prefer it over existing non-native shims.
- if(polyfillJSON) {
- if (isNativeFunction(JSON.stringify)) {
- RollbarJSON.stringify = JSON.stringify;
- }
- if (isNativeFunction(JSON.parse)) {
- RollbarJSON.parse = JSON.parse;
- }
- } else { // else accept any interface that is present.
- if (isFunction(JSON.stringify)) {
- RollbarJSON.stringify = JSON.stringify;
- }
- if (isFunction(JSON.parse)) {
- RollbarJSON.parse = JSON.parse;
- }
+ // Separate line and column numbers from a string of the form: (URI:Line:Column)
+ extractLocation: function ErrorStackParser$$extractLocation(urlLike) {
+ // Fail-fast but return locations like "(native)"
+ if (urlLike.indexOf(':') === -1) {
+ return [urlLike];
+ }
+
+ var regExp = /(.+?)(?::(\d+))?(?::(\d+))?$/;
+ var parts = regExp.exec(urlLike.replace(/[()]/g, ''));
+ return [parts[1], parts[2] || undefined, parts[3] || undefined];
+ },
+
+ parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {
+ var filtered = error.stack.split('\n').filter(function(line) {
+ return !!line.match(CHROME_IE_STACK_REGEXP);
+ }, this);
+
+ return filtered.map(function(line) {
+ if (line.indexOf('(eval ') > -1) {
+ // Throw away eval information until we implement stacktrace.js/stackframe#8
+ line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(\),.*$)/g, '');
+ }
+ var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '(');
+
+ // capture and preseve the parenthesized location "(/foo/my bar.js:12:87)" in
+ // case it has spaces in it, as the string is split on \s+ later on
+ var location = sanitizedLine.match(/ (\((.+):(\d+):(\d+)\)$)/);
+
+ // remove the parenthesized location from the line, if it was matched
+ sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;
+
+ var tokens = sanitizedLine.split(/\s+/).slice(1);
+ // if a location was matched, pass it to extractLocation() otherwise pop the last token
+ var locationParts = this.extractLocation(location ? location[1] : tokens.pop());
+ var functionName = tokens.join(' ') || undefined;
+ var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];
+
+ return new StackFrame({
+ functionName: functionName,
+ fileName: fileName,
+ lineNumber: locationParts[1],
+ columnNumber: locationParts[2],
+ source: line
+ });
+ }, this);
+ },
+
+ parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {
+ var filtered = error.stack.split('\n').filter(function(line) {
+ return !line.match(SAFARI_NATIVE_CODE_REGEXP);
+ }, this);
+
+ return filtered.map(function(line) {
+ // Throw away eval information until we implement stacktrace.js/stackframe#8
+ if (line.indexOf(' > eval') > -1) {
+ line = line.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ':$1');
+ }
+
+ if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {
+ // Safari eval frames only have function names and nothing else
+ return new StackFrame({
+ functionName: line
+ });
+ } else {
+ var functionNameRegex = /((.*".+"[^@]*)?[^@]*)(?:@)/;
+ var matches = line.match(functionNameRegex);
+ var functionName = matches && matches[1] ? matches[1] : undefined;
+ var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));
+
+ return new StackFrame({
+ functionName: functionName,
+ fileName: locationParts[0],
+ lineNumber: locationParts[1],
+ columnNumber: locationParts[2],
+ source: line
+ });
+ }
+ }, this);
+ },
+
+ parseOpera: function ErrorStackParser$$parseOpera(e) {
+ if (!e.stacktrace || (e.message.indexOf('\n') > -1 &&
+ e.message.split('\n').length > e.stacktrace.split('\n').length)) {
+ return this.parseOpera9(e);
+ } else if (!e.stack) {
+ return this.parseOpera10(e);
+ } else {
+ return this.parseOpera11(e);
+ }
+ },
+
+ parseOpera9: function ErrorStackParser$$parseOpera9(e) {
+ var lineRE = /Line (\d+).*script (?:in )?(\S+)/i;
+ var lines = e.message.split('\n');
+ var result = [];
+
+ for (var i = 2, len = lines.length; i < len; i += 2) {
+ var match = lineRE.exec(lines[i]);
+ if (match) {
+ result.push(new StackFrame({
+ fileName: match[2],
+ lineNumber: match[1],
+ source: lines[i]
+ }));
+ }
+ }
+
+ return result;
+ },
+
+ parseOpera10: function ErrorStackParser$$parseOpera10(e) {
+ var lineRE = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i;
+ var lines = e.stacktrace.split('\n');
+ var result = [];
+
+ for (var i = 0, len = lines.length; i < len; i += 2) {
+ var match = lineRE.exec(lines[i]);
+ if (match) {
+ result.push(
+ new StackFrame({
+ functionName: match[3] || undefined,
+ fileName: match[2],
+ lineNumber: match[1],
+ source: lines[i]
+ })
+ );
+ }
+ }
+
+ return result;
+ },
+
+ // Opera 10.65+ Error.stack very similar to FF/Safari
+ parseOpera11: function ErrorStackParser$$parseOpera11(error) {
+ var filtered = error.stack.split('\n').filter(function(line) {
+ return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);
+ }, this);
+
+ return filtered.map(function(line) {
+ var tokens = line.split('@');
+ var locationParts = this.extractLocation(tokens.pop());
+ var functionCall = (tokens.shift() || '');
+ var functionName = functionCall
+ .replace(//, '$2')
+ .replace(/\([^)]*\)/g, '') || undefined;
+ var argsRaw;
+ if (functionCall.match(/\(([^)]*)\)/)) {
+ argsRaw = functionCall.replace(/^[^(]+\(([^)]*)\)$/, '$1');
+ }
+ var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?
+ undefined : argsRaw.split(',');
+
+ return new StackFrame({
+ functionName: functionName,
+ args: args,
+ fileName: locationParts[0],
+ lineNumber: locationParts[1],
+ columnNumber: locationParts[2],
+ source: line
+ });
+ }, this);
+ }
+ };
+}));
+
+
+/***/ }),
+
+/***/ 124:
+/***/ (function(module, exports) {
+
+var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {
+ 'use strict';
+ // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
+
+ /* istanbul ignore next */
+ if (true) {
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
+ (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else {}
+}(this, function() {
+ 'use strict';
+ function _isNumber(n) {
+ return !isNaN(parseFloat(n)) && isFinite(n);
}
- }
- if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {
- polyfillJSON && polyfillJSON(RollbarJSON);
- }
-}
-/*
- * isType - Given a Javascript value and a string, returns true if the type of the value matches the
- * given string.
- *
- * @param x - any value
- * @param t - a lowercase string containing one of the following type names:
- * - undefined
- * - null
- * - error
- * - number
- * - boolean
- * - string
- * - symbol
- * - function
- * - object
- * - array
- * @returns true if x is of type t, otherwise false
- */
-function isType(x, t) {
- return t === typeName(x);
-}
+ function _capitalize(str) {
+ return str.charAt(0).toUpperCase() + str.substring(1);
+ }
+
+ function _getter(p) {
+ return function() {
+ return this[p];
+ };
+ }
+
+ var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];
+ var numericProps = ['columnNumber', 'lineNumber'];
+ var stringProps = ['fileName', 'functionName', 'source'];
+ var arrayProps = ['args'];
+ var objectProps = ['evalOrigin'];
+
+ var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);
+
+ function StackFrame(obj) {
+ if (!obj) return;
+ for (var i = 0; i < props.length; i++) {
+ if (obj[props[i]] !== undefined) {
+ this['set' + _capitalize(props[i])](obj[props[i]]);
+ }
+ }
+ }
+
+ StackFrame.prototype = {
+ getArgs: function() {
+ return this.args;
+ },
+ setArgs: function(v) {
+ if (Object.prototype.toString.call(v) !== '[object Array]') {
+ throw new TypeError('Args must be an Array');
+ }
+ this.args = v;
+ },
+
+ getEvalOrigin: function() {
+ return this.evalOrigin;
+ },
+ setEvalOrigin: function(v) {
+ if (v instanceof StackFrame) {
+ this.evalOrigin = v;
+ } else if (v instanceof Object) {
+ this.evalOrigin = new StackFrame(v);
+ } else {
+ throw new TypeError('Eval Origin must be an Object or StackFrame');
+ }
+ },
+
+ toString: function() {
+ var fileName = this.getFileName() || '';
+ var lineNumber = this.getLineNumber() || '';
+ var columnNumber = this.getColumnNumber() || '';
+ var functionName = this.getFunctionName() || '';
+ if (this.getIsEval()) {
+ if (fileName) {
+ return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';
+ }
+ return '[eval]:' + lineNumber + ':' + columnNumber;
+ }
+ if (functionName) {
+ return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';
+ }
+ return fileName + ':' + lineNumber + ':' + columnNumber;
+ }
+ };
+
+ StackFrame.fromString = function StackFrame$$fromString(str) {
+ var argsStartIndex = str.indexOf('(');
+ var argsEndIndex = str.lastIndexOf(')');
+
+ var functionName = str.substring(0, argsStartIndex);
+ var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');
+ var locationString = str.substring(argsEndIndex + 1);
+
+ if (locationString.indexOf('@') === 0) {
+ var parts = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(locationString, '');
+ var fileName = parts[1];
+ var lineNumber = parts[2];
+ var columnNumber = parts[3];
+ }
+
+ return new StackFrame({
+ functionName: functionName,
+ args: args || undefined,
+ fileName: fileName,
+ lineNumber: lineNumber || undefined,
+ columnNumber: columnNumber || undefined
+ });
+ };
+
+ for (var i = 0; i < booleanProps.length; i++) {
+ StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);
+ StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {
+ return function(v) {
+ this[p] = Boolean(v);
+ };
+ })(booleanProps[i]);
+ }
+
+ for (var j = 0; j < numericProps.length; j++) {
+ StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);
+ StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {
+ return function(v) {
+ if (!_isNumber(v)) {
+ throw new TypeError(p + ' must be a Number');
+ }
+ this[p] = Number(v);
+ };
+ })(numericProps[j]);
+ }
+
+ for (var k = 0; k < stringProps.length; k++) {
+ StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);
+ StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {
+ return function(v) {
+ this[p] = String(v);
+ };
+ })(stringProps[k]);
+ }
-/*
- * typeName - Given a Javascript value, returns the type of the object as a string
- */
-function typeName(x) {
- var name = typeof x;
- if (name !== 'object') {
- return name;
- }
- if (!x) {
- return 'null';
- }
- if (x instanceof Error) {
- return 'error';
- }
- return ({}).toString.call(x).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
-}
+ return StackFrame;
+}));
-/* isFunction - a convenience function for checking if a value is a function
- *
- * @param f - any value
- * @returns true if f is a function, otherwise false
- */
-function isFunction(f) {
- 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');
-}
+/***/ 815:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-/* isString - Checks if the argument is a string
- *
- * @param value - any value
- * @returns true if value is a string
-*/
-function isString(value) {
- return typeof value === 'string' || value instanceof String
-}
+"use strict";
-/**
- * isFiniteNumber - determines whether the passed value is a finite number
- *
- * @param {*} n - any value
- * @returns true if value is a finite number
- */
- function isFiniteNumber(n) {
- return Number.isFinite(n);
-}
-/*
- * isDefined - a convenience function for checking if a value is not equal to undefined
- *
- * @param u - any value
- * @returns true if u is anything other than undefined
- */
-function isDefined(u) {
- return !isType(u, 'undefined');
-}
+var _ = __webpack_require__(702);
+var helpers = __webpack_require__(817);
-/*
- * isIterable - convenience function for checking if a value can be iterated, essentially
- * whether it is an object or an array.
- *
- * @param i - any value
- * @returns true if i is an object or an array as determined by `typeName`
- */
-function isIterable(i) {
- var type = typeName(i);
- return (type === 'object' || type === 'array');
-}
+var defaultOptions = {
+ hostname: 'api.rollbar.com',
+ path: '/api/1/item/',
+ search: null,
+ version: '1',
+ protocol: 'https:',
+ port: 443,
+};
-/*
- * isError - convenience function for checking if a value is of an error type
+/**
+ * Api is an object that encapsulates methods of communicating with
+ * the Rollbar API. It is a standard interface with some parts implemented
+ * differently for server or browser contexts. It is an object that should
+ * be instantiated when used so it can contain non-global options that may
+ * be different for another instance of RollbarApi.
*
- * @param e - any value
- * @returns true if e is an error
+ * @param options {
+ * accessToken: the accessToken to use for posting items to rollbar
+ * endpoint: an alternative endpoint to send errors to
+ * must be a valid, fully qualified URL.
+ * The default is: https://api.rollbar.com/api/1/item
+ * proxy: if you wish to proxy requests provide an object
+ * with the following keys:
+ * host or hostname (required): foo.example.com
+ * port (optional): 123
+ * protocol (optional): https
+ * }
*/
-function isError(e) {
- // Detect both Error and Firefox Exception type
- return isType(e, 'error') || isType(e, 'exception');
+function Api(options, transport, urllib, truncation, jsonBackup) {
+ this.options = options;
+ this.transport = transport;
+ this.url = urllib;
+ this.truncation = truncation;
+ this.jsonBackup = jsonBackup;
+ this.accessToken = options.accessToken;
+ this.transportOptions = _getTransport(options, urllib);
}
-/* isPromise - a convenience function for checking if a value is a promise
+/**
*
- * @param p - any value
- * @returns true if f is a function, otherwise false
+ * @param data
+ * @param callback
*/
-function isPromise(p) {
- return isObject(p) && isType(p.then, 'function');
-}
-
-function redact() {
- return '********';
-}
-
-// from http://stackoverflow.com/a/8809472/1138191
-function uuid4() {
- var d = now();
- var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
- var r = (d + Math.random() * 16) % 16 | 0;
- d = Math.floor(d / 16);
- return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);
- });
- return uuid;
-}
-
-var LEVELS = {
- debug: 0,
- info: 1,
- warning: 2,
- error: 3,
- critical: 4
-};
-
-function sanitizeUrl(url) {
- var baseUrlParts = parseUri(url);
- if (!baseUrlParts) {
- return '(unknown)';
- }
-
- // remove a trailing # if there is no anchor
- if (baseUrlParts.anchor === '') {
- baseUrlParts.source = baseUrlParts.source.replace('#', '');
- }
-
- url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');
- return url;
-}
+Api.prototype.postItem = function (data, callback) {
+ var transportOptions = helpers.transportOptions(
+ this.transportOptions,
+ 'POST',
+ );
+ var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);
+ var self = this;
-var parseUriOptions = {
- strictMode: false,
- 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*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
- }
+ // ensure the network request is scheduled after the current tick.
+ setTimeout(function () {
+ self.transport.post(self.accessToken, transportOptions, payload, callback);
+ }, 0);
};
-function parseUri(str) {
- if (!isType(str, 'string')) {
- return undefined;
- }
-
- var o = parseUriOptions;
- var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);
- var uri = {};
+/**
+ *
+ * @param data
+ * @param callback
+ */
+Api.prototype.buildJsonPayload = function (data, callback) {
+ var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);
- for (var i = 0, l = o.key.length; i < l; ++i) {
- uri[o.key[i]] = m[i] || '';
+ var stringifyResult;
+ if (this.truncation) {
+ stringifyResult = this.truncation.truncate(payload);
+ } else {
+ stringifyResult = _.stringify(payload);
}
- uri[o.q.name] = {};
- uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
- if ($1) {
- uri[o.q.name][$1] = $2;
+ if (stringifyResult.error) {
+ if (callback) {
+ callback(stringifyResult.error);
}
- });
+ return null;
+ }
- return uri;
-}
+ return stringifyResult.value;
+};
-function addParamsAndAccessTokenToPath(accessToken, options, params) {
- params = params || {};
- params.access_token = accessToken;
- var paramsArray = [];
- var k;
- for (k in params) {
- if (Object.prototype.hasOwnProperty.call(params, k)) {
- paramsArray.push([k, params[k]].join('='));
- }
- }
- var query = '?' + paramsArray.sort().join('&');
+/**
+ *
+ * @param jsonPayload
+ * @param callback
+ */
+Api.prototype.postJsonPayload = function (jsonPayload, callback) {
+ var transportOptions = helpers.transportOptions(
+ this.transportOptions,
+ 'POST',
+ );
+ this.transport.postJsonPayload(
+ this.accessToken,
+ transportOptions,
+ jsonPayload,
+ callback,
+ );
+};
- options = options || {};
- options.path = options.path || '';
- var qs = options.path.indexOf('?');
- var h = options.path.indexOf('#');
- var p;
- if (qs !== -1 && (h === -1 || h > qs)) {
- p = options.path;
- options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);
- } else {
- if (h !== -1) {
- p = options.path;
- options.path = p.substring(0,h) + query + p.substring(h);
- } else {
- options.path = options.path + query;
- }
+Api.prototype.configure = function (options) {
+ var oldOptions = this.oldOptions;
+ this.options = _.merge(oldOptions, options);
+ this.transportOptions = _getTransport(this.options, this.url);
+ if (this.options.accessToken !== undefined) {
+ this.accessToken = this.options.accessToken;
}
+ return this;
+};
+
+function _getTransport(options, url) {
+ return helpers.getTransportFromOptions(options, defaultOptions, url);
}
-function formatUrl(u, protocol) {
- protocol = protocol || u.protocol;
- if (!protocol && u.port) {
- if (u.port === 80) {
- protocol = 'http:';
- } else if (u.port === 443) {
- protocol = 'https:';
- }
- }
- protocol = protocol || 'https:';
+module.exports = Api;
- if (!u.hostname) {
- return null;
- }
- var result = protocol + '//' + u.hostname;
- if (u.port) {
- result = result + ':' + u.port;
- }
- if (u.path) {
- result = result + u.path;
- }
- return result;
-}
-function stringify(obj, backup) {
- var value, error;
- try {
- value = RollbarJSON.stringify(obj);
- } catch (jsonError) {
- if (backup && isFunction(backup)) {
- try {
- value = backup(obj);
- } catch (backupError) {
- error = backupError;
- }
+/***/ }),
+
+/***/ 817:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+var _ = __webpack_require__(702);
+
+function buildPayload(accessToken, data, jsonBackup) {
+ if (!_.isType(data.context, 'string')) {
+ var contextResult = _.stringify(data.context, jsonBackup);
+ if (contextResult.error) {
+ data.context = "Error: could not serialize 'context'";
} else {
- error = jsonError;
+ data.context = contextResult.value || '';
+ }
+ if (data.context.length > 255) {
+ data.context = data.context.substr(0, 255);
}
}
- return {error: error, value: value};
+ return {
+ access_token: accessToken,
+ data: data,
+ };
}
-function maxByteSize(string) {
- // The transport will use utf-8, so assume utf-8 encoding.
- //
- // This minimal implementation will accurately count bytes for all UCS-2 and
- // single code point UTF-16. If presented with multi code point UTF-16,
- // which should be rare, it will safely overcount, not undercount.
- //
- // While robust utf-8 encoders exist, this is far smaller and far more performant.
- // For quickly counting payload size for truncation, smaller is better.
-
- var count = 0;
- var length = string.length;
+function getTransportFromOptions(options, defaults, url) {
+ var hostname = defaults.hostname;
+ var protocol = defaults.protocol;
+ var port = defaults.port;
+ var path = defaults.path;
+ var search = defaults.search;
+ var timeout = options.timeout;
+ var transport = detectTransport(options);
- for (var i = 0; i < length; i++) {
- var code = string.charCodeAt(i);
- if (code < 128) { // up to 7 bits
- count = count + 1;
- } else if (code < 2048) { // up to 11 bits
- count = count + 2;
- } else if (code < 65536) { // up to 16 bits
- count = count + 3;
- }
+ var proxy = options.proxy;
+ if (options.endpoint) {
+ var opts = url.parse(options.endpoint);
+ hostname = opts.hostname;
+ protocol = opts.protocol;
+ port = opts.port;
+ path = opts.pathname;
+ search = opts.search;
}
-
- return count;
+ return {
+ timeout: timeout,
+ hostname: hostname,
+ protocol: protocol,
+ port: port,
+ path: path,
+ search: search,
+ proxy: proxy,
+ transport: transport,
+ };
}
-function jsonParse(s) {
- var value, error;
- try {
- value = RollbarJSON.parse(s);
- } catch (e) {
- error = e;
- }
- return {error: error, value: value};
+function detectTransport(options) {
+ var gWindow =
+ (typeof window != 'undefined' && window) ||
+ (typeof self != 'undefined' && self);
+ var transport = options.defaultTransport || 'xhr';
+ if (typeof gWindow.fetch === 'undefined') transport = 'xhr';
+ if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';
+ return transport;
}
-function makeUnhandledStackInfo(
- message,
- url,
- lineno,
- colno,
- error,
- mode,
- backupMessage,
- errorParser
-) {
- var location = {
- url: url || '',
- line: lineno,
- column: colno
- };
- location.func = errorParser.guessFunctionName(location.url, location.line);
- location.context = errorParser.gatherContext(location.url, location.line);
- var href = typeof document !== 'undefined' && document && document.location && document.location.href;
- var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;
+function transportOptions(transport, method) {
+ var protocol = transport.protocol || 'https:';
+ var port =
+ transport.port ||
+ (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);
+ var hostname = transport.hostname;
+ var path = transport.path;
+ var timeout = transport.timeout;
+ var transportAPI = transport.transport;
+ if (transport.search) {
+ path = path + transport.search;
+ }
+ if (transport.proxy) {
+ path = protocol + '//' + hostname + path;
+ hostname = transport.proxy.host || transport.proxy.hostname;
+ port = transport.proxy.port;
+ protocol = transport.proxy.protocol || protocol;
+ }
return {
- 'mode': mode,
- 'message': error ? String(error) : (message || backupMessage),
- 'url': href,
- 'stack': [location],
- 'useragent': useragent
+ timeout: timeout,
+ protocol: protocol,
+ hostname: hostname,
+ path: path,
+ port: port,
+ method: method,
+ transport: transportAPI,
};
}
-function wrapCallback(logger, f) {
- return function(err, resp) {
- try {
- f(err, resp);
- } catch (e) {
- logger.error(e);
- }
- };
+function appendPathToPath(base, path) {
+ var baseTrailingSlash = /\/$/.test(base);
+ var pathBeginningSlash = /^\//.test(path);
+
+ if (baseTrailingSlash && pathBeginningSlash) {
+ path = path.substring(1);
+ } else if (!baseTrailingSlash && !pathBeginningSlash) {
+ path = '/' + path;
+ }
+
+ return base + path;
}
-function createItem(args, logger, notifier, requestKeys, lambdaContext) {
- var message, err, custom, callback, request;
- var arg;
- var extraArgs = [];
- var diagnostic = {};
- var argTypes = [];
+module.exports = {
+ buildPayload: buildPayload,
+ getTransportFromOptions: getTransportFromOptions,
+ transportOptions: transportOptions,
+ appendPathToPath: appendPathToPath,
+};
- for (var i = 0, l = args.length; i < l; ++i) {
- arg = args[i];
- var typ = typeName(arg);
- argTypes.push(typ);
- switch (typ) {
- case 'undefined':
- break;
- case 'string':
- message ? extraArgs.push(arg) : message = arg;
- break;
- case 'function':
- callback = wrapCallback(logger, arg);
- break;
- case 'date':
- extraArgs.push(arg);
- break;
- case 'error':
- case 'domexception':
- case 'exception': // Firefox Exception type
- err ? extraArgs.push(arg) : err = arg;
- break;
- case 'object':
- case 'array':
- if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {
- err ? extraArgs.push(arg) : err = arg;
- break;
- }
- if (requestKeys && typ === 'object' && !request) {
- for (var j = 0, len = requestKeys.length; j < len; ++j) {
- if (arg[requestKeys[j]] !== undefined) {
- request = arg;
- break;
- }
- }
- if (request) {
- break;
- }
- }
- custom ? extraArgs.push(arg) : custom = arg;
- break;
- default:
- if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {
- err ? extraArgs.push(arg) : err = arg;
- break;
- }
- extraArgs.push(arg);
- }
- }
+/***/ }),
- if (extraArgs.length > 0) {
- // if custom is an array this turns it into an object with integer keys
- custom = merge(custom);
- custom.extraArgs = extraArgs;
- }
+/***/ 409:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- var item = {
- message: message,
- err: err,
- custom: custom,
- timestamp: now(),
- callback: callback,
- notifier: notifier,
- diagnostic: diagnostic,
- uuid: uuid4()
- };
+"use strict";
- setCustomItemKeys(item, custom);
- if (requestKeys && request) {
- item.request = request;
- }
- if (lambdaContext) {
- item.lambdaContext = lambdaContext;
- }
- item._originalArgs = args;
- item.diagnostic.original_arg_types = argTypes;
- return item;
+var rollbar = __webpack_require__(343);
+
+var options = (typeof window !== 'undefined') && window._rollbarConfig;
+var alias = options && options.globalAlias || 'Rollbar';
+var shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;
+
+if ((typeof window !== 'undefined') && !window._rollbarStartTime) {
+ window._rollbarStartTime = (new Date()).getTime();
+}
+
+if (!shimRunning && options) {
+ var Rollbar = new rollbar(options);
+ window[alias] = Rollbar;
+} else if (typeof window !== 'undefined') {
+ window.rollbar = rollbar;
+ window._rollbarDidLoad = true;
+} else if (typeof self !== 'undefined') {
+ self.rollbar = rollbar;
+ self._rollbarDidLoad = true;
}
-function setCustomItemKeys(item, custom) {
- if (custom && custom.level !== undefined) {
- item.level = custom.level;
- delete custom.level;
- }
- if (custom && custom.skipFrames !== undefined) {
- item.skipFrames = custom.skipFrames;
- delete custom.skipFrames;
- }
-}
+module.exports = rollbar;
-function addErrorContext(item, errors) {
- var custom = item.data.custom || {};
- var contextAdded = false;
- try {
- for (var i = 0; i < errors.length; ++i) {
- if (errors[i].hasOwnProperty('rollbarContext')) {
- custom = merge(custom, errors[i].rollbarContext);
- contextAdded = true;
- }
- }
+/***/ }),
- // Avoid adding an empty object to the data.
- if (contextAdded) {
- item.data.custom = custom;
- }
- } catch (e) {
- item.diagnostic.error_context = 'Failed: ' + e.message;
- }
-}
+/***/ 403:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-var TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];
-var TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];
+"use strict";
-function arrayIncludes(arr, val) {
- for (var k = 0; k < arr.length; ++k) {
- if (arr[k] === val) {
- return true;
- }
- }
- return false;
-}
+var Client = __webpack_require__(562);
+var _ = __webpack_require__(702);
+var API = __webpack_require__(815);
+var logger = __webpack_require__(802);
+var globals = __webpack_require__(349);
-function createTelemetryEvent(args) {
- var type, metadata, level;
- var arg;
+var Transport = __webpack_require__(477);
+var urllib = __webpack_require__(509);
- for (var i = 0, l = args.length; i < l; ++i) {
- arg = args[i];
+var transforms = __webpack_require__(860);
+var sharedTransforms = __webpack_require__(417);
+var predicates = __webpack_require__(172);
+var sharedPredicates = __webpack_require__(61);
+var errorParser = __webpack_require__(303);
- var typ = typeName(arg);
- switch (typ) {
- case 'string':
- if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {
- type = arg;
- } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {
- level = arg;
- }
- break;
- case 'object':
- metadata = arg;
- break;
- default:
- break;
- }
+function Rollbar(options, client) {
+ this.options = _.handleOptions(defaultOptions, options, null, logger);
+ this.options._configuredOptions = options;
+ var Telemeter = this.components.telemeter;
+ var Instrumenter = this.components.instrumenter;
+ var polyfillJSON = this.components.polyfillJSON;
+ this.wrapGlobals = this.components.wrapGlobals;
+ this.scrub = this.components.scrub;
+ var truncation = this.components.truncation;
+
+ var transport = new Transport(truncation);
+ var api = new API(this.options, transport, urllib, truncation);
+ if (Telemeter) {
+ this.telemeter = new Telemeter(this.options);
}
- var event = {
- type: type || 'manual',
- metadata: metadata || {},
- level: level
- };
+ this.client =
+ client || new Client(this.options, api, logger, this.telemeter, 'browser');
+ var gWindow = _gWindow();
+ var gDocument = typeof document != 'undefined' && document;
+ this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers
+ this.anonymousErrorsPending = 0;
+ addTransformsToNotifier(this.client.notifier, this, gWindow);
+ addPredicatesToQueue(this.client.queue);
+ this.setupUnhandledCapture();
+ if (Instrumenter) {
+ this.instrumenter = new Instrumenter(
+ this.options,
+ this.client.telemeter,
+ this,
+ gWindow,
+ gDocument,
+ );
+ this.instrumenter.instrument();
+ }
+ _.setupJSON(polyfillJSON);
- return event;
+ // Used with rollbar-react for rollbar-react-native compatibility.
+ this.rollbar = this;
}
-/*
- * get - given an obj/array and a keypath, return the value at that keypath or
- * undefined if not possible.
- *
- * @param obj - an object or array
- * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'
- * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`
- */
-function get(obj, path) {
- if (!obj) {
- return undefined;
+var _instance = null;
+Rollbar.init = function (options, client) {
+ if (_instance) {
+ return _instance.global(options).configure(options);
}
- var keys = path.split('.');
- var result = obj;
- try {
- for (var i = 0, len = keys.length; i < len; ++i) {
- result = result[keys[i]];
- }
- } catch (e) {
- result = undefined;
+ _instance = new Rollbar(options, client);
+ return _instance;
+};
+
+Rollbar.prototype.components = {};
+
+Rollbar.setComponents = function (components) {
+ Rollbar.prototype.components = components;
+};
+
+function handleUninitialized(maybeCallback) {
+ var message = 'Rollbar is not initialized';
+ logger.error(message);
+ if (maybeCallback) {
+ maybeCallback(new Error(message));
}
- return result;
}
-function set(obj, path, value) {
- if (!obj) {
- return;
+Rollbar.prototype.global = function (options) {
+ this.client.global(options);
+ return this;
+};
+Rollbar.global = function (options) {
+ if (_instance) {
+ return _instance.global(options);
+ } else {
+ handleUninitialized();
}
- var keys = path.split('.');
- var len = keys.length;
- if (len < 1) {
- return;
+};
+
+Rollbar.prototype.configure = function (options, payloadData) {
+ var oldOptions = this.options;
+ var payload = {};
+ if (payloadData) {
+ payload = { payload: payloadData };
}
- if (len === 1) {
- obj[keys[0]] = value;
- return;
+ this.options = _.handleOptions(oldOptions, options, payload, logger);
+ this.options._configuredOptions = _.handleOptions(
+ oldOptions._configuredOptions,
+ options,
+ payload,
+ );
+ this.client.configure(this.options, payloadData);
+ this.instrumenter && this.instrumenter.configure(this.options);
+ this.setupUnhandledCapture();
+ return this;
+};
+Rollbar.configure = function (options, payloadData) {
+ if (_instance) {
+ return _instance.configure(options, payloadData);
+ } else {
+ handleUninitialized();
}
- try {
- var temp = obj[keys[0]] || {};
- var replacement = temp;
- for (var i = 1; i < len - 1; ++i) {
- temp[keys[i]] = temp[keys[i]] || {};
- temp = temp[keys[i]];
- }
- temp[keys[len-1]] = value;
- obj[keys[0]] = replacement;
- } catch (e) {
- return;
+};
+
+Rollbar.prototype.lastError = function () {
+ return this.client.lastError;
+};
+Rollbar.lastError = function () {
+ if (_instance) {
+ return _instance.lastError();
+ } else {
+ handleUninitialized();
}
-}
+};
-function formatArgsAsString(args) {
- var i, len, arg;
- var result = [];
- for (i = 0, len = args.length; i < len; ++i) {
- arg = args[i];
- switch (typeName(arg)) {
- case 'object':
- arg = stringify(arg);
- arg = arg.error || arg.value;
- if (arg.length > 500) {
- arg = arg.substr(0, 497) + '...';
- }
- break;
- case 'null':
- arg = 'null';
- break;
- case 'undefined':
- arg = 'undefined';
- break;
- case 'symbol':
- arg = arg.toString();
- break;
- }
- result.push(arg);
+Rollbar.prototype.log = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.log(item);
+ return { uuid: uuid };
+};
+Rollbar.log = function () {
+ if (_instance) {
+ return _instance.log.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
+ }
+};
+
+Rollbar.prototype.debug = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.debug(item);
+ return { uuid: uuid };
+};
+Rollbar.debug = function () {
+ if (_instance) {
+ return _instance.debug.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
+ }
+};
+
+Rollbar.prototype.info = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.info(item);
+ return { uuid: uuid };
+};
+Rollbar.info = function () {
+ if (_instance) {
+ return _instance.info.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
+ }
+};
+
+Rollbar.prototype.warn = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.warn(item);
+ return { uuid: uuid };
+};
+Rollbar.warn = function () {
+ if (_instance) {
+ return _instance.warn.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
+ }
+};
+
+Rollbar.prototype.warning = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.warning(item);
+ return { uuid: uuid };
+};
+Rollbar.warning = function () {
+ if (_instance) {
+ return _instance.warning.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
}
- return result.join(' ');
-}
+};
-function now() {
- if (Date.now) {
- return +Date.now();
+Rollbar.prototype.error = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.error(item);
+ return { uuid: uuid };
+};
+Rollbar.error = function () {
+ if (_instance) {
+ return _instance.error.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
}
- return +new Date();
-}
+};
-function filterIp(requestData, captureIp) {
- if (!requestData || !requestData['user_ip'] || captureIp === true) {
- return;
+Rollbar.prototype.critical = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.critical(item);
+ return { uuid: uuid };
+};
+Rollbar.critical = function () {
+ if (_instance) {
+ return _instance.critical.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
}
- var newIp = requestData['user_ip'];
- if (!captureIp) {
- newIp = null;
+};
+
+Rollbar.prototype.buildJsonPayload = function (item) {
+ return this.client.buildJsonPayload(item);
+};
+Rollbar.buildJsonPayload = function () {
+ if (_instance) {
+ return _instance.buildJsonPayload.apply(_instance, arguments);
} else {
- try {
- var parts;
- if (newIp.indexOf('.') !== -1) {
- parts = newIp.split('.');
- parts.pop();
- parts.push('0');
- newIp = parts.join('.');
- } else if (newIp.indexOf(':') !== -1) {
- parts = newIp.split(':');
- if (parts.length > 2) {
- var beginning = parts.slice(0, 3);
- var slashIdx = beginning[2].indexOf('/');
- if (slashIdx !== -1) {
- beginning[2] = beginning[2].substring(0, slashIdx);
- }
- var terminal = '0000:0000:0000:0000:0000';
- newIp = beginning.concat(terminal).join(':');
- }
- } else {
- newIp = null;
+ handleUninitialized();
+ }
+};
+
+Rollbar.prototype.sendJsonPayload = function (jsonPayload) {
+ return this.client.sendJsonPayload(jsonPayload);
+};
+Rollbar.sendJsonPayload = function () {
+ if (_instance) {
+ return _instance.sendJsonPayload.apply(_instance, arguments);
+ } else {
+ handleUninitialized();
+ }
+};
+
+Rollbar.prototype.setupUnhandledCapture = function () {
+ var gWindow = _gWindow();
+
+ if (!this.unhandledExceptionsInitialized) {
+ if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {
+ globals.captureUncaughtExceptions(gWindow, this);
+ if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {
+ this.wrapGlobals(gWindow, this);
}
- } catch (e) {
- newIp = null;
+ this.unhandledExceptionsInitialized = true;
}
}
- requestData['user_ip'] = newIp;
-}
+ if (!this.unhandledRejectionsInitialized) {
+ if (
+ this.options.captureUnhandledRejections ||
+ this.options.handleUnhandledRejections
+ ) {
+ globals.captureUnhandledRejections(gWindow, this);
+ this.unhandledRejectionsInitialized = true;
+ }
+ }
+};
-function handleOptions(current, input, payload, logger) {
- var result = merge(current, input, payload);
- result = updateDeprecatedOptions(result, logger);
- if (!input || input.overwriteScrubFields) {
- return result;
+Rollbar.prototype.handleUncaughtException = function (
+ message,
+ url,
+ lineno,
+ colno,
+ error,
+ context,
+) {
+ if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {
+ return;
}
- if (input.scrubFields) {
- result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);
+
+ // Chrome will always send 5+ arguments and error will be valid or null, not undefined.
+ // If error is undefined, we have a different caller.
+ // Chrome also sends errors from web workers with null error, but does not invoke
+ // prepareStackTrace() for these. Test for empty url to skip them.
+ if (
+ this.options.inspectAnonymousErrors &&
+ this.isChrome &&
+ error === null &&
+ url === ''
+ ) {
+ return 'anonymous';
}
- return result;
-}
-function updateDeprecatedOptions(options, logger) {
- if(options.hostWhiteList && !options.hostSafeList) {
- options.hostSafeList = options.hostWhiteList;
- options.hostWhiteList = undefined;
- logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');
+ var item;
+ var stackInfo = _.makeUnhandledStackInfo(
+ message,
+ url,
+ lineno,
+ colno,
+ error,
+ 'onerror',
+ 'uncaught exception',
+ errorParser,
+ );
+ if (_.isError(error)) {
+ item = this._createItem([message, error, context]);
+ item._unhandledStackInfo = stackInfo;
+ } else if (_.isError(url)) {
+ item = this._createItem([message, url, context]);
+ item._unhandledStackInfo = stackInfo;
+ } else {
+ item = this._createItem([message, context]);
+ item.stackInfo = stackInfo;
}
- if(options.hostBlackList && !options.hostBlockList) {
- options.hostBlockList = options.hostBlackList;
- options.hostBlackList = undefined;
- logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');
+ item.level = this.options.uncaughtErrorLevel;
+ item._isUncaught = true;
+ this.client.log(item);
+};
+
+/**
+ * Chrome only. Other browsers will ignore.
+ *
+ * Use Error.prepareStackTrace to extract information about errors that
+ * do not have a valid error object in onerror().
+ *
+ * In tested version of Chrome, onerror is called first but has no way
+ * to communicate with prepareStackTrace. Use a counter to let this
+ * handler know which errors to send to Rollbar.
+ *
+ * In config options, set inspectAnonymousErrors to enable.
+ */
+Rollbar.prototype.handleAnonymousErrors = function () {
+ if (!this.options.inspectAnonymousErrors || !this.isChrome) {
+ return;
}
- return options;
-}
-module.exports = {
- addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,
- createItem: createItem,
- addErrorContext: addErrorContext,
- createTelemetryEvent: createTelemetryEvent,
- filterIp: filterIp,
- formatArgsAsString: formatArgsAsString,
- formatUrl: formatUrl,
- get: get,
- handleOptions: handleOptions,
- isError: isError,
- isFiniteNumber: isFiniteNumber,
- isFunction: isFunction,
- isIterable: isIterable,
- isNativeFunction: isNativeFunction,
- isObject: isObject,
- isString: isString,
- isType: isType,
- isPromise: isPromise,
- jsonParse: jsonParse,
- LEVELS: LEVELS,
- makeUnhandledStackInfo: makeUnhandledStackInfo,
- merge: merge,
- now: now,
- redact: redact,
- RollbarJSON: RollbarJSON,
- sanitizeUrl: sanitizeUrl,
- set: set,
- setupJSON: setupJSON,
- stringify: stringify,
- maxByteSize: maxByteSize,
- typeName: typeName,
- uuid4: uuid4
-};
+ var r = this;
+ function prepareStackTrace(error, _stack) {
+ // eslint-disable-line no-unused-vars
+ if (r.options.inspectAnonymousErrors) {
+ if (r.anonymousErrorsPending) {
+ // This is the only known way to detect that onerror saw an anonymous error.
+ // It depends on onerror reliably being called before Error.prepareStackTrace,
+ // which so far holds true on tested versions of Chrome. If versions of Chrome
+ // are tested that behave differently, this logic will need to be updated
+ // accordingly.
+ r.anonymousErrorsPending -= 1;
+ if (!error) {
+ // Not likely to get here, but calling handleUncaughtException from here
+ // without an error object would throw off the anonymousErrorsPending counter,
+ // so return now.
+ return;
+ }
-/***/ }),
-/* 1 */
-/***/ (function(module, exports, __webpack_require__) {
+ // Allow this to be tracked later.
+ error._isAnonymous = true;
-"use strict";
+ // url, lineno, colno shouldn't be needed for these errors.
+ // If that changes, update this accordingly, using the unused
+ // _stack param as needed (rather than parse error.toString()).
+ r.handleUncaughtException(error.message, null, null, null, error);
+ }
+ }
+ // Workaround to ensure stack is preserved for normal errors.
+ return error.stack;
+ }
-/* eslint-disable no-console */
-__webpack_require__(16);
-var detection = __webpack_require__(17);
-var _ = __webpack_require__(0);
+ // https://v8.dev/docs/stack-trace-api
+ try {
+ Error.prepareStackTrace = prepareStackTrace;
+ } catch (e) {
+ this.options.inspectAnonymousErrors = false;
+ this.error('anonymous error handler failed', e);
+ }
+};
-function error() {
- var args = Array.prototype.slice.call(arguments, 0);
- args.unshift('Rollbar:');
- if (detection.ieVersion() <= 8) {
- console.error(_.formatArgsAsString(args));
- } else {
- console.error.apply(console, args);
+Rollbar.prototype.handleUnhandledRejection = function (reason, promise) {
+ if (
+ !this.options.captureUnhandledRejections &&
+ !this.options.handleUnhandledRejections
+ ) {
+ return;
}
-}
-function info() {
- var args = Array.prototype.slice.call(arguments, 0);
- args.unshift('Rollbar:');
- if (detection.ieVersion() <= 8) {
- console.info(_.formatArgsAsString(args));
- } else {
- console.info.apply(console, args);
+ var message = 'unhandled rejection was null or undefined!';
+ if (reason) {
+ if (reason.message) {
+ message = reason.message;
+ } else {
+ var reasonResult = _.stringify(reason);
+ if (reasonResult.value) {
+ message = reasonResult.value;
+ }
+ }
}
-}
+ var context =
+ (reason && reason._rollbarContext) || (promise && promise._rollbarContext);
-function log() {
- var args = Array.prototype.slice.call(arguments, 0);
- args.unshift('Rollbar:');
- if (detection.ieVersion() <= 8) {
- console.log(_.formatArgsAsString(args));
+ var item;
+ if (_.isError(reason)) {
+ item = this._createItem([message, reason, context]);
} else {
- console.log.apply(console, args);
+ item = this._createItem([message, reason, context]);
+ item.stackInfo = _.makeUnhandledStackInfo(
+ message,
+ '',
+ 0,
+ 0,
+ null,
+ 'unhandledrejection',
+ '',
+ errorParser,
+ );
}
-}
-
-/* eslint-enable no-console */
-
-module.exports = {
- error: error,
- info: info,
- log: log
+ item.level = this.options.uncaughtErrorLevel;
+ item._isUncaught = true;
+ item._originalArgs = item._originalArgs || [];
+ item._originalArgs.push(promise);
+ this.client.log(item);
};
+Rollbar.prototype.wrap = function (f, context, _before) {
+ try {
+ var ctxFn;
+ if (_.isFunction(context)) {
+ ctxFn = context;
+ } else {
+ ctxFn = function () {
+ return context || {};
+ };
+ }
-/***/ }),
-/* 2 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (!_.isFunction(f)) {
+ return f;
+ }
-"use strict";
+ if (f._isWrap) {
+ return f;
+ }
+ if (!f._rollbar_wrapped) {
+ f._rollbar_wrapped = function () {
+ if (_before && _.isFunction(_before)) {
+ _before.apply(this, arguments);
+ }
+ try {
+ return f.apply(this, arguments);
+ } catch (exc) {
+ var e = exc;
+ if (e && window._rollbarWrappedError !== e) {
+ if (_.isType(e, 'string')) {
+ e = new String(e);
+ }
+ e._rollbarContext = ctxFn() || {};
+ e._rollbarContext._wrappedSource = f.toString();
-// See https://nodejs.org/docs/latest/api/url.html
-function parse(url) {
- var result = {
- protocol: null, auth: null, host: null, path: null,
- hash: null, href: url, hostname: null, port: null,
- pathname: null, search: null, query: null
- };
+ window._rollbarWrappedError = e;
+ }
+ throw e;
+ }
+ };
- var i, last;
- i = url.indexOf('//');
- if (i !== -1) {
- result.protocol = url.substring(0,i);
- last = i+2;
- } else {
- last = 0;
- }
-
- i = url.indexOf('@', last);
- if (i !== -1) {
- result.auth = url.substring(last, i);
- last = i+1;
- }
+ f._rollbar_wrapped._isWrap = true;
- i = url.indexOf('/', last);
- if (i === -1) {
- i = url.indexOf('?', last);
- if (i === -1) {
- i = url.indexOf('#', last);
- if (i === -1) {
- result.host = url.substring(last);
- } else {
- result.host = url.substring(last, i);
- result.hash = url.substring(i);
- }
- result.hostname = result.host.split(':')[0];
- result.port = result.host.split(':')[1];
- if (result.port) {
- result.port = parseInt(result.port, 10);
- }
- return result;
- } else {
- result.host = url.substring(last, i);
- result.hostname = result.host.split(':')[0];
- result.port = result.host.split(':')[1];
- if (result.port) {
- result.port = parseInt(result.port, 10);
+ if (f.hasOwnProperty) {
+ for (var prop in f) {
+ if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {
+ f._rollbar_wrapped[prop] = f[prop];
+ }
+ }
}
- last = i;
}
+
+ return f._rollbar_wrapped;
+ } catch (e) {
+ // Return the original function if the wrap fails.
+ return f;
+ }
+};
+Rollbar.wrap = function (f, context) {
+ if (_instance) {
+ return _instance.wrap(f, context);
} else {
- result.host = url.substring(last, i);
- result.hostname = result.host.split(':')[0];
- result.port = result.host.split(':')[1];
- if (result.port) {
- result.port = parseInt(result.port, 10);
- }
- last = i;
+ handleUninitialized();
}
+};
- i = url.indexOf('#', last);
- if (i === -1) {
- result.path = url.substring(last);
+Rollbar.prototype.captureEvent = function () {
+ var event = _.createTelemetryEvent(arguments);
+ return this.client.captureEvent(event.type, event.metadata, event.level);
+};
+Rollbar.captureEvent = function () {
+ if (_instance) {
+ return _instance.captureEvent.apply(_instance, arguments);
} else {
- result.path = url.substring(last, i);
- result.hash = url.substring(i);
+ handleUninitialized();
}
+};
- if (result.path) {
- var pathParts = result.path.split('?');
- result.pathname = pathParts[0];
- result.query = pathParts[1];
- result.search = result.query ? '?' + result.query : null;
+// The following two methods are used internally and are not meant for public use
+Rollbar.prototype.captureDomContentLoaded = function (e, ts) {
+ if (!ts) {
+ ts = new Date();
}
- return result;
-}
-
-module.exports = {
- parse: parse
+ return this.client.captureDomContentLoaded(ts);
};
+Rollbar.prototype.captureLoad = function (e, ts) {
+ if (!ts) {
+ ts = new Date();
+ }
+ return this.client.captureLoad(ts);
+};
-/***/ }),
-/* 3 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var ErrorStackParser = __webpack_require__(21);
-
-var UNKNOWN_FUNCTION = '?';
-var ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');
+/* Internal */
-function guessFunctionName() {
- return UNKNOWN_FUNCTION;
+function addTransformsToNotifier(notifier, rollbar, gWindow) {
+ notifier
+ .addTransform(transforms.handleDomException)
+ .addTransform(transforms.handleItemWithError)
+ .addTransform(transforms.ensureItemHasSomethingToSay)
+ .addTransform(transforms.addBaseInfo)
+ .addTransform(transforms.addRequestInfo(gWindow))
+ .addTransform(transforms.addClientInfo(gWindow))
+ .addTransform(transforms.addPluginInfo(gWindow))
+ .addTransform(transforms.addBody)
+ .addTransform(sharedTransforms.addMessageWithError)
+ .addTransform(sharedTransforms.addTelemetryData)
+ .addTransform(sharedTransforms.addConfigToPayload)
+ .addTransform(transforms.addScrubber(rollbar.scrub))
+ .addTransform(sharedTransforms.addPayloadOptions)
+ .addTransform(sharedTransforms.userTransform(logger))
+ .addTransform(sharedTransforms.addConfiguredOptions)
+ .addTransform(sharedTransforms.addDiagnosticKeys)
+ .addTransform(sharedTransforms.itemToPayload);
}
-
-function gatherContext() {
- return null;
+function addPredicatesToQueue(queue) {
+ queue
+ .addPredicate(sharedPredicates.checkLevel)
+ .addPredicate(predicates.checkIgnore)
+ .addPredicate(sharedPredicates.userCheckIgnore(logger))
+ .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))
+ .addPredicate(sharedPredicates.urlIsSafeListed(logger))
+ .addPredicate(sharedPredicates.messageIsIgnored(logger));
}
+Rollbar.prototype.loadFull = function () {
+ logger.info(
+ 'Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.',
+ );
+};
-function Frame(stackFrame) {
- var data = {};
-
- data._stackFrame = stackFrame;
-
- data.url = stackFrame.fileName;
- data.line = stackFrame.lineNumber;
- data.func = stackFrame.functionName;
- data.column = stackFrame.columnNumber;
- data.args = stackFrame.args;
+Rollbar.prototype._createItem = function (args) {
+ return _.createItem(args, logger, this);
+};
- data.context = gatherContext();
+function _getFirstFunction(args) {
+ for (var i = 0, len = args.length; i < len; ++i) {
+ if (_.isFunction(args[i])) {
+ return args[i];
+ }
+ }
+ return undefined;
+}
- return data;
+function _gWindow() {
+ return (
+ (typeof window != 'undefined' && window) ||
+ (typeof self != 'undefined' && self)
+ );
}
+var defaults = __webpack_require__(948);
+var scrubFields = __webpack_require__(677);
-function Stack(exception, skip) {
- function getStack() {
- var parserStack = [];
+var defaultOptions = {
+ version: defaults.version,
+ scrubFields: scrubFields.scrubFields,
+ logLevel: defaults.logLevel,
+ reportLevel: defaults.reportLevel,
+ uncaughtErrorLevel: defaults.uncaughtErrorLevel,
+ endpoint: defaults.endpoint,
+ verbose: false,
+ enabled: true,
+ transmit: true,
+ sendConfig: false,
+ includeItemsInTelemetry: true,
+ captureIp: true,
+ inspectAnonymousErrors: true,
+ ignoreDuplicateErrors: true,
+ wrapGlobalEventHandlers: false,
+};
- skip = skip || 0;
+module.exports = Rollbar;
- try {
- parserStack = ErrorStackParser.parse(exception);
- } catch(e) {
- parserStack = [];
- }
- var stack = [];
+/***/ }),
- for (var i = skip; i < parserStack.length; i++) {
- stack.push(new Frame(parserStack[i]));
- }
+/***/ 677:
+/***/ ((module) => {
- return stack;
- }
+"use strict";
- return {
- stack: getStack(),
- message: exception.message,
- name: _mostSpecificErrorName(exception),
- rawStack: exception.stack,
- rawException: exception
- };
-}
+module.exports = {
+ scrubFields: [
+ 'pw',
+ 'pass',
+ 'passwd',
+ 'password',
+ 'secret',
+ 'confirm_password',
+ 'confirmPassword',
+ 'password_confirmation',
+ 'passwordConfirmation',
+ 'access_token',
+ 'accessToken',
+ 'X-Rollbar-Access-Token',
+ 'secret_key',
+ 'secretKey',
+ 'secretToken',
+ 'cc-number',
+ 'card number',
+ 'cardnumber',
+ 'cardnum',
+ 'ccnum',
+ 'ccnumber',
+ 'cc num',
+ 'creditcardnumber',
+ 'credit card number',
+ 'newcreditcardnumber',
+ 'new credit card',
+ 'creditcardno',
+ 'credit card no',
+ 'card#',
+ 'card #',
+ 'cc-csc',
+ 'cvc',
+ 'cvc2',
+ 'cvv2',
+ 'ccv2',
+ 'security code',
+ 'card verification',
+ 'name on credit card',
+ 'name on card',
+ 'nameoncard',
+ 'cardholder',
+ 'card holder',
+ 'name des karteninhabers',
+ 'ccname',
+ 'card type',
+ 'cardtype',
+ 'cc type',
+ 'cctype',
+ 'payment type',
+ 'expiration date',
+ 'expirationdate',
+ 'expdate',
+ 'cc-exp',
+ 'ccmonth',
+ 'ccyear',
+ ],
+};
-function parse(e, skip) {
- var err = e;
- if (err.nested) {
- var traceChain = [];
- while (err) {
- traceChain.push(new Stack(err, skip));
- err = err.nested;
+/***/ }),
- skip = 0; // Only apply skip value to primary error
- }
+/***/ 616:
+/***/ ((module) => {
- // Return primary error with full trace chain attached.
- traceChain[0].traceChain = traceChain;
- return traceChain[0];
- } else {
- return new Stack(err, skip);
- }
-}
+"use strict";
-function guessErrorClass(errMsg) {
- if (!errMsg || !errMsg.match) {
- return ['Unknown error. There was no error message to display.', ''];
- }
- var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);
- var errClass = '(unknown)';
+// This detection.js module is used to encapsulate any ugly browser/feature
+// detection we may need to do.
- if (errClassMatch) {
- errClass = errClassMatch[errClassMatch.length - 1];
- errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');
- errMsg = errMsg.replace(/(^[\s]+|[\s]+$)/g, '');
+// Figure out which version of IE we're using, if any.
+// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library
+// Will return an integer on IE (i.e. 8)
+// Will return undefined otherwise
+function getIEVersion() {
+ var undef;
+ if (typeof document === 'undefined') {
+ return undef;
}
- return [errClass, errMsg];
-}
-// * Prefers any value over an empty string
-// * Prefers any value over 'Error' where possible
-// * Prefers name over constructor.name when both are more specific than 'Error'
-function _mostSpecificErrorName(error) {
- var name = error.name && error.name.length && error.name;
- var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;
+ var v = 3,
+ div = document.createElement('div'),
+ all = div.getElementsByTagName('i');
- if (!name || !constructorName) {
- return name || constructorName;
- }
+ while (
+ ((div.innerHTML = ''), all[0])
+ );
- if (name === 'Error') {
- return constructorName;
- }
- return name;
+ return v > 4 ? v : undef;
}
-module.exports = {
- guessFunctionName: guessFunctionName,
- guessErrorClass: guessErrorClass,
- gatherContext: gatherContext,
- parse: parse,
- Stack: Stack,
- Frame: Frame
+var Detection = {
+ ieVersion: getIEVersion,
};
+module.exports = Detection;
+
/***/ }),
-/* 4 */
-/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+/***/ 300:
+/***/ ((module) => {
+"use strict";
-var _ = __webpack_require__(0);
-var traverse = __webpack_require__(5);
-function scrub(data, scrubFields, scrubPaths) {
- scrubFields = scrubFields || [];
+function getElementType(e) {
+ return (e.getAttribute('type') || '').toLowerCase();
+}
- if (scrubPaths) {
- for (var i = 0; i < scrubPaths.length; ++i) {
- scrubPath(data, scrubPaths[i]);
- }
+function isDescribedElement(element, type, subtypes) {
+ if (element.tagName.toLowerCase() !== type.toLowerCase()) {
+ return false;
}
-
- var paramRes = _getScrubFieldRegexs(scrubFields);
- var queryRes = _getScrubQueryParamRegexs(scrubFields);
-
- function redactQueryParam(dummy0, paramPart) {
- return paramPart + _.redact();
+ if (!subtypes) {
+ return true;
}
-
- function paramScrubber(v) {
- var i;
- if (_.isType(v, 'string')) {
- for (i = 0; i < queryRes.length; ++i) {
- v = v.replace(queryRes[i], redactQueryParam);
- }
+ element = getElementType(element);
+ for (var i = 0; i < subtypes.length; i++) {
+ if (subtypes[i] === element) {
+ return true;
}
- return v;
}
+ return false;
+}
- function valScrubber(k, v) {
- var i;
- for (i = 0; i < paramRes.length; ++i) {
- if (paramRes[i].test(k)) {
- v = _.redact();
- break;
- }
- }
- return v;
+function getElementFromEvent(evt, doc) {
+ if (evt.target) {
+ return evt.target;
+ }
+ if (doc && doc.elementFromPoint) {
+ return doc.elementFromPoint(evt.clientX, evt.clientY);
}
+ return undefined;
+}
- function scrubber(k, v, seen) {
- var tmpV = valScrubber(k, v);
- if (tmpV === v) {
- if (_.isType(v, 'object') || _.isType(v, 'array')) {
- return traverse(v, scrubber, seen);
- }
- return paramScrubber(tmpV);
- } else {
- return tmpV;
+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 traverse(data, scrubber);
+ return out;
}
-function scrubPath(obj, path) {
- var keys = path.split('.');
- var last = keys.length - 1;
- try {
- for (var i = 0; i <= last; ++i) {
- if (i < last) {
- obj = obj[keys[i]];
- } else {
- obj[keys[i]] = _.redact();
- }
+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;
}
- } catch (e) {
- // Missing key is OK;
+ out.unshift(nextStr);
+ len += nextStr.length;
}
+ return out.join(separator);
}
-function _getScrubFieldRegexs(scrubFields) {
- var ret = [];
- var pat;
- for (var i = 0; i < scrubFields.length; ++i) {
- pat = '^\\[?(%5[bB])?' + scrubFields[i] + '\\[?(%5[bB])?\\]?(%5[dD])?$';
- ret.push(new RegExp(pat, 'i'));
+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 ret;
-}
+ return out.join('');
+}
-function _getScrubQueryParamRegexs(scrubFields) {
- var ret = [];
- var pat;
- for (var i = 0; i < scrubFields.length; ++i) {
- pat = '\\[?(%5[bB])?' + scrubFields[i] + '\\[?(%5[bB])?\\]?(%5[dD])?';
- ret.push(new RegExp('(' + pat + '=)([^&\\n]+)', 'igm'));
+/**
+ * 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;
}
- return ret;
+ 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 = scrub;
+module.exports = {
+ describeElement: describeElement,
+ descriptionToString: descriptionToString,
+ elementArrayToString: elementArrayToString,
+ treeToArray: treeToArray,
+ getElementFromEvent: getElementFromEvent,
+ isDescribedElement: isDescribedElement,
+ getElementType: getElementType,
+};
/***/ }),
-/* 5 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var _ = __webpack_require__(0);
+/***/ 349:
+/***/ ((module) => {
-function traverse(obj, func, seen) {
- var k, v, i;
- var isObj = _.isType(obj, 'object');
- var isArray = _.isType(obj, 'array');
- var keys = [];
- var seenIndex;
+"use strict";
- // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.
- seen = seen || { obj: [], mapped: []};
- if (isObj) {
- seenIndex = seen.obj.indexOf(obj);
+function captureUncaughtExceptions(window, handler, shim) {
+ if (!window) {
+ return;
+ }
+ var oldOnError;
- if (isObj && seenIndex !== -1) {
- // Prefer the mapped object if there is one.
- return seen.mapped[seenIndex] || seen.obj[seenIndex];
+ if (typeof handler._rollbarOldOnError === 'function') {
+ oldOnError = handler._rollbarOldOnError;
+ } else if (window.onerror) {
+ oldOnError = window.onerror;
+ while (oldOnError._rollbarOldOnError) {
+ oldOnError = oldOnError._rollbarOldOnError;
}
+ handler._rollbarOldOnError = oldOnError;
+ }
- seen.obj.push(obj);
- seenIndex = seen.obj.length - 1;
+ handler.handleAnonymousErrors();
+
+ var fn = function () {
+ var args = Array.prototype.slice.call(arguments, 0);
+ _rollbarWindowOnError(window, handler, oldOnError, args);
+ };
+ if (shim) {
+ fn._rollbarOldOnError = oldOnError;
}
+ window.onerror = fn;
+}
- if (isObj) {
- for (k in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, k)) {
- keys.push(k);
- }
+function _rollbarWindowOnError(window, r, old, args) {
+ if (window._rollbarWrappedError) {
+ if (!args[4]) {
+ args[4] = window._rollbarWrappedError;
}
- } else if (isArray) {
- for (i = 0; i < obj.length; ++i) {
- keys.push(i);
+ if (!args[5]) {
+ args[5] = window._rollbarWrappedError._rollbarContext;
}
+ window._rollbarWrappedError = null;
}
- var result = isObj ? {} : [];
- var same = true;
- for (i = 0; i < keys.length; ++i) {
- k = keys[i];
- v = obj[k];
- result[k] = func(k, v, seen);
- same = same && result[k] === obj[k];
- }
+ var ret = r.handleUncaughtException.apply(r, args);
- if (isObj && !same) {
- seen.mapped[seenIndex] = result;
+ if (old) {
+ old.apply(window, args);
}
- return !same ? result : obj;
+ // Let other chained onerror handlers above run before setting this.
+ // If an error is thrown and caught within a chained onerror handler,
+ // Error.prepareStackTrace() will see that one before the one we want.
+ if (ret === 'anonymous') {
+ r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()
+ }
}
-module.exports = traverse;
-
-
-/***/ }),
-/* 6 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var rollbar = __webpack_require__(7);
+function captureUnhandledRejections(window, handler, shim) {
+ if (!window) {
+ return;
+ }
-var options = (typeof window !== 'undefined') && window._rollbarConfig;
-var alias = options && options.globalAlias || 'Rollbar';
-var shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;
+ if (
+ typeof window._rollbarURH === 'function' &&
+ window._rollbarURH.belongsToShim
+ ) {
+ window.removeEventListener('unhandledrejection', window._rollbarURH);
+ }
-if ((typeof window !== 'undefined') && !window._rollbarStartTime) {
- window._rollbarStartTime = (new Date()).getTime();
-}
+ var rejectionHandler = function (evt) {
+ var reason, promise, detail;
+ try {
+ reason = evt.reason;
+ } catch (e) {
+ reason = undefined;
+ }
+ try {
+ promise = evt.promise;
+ } catch (e) {
+ promise = '[unhandledrejection] error getting `promise` from event';
+ }
+ try {
+ detail = evt.detail;
+ if (!reason && detail) {
+ reason = detail.reason;
+ promise = detail.promise;
+ }
+ } catch (e) {
+ // Ignore
+ }
+ if (!reason) {
+ reason = '[unhandledrejection] error getting `reason` from event';
+ }
-if (!shimRunning && options) {
- var Rollbar = new rollbar(options);
- window[alias] = Rollbar;
-} else if (typeof window !== 'undefined') {
- window.rollbar = rollbar;
- window._rollbarDidLoad = true;
-} else if (typeof self !== 'undefined') {
- self.rollbar = rollbar;
- self._rollbarDidLoad = true;
+ if (handler && handler.handleUnhandledRejection) {
+ handler.handleUnhandledRejection(reason, promise);
+ }
+ };
+ rejectionHandler.belongsToShim = shim;
+ window._rollbarURH = rejectionHandler;
+ window.addEventListener('unhandledrejection', rejectionHandler);
}
-module.exports = rollbar;
+module.exports = {
+ captureUncaughtExceptions: captureUncaughtExceptions,
+ captureUnhandledRejections: captureUnhandledRejections,
+};
/***/ }),
-/* 7 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var Rollbar = __webpack_require__(8);
-var telemeter = __webpack_require__(28);
-var instrumenter = __webpack_require__(29);
-var polyfillJSON = __webpack_require__(31);
-var wrapGlobals = __webpack_require__(33);
-var scrub = __webpack_require__(4);
-var truncation = __webpack_require__(34);
-
-Rollbar.setComponents({
- telemeter: telemeter,
- instrumenter: instrumenter,
- polyfillJSON: polyfillJSON,
- wrapGlobals: wrapGlobals,
- scrub: scrub,
- truncation: truncation
-});
-
-module.exports = Rollbar;
-
-/***/ }),
-/* 8 */
-/***/ (function(module, exports, __webpack_require__) {
+/***/ 802:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var Client = __webpack_require__(9);
-var _ = __webpack_require__(0);
-var API = __webpack_require__(14);
-var logger = __webpack_require__(1);
-var globals = __webpack_require__(18);
-
-var Transport = __webpack_require__(19);
-var urllib = __webpack_require__(2);
-
-var transforms = __webpack_require__(20);
-var sharedTransforms = __webpack_require__(23);
-var predicates = __webpack_require__(24);
-var sharedPredicates = __webpack_require__(25);
-var errorParser = __webpack_require__(3);
+/* eslint-disable no-console */
+__webpack_require__(276);
+var detection = __webpack_require__(616);
+var _ = __webpack_require__(702);
-function Rollbar(options, client) {
- this.options = _.handleOptions(defaultOptions, options, null, logger);
- this.options._configuredOptions = options;
- var Telemeter = this.components.telemeter;
- var Instrumenter = this.components.instrumenter;
- var polyfillJSON = this.components.polyfillJSON;
- this.wrapGlobals = this.components.wrapGlobals;
- this.scrub = this.components.scrub;
- var truncation = this.components.truncation;
+function error() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ args.unshift('Rollbar:');
+ if (detection.ieVersion() <= 8) {
+ console.error(_.formatArgsAsString(args));
+ } else {
+ console.error.apply(console, args);
+ }
+}
- var transport = new Transport(truncation);
- var api = new API(this.options, transport, urllib, truncation);
- if (Telemeter) {
- this.telemeter = new Telemeter(this.options);
+function info() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ args.unshift('Rollbar:');
+ if (detection.ieVersion() <= 8) {
+ console.info(_.formatArgsAsString(args));
+ } else {
+ console.info.apply(console, args);
}
- this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');
- var gWindow = _gWindow();
- var gDocument = (typeof document != 'undefined') && document;
- this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers
- this.anonymousErrorsPending = 0;
- addTransformsToNotifier(this.client.notifier, this, gWindow);
- addPredicatesToQueue(this.client.queue);
- this.setupUnhandledCapture();
- if (Instrumenter) {
- this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);
- this.instrumenter.instrument();
+}
+
+function log() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ args.unshift('Rollbar:');
+ if (detection.ieVersion() <= 8) {
+ console.log(_.formatArgsAsString(args));
+ } else {
+ console.log.apply(console, args);
}
- _.setupJSON(polyfillJSON);
}
-var _instance = null;
-Rollbar.init = function(options, client) {
- if (_instance) {
- return _instance.global(options).configure(options);
- }
- _instance = new Rollbar(options, client);
- return _instance;
+/* eslint-enable no-console */
+
+module.exports = {
+ error: error,
+ info: info,
+ log: log,
};
-Rollbar.prototype.components = {};
-Rollbar.setComponents = function(components) {
- Rollbar.prototype.components = components;
-}
+/***/ }),
-function handleUninitialized(maybeCallback) {
- var message = 'Rollbar is not initialized';
- logger.error(message);
- if (maybeCallback) {
- maybeCallback(new Error(message));
+/***/ 172:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+var _ = __webpack_require__(702);
+
+function checkIgnore(item, settings) {
+ if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {
+ return !_.get(item, 'body.message.extra.isAjax');
}
+ return true;
}
-Rollbar.prototype.global = function(options) {
- this.client.global(options);
- return this;
-};
-Rollbar.global = function(options) {
- if (_instance) {
- return _instance.global(options);
- } else {
- handleUninitialized();
- }
+module.exports = {
+ checkIgnore: checkIgnore,
};
-Rollbar.prototype.configure = function(options, payloadData) {
- var oldOptions = this.options;
- var payload = {};
- if (payloadData) {
- payload = {payload: payloadData};
- }
- this.options = _.handleOptions(oldOptions, options, payload, logger);
- this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);
- this.client.configure(this.options, payloadData);
- this.instrumenter && this.instrumenter.configure(this.options);
- this.setupUnhandledCapture();
- return this;
-};
-Rollbar.configure = function(options, payloadData) {
- if (_instance) {
- return _instance.configure(options, payloadData);
- } else {
- handleUninitialized();
- }
-};
-Rollbar.prototype.lastError = function() {
- return this.client.lastError;
-};
-Rollbar.lastError = function() {
- if (_instance) {
- return _instance.lastError();
- } else {
- handleUninitialized();
- }
-};
+/***/ }),
-Rollbar.prototype.log = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.log(item);
- return {uuid: uuid};
-};
-Rollbar.log = function() {
- if (_instance) {
- return _instance.log.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
- }
-};
+/***/ 343:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-Rollbar.prototype.debug = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.debug(item);
- return {uuid: uuid};
-};
-Rollbar.debug = function() {
- if (_instance) {
- return _instance.debug.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
- }
-};
+"use strict";
-Rollbar.prototype.info = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.info(item);
- return {uuid: uuid};
-};
-Rollbar.info = function() {
- if (_instance) {
- return _instance.info.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
- }
-};
-Rollbar.prototype.warn = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.warn(item);
- return {uuid: uuid};
-};
-Rollbar.warn = function() {
- if (_instance) {
- return _instance.warn.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
- }
-};
+var Rollbar = __webpack_require__(403);
+var telemeter = __webpack_require__(773);
+var instrumenter = __webpack_require__(568);
+var polyfillJSON = __webpack_require__(876);
+var wrapGlobals = __webpack_require__(965);
+var scrub = __webpack_require__(369);
+var truncation = __webpack_require__(473);
-Rollbar.prototype.warning = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.warning(item);
- return {uuid: uuid};
-};
-Rollbar.warning = function() {
- if (_instance) {
- return _instance.warning.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
- }
-};
+Rollbar.setComponents({
+ telemeter: telemeter,
+ instrumenter: instrumenter,
+ polyfillJSON: polyfillJSON,
+ wrapGlobals: wrapGlobals,
+ scrub: scrub,
+ truncation: truncation,
+});
-Rollbar.prototype.error = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.error(item);
- return {uuid: uuid};
+module.exports = Rollbar;
+
+
+/***/ }),
+
+/***/ 568:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+var _ = __webpack_require__(702);
+var headers = __webpack_require__(650);
+var replace = __webpack_require__(297);
+var scrub = __webpack_require__(369);
+var urlparser = __webpack_require__(509);
+var domUtil = __webpack_require__(300);
+
+var defaults = {
+ network: true,
+ networkResponseHeaders: false,
+ networkResponseBody: false,
+ networkRequestHeaders: false,
+ networkRequestBody: false,
+ networkErrorOnHttp5xx: false,
+ networkErrorOnHttp4xx: false,
+ networkErrorOnHttp0: false,
+ log: true,
+ dom: true,
+ navigation: true,
+ connectivity: true,
+ contentSecurityPolicy: true,
+ errorOnContentSecurityPolicy: false,
};
-Rollbar.error = function() {
- if (_instance) {
- return _instance.error.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
+
+function restore(replacements, type) {
+ var b;
+ while (replacements[type].length) {
+ b = replacements[type].shift();
+ b[0][b[1]] = b[2];
}
-};
+}
-Rollbar.prototype.critical = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.critical(item);
- return {uuid: uuid};
-};
-Rollbar.critical = function() {
- if (_instance) {
- return _instance.critical.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
+function nameFromDescription(description) {
+ if (!description || !description.attributes) {
+ return null;
}
-};
+ var attrs = description.attributes;
+ for (var a = 0; a < attrs.length; ++a) {
+ if (attrs[a].key === 'name') {
+ return attrs[a].value;
+ }
+ }
+ return null;
+}
-Rollbar.prototype.buildJsonPayload = function(item) {
- return this.client.buildJsonPayload(item);
-};
-Rollbar.buildJsonPayload = function() {
- if (_instance) {
- return _instance.buildJsonPayload.apply(_instance, arguments);
- } else {
- handleUninitialized();
+function defaultValueScrubber(scrubFields) {
+ var patterns = [];
+ for (var i = 0; i < scrubFields.length; ++i) {
+ patterns.push(new RegExp(scrubFields[i], 'i'));
}
-};
+ return function (description) {
+ var name = nameFromDescription(description);
+ if (!name) {
+ return false;
+ }
+ for (var i = 0; i < patterns.length; ++i) {
+ if (patterns[i].test(name)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
-Rollbar.prototype.sendJsonPayload = function(jsonPayload) {
- return this.client.sendJsonPayload(jsonPayload);
-};
-Rollbar.sendJsonPayload = function() {
- if (_instance) {
- return _instance.sendJsonPayload.apply(_instance, arguments);
+function Instrumenter(options, telemeter, rollbar, _window, _document) {
+ this.options = options;
+ var autoInstrument = options.autoInstrument;
+ if (options.enabled === false || autoInstrument === false) {
+ this.autoInstrument = {};
} else {
- handleUninitialized();
+ if (!_.isType(autoInstrument, 'object')) {
+ autoInstrument = defaults;
+ }
+ this.autoInstrument = _.merge(defaults, autoInstrument);
}
-};
-
-Rollbar.prototype.setupUnhandledCapture = function() {
- var gWindow = _gWindow();
-
- if (!this.unhandledExceptionsInitialized) {
- if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {
- globals.captureUncaughtExceptions(gWindow, this);
- if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {
- this.wrapGlobals(gWindow, this);
- }
- this.unhandledExceptionsInitialized = true;
+ this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;
+ this.telemetryScrubber = options.telemetryScrubber;
+ this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);
+ this.telemeter = telemeter;
+ this.rollbar = rollbar;
+ this.diagnostic = rollbar.client.notifier.diagnostic;
+ this._window = _window || {};
+ this._document = _document || {};
+ this.replacements = {
+ network: [],
+ log: [],
+ navigation: [],
+ connectivity: [],
+ };
+ this.eventRemovers = {
+ dom: [],
+ connectivity: [],
+ contentsecuritypolicy: [],
+ };
+
+ this._location = this._window.location;
+ this._lastHref = this._location && this._location.href;
+}
+
+Instrumenter.prototype.configure = function (options) {
+ this.options = _.merge(this.options, options);
+ var autoInstrument = options.autoInstrument;
+ var oldSettings = _.merge(this.autoInstrument);
+ if (options.enabled === false || autoInstrument === false) {
+ this.autoInstrument = {};
+ } else {
+ if (!_.isType(autoInstrument, 'object')) {
+ autoInstrument = defaults;
}
+ this.autoInstrument = _.merge(defaults, autoInstrument);
}
- if (!this.unhandledRejectionsInitialized) {
- if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {
- globals.captureUnhandledRejections(gWindow, this);
- this.unhandledRejectionsInitialized = true;
- }
+ this.instrument(oldSettings);
+ if (options.scrubTelemetryInputs !== undefined) {
+ this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;
+ }
+ if (options.telemetryScrubber !== undefined) {
+ this.telemetryScrubber = options.telemetryScrubber;
}
};
-Rollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {
- if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {
- return;
+// eslint-disable-next-line complexity
+Instrumenter.prototype.instrument = function (oldSettings) {
+ if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {
+ this.instrumentNetwork();
+ } else if (
+ !this.autoInstrument.network &&
+ oldSettings &&
+ oldSettings.network
+ ) {
+ this.deinstrumentNetwork();
}
- // Chrome will always send 5+ arguments and error will be valid or null, not undefined.
- // If error is undefined, we have a different caller.
- // Chrome also sends errors from web workers with null error, but does not invoke
- // prepareStackTrace() for these. Test for empty url to skip them.
- if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {
- return 'anonymous';
+ if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {
+ this.instrumentConsole();
+ } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {
+ this.deinstrumentConsole();
}
- var item;
- var stackInfo = _.makeUnhandledStackInfo(
- message,
- url,
- lineno,
- colno,
- error,
- 'onerror',
- 'uncaught exception',
- errorParser
- );
- if (_.isError(error)) {
- item = this._createItem([message, error, context]);
- item._unhandledStackInfo = stackInfo;
- } else if (_.isError(url)) {
- item = this._createItem([message, url, context]);
- item._unhandledStackInfo = stackInfo;
- } else {
- item = this._createItem([message, context]);
- item.stackInfo = stackInfo;
+ if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {
+ this.instrumentDom();
+ } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {
+ this.deinstrumentDom();
}
- item.level = this.options.uncaughtErrorLevel;
- item._isUncaught = true;
- this.client.log(item);
-};
-/**
- * Chrome only. Other browsers will ignore.
- *
- * Use Error.prepareStackTrace to extract information about errors that
- * do not have a valid error object in onerror().
- *
- * In tested version of Chrome, onerror is called first but has no way
- * to communicate with prepareStackTrace. Use a counter to let this
- * handler know which errors to send to Rollbar.
- *
- * In config options, set inspectAnonymousErrors to enable.
- */
-Rollbar.prototype.handleAnonymousErrors = function() {
- if (!this.options.inspectAnonymousErrors || !this.isChrome) {
- return;
+ if (
+ this.autoInstrument.navigation &&
+ !(oldSettings && oldSettings.navigation)
+ ) {
+ this.instrumentNavigation();
+ } else if (
+ !this.autoInstrument.navigation &&
+ oldSettings &&
+ oldSettings.navigation
+ ) {
+ this.deinstrumentNavigation();
}
- var r = this;
- function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars
- if (r.options.inspectAnonymousErrors) {
- if (r.anonymousErrorsPending) {
- // This is the only known way to detect that onerror saw an anonymous error.
- // It depends on onerror reliably being called before Error.prepareStackTrace,
- // which so far holds true on tested versions of Chrome. If versions of Chrome
- // are tested that behave differently, this logic will need to be updated
- // accordingly.
- r.anonymousErrorsPending -= 1;
-
- if (!error) {
- // Not likely to get here, but calling handleUncaughtException from here
- // without an error object would throw off the anonymousErrorsPending counter,
- // so return now.
- return;
- }
-
- // Allow this to be tracked later.
- error._isAnonymous = true;
-
- // url, lineno, colno shouldn't be needed for these errors.
- // If that changes, update this accordingly, using the unused
- // _stack param as needed (rather than parse error.toString()).
- r.handleUncaughtException(error.message, null, null, null, error);
- }
- }
-
- // Workaround to ensure stack is preserved for normal errors.
- return error.stack;
+ if (
+ this.autoInstrument.connectivity &&
+ !(oldSettings && oldSettings.connectivity)
+ ) {
+ this.instrumentConnectivity();
+ } else if (
+ !this.autoInstrument.connectivity &&
+ oldSettings &&
+ oldSettings.connectivity
+ ) {
+ this.deinstrumentConnectivity();
}
- // https://v8.dev/docs/stack-trace-api
- try {
- Error.prepareStackTrace = prepareStackTrace;
- } catch (e) {
- this.options.inspectAnonymousErrors = false;
- this.error('anonymous error handler failed', e);
+ if (
+ this.autoInstrument.contentSecurityPolicy &&
+ !(oldSettings && oldSettings.contentSecurityPolicy)
+ ) {
+ this.instrumentContentSecurityPolicy();
+ } else if (
+ !this.autoInstrument.contentSecurityPolicy &&
+ oldSettings &&
+ oldSettings.contentSecurityPolicy
+ ) {
+ this.deinstrumentContentSecurityPolicy();
}
-}
+};
-Rollbar.prototype.handleUnhandledRejection = function(reason, promise) {
- if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {
- return;
- }
+Instrumenter.prototype.deinstrumentNetwork = function () {
+ restore(this.replacements, 'network');
+};
- var message = 'unhandled rejection was null or undefined!';
- if (reason) {
- if (reason.message) {
- message = reason.message;
- } else {
- var reasonResult = _.stringify(reason);
- if (reasonResult.value) {
- message = reasonResult.value;
- }
+Instrumenter.prototype.instrumentNetwork = function () {
+ var self = this;
+
+ function wrapProp(prop, xhr) {
+ if (prop in xhr && _.isFunction(xhr[prop])) {
+ replace(xhr, prop, function (orig) {
+ return self.rollbar.wrap(orig);
+ });
}
}
- var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);
- var item;
- if (_.isError(reason)) {
- item = this._createItem([message, reason, context]);
- } else {
- item = this._createItem([message, reason, context]);
- item.stackInfo = _.makeUnhandledStackInfo(
- message,
- '',
- 0,
- 0,
- null,
- 'unhandledrejection',
- '',
- errorParser
+ if ('XMLHttpRequest' in this._window) {
+ var xhrp = this._window.XMLHttpRequest.prototype;
+ replace(
+ xhrp,
+ 'open',
+ function (orig) {
+ return function (method, url) {
+ var isUrlObject = _isUrlObject(url);
+ if (_.isType(url, 'string') || isUrlObject) {
+ url = isUrlObject ? url.toString() : url;
+ if (this.__rollbar_xhr) {
+ this.__rollbar_xhr.method = method;
+ this.__rollbar_xhr.url = url;
+ this.__rollbar_xhr.status_code = null;
+ this.__rollbar_xhr.start_time_ms = _.now();
+ this.__rollbar_xhr.end_time_ms = null;
+ } else {
+ this.__rollbar_xhr = {
+ method: method,
+ url: url,
+ status_code: null,
+ start_time_ms: _.now(),
+ end_time_ms: null,
+ };
+ }
+ }
+ return orig.apply(this, arguments);
+ };
+ },
+ this.replacements,
+ 'network',
);
- }
- item.level = this.options.uncaughtErrorLevel;
- item._isUncaught = true;
- item._originalArgs = item._originalArgs || [];
- item._originalArgs.push(promise);
- this.client.log(item);
-};
-
-Rollbar.prototype.wrap = function(f, context, _before) {
- try {
- var ctxFn;
- if(_.isFunction(context)) {
- ctxFn = context;
- } else {
- ctxFn = function() { return context || {}; };
- }
-
- if (!_.isFunction(f)) {
- return f;
- }
- if (f._isWrap) {
- return f;
- }
+ replace(
+ xhrp,
+ 'setRequestHeader',
+ function (orig) {
+ return function (header, value) {
+ // If xhr.open is async, __rollbar_xhr may not be initialized yet.
+ if (!this.__rollbar_xhr) {
+ this.__rollbar_xhr = {};
+ }
+ if (_.isType(header, 'string') && _.isType(value, 'string')) {
+ if (self.autoInstrument.networkRequestHeaders) {
+ if (!this.__rollbar_xhr.request_headers) {
+ this.__rollbar_xhr.request_headers = {};
+ }
+ this.__rollbar_xhr.request_headers[header] = value;
+ }
+ // We want the content type even if request header telemetry is off.
+ if (header.toLowerCase() === 'content-type') {
+ this.__rollbar_xhr.request_content_type = value;
+ }
+ }
+ return orig.apply(this, arguments);
+ };
+ },
+ this.replacements,
+ 'network',
+ );
- if (!f._rollbar_wrapped) {
- f._rollbar_wrapped = function () {
- if (_before && _.isFunction(_before)) {
- _before.apply(this, arguments);
- }
- try {
- return f.apply(this, arguments);
- } catch(exc) {
- var e = exc;
- if (e && window._rollbarWrappedError !== e) {
- if (_.isType(e, 'string')) {
- e = new String(e);
+ replace(
+ xhrp,
+ 'send',
+ function (orig) {
+ /* eslint-disable no-unused-vars */
+ return function (data) {
+ /* eslint-enable no-unused-vars */
+ var xhr = this;
+
+ function onreadystatechangeHandler() {
+ if (xhr.__rollbar_xhr) {
+ if (xhr.__rollbar_xhr.status_code === null) {
+ xhr.__rollbar_xhr.status_code = 0;
+ if (self.autoInstrument.networkRequestBody) {
+ xhr.__rollbar_xhr.request = data;
+ }
+ xhr.__rollbar_event = self.captureNetwork(
+ xhr.__rollbar_xhr,
+ 'xhr',
+ undefined,
+ );
+ }
+ if (xhr.readyState < 2) {
+ xhr.__rollbar_xhr.start_time_ms = _.now();
+ }
+ if (xhr.readyState > 3) {
+ xhr.__rollbar_xhr.end_time_ms = _.now();
+
+ var headers = null;
+ xhr.__rollbar_xhr.response_content_type =
+ xhr.getResponseHeader('Content-Type');
+ if (self.autoInstrument.networkResponseHeaders) {
+ var headersConfig =
+ self.autoInstrument.networkResponseHeaders;
+ headers = {};
+ try {
+ var header, i;
+ if (headersConfig === true) {
+ var allHeaders = xhr.getAllResponseHeaders();
+ if (allHeaders) {
+ var arr = allHeaders.trim().split(/[\r\n]+/);
+ var parts, value;
+ for (i = 0; i < arr.length; i++) {
+ parts = arr[i].split(': ');
+ header = parts.shift();
+ value = parts.join(': ');
+ headers[header] = value;
+ }
+ }
+ } else {
+ for (i = 0; i < headersConfig.length; i++) {
+ header = headersConfig[i];
+ headers[header] = xhr.getResponseHeader(header);
+ }
+ }
+ } catch (e) {
+ /* we ignore the errors here that could come from different
+ * browser issues with the xhr methods */
+ }
+ }
+ var body = null;
+ if (self.autoInstrument.networkResponseBody) {
+ try {
+ body = xhr.responseText;
+ } catch (e) {
+ /* ignore errors from reading responseText */
+ }
+ }
+ var response = null;
+ if (body || headers) {
+ response = {};
+ if (body) {
+ if (
+ self.isJsonContentType(
+ xhr.__rollbar_xhr.response_content_type,
+ )
+ ) {
+ response.body = self.scrubJson(body);
+ } else {
+ response.body = body;
+ }
+ }
+ if (headers) {
+ response.headers = headers;
+ }
+ }
+ if (response) {
+ xhr.__rollbar_xhr.response = response;
+ }
+ try {
+ var code = xhr.status;
+ code = code === 1223 ? 204 : code;
+ xhr.__rollbar_xhr.status_code = code;
+ xhr.__rollbar_event.level =
+ self.telemeter.levelFromStatus(code);
+ self.errorOnHttpStatus(xhr.__rollbar_xhr);
+ } catch (e) {
+ /* ignore possible exception from xhr.status */
+ }
+ }
}
- e._rollbarContext = ctxFn() || {};
- e._rollbarContext._wrappedSource = f.toString();
+ }
- window._rollbarWrappedError = e;
+ wrapProp('onload', xhr);
+ wrapProp('onerror', xhr);
+ wrapProp('onprogress', xhr);
+
+ if (
+ 'onreadystatechange' in xhr &&
+ _.isFunction(xhr.onreadystatechange)
+ ) {
+ replace(xhr, 'onreadystatechange', function (orig) {
+ return self.rollbar.wrap(
+ orig,
+ undefined,
+ onreadystatechangeHandler,
+ );
+ });
+ } else {
+ xhr.onreadystatechange = onreadystatechangeHandler;
}
- throw e;
- }
- };
+ if (xhr.__rollbar_xhr && self.trackHttpErrors()) {
+ xhr.__rollbar_xhr.stack = new Error().stack;
+ }
+ return orig.apply(this, arguments);
+ };
+ },
+ this.replacements,
+ 'network',
+ );
+ }
- f._rollbar_wrapped._isWrap = true;
+ if ('fetch' in this._window) {
+ replace(
+ this._window,
+ 'fetch',
+ function (orig) {
+ /* eslint-disable no-unused-vars */
+ return function (fn, t) {
+ /* eslint-enable no-unused-vars */
+ var args = new Array(arguments.length);
+ for (var i = 0, len = args.length; i < len; i++) {
+ args[i] = arguments[i];
+ }
+ var input = args[0];
+ var method = 'GET';
+ var url;
+ var isUrlObject = _isUrlObject(input);
+ if (_.isType(input, 'string') || isUrlObject) {
+ url = isUrlObject ? input.toString() : input;
+ } else if (input) {
+ url = input.url;
+ if (input.method) {
+ method = input.method;
+ }
+ }
+ if (args[1] && args[1].method) {
+ method = args[1].method;
+ }
+ var metadata = {
+ method: method,
+ url: url,
+ status_code: null,
+ start_time_ms: _.now(),
+ end_time_ms: null,
+ };
+ if (args[1] && args[1].headers) {
+ // Argument may be a Headers object, or plain object. Ensure here that
+ // we are working with a Headers object with case-insensitive keys.
+ var reqHeaders = headers(args[1].headers);
+
+ metadata.request_content_type = reqHeaders.get('Content-Type');
+
+ if (self.autoInstrument.networkRequestHeaders) {
+ metadata.request_headers = self.fetchHeaders(
+ reqHeaders,
+ self.autoInstrument.networkRequestHeaders,
+ );
+ }
+ }
- if (f.hasOwnProperty) {
- for (var prop in f) {
- if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {
- f._rollbar_wrapped[prop] = f[prop];
+ if (self.autoInstrument.networkRequestBody) {
+ if (args[1] && args[1].body) {
+ metadata.request = args[1].body;
+ } else if (
+ args[0] &&
+ !_.isType(args[0], 'string') &&
+ args[0].body
+ ) {
+ metadata.request = args[0].body;
+ }
+ }
+ self.captureNetwork(metadata, 'fetch', undefined);
+ if (self.trackHttpErrors()) {
+ metadata.stack = new Error().stack;
}
- }
- }
- }
- return f._rollbar_wrapped;
- } catch (e) {
- // Return the original function if the wrap fails.
- return f;
+ // Start our handler before returning the promise. This allows resp.clone()
+ // to execute before other handlers touch the response.
+ return orig.apply(this, args).then(function (resp) {
+ metadata.end_time_ms = _.now();
+ metadata.status_code = resp.status;
+ metadata.response_content_type = resp.headers.get('Content-Type');
+ var headers = null;
+ if (self.autoInstrument.networkResponseHeaders) {
+ headers = self.fetchHeaders(
+ resp.headers,
+ self.autoInstrument.networkResponseHeaders,
+ );
+ }
+ var body = null;
+ if (self.autoInstrument.networkResponseBody) {
+ if (typeof resp.text === 'function') {
+ // Response.text() is not implemented on some platforms
+ // The response must be cloned to prevent reading (and locking) the original stream.
+ // This must be done before other handlers touch the response.
+ body = resp.clone().text(); //returns a Promise
+ }
+ }
+ if (headers || body) {
+ metadata.response = {};
+ if (body) {
+ // Test to ensure body is a Promise, which it should always be.
+ if (typeof body.then === 'function') {
+ body.then(function (text) {
+ if (
+ text &&
+ self.isJsonContentType(metadata.response_content_type)
+ ) {
+ metadata.response.body = self.scrubJson(text);
+ } else {
+ metadata.response.body = text;
+ }
+ });
+ } else {
+ metadata.response.body = body;
+ }
+ }
+ if (headers) {
+ metadata.response.headers = headers;
+ }
+ }
+ self.errorOnHttpStatus(metadata);
+ return resp;
+ });
+ };
+ },
+ this.replacements,
+ 'network',
+ );
}
};
-Rollbar.wrap = function(f, context) {
- if (_instance) {
- return _instance.wrap(f, context);
- } else {
- handleUninitialized();
+
+Instrumenter.prototype.captureNetwork = function (
+ metadata,
+ subtype,
+ rollbarUUID,
+) {
+ if (
+ metadata.request &&
+ this.isJsonContentType(metadata.request_content_type)
+ ) {
+ metadata.request = this.scrubJson(metadata.request);
}
+ return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);
};
-Rollbar.prototype.captureEvent = function() {
- var event = _.createTelemetryEvent(arguments);
- return this.client.captureEvent(event.type, event.metadata, event.level);
-};
-Rollbar.captureEvent = function() {
- if (_instance) {
- return _instance.captureEvent.apply(_instance, arguments);
- } else {
- handleUninitialized();
- }
+Instrumenter.prototype.isJsonContentType = function (contentType) {
+ return contentType &&
+ _.isType(contentType, 'string') &&
+ contentType.toLowerCase().includes('json')
+ ? true
+ : false;
};
-// The following two methods are used internally and are not meant for public use
-Rollbar.prototype.captureDomContentLoaded = function(e, ts) {
- if (!ts) {
- ts = new Date();
- }
- return this.client.captureDomContentLoaded(ts);
+Instrumenter.prototype.scrubJson = function (json) {
+ return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));
};
-Rollbar.prototype.captureLoad = function(e, ts) {
- if (!ts) {
- ts = new Date();
+Instrumenter.prototype.fetchHeaders = function (inHeaders, headersConfig) {
+ var outHeaders = {};
+ try {
+ var i;
+ if (headersConfig === true) {
+ if (typeof inHeaders.entries === 'function') {
+ // Headers.entries() is not implemented in IE
+ var allHeaders = inHeaders.entries();
+ var currentHeader = allHeaders.next();
+ while (!currentHeader.done) {
+ outHeaders[currentHeader.value[0]] = currentHeader.value[1];
+ currentHeader = allHeaders.next();
+ }
+ }
+ } else {
+ for (i = 0; i < headersConfig.length; i++) {
+ var header = headersConfig[i];
+ outHeaders[header] = inHeaders.get(header);
+ }
+ }
+ } catch (e) {
+ /* ignore probable IE errors */
}
- return this.client.captureLoad(ts);
+ return outHeaders;
};
-/* Internal */
-
-function addTransformsToNotifier(notifier, rollbar, gWindow) {
- notifier
- .addTransform(transforms.handleDomException)
- .addTransform(transforms.handleItemWithError)
- .addTransform(transforms.ensureItemHasSomethingToSay)
- .addTransform(transforms.addBaseInfo)
- .addTransform(transforms.addRequestInfo(gWindow))
- .addTransform(transforms.addClientInfo(gWindow))
- .addTransform(transforms.addPluginInfo(gWindow))
- .addTransform(transforms.addBody)
- .addTransform(sharedTransforms.addMessageWithError)
- .addTransform(sharedTransforms.addTelemetryData)
- .addTransform(sharedTransforms.addConfigToPayload)
- .addTransform(transforms.addScrubber(rollbar.scrub))
- .addTransform(sharedTransforms.userTransform(logger))
- .addTransform(sharedTransforms.addConfiguredOptions)
- .addTransform(sharedTransforms.addDiagnosticKeys)
- .addTransform(sharedTransforms.itemToPayload);
-}
+Instrumenter.prototype.trackHttpErrors = function () {
+ return (
+ this.autoInstrument.networkErrorOnHttp5xx ||
+ this.autoInstrument.networkErrorOnHttp4xx ||
+ this.autoInstrument.networkErrorOnHttp0
+ );
+};
-function addPredicatesToQueue(queue) {
- queue
- .addPredicate(sharedPredicates.checkLevel)
- .addPredicate(predicates.checkIgnore)
- .addPredicate(sharedPredicates.userCheckIgnore(logger))
- .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))
- .addPredicate(sharedPredicates.urlIsSafeListed(logger))
- .addPredicate(sharedPredicates.messageIsIgnored(logger));
-}
+Instrumenter.prototype.errorOnHttpStatus = function (metadata) {
+ var status = metadata.status_code;
-Rollbar.prototype.loadFull = function() {
- logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');
+ if (
+ (status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||
+ (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||
+ (status === 0 && this.autoInstrument.networkErrorOnHttp0)
+ ) {
+ var error = new Error('HTTP request failed with Status ' + status);
+ error.stack = metadata.stack;
+ this.rollbar.error(error, { skipFrames: 1 });
+ }
};
-Rollbar.prototype._createItem = function(args) {
- return _.createItem(args, logger, this);
+Instrumenter.prototype.deinstrumentConsole = function () {
+ if (!('console' in this._window && this._window.console.log)) {
+ return;
+ }
+ var b;
+ while (this.replacements['log'].length) {
+ b = this.replacements['log'].shift();
+ this._window.console[b[0]] = b[1];
+ }
};
-function _getFirstFunction(args) {
- for (var i = 0, len = args.length; i < len; ++i) {
- if (_.isFunction(args[i])) {
- return args[i];
- }
+Instrumenter.prototype.instrumentConsole = function () {
+ if (!('console' in this._window && this._window.console.log)) {
+ return;
}
- return undefined;
-}
-function _gWindow() {
- return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);
-}
+ var self = this;
+ var c = this._window.console;
-var defaults = __webpack_require__(26);
-var scrubFields = __webpack_require__(27);
+ function wrapConsole(method) {
+ 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778
-var defaultOptions = {
- version: defaults.version,
- scrubFields: scrubFields.scrubFields,
- logLevel: defaults.logLevel,
- reportLevel: defaults.reportLevel,
- uncaughtErrorLevel: defaults.uncaughtErrorLevel,
- endpoint: defaults.endpoint,
- verbose: false,
- enabled: true,
- transmit: true,
- sendConfig: false,
- includeItemsInTelemetry: true,
- captureIp: true,
- inspectAnonymousErrors: true,
- ignoreDuplicateErrors: true,
- wrapGlobalEventHandlers: false
+ var orig = c[method];
+ var origConsole = c;
+ var level = method === 'warn' ? 'warning' : method;
+ c[method] = function () {
+ var args = Array.prototype.slice.call(arguments);
+ var message = _.formatArgsAsString(args);
+ self.telemeter.captureLog(message, level);
+ if (orig) {
+ Function.prototype.apply.call(orig, origConsole, args);
+ }
+ };
+ self.replacements['log'].push([method, orig]);
+ }
+ var methods = ['debug', 'info', 'warn', 'error', 'log'];
+ try {
+ for (var i = 0, len = methods.length; i < len; i++) {
+ wrapConsole(methods[i]);
+ }
+ } catch (e) {
+ this.diagnostic.instrumentConsole = { error: e.message };
+ }
};
-module.exports = Rollbar;
-
-
-/***/ }),
-/* 9 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var RateLimiter = __webpack_require__(10);
-var Queue = __webpack_require__(12);
-var Notifier = __webpack_require__(13);
-var _ = __webpack_require__(0);
-
-/*
- * Rollbar - the interface to Rollbar
- *
- * @param options
- * @param api
- * @param logger
- */
-function Rollbar(options, api, logger, telemeter, platform) {
- this.options = _.merge(options);
- this.logger = logger;
- Rollbar.rateLimiter.configureGlobal(this.options);
- Rollbar.rateLimiter.setPlatformOptions(platform, this.options);
- this.api = api;
- this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);
-
- // This must happen before the Notifier is created
- var tracer = this.options.tracer || null;
- if (validateTracer(tracer)) {
- this.tracer = tracer;
- // set to a string for api response serialization
- this.options.tracer = 'opentracing-tracer-enabled';
- this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';
- } else {
- this.tracer = null;
+Instrumenter.prototype.deinstrumentDom = function () {
+ if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {
+ return;
}
-
- this.notifier = new Notifier(this.queue, this.options);
- this.telemeter = telemeter;
- setStackTraceLimit(options);
- this.lastError = null;
- this.lastErrorHash = 'none';
-}
-
-var defaultOptions = {
- maxItems: 0,
- itemsPerMinute: 60
+ this.removeListeners('dom');
};
-Rollbar.rateLimiter = new RateLimiter(defaultOptions);
-
-Rollbar.prototype.global = function (options) {
- Rollbar.rateLimiter.configureGlobal(options);
- return this;
+Instrumenter.prototype.instrumentDom = function () {
+ if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {
+ return;
+ }
+ var clickHandler = this.handleClick.bind(this);
+ var blurHandler = this.handleBlur.bind(this);
+ this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);
+ this.addListener(
+ 'dom',
+ this._window,
+ 'blur',
+ 'onfocusout',
+ blurHandler,
+ true,
+ );
};
-Rollbar.prototype.configure = function (options, payloadData) {
- var oldOptions = this.options;
- var payload = {};
- if (payloadData) {
- payload = { payload: payloadData };
+Instrumenter.prototype.handleClick = function (evt) {
+ try {
+ var e = domUtil.getElementFromEvent(evt, this._document);
+ var hasTag = e && e.tagName;
+ 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 (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {
+ this.captureDomEvent('input', e, e.value, e.checked);
+ }
+ } catch (exc) {
+ // TODO: Not sure what to do here
}
+};
- this.options = _.merge(oldOptions, options, payload);
-
- // This must happen before the Notifier is configured
- var tracer = this.options.tracer || null;
- if (validateTracer(tracer)) {
- this.tracer = tracer;
- // set to a string for api response serialization
- this.options.tracer = 'opentracing-tracer-enabled';
- this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';
- } else {
- this.tracer = null;
+Instrumenter.prototype.handleBlur = function (evt) {
+ try {
+ var e = domUtil.getElementFromEvent(evt, this._document);
+ if (e && e.tagName) {
+ if (domUtil.isDescribedElement(e, 'textarea')) {
+ this.captureDomEvent('input', e, e.value);
+ } else if (
+ domUtil.isDescribedElement(e, 'select') &&
+ e.options &&
+ e.options.length
+ ) {
+ this.handleSelectInputChanged(e);
+ } else if (
+ domUtil.isDescribedElement(e, 'input') &&
+ !domUtil.isDescribedElement(e, 'input', [
+ 'button',
+ 'submit',
+ 'hidden',
+ 'checkbox',
+ 'radio',
+ ])
+ ) {
+ this.captureDomEvent('input', e, e.value);
+ }
+ }
+ } catch (exc) {
+ // TODO: Not sure what to do here
}
+};
- this.notifier && this.notifier.configure(this.options);
- this.telemeter && this.telemeter.configure(this.options);
- setStackTraceLimit(options);
- this.global(this.options);
-
- if (validateTracer(options.tracer)) {
- this.tracer = options.tracer
+Instrumenter.prototype.handleSelectInputChanged = function (elem) {
+ if (elem.multiple) {
+ for (var i = 0; i < elem.options.length; i++) {
+ if (elem.options[i].selected) {
+ this.captureDomEvent('input', elem, elem.options[i].value);
+ }
+ }
+ } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {
+ this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);
}
-
- return this;
};
-Rollbar.prototype.log = function (item) {
- var level = this._defaultLogLevel();
- return this._log(level, item);
+Instrumenter.prototype.captureDomEvent = function (
+ subtype,
+ element,
+ value,
+ isChecked,
+) {
+ if (value !== undefined) {
+ if (
+ this.scrubTelemetryInputs ||
+ domUtil.getElementType(element) === 'password'
+ ) {
+ value = '[scrubbed]';
+ } else {
+ var description = domUtil.describeElement(element);
+ if (this.telemetryScrubber) {
+ if (this.telemetryScrubber(description)) {
+ value = '[scrubbed]';
+ }
+ } else if (this.defaultValueScrubber(description)) {
+ value = '[scrubbed]';
+ }
+ }
+ }
+ var elementString = domUtil.elementArrayToString(
+ domUtil.treeToArray(element),
+ );
+ this.telemeter.captureDom(subtype, elementString, value, isChecked);
};
-Rollbar.prototype.debug = function (item) {
- this._log('debug', item);
+Instrumenter.prototype.deinstrumentNavigation = function () {
+ var chrome = this._window.chrome;
+ var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;
+ // See https://github.com/angular/angular.js/pull/13945/files
+ var hasPushState =
+ !chromePackagedApp &&
+ this._window.history &&
+ this._window.history.pushState;
+ if (!hasPushState) {
+ return;
+ }
+ restore(this.replacements, 'navigation');
};
-Rollbar.prototype.info = function (item) {
- this._log('info', item);
-};
+Instrumenter.prototype.instrumentNavigation = function () {
+ var chrome = this._window.chrome;
+ var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;
+ // See https://github.com/angular/angular.js/pull/13945/files
+ var hasPushState =
+ !chromePackagedApp &&
+ this._window.history &&
+ this._window.history.pushState;
+ if (!hasPushState) {
+ return;
+ }
+ var self = this;
+ replace(
+ this._window,
+ 'onpopstate',
+ function (orig) {
+ return function () {
+ var current = self._location.href;
+ self.handleUrlChange(self._lastHref, current);
+ if (orig) {
+ orig.apply(this, arguments);
+ }
+ };
+ },
+ this.replacements,
+ 'navigation',
+ );
-Rollbar.prototype.warn = function (item) {
- this._log('warning', item);
+ replace(
+ this._window.history,
+ 'pushState',
+ function (orig) {
+ return function () {
+ var url = arguments.length > 2 ? arguments[2] : undefined;
+ if (url) {
+ self.handleUrlChange(self._lastHref, url + '');
+ }
+ return orig.apply(this, arguments);
+ };
+ },
+ this.replacements,
+ 'navigation',
+ );
};
-Rollbar.prototype.warning = function (item) {
- this._log('warning', item);
+Instrumenter.prototype.handleUrlChange = function (from, to) {
+ var parsedHref = urlparser.parse(this._location.href);
+ var parsedTo = urlparser.parse(to);
+ var parsedFrom = urlparser.parse(from);
+ this._lastHref = to;
+ if (
+ parsedHref.protocol === parsedTo.protocol &&
+ parsedHref.host === parsedTo.host
+ ) {
+ to = parsedTo.path + (parsedTo.hash || '');
+ }
+ if (
+ parsedHref.protocol === parsedFrom.protocol &&
+ parsedHref.host === parsedFrom.host
+ ) {
+ from = parsedFrom.path + (parsedFrom.hash || '');
+ }
+ this.telemeter.captureNavigation(from, to);
};
-Rollbar.prototype.error = function (item) {
- this._log('error', item);
+Instrumenter.prototype.deinstrumentConnectivity = function () {
+ if (!('addEventListener' in this._window || 'body' in this._document)) {
+ return;
+ }
+ if (this._window.addEventListener) {
+ this.removeListeners('connectivity');
+ } else {
+ restore(this.replacements, 'connectivity');
+ }
};
-Rollbar.prototype.critical = function (item) {
- this._log('critical', item);
+Instrumenter.prototype.instrumentConnectivity = function () {
+ if (!('addEventListener' in this._window || 'body' in this._document)) {
+ return;
+ }
+ if (this._window.addEventListener) {
+ this.addListener(
+ 'connectivity',
+ this._window,
+ 'online',
+ undefined,
+ function () {
+ this.telemeter.captureConnectivityChange('online');
+ }.bind(this),
+ true,
+ );
+ this.addListener(
+ 'connectivity',
+ this._window,
+ 'offline',
+ undefined,
+ function () {
+ this.telemeter.captureConnectivityChange('offline');
+ }.bind(this),
+ true,
+ );
+ } else {
+ var self = this;
+ replace(
+ this._document.body,
+ 'ononline',
+ function (orig) {
+ return function () {
+ self.telemeter.captureConnectivityChange('online');
+ if (orig) {
+ orig.apply(this, arguments);
+ }
+ };
+ },
+ this.replacements,
+ 'connectivity',
+ );
+ replace(
+ this._document.body,
+ 'onoffline',
+ function (orig) {
+ return function () {
+ self.telemeter.captureConnectivityChange('offline');
+ if (orig) {
+ orig.apply(this, arguments);
+ }
+ };
+ },
+ this.replacements,
+ 'connectivity',
+ );
+ }
};
-Rollbar.prototype.wait = function (callback) {
- this.queue.wait(callback);
-};
+Instrumenter.prototype.handleCspEvent = function (cspEvent) {
+ var message =
+ 'Security Policy Violation: ' +
+ 'blockedURI: ' +
+ cspEvent.blockedURI +
+ ', ' +
+ 'violatedDirective: ' +
+ cspEvent.violatedDirective +
+ ', ' +
+ 'effectiveDirective: ' +
+ cspEvent.effectiveDirective +
+ ', ';
-Rollbar.prototype.captureEvent = function (type, metadata, level) {
- return this.telemeter && this.telemeter.captureEvent(type, metadata, level);
-};
+ if (cspEvent.sourceFile) {
+ message +=
+ 'location: ' +
+ cspEvent.sourceFile +
+ ', ' +
+ 'line: ' +
+ cspEvent.lineNumber +
+ ', ' +
+ 'col: ' +
+ cspEvent.columnNumber +
+ ', ';
+ }
-Rollbar.prototype.captureDomContentLoaded = function (ts) {
- return this.telemeter && this.telemeter.captureDomContentLoaded(ts);
-};
+ message += 'originalPolicy: ' + cspEvent.originalPolicy;
-Rollbar.prototype.captureLoad = function (ts) {
- return this.telemeter && this.telemeter.captureLoad(ts);
+ this.telemeter.captureLog(message, 'error');
+ this.handleCspError(message);
};
-Rollbar.prototype.buildJsonPayload = function (item) {
- return this.api.buildJsonPayload(item);
+Instrumenter.prototype.handleCspError = function (message) {
+ if (this.autoInstrument.errorOnContentSecurityPolicy) {
+ this.rollbar.error(message);
+ }
};
-Rollbar.prototype.sendJsonPayload = function (jsonPayload) {
- this.api.postJsonPayload(jsonPayload);
-};
+Instrumenter.prototype.deinstrumentContentSecurityPolicy = function () {
+ if (!('addEventListener' in this._document)) {
+ return;
+ }
-/* Internal */
+ this.removeListeners('contentsecuritypolicy');
+};
-Rollbar.prototype._log = function (defaultLevel, item) {
- var callback;
- if (item.callback) {
- callback = item.callback;
- delete item.callback;
- }
- if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {
- if (callback) {
- var error = new Error('ignored identical item');
- error.item = item;
- callback(error);
- }
+Instrumenter.prototype.instrumentContentSecurityPolicy = function () {
+ if (!('addEventListener' in this._document)) {
return;
}
- try {
- this._addTracingInfo(item);
- item.level = item.level || defaultLevel;
- this.telemeter && this.telemeter._captureRollbarItem(item);
- item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];
- this.notifier.log(item, callback);
- } catch (e) {
- if (callback) {
- callback(e);
- }
- this.logger.error(e);
- }
-};
-Rollbar.prototype._defaultLogLevel = function () {
- return this.options.logLevel || 'debug';
+ var cspHandler = this.handleCspEvent.bind(this);
+ this.addListener(
+ 'contentsecuritypolicy',
+ this._document,
+ 'securitypolicyviolation',
+ null,
+ cspHandler,
+ false,
+ );
};
-Rollbar.prototype._sameAsLastError = function (item) {
- if (!item._isUncaught) {
- return false;
+Instrumenter.prototype.addListener = function (
+ section,
+ obj,
+ type,
+ altType,
+ handler,
+ capture,
+) {
+ if (obj.addEventListener) {
+ obj.addEventListener(type, handler, capture);
+ this.eventRemovers[section].push(function () {
+ obj.removeEventListener(type, handler, capture);
+ });
+ } else if (altType) {
+ obj.attachEvent(altType, handler);
+ this.eventRemovers[section].push(function () {
+ obj.detachEvent(altType, handler);
+ });
}
- var itemHash = generateItemHash(item);
- if (this.lastErrorHash === itemHash) {
- return true;
+};
+
+Instrumenter.prototype.removeListeners = function (section) {
+ var r;
+ while (this.eventRemovers[section].length) {
+ r = this.eventRemovers[section].shift();
+ r();
}
- this.lastError = item.err;
- this.lastErrorHash = itemHash;
- return false;
};
-Rollbar.prototype._addTracingInfo = function (item) {
- // Tracer validation occurs in the constructor
- // or in the Rollbar.prototype.configure methods
- if (this.tracer) {
- // add rollbar occurrence uuid to span
- var span = this.tracer.scope().active();
+function _isUrlObject(input) {
+ return typeof URL !== 'undefined' && input instanceof URL;
+}
- if (validateSpan(span)) {
- span.setTag('rollbar.error_uuid', item.uuid);
- span.setTag('rollbar.has_error', true);
- span.setTag('error', true);
- span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);
- span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);
+module.exports = Instrumenter;
- // add span ID & trace ID to occurrence
- var opentracingSpanId = span.context().toSpanId();
- var opentracingTraceId = span.context().toTraceId();
- if (item.custom) {
- item.custom.opentracing_span_id = opentracingSpanId;
- item.custom.opentracing_trace_id = opentracingTraceId;
- } else {
- item.custom = {
- opentracing_span_id: opentracingSpanId,
- opentracing_trace_id: opentracingTraceId
- };
- }
- }
- }
-}
+/***/ }),
-function generateItemHash(item) {
- var message = item.message || '';
- var stack = (item.err || {}).stack || String(item.err);
- return message + '::' + stack;
-}
+/***/ 860:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-// Node.js, Chrome, Safari, and some other browsers support this property
-// which globally sets the number of stack frames returned in an Error object.
-// If a browser can't use it, no harm done.
-function setStackTraceLimit(options) {
- if (options.stackTraceLimit) {
- Error.stackTraceLimit = options.stackTraceLimit;
- }
-}
+"use strict";
-/**
- * Validate the Tracer object provided to the Client
- * is valid for our Opentracing use case.
- * @param {opentracer.Tracer} tracer
- */
-function validateTracer(tracer) {
- if (!tracer) {
- return false;
- }
- if (!tracer.scope || typeof tracer.scope !== 'function') {
- return false;
+var _ = __webpack_require__(702);
+var errorParser = __webpack_require__(303);
+var logger = __webpack_require__(802);
+
+function handleDomException(item, options, callback) {
+ if (item.err && errorParser.Stack(item.err).name === 'DOMException') {
+ var originalError = new Error();
+ originalError.name = item.err.name;
+ originalError.message = item.err.message;
+ originalError.stack = item.err.stack;
+ originalError.nested = item.err;
+ item.err = originalError;
}
+ callback(null, item);
+}
- var scope = tracer.scope();
+function handleItemWithError(item, options, callback) {
+ item.data = item.data || {};
+ if (item.err) {
+ try {
+ item.stackInfo =
+ item.err._savedStackTrace ||
+ errorParser.parse(item.err, item.skipFrames);
- if (!scope || !scope.active || typeof scope.active !== 'function') {
- return false;
+ if (options.addErrorContext) {
+ addErrorContext(item);
+ }
+ } catch (e) {
+ logger.error('Error while parsing the error object.', e);
+ try {
+ item.message =
+ item.err.message ||
+ item.err.description ||
+ item.message ||
+ String(item.err);
+ } catch (e2) {
+ item.message = String(item.err) || String(e2);
+ }
+ delete item.err;
+ }
}
-
- return true;
+ callback(null, item);
}
-/**
- * Validate the Span object provided
- * @param {opentracer.Span} span
- */
-function validateSpan(span) {
- if (!span || !span.context || typeof span.context !== 'function') {
- return false;
- }
+function addErrorContext(item) {
+ var chain = [];
+ var err = item.err;
- var spanContext = span.context();
+ chain.push(err);
- if (!spanContext
- || !spanContext.toSpanId
- || !spanContext.toTraceId
- || typeof spanContext.toSpanId !== 'function'
- || typeof spanContext.toTraceId !== 'function') {
- return false
+ while (err.nested || err.cause) {
+ err = err.nested || err.cause;
+ chain.push(err);
}
- return true;
+ _.addErrorContext(item, chain);
}
-module.exports = Rollbar;
+function ensureItemHasSomethingToSay(item, options, callback) {
+ if (!item.message && !item.stackInfo && !item.custom) {
+ callback(new Error('No message, stack info, or custom data'), null);
+ }
+ callback(null, item);
+}
+function addBaseInfo(item, options, callback) {
+ var environment =
+ (options.payload && options.payload.environment) || options.environment;
+ item.data = _.merge(item.data, {
+ environment: environment,
+ level: item.level,
+ endpoint: options.endpoint,
+ platform: 'browser',
+ framework: 'browser-js',
+ language: 'javascript',
+ server: {},
+ uuid: item.uuid,
+ notifier: {
+ name: 'rollbar-browser-js',
+ version: options.version,
+ },
+ custom: item.custom,
+ });
+ callback(null, item);
+}
-/***/ }),
-/* 10 */
-/***/ (function(module, exports, __webpack_require__) {
+function addRequestInfo(window) {
+ return function (item, options, callback) {
+ var requestInfo = {};
-"use strict";
+ if (window && window.location) {
+ requestInfo.url = window.location.href;
+ requestInfo.query_string = window.location.search;
+ }
+ var remoteString = '$remote_ip';
+ if (!options.captureIp) {
+ remoteString = null;
+ } else if (options.captureIp !== true) {
+ remoteString += '_anonymize';
+ }
+ if (remoteString) requestInfo.user_ip = remoteString;
-var _ = __webpack_require__(0);
+ if (Object.keys(requestInfo).length > 0) {
+ _.set(item, 'data.request', requestInfo);
+ }
-/*
- * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar
- *
- * @param options - the same options that are accepted by configureGlobal offered as a convenience
- */
-function RateLimiter(options) {
- this.startTime = _.now();
- this.counter = 0;
- this.perMinCounter = 0;
- this.platform = null;
- this.platformOptions = {};
- this.configureGlobal(options);
+ callback(null, item);
+ };
}
-RateLimiter.globalSettings = {
- startTime: _.now(),
- maxItems: undefined,
- itemsPerMinute: undefined
-};
+function addClientInfo(window) {
+ return function (item, options, callback) {
+ if (!window) {
+ return callback(null, item);
+ }
+ var nav = window.navigator || {};
+ var scr = window.screen || {};
+ _.set(item, 'data.client', {
+ runtime_ms: item.timestamp - window._rollbarStartTime,
+ timestamp: Math.round(item.timestamp / 1000),
+ javascript: {
+ browser: nav.userAgent,
+ language: nav.language,
+ cookie_enabled: nav.cookieEnabled,
+ screen: {
+ width: scr.width,
+ height: scr.height,
+ },
+ },
+ });
+ callback(null, item);
+ };
+}
-/*
- * configureGlobal - set the global rate limiter options
- *
- * @param options - Only the following values are recognized:
- * startTime: a timestamp of the form returned by (new Date()).getTime()
- * maxItems: the maximum items
- * itemsPerMinute: the max number of items to send in a given minute
- */
-RateLimiter.prototype.configureGlobal = function(options) {
- if (options.startTime !== undefined) {
- RateLimiter.globalSettings.startTime = options.startTime;
- }
- if (options.maxItems !== undefined) {
- RateLimiter.globalSettings.maxItems = options.maxItems;
- }
- if (options.itemsPerMinute !== undefined) {
- RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;
- }
-};
+function addPluginInfo(window) {
+ return function (item, options, callback) {
+ if (!window || !window.navigator) {
+ return callback(null, item);
+ }
+ var plugins = [];
+ var navPlugins = window.navigator.plugins || [];
+ var cur;
+ for (var i = 0, l = navPlugins.length; i < l; ++i) {
+ cur = navPlugins[i];
+ plugins.push({ name: cur.name, description: cur.description });
+ }
+ _.set(item, 'data.client.javascript.plugins', plugins);
+ callback(null, item);
+ };
+}
-/*
- * shouldSend - determine if we should send a given item based on rate limit settings
- *
- * @param item - the item we are about to send
- * @returns An object with the following structure:
- * error: (Error|null)
- * shouldSend: bool
- * payload: (Object|null)
- * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and
- * exactly one of error or payload will be non-null. If error is non-null, the returned Error will
- * describe the situation, but it means that we were already over a rate limit (either globally or
- * per minute) when this item was checked. If error is null, and therefore payload is non-null, it
- * means this item put us over the global rate limit and the payload should be sent to Rollbar in
- * place of the passed in item.
- */
-RateLimiter.prototype.shouldSend = function(item, now) {
- now = now || _.now();
- var elapsedTime = now - this.startTime;
- if (elapsedTime < 0 || elapsedTime >= 60000) {
- this.startTime = now;
- this.perMinCounter = 0;
+function addBody(item, options, callback) {
+ if (item.stackInfo) {
+ if (item.stackInfo.traceChain) {
+ addBodyTraceChain(item, options, callback);
+ } else {
+ addBodyTrace(item, options, callback);
+ }
+ } else {
+ addBodyMessage(item, options, callback);
}
+}
- var globalRateLimit = RateLimiter.globalSettings.maxItems;
- var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;
+function addBodyMessage(item, options, callback) {
+ var message = item.message;
+ var custom = item.custom;
- if (checkRate(item, globalRateLimit, this.counter)) {
- return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);
- } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {
- return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);
+ if (!message) {
+ message = 'Item sent with null or missing arguments.';
}
- this.counter++;
- this.perMinCounter++;
-
- var shouldSend = !checkRate(item, globalRateLimit, this.counter);
- var perMinute = shouldSend;
- shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);
- return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);
-};
-
-RateLimiter.prototype.setPlatformOptions = function(platform, options) {
- this.platform = platform;
- this.platformOptions = options;
-};
-
-/* Helpers */
-
-function checkRate(item, limit, counter) {
- return !item.ignoreRateLimit && limit >= 1 && counter > limit;
-}
+ var result = {
+ body: message,
+ };
-function shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {
- var payload = null;
- if (error) {
- error = new Error(error);
- }
- if (!error && !shouldSend) {
- payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);
+ if (custom) {
+ result.extra = _.merge(custom);
}
- return {error: error, shouldSend: shouldSend, payload: payload};
+
+ _.set(item, 'data.body', { message: result });
+ callback(null, item);
}
-function rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {
- var environment = options.environment || (options.payload && options.payload.environment);
- var msg;
- if (perMinute) {
- msg = 'item per minute limit reached, ignoring errors until timeout';
- } else {
- msg = 'maxItems has been hit, ignoring errors until reset.';
- }
- var item = {
- body: {
- message: {
- body: msg,
- extra: {
- maxItems: globalRateLimit,
- itemsPerMinute: limitPerMin
- }
- }
- },
- language: 'javascript',
- environment: environment,
- notifier: {
- version: (options.notifier && options.notifier.version) || options.version
- }
- };
- if (platform === 'browser') {
- item.platform = 'browser';
- item.framework = 'browser-js';
- item.notifier.name = 'rollbar-browser-js';
- } else if (platform === 'server') {
- item.framework = options.framework || 'node-js';
- item.notifier.name = options.notifier.name;
- } else if (platform === 'react-native') {
- item.framework = options.framework || 'react-native';
- item.notifier.name = options.notifier.name;
+function stackFromItem(item) {
+ // Transform a TraceKit stackInfo object into a Rollbar trace
+ var stack = item.stackInfo.stack;
+ if (
+ stack &&
+ stack.length === 0 &&
+ item._unhandledStackInfo &&
+ item._unhandledStackInfo.stack
+ ) {
+ stack = item._unhandledStackInfo.stack;
}
- return item;
+ return stack;
}
-module.exports = RateLimiter;
+function addBodyTraceChain(item, options, callback) {
+ var traceChain = item.stackInfo.traceChain;
+ var traces = [];
+ var traceChainLength = traceChain.length;
+ for (var i = 0; i < traceChainLength; i++) {
+ var trace = buildTrace(item, traceChain[i], options);
+ traces.push(trace);
+ }
-/***/ }),
-/* 11 */
-/***/ (function(module, exports, __webpack_require__) {
+ _.set(item, 'data.body', { trace_chain: traces });
+ callback(null, item);
+}
-"use strict";
+function addBodyTrace(item, options, callback) {
+ var stack = stackFromItem(item);
+ if (stack) {
+ var trace = buildTrace(item, item.stackInfo, options);
+ _.set(item, 'data.body', { trace: trace });
+ callback(null, item);
+ } else {
+ var stackInfo = item.stackInfo;
+ var guess = errorParser.guessErrorClass(stackInfo.message);
+ var className = errorClass(stackInfo, guess[0], options);
+ var message = guess[1];
-'use strict';
+ item.message = className + ': ' + message;
+ addBodyMessage(item, options, callback);
+ }
+}
-var hasOwn = Object.prototype.hasOwnProperty;
-var toStr = Object.prototype.toString;
+function buildTrace(item, stackInfo, options) {
+ var description = item && item.data.description;
+ var custom = item && item.custom;
+ var stack = stackFromItem(item);
-var isPlainObject = function isPlainObject(obj) {
- if (!obj || toStr.call(obj) !== '[object Object]') {
- return false;
- }
+ var guess = errorParser.guessErrorClass(stackInfo.message);
+ var className = errorClass(stackInfo, guess[0], options);
+ var message = guess[1];
+ var trace = {
+ exception: {
+ class: className,
+ message: message,
+ },
+ };
- var hasOwnConstructor = hasOwn.call(obj, 'constructor');
- var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
- // Not own constructor property must be Object
- if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
- return false;
- }
+ if (description) {
+ trace.exception.description = description;
+ }
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
- var key;
- for (key in obj) {/**/}
+ if (stack) {
+ if (stack.length === 0) {
+ trace.exception.stack = stackInfo.rawStack;
+ trace.exception.raw = String(stackInfo.rawException);
+ }
+ var stackFrame;
+ var frame;
+ var code;
+ var pre;
+ var post;
+ var contextLength;
+ var i, mid;
- return typeof key === 'undefined' || hasOwn.call(obj, key);
-};
+ trace.frames = [];
+ for (i = 0; i < stack.length; ++i) {
+ stackFrame = stack[i];
+ frame = {
+ filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',
+ lineno: stackFrame.line || null,
+ method:
+ !stackFrame.func || stackFrame.func === '?'
+ ? '[anonymous]'
+ : stackFrame.func,
+ colno: stackFrame.column,
+ };
+ if (options.sendFrameUrl) {
+ frame.url = stackFrame.url;
+ }
+ if (
+ frame.method &&
+ frame.method.endsWith &&
+ frame.method.endsWith('_rollbar_wrapped')
+ ) {
+ continue;
+ }
-function merge() {
- var i, src, copy, clone, name,
- result = {},
- current = null,
- length = arguments.length;
+ code = pre = post = null;
+ contextLength = stackFrame.context ? stackFrame.context.length : 0;
+ if (contextLength) {
+ mid = Math.floor(contextLength / 2);
+ pre = stackFrame.context.slice(0, mid);
+ code = stackFrame.context[mid];
+ post = stackFrame.context.slice(mid);
+ }
- for (i=0; i < length; i++) {
- current = arguments[i];
- if (current == null) {
- continue;
- }
+ if (code) {
+ frame.code = code;
+ }
- for (name in current) {
- src = result[name];
- copy = current[name];
- if (result !== copy) {
- if (copy && isPlainObject(copy)) {
- clone = src && isPlainObject(src) ? src : {};
- result[name] = merge(clone, copy);
- } else if (typeof copy !== 'undefined') {
- result[name] = copy;
+ if (pre || post) {
+ frame.context = {};
+ if (pre && pre.length) {
+ frame.context.pre = pre;
+ }
+ if (post && post.length) {
+ frame.context.post = post;
}
}
- }
- }
- return result;
-}
-module.exports = merge;
+ if (stackFrame.args) {
+ frame.args = stackFrame.args;
+ }
+ trace.frames.push(frame);
+ }
-/***/ }),
-/* 12 */
-/***/ (function(module, exports, __webpack_require__) {
+ // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last
+ trace.frames.reverse();
-"use strict";
+ if (custom) {
+ trace.extra = _.merge(custom);
+ }
+ }
+ return trace;
+}
-var _ = __webpack_require__(0);
+function errorClass(stackInfo, guess, options) {
+ if (stackInfo.name) {
+ return stackInfo.name;
+ } else if (options.guessErrorClass) {
+ return guess;
+ } else {
+ return '(unknown)';
+ }
+}
-/*
- * Queue - an object which handles which handles a queue of items to be sent to Rollbar.
- * This object handles rate limiting via a passed in rate limiter, retries based on connection
- * errors, and filtering of items based on a set of configurable predicates. The communication to
- * the backend is performed via a given API object.
- *
- * @param rateLimiter - An object which conforms to the interface
- * rateLimiter.shouldSend(item) -> bool
- * @param api - An object which conforms to the interface
- * api.postItem(payload, function(err, response))
- * @param logger - An object used to log verbose messages if desired
- * @param options - see Queue.prototype.configure
- */
-function Queue(rateLimiter, api, logger, options) {
- this.rateLimiter = rateLimiter;
- this.api = api;
- this.logger = logger;
- this.options = options;
- this.predicates = [];
- this.pendingItems = [];
- this.pendingRequests = [];
- this.retryQueue = [];
- this.retryHandle = null;
- this.waitCallback = null;
- this.waitIntervalID = null;
+function addScrubber(scrubFn) {
+ return function (item, options, callback) {
+ if (scrubFn) {
+ var scrubFields = options.scrubFields || [];
+ var scrubPaths = options.scrubPaths || [];
+ item.data = scrubFn(item.data, scrubFields, scrubPaths);
+ }
+ callback(null, item);
+ };
}
-/*
- * configure - updates the options this queue uses
- *
- * @param options
- */
-Queue.prototype.configure = function(options) {
- this.api && this.api.configure(options);
- var oldOptions = this.options;
- this.options = _.merge(oldOptions, options);
- return this;
+module.exports = {
+ handleDomException: handleDomException,
+ handleItemWithError: handleItemWithError,
+ ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,
+ addBaseInfo: addBaseInfo,
+ addRequestInfo: addRequestInfo,
+ addClientInfo: addClientInfo,
+ addPluginInfo: addPluginInfo,
+ addBody: addBody,
+ addScrubber: addScrubber,
};
-/*
- * addPredicate - adds a predicate to the end of the list of predicates for this queue
- *
- * @param predicate - function(item, options) -> (bool|{err: Error})
- * Returning true means that this predicate passes and the item is okay to go on the queue
- * Returning false means do not add the item to the queue, but it is not an error
- * Returning {err: Error} means do not add the item to the queue, and the given error explains why
- * Returning {err: undefined} is equivalent to returning true but don't do that
- */
-Queue.prototype.addPredicate = function(predicate) {
- if (_.isFunction(predicate)) {
- this.predicates.push(predicate);
- }
- return this;
-};
-Queue.prototype.addPendingItem = function(item) {
- this.pendingItems.push(item);
-};
+/***/ }),
-Queue.prototype.removePendingItem = function(item) {
- var idx = this.pendingItems.indexOf(item);
- if (idx !== -1) {
- this.pendingItems.splice(idx, 1);
- }
-};
+/***/ 477:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-/*
- * addItem - Send an item to the Rollbar API if all of the predicates are satisfied
- *
- * @param item - The payload to send to the backend
- * @param callback - function(error, repsonse) which will be called with the response from the API
- * in the case of a success, otherwise response will be null and error will have a value. If both
- * error and response are null then the item was stopped by a predicate which did not consider this
- * to be an error condition, but nonetheless did not send the item to the API.
- * @param originalError - The original error before any transformations that is to be logged if any
- */
-Queue.prototype.addItem = function(item, callback, originalError, originalItem) {
- if (!callback || !_.isFunction(callback)) {
- callback = function() { return; };
- }
- var predicateResult = this._applyPredicates(item);
- if (predicateResult.stop) {
- this.removePendingItem(originalItem);
- callback(predicateResult.err);
- return;
- }
- this._maybeLog(item, originalError);
- this.removePendingItem(originalItem);
- if (!this.options.transmit) {
- callback(new Error('Transmit disabled'));
- return;
- }
- this.pendingRequests.push(item);
- try {
- this._makeApiRequest(item, function(err, resp) {
- this._dequeuePendingRequest(item);
- callback(err, resp);
- }.bind(this));
- } catch (e) {
- this._dequeuePendingRequest(item);
- callback(e);
- }
-};
+"use strict";
-/*
- * wait - Stop any further errors from being added to the queue, and get called back when all items
- * currently processing have finished sending to the backend.
- *
- * @param callback - function() called when all pending items have been sent
- */
-Queue.prototype.wait = function(callback) {
- if (!_.isFunction(callback)) {
- return;
- }
- this.waitCallback = callback;
- if (this._maybeCallWait()) {
- return;
- }
- if (this.waitIntervalID) {
- this.waitIntervalID = clearInterval(this.waitIntervalID);
- }
- this.waitIntervalID = setInterval(function() {
- this._maybeCallWait();
- }.bind(this), 500);
-};
-/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the
- * given item with the currently configured options.
- *
- * @param item - An item in the queue
- * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,
- * the error value should be passed up to a callbak if we are stopping.
- */
-Queue.prototype._applyPredicates = function(item) {
- var p = null;
- for (var i = 0, len = this.predicates.length; i < len; i++) {
- p = this.predicates[i](item, this.options);
- if (!p || p.err !== undefined) {
- return {stop: true, err: p.err};
- }
- }
- return {stop: false, err: null};
-};
+var _ = __webpack_require__(702);
+var makeFetchRequest = __webpack_require__(656);
+var makeXhrRequest = __webpack_require__(86);
/*
- * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an
- * effort to retry if we are configured to do so.
+ * accessToken may be embedded in payload but that should not
+ * be assumed
*
- * @param item - an item ready to send to the backend
- * @param callback - function(err, response)
+ * options: {
+ * hostname
+ * protocol
+ * path
+ * port
+ * method
+ * transport ('xhr' | 'fetch')
+ * }
+ *
+ * params is an object containing key/value pairs. These
+ * will be appended to the path as 'key=value&key=value'
+ *
+ * payload is an unserialized object
*/
-Queue.prototype._makeApiRequest = function(item, callback) {
- var rateLimitResponse = this.rateLimiter.shouldSend(item);
- if (rateLimitResponse.shouldSend) {
- this.api.postItem(item, function(err, resp) {
- if (err) {
- this._maybeRetry(err, item, callback);
- } else {
- callback(err, resp);
- }
- }.bind(this));
- } else if (rateLimitResponse.error) {
- callback(rateLimitResponse.error);
- } else {
- this.api.postItem(rateLimitResponse.payload, callback);
+function Transport(truncation) {
+ this.truncation = truncation;
+}
+
+Transport.prototype.get = function (
+ accessToken,
+ options,
+ params,
+ callback,
+ requestFactory,
+) {
+ if (!callback || !_.isFunction(callback)) {
+ callback = function () {};
}
+ _.addParamsAndAccessTokenToPath(accessToken, options, params);
+
+ var method = 'GET';
+ var url = _.formatUrl(options);
+ this._makeZoneRequest(
+ accessToken,
+ url,
+ method,
+ null,
+ callback,
+ requestFactory,
+ options.timeout,
+ options.transport,
+ );
};
-// These are errors basically mean there is no internet connection
-var RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];
+Transport.prototype.post = function (
+ accessToken,
+ options,
+ payload,
+ callback,
+ requestFactory,
+) {
+ if (!callback || !_.isFunction(callback)) {
+ callback = function () {};
+ }
-/*
- * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback
- * with the error.
- *
- * @param err - an error returned by the API transport
- * @param item - the item that was trying to be sent when this error occured
- * @param callback - function(err, response)
- */
-Queue.prototype._maybeRetry = function(err, item, callback) {
- var shouldRetry = false;
- if (this.options.retryInterval) {
- for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {
- if (err.code === RETRIABLE_ERRORS[i]) {
- shouldRetry = true;
- break;
- }
- }
- if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {
- item.retries = item.retries ? item.retries + 1 : 1;
- if (item.retries > this.options.maxRetries) {
- shouldRetry = false;
- }
- }
+ if (!payload) {
+ return callback(new Error('Cannot send empty request'));
}
- if (shouldRetry) {
- this._retryApiRequest(item, callback);
+
+ var stringifyResult;
+ if (this.truncation) {
+ stringifyResult = this.truncation.truncate(payload);
} else {
- callback(err);
+ stringifyResult = _.stringify(payload);
+ }
+ if (stringifyResult.error) {
+ return callback(stringifyResult.error);
}
-};
-/*
- * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process
- * that queue based on the retryInterval in the options for this queue.
- *
- * @param item - an item that failed to send due to an error we deem retriable
- * @param callback - function(err, response)
- */
-Queue.prototype._retryApiRequest = function(item, callback) {
- this.retryQueue.push({item: item, callback: callback});
+ var writeData = stringifyResult.value;
+ var method = 'POST';
+ var url = _.formatUrl(options);
+ this._makeZoneRequest(
+ accessToken,
+ url,
+ method,
+ writeData,
+ callback,
+ requestFactory,
+ options.timeout,
+ options.transport,
+ );
+};
- if (!this.retryHandle) {
- this.retryHandle = setInterval(function() {
- while (this.retryQueue.length) {
- var retryObject = this.retryQueue.shift();
- this._makeApiRequest(retryObject.item, retryObject.callback);
- }
- }.bind(this), this.options.retryInterval);
+Transport.prototype.postJsonPayload = function (
+ accessToken,
+ options,
+ jsonPayload,
+ callback,
+ requestFactory,
+) {
+ if (!callback || !_.isFunction(callback)) {
+ callback = function () {};
}
+
+ var method = 'POST';
+ var url = _.formatUrl(options);
+ this._makeZoneRequest(
+ accessToken,
+ url,
+ method,
+ jsonPayload,
+ callback,
+ requestFactory,
+ options.timeout,
+ options.transport,
+ );
};
-/*
- * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to
- * enable to functionality of providing a callback that clients can pass to `wait` to be notified
- * when the pending request queue has been emptied. This must be called when the API finishes
- * processing this item. If a `wait` callback is configured, it is called by this function.
- *
- * @param item - the item previously added to the pending request queue
- */
-Queue.prototype._dequeuePendingRequest = function(item) {
- var idx = this.pendingRequests.indexOf(item);
- if (idx !== -1) {
- this.pendingRequests.splice(idx, 1);
- this._maybeCallWait();
+// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope
+// so Angular change detection isn't triggered on each API call.
+// This is the equivalent of runOutsideAngular().
+//
+Transport.prototype._makeZoneRequest = function () {
+ var gWindow =
+ (typeof window != 'undefined' && window) ||
+ (typeof self != 'undefined' && self);
+ var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;
+ var args = Array.prototype.slice.call(arguments);
+
+ if (currentZone && currentZone._name === 'angular') {
+ var rootZone = currentZone._parent;
+ var self = this;
+ rootZone.run(function () {
+ self._makeRequest.apply(undefined, args);
+ });
+ } else {
+ this._makeRequest.apply(undefined, args);
}
};
-Queue.prototype._maybeLog = function(data, originalError) {
- if (this.logger && this.options.verbose) {
- var message = originalError;
- message = message || _.get(data, 'body.trace.exception.message');
- message = message || _.get(data, 'body.trace_chain.0.exception.message');
- if (message) {
- this.logger.error(message);
- return;
- }
- message = _.get(data, 'body.message.body');
- if (message) {
- this.logger.log(message);
- }
+Transport.prototype._makeRequest = function (
+ accessToken,
+ url,
+ method,
+ data,
+ callback,
+ requestFactory,
+ timeout,
+ transport,
+) {
+ if (typeof RollbarProxy !== 'undefined') {
+ return _proxyRequest(data, callback);
}
-};
-Queue.prototype._maybeCallWait = function() {
- if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {
- if (this.waitIntervalID) {
- this.waitIntervalID = clearInterval(this.waitIntervalID);
- }
- this.waitCallback();
- return true;
+ if (transport === 'fetch') {
+ makeFetchRequest(accessToken, url, method, data, callback, timeout);
+ } else {
+ makeXhrRequest(
+ accessToken,
+ url,
+ method,
+ data,
+ callback,
+ requestFactory,
+ timeout,
+ );
}
- return false;
};
-module.exports = Queue;
+/* global RollbarProxy */
+function _proxyRequest(json, callback) {
+ var rollbarProxy = new RollbarProxy();
+ rollbarProxy.sendJsonPayload(
+ json,
+ function (_msg) {
+ /* do nothing */
+ }, // eslint-disable-line no-unused-vars
+ function (err) {
+ callback(new Error(err));
+ },
+ );
+}
+
+module.exports = Transport;
/***/ }),
-/* 13 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 656:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var _ = __webpack_require__(0);
+var logger = __webpack_require__(802);
+var _ = __webpack_require__(702);
-/*
- * Notifier - the internal object responsible for delegating between the client exposed API, the
- * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the
- * queue which handles the communcation with the Rollbar API servers.
- *
- * @param queue - an object that conforms to the interface: addItem(item, callback)
- * @param options - an object representing the options to be set for this notifier, this should have
- * any defaults already set by the caller
- */
-function Notifier(queue, options) {
- this.queue = queue;
- this.options = options;
- this.transforms = [];
- this.diagnostic = {};
+function makeFetchRequest(accessToken, url, method, data, callback, timeout) {
+ var controller;
+ var timeoutId;
+
+ if (_.isFiniteNumber(timeout)) {
+ controller = new AbortController();
+ timeoutId = setTimeout(function () {
+ controller.abort();
+ }, timeout);
+ }
+
+ fetch(url, {
+ method: method,
+ headers: {
+ 'Content-Type': 'application/json',
+ 'X-Rollbar-Access-Token': accessToken,
+ signal: controller && controller.signal,
+ },
+ body: data,
+ })
+ .then(function (response) {
+ if (timeoutId) clearTimeout(timeoutId);
+ return response.json();
+ })
+ .then(function (data) {
+ callback(null, data);
+ })
+ .catch(function (error) {
+ logger.error(error.message);
+ callback(error);
+ });
}
-/*
- * configure - updates the options for this notifier with the passed in object
- *
- * @param options - an object which gets merged with the current options set on this notifier
- * @returns this
- */
-Notifier.prototype.configure = function(options) {
- this.queue && this.queue.configure(options);
- var oldOptions = this.options;
- this.options = _.merge(oldOptions, options);
- return this;
-};
+module.exports = makeFetchRequest;
-/*
- * addTransform - adds a transform onto the end of the queue of transforms for this notifier
- *
- * @param transform - a function which takes three arguments:
- * * item: An Object representing the data to eventually be sent to Rollbar
- * * options: The current value of the options for this notifier
- * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this
- * callback with a null value for error if it wants the processing chain to continue, otherwise
- * with an error to terminate the processing. The item should be the updated item after this
- * transform is finished modifying it.
- */
-Notifier.prototype.addTransform = function(transform) {
- if (_.isFunction(transform)) {
- this.transforms.push(transform);
- }
- return this;
-};
-/*
- * log - the internal log function which applies the configured transforms and then pushes onto the
- * queue to be sent to the backend.
- *
- * @param item - An object with the following structure:
- * message [String] - An optional string to be sent to rollbar
- * error [Error] - An optional error
- *
- * @param callback - A function of type function(err, resp) which will be called with exactly one
- * null argument and one non-null argument. The callback will be called once, either during the
- * transform stage if an error occurs inside a transform, or in response to the communication with
- * the backend. The second argument will be the response from the backend in case of success.
- */
-Notifier.prototype.log = function(item, callback) {
- if (!callback || !_.isFunction(callback)) {
- callback = function() {};
- }
+/***/ }),
- if (!this.options.enabled) {
- return callback(new Error('Rollbar is not enabled'));
+/***/ 86:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+/*global XDomainRequest*/
+
+var _ = __webpack_require__(702);
+var logger = __webpack_require__(802);
+
+function makeXhrRequest(
+ accessToken,
+ url,
+ method,
+ data,
+ callback,
+ requestFactory,
+ timeout,
+) {
+ var request;
+ if (requestFactory) {
+ request = requestFactory();
+ } else {
+ request = _createXMLHTTPObject();
+ }
+ if (!request) {
+ // Give up, no way to send requests
+ return callback(new Error('No way to send a request'));
}
+ try {
+ try {
+ var onreadystatechange = function () {
+ try {
+ if (onreadystatechange && request.readyState === 4) {
+ onreadystatechange = undefined;
+
+ var parseResponse = _.jsonParse(request.responseText);
+ if (_isSuccess(request)) {
+ callback(parseResponse.error, parseResponse.value);
+ return;
+ } else if (_isNormalFailure(request)) {
+ if (request.status === 403) {
+ // likely caused by using a server access token
+ var message =
+ parseResponse.value && parseResponse.value.message;
+ logger.error(message);
+ }
+ // return valid http status codes
+ callback(new Error(String(request.status)));
+ } else {
+ // IE will return a status 12000+ on some sort of connection failure,
+ // so we return a blank error
+ // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx
+ var msg =
+ 'XHR response had no status code (likely connection failure)';
+ callback(_newRetriableError(msg));
+ }
+ }
+ } catch (ex) {
+ //jquery source mentions firefox may error out while accessing the
+ //request members if there is a network error
+ //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111
+ var exc;
+ if (ex && ex.stack) {
+ exc = ex;
+ } else {
+ exc = new Error(ex);
+ }
+ callback(exc);
+ }
+ };
- this.queue.addPendingItem(item);
- var originalError = item.err;
- this._applyTransforms(item, function(err, i) {
- if (err) {
- this.queue.removePendingItem(item);
- return callback(err, null);
- }
- this.queue.addItem(i, callback, originalError, item);
- }.bind(this));
-};
+ request.open(method, url, true);
+ if (request.setRequestHeader) {
+ request.setRequestHeader('Content-Type', 'application/json');
+ request.setRequestHeader('X-Rollbar-Access-Token', accessToken);
+ }
-/* Internal */
+ if (_.isFiniteNumber(timeout)) {
+ request.timeout = timeout;
+ }
-/*
- * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See
- * `addTransform` for more information.
- *
- * @param item - An item to be transformed
- * @param callback - A function of type function(err, item) which will be called with a non-null
- * error and a null item in the case of a transform failure, or a null error and non-null item after
- * all transforms have been applied.
- */
-Notifier.prototype._applyTransforms = function(item, callback) {
- var transformIndex = -1;
- var transformsLength = this.transforms.length;
- var transforms = this.transforms;
- var options = this.options;
+ request.onreadystatechange = onreadystatechange;
+ request.send(data);
+ } catch (e1) {
+ // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest
+ if (typeof XDomainRequest !== 'undefined') {
+ // Assume we are in a really old browser which has a bunch of limitations:
+ // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx
- var cb = function(err, i) {
- if (err) {
- callback(err, null);
- return;
- }
+ // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case
+ if (!window || !window.location) {
+ return callback(
+ new Error(
+ 'No window available during request, unknown environment',
+ ),
+ );
+ }
- transformIndex++;
+ // If the current page is http, try and send over http
+ if (
+ window.location.href.substring(0, 5) === 'http:' &&
+ url.substring(0, 5) === 'https'
+ ) {
+ url = 'http' + url.substring(5);
+ }
- if (transformIndex === transformsLength) {
- callback(null, i);
- return;
+ var xdomainrequest = new XDomainRequest();
+ xdomainrequest.onprogress = function () {};
+ xdomainrequest.ontimeout = function () {
+ var msg = 'Request timed out';
+ var code = 'ETIMEDOUT';
+ callback(_newRetriableError(msg, code));
+ };
+ xdomainrequest.onerror = function () {
+ callback(new Error('Error during request'));
+ };
+ xdomainrequest.onload = function () {
+ var parseResponse = _.jsonParse(xdomainrequest.responseText);
+ callback(parseResponse.error, parseResponse.value);
+ };
+ xdomainrequest.open(method, url, true);
+ xdomainrequest.send(data);
+ } else {
+ callback(new Error('Cannot find a method to transport a request'));
+ }
}
+ } catch (e2) {
+ callback(e2);
+ }
+}
- transforms[transformIndex](i, options, cb);
- };
+function _createXMLHTTPObject() {
+ /* global ActiveXObject:false */
- cb(null, item);
-};
+ var factories = [
+ function () {
+ return new XMLHttpRequest();
+ },
+ function () {
+ return new ActiveXObject('Msxml2.XMLHTTP');
+ },
+ function () {
+ return new ActiveXObject('Msxml3.XMLHTTP');
+ },
+ function () {
+ return new ActiveXObject('Microsoft.XMLHTTP');
+ },
+ ];
+ var xmlhttp;
+ var i;
+ var numFactories = factories.length;
+ for (i = 0; i < numFactories; i++) {
+ /* eslint-disable no-empty */
+ try {
+ xmlhttp = factories[i]();
+ break;
+ } catch (e) {
+ // pass
+ }
+ /* eslint-enable no-empty */
+ }
+ return xmlhttp;
+}
-module.exports = Notifier;
+function _isSuccess(r) {
+ return r && r.status && r.status === 200;
+}
+function _isNormalFailure(r) {
+ return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;
+}
-/***/ }),
-/* 14 */
-/***/ (function(module, exports, __webpack_require__) {
+function _newRetriableError(message, code) {
+ var err = new Error(message);
+ err.code = code || 'ENOTFOUND';
+ return err;
+}
-"use strict";
+module.exports = makeXhrRequest;
-var _ = __webpack_require__(0);
-var helpers = __webpack_require__(15);
+/***/ }),
-var defaultOptions = {
- hostname: 'api.rollbar.com',
- path: '/api/1/item/',
- search: null,
- version: '1',
- protocol: 'https:',
- port: 443
-};
+/***/ 509:
+/***/ ((module) => {
-/**
- * Api is an object that encapsulates methods of communicating with
- * the Rollbar API. It is a standard interface with some parts implemented
- * differently for server or browser contexts. It is an object that should
- * be instantiated when used so it can contain non-global options that may
- * be different for another instance of RollbarApi.
- *
- * @param options {
- * accessToken: the accessToken to use for posting items to rollbar
- * endpoint: an alternative endpoint to send errors to
- * must be a valid, fully qualified URL.
- * The default is: https://api.rollbar.com/api/1/item
- * proxy: if you wish to proxy requests provide an object
- * with the following keys:
- * host or hostname (required): foo.example.com
- * port (optional): 123
- * protocol (optional): https
- * }
- */
-function Api(options, transport, urllib, truncation, jsonBackup) {
- this.options = options;
- this.transport = transport;
- this.url = urllib;
- this.truncation = truncation;
- this.jsonBackup = jsonBackup;
- this.accessToken = options.accessToken;
- this.transportOptions = _getTransport(options, urllib);
-}
+"use strict";
-/**
- *
- * @param data
- * @param callback
- */
-Api.prototype.postItem = function(data, callback) {
- var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');
- var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);
- this.transport.post(this.accessToken, transportOptions, payload, callback);
-};
-/**
- *
- * @param data
- * @param callback
- */
-Api.prototype.buildJsonPayload = function(data, callback) {
- var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);
+// See https://nodejs.org/docs/latest/api/url.html
+function parse(url) {
+ var result = {
+ protocol: null,
+ auth: null,
+ host: null,
+ path: null,
+ hash: null,
+ href: url,
+ hostname: null,
+ port: null,
+ pathname: null,
+ search: null,
+ query: null,
+ };
- var stringifyResult;
- if (this.truncation) {
- stringifyResult = this.truncation.truncate(payload);
+ var i, last;
+ i = url.indexOf('//');
+ if (i !== -1) {
+ result.protocol = url.substring(0, i);
+ last = i + 2;
} else {
- stringifyResult = _.stringify(payload)
+ last = 0;
}
- if (stringifyResult.error) {
- if (callback) {
- callback(stringifyResult.error);
- }
- return null;
+ i = url.indexOf('@', last);
+ if (i !== -1) {
+ result.auth = url.substring(last, i);
+ last = i + 1;
}
- return stringifyResult.value;
-};
+ i = url.indexOf('/', last);
+ if (i === -1) {
+ i = url.indexOf('?', last);
+ if (i === -1) {
+ i = url.indexOf('#', last);
+ if (i === -1) {
+ result.host = url.substring(last);
+ } else {
+ result.host = url.substring(last, i);
+ result.hash = url.substring(i);
+ }
+ result.hostname = result.host.split(':')[0];
+ result.port = result.host.split(':')[1];
+ if (result.port) {
+ result.port = parseInt(result.port, 10);
+ }
+ return result;
+ } else {
+ result.host = url.substring(last, i);
+ result.hostname = result.host.split(':')[0];
+ result.port = result.host.split(':')[1];
+ if (result.port) {
+ result.port = parseInt(result.port, 10);
+ }
+ last = i;
+ }
+ } else {
+ result.host = url.substring(last, i);
+ result.hostname = result.host.split(':')[0];
+ result.port = result.host.split(':')[1];
+ if (result.port) {
+ result.port = parseInt(result.port, 10);
+ }
+ last = i;
+ }
-/**
- *
- * @param jsonPayload
- * @param callback
- */
-Api.prototype.postJsonPayload = function(jsonPayload, callback) {
- var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');
- this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);
-};
+ i = url.indexOf('#', last);
+ if (i === -1) {
+ result.path = url.substring(last);
+ } else {
+ result.path = url.substring(last, i);
+ result.hash = url.substring(i);
+ }
-Api.prototype.configure = function(options) {
- var oldOptions = this.oldOptions;
- this.options = _.merge(oldOptions, options);
- this.transportOptions = _getTransport(this.options, this.url);
- if (this.options.accessToken !== undefined) {
- this.accessToken = this.options.accessToken;
+ if (result.path) {
+ var pathParts = result.path.split('?');
+ result.pathname = pathParts[0];
+ result.query = pathParts[1];
+ result.search = result.query ? '?' + result.query : null;
}
- return this;
-};
-
-function _getTransport(options, url) {
- return helpers.getTransportFromOptions(options, defaultOptions, url);
+ return result;
}
-module.exports = Api;
+module.exports = {
+ parse: parse,
+};
/***/ }),
-/* 15 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 965:
+/***/ ((module) => {
"use strict";
-var _ = __webpack_require__(0);
+function wrapGlobals(window, handler, shim) {
+ if (!window) {
+ return;
+ }
+ // Adapted from https://github.com/bugsnag/bugsnag-js
+ 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(
+ ',',
+ );
+ var i, global;
+ for (i = 0; i < globals.length; ++i) {
+ global = globals[i];
-function buildPayload(accessToken, data, jsonBackup) {
- if (!_.isType(data.context, 'string')) {
- var contextResult = _.stringify(data.context, jsonBackup);
- if (contextResult.error) {
- data.context = 'Error: could not serialize \'context\'';
- } else {
- data.context = contextResult.value || '';
- }
- if (data.context.length > 255) {
- data.context = data.context.substr(0, 255);
+ if (window[global] && window[global].prototype) {
+ _extendListenerPrototype(handler, window[global].prototype, shim);
}
}
- return {
- access_token: accessToken,
- data: data
- };
}
-function getTransportFromOptions(options, defaults, url) {
- var hostname = defaults.hostname;
- var protocol = defaults.protocol;
- var port = defaults.port;
- var path = defaults.path;
- var search = defaults.search;
- var timeout = options.timeout;
+function _extendListenerPrototype(handler, prototype, shim) {
+ if (
+ prototype.hasOwnProperty &&
+ prototype.hasOwnProperty('addEventListener')
+ ) {
+ var oldAddEventListener = prototype.addEventListener;
+ while (
+ oldAddEventListener._rollbarOldAdd &&
+ oldAddEventListener.belongsToShim
+ ) {
+ oldAddEventListener = oldAddEventListener._rollbarOldAdd;
+ }
+ var addFn = function (event, callback, bubble) {
+ oldAddEventListener.call(this, event, handler.wrap(callback), bubble);
+ };
+ addFn._rollbarOldAdd = oldAddEventListener;
+ addFn.belongsToShim = shim;
+ prototype.addEventListener = addFn;
- var proxy = options.proxy;
- if (options.endpoint) {
- var opts = url.parse(options.endpoint);
- hostname = opts.hostname;
- protocol = opts.protocol;
- port = opts.port;
- path = opts.pathname;
- search = opts.search;
+ var oldRemoveEventListener = prototype.removeEventListener;
+ while (
+ oldRemoveEventListener._rollbarOldRemove &&
+ oldRemoveEventListener.belongsToShim
+ ) {
+ oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;
+ }
+ var removeFn = function (event, callback, bubble) {
+ oldRemoveEventListener.call(
+ this,
+ event,
+ (callback && callback._rollbar_wrapped) || callback,
+ bubble,
+ );
+ };
+ removeFn._rollbarOldRemove = oldRemoveEventListener;
+ removeFn.belongsToShim = shim;
+ prototype.removeEventListener = removeFn;
}
- return {
- timeout: timeout,
- hostname: hostname,
- protocol: protocol,
- port: port,
- path: path,
- search: search,
- proxy: proxy
- };
}
-function transportOptions(transport, method) {
- var protocol = transport.protocol || 'https:';
- var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);
- var hostname = transport.hostname;
- var path = transport.path;
- var timeout = transport.timeout;
- if (transport.search) {
- path = path + transport.search;
- }
- if (transport.proxy) {
- path = protocol + '//' + hostname + path;
- hostname = transport.proxy.host || transport.proxy.hostname;
- port = transport.proxy.port;
- protocol = transport.proxy.protocol || protocol;
- }
- return {
- timeout: timeout,
- protocol: protocol,
- hostname: hostname,
- path: path,
- port: port,
- method: method
- };
-}
+module.exports = wrapGlobals;
-function appendPathToPath(base, path) {
- var baseTrailingSlash = /\/$/.test(base);
- var pathBeginningSlash = /^\//.test(path);
- if (baseTrailingSlash && pathBeginningSlash) {
- path = path.substring(1);
- } else if (!baseTrailingSlash && !pathBeginningSlash) {
- path = '/' + path;
- }
+/***/ }),
+
+/***/ 948:
+/***/ ((module) => {
+
+"use strict";
- return base + path;
-}
module.exports = {
- buildPayload: buildPayload,
- getTransportFromOptions: getTransportFromOptions,
- transportOptions: transportOptions,
- appendPathToPath: appendPathToPath
+ version: '2.26.4',
+ endpoint: 'api.rollbar.com/api/1/item/',
+ logLevel: 'debug',
+ reportLevel: 'debug',
+ uncaughtErrorLevel: 'error',
+ maxItems: 0,
+ itemsPerMin: 60,
};
/***/ }),
-/* 16 */
-/***/ (function(module, exports) {
-// Console-polyfill. MIT license.
-// https://github.com/paulmillr/console-polyfill
-// Make it safe to do console.log() always.
-(function(global) {
- 'use strict';
- if (!global.console) {
- global.console = {};
- }
- var con = global.console;
- var prop, method;
- var dummy = function() {};
- var properties = ['memory'];
- var methods = ('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(',');
- while (prop = properties.pop()) if (!con[prop]) con[prop] = {};
- while (method = methods.pop()) if (!con[method]) con[method] = dummy;
- // Using `this` for web workers & supports Browserify / Webpack.
-})(typeof window === 'undefined' ? this : window);
+/***/ 303:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+"use strict";
-/***/ }),
-/* 17 */
-/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+var ErrorStackParser = __webpack_require__(180);
+var UNKNOWN_FUNCTION = '?';
+var ERR_CLASS_REGEXP = new RegExp(
+ '^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ',
+);
-// This detection.js module is used to encapsulate any ugly browser/feature
-// detection we may need to do.
+function guessFunctionName() {
+ return UNKNOWN_FUNCTION;
+}
-// Figure out which version of IE we're using, if any.
-// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library
-// Will return an integer on IE (i.e. 8)
-// Will return undefined otherwise
-function getIEVersion() {
- var undef;
- if (typeof document === 'undefined') {
- return undef;
- }
+function gatherContext() {
+ return null;
+}
- var v = 3,
- div = document.createElement('div'),
- all = div.getElementsByTagName('i');
+function Frame(stackFrame) {
+ var data = {};
- while (
- div.innerHTML = '',
- all[0]
+ data._stackFrame = stackFrame;
+
+ data.url = stackFrame.fileName;
+ data.line = stackFrame.lineNumber;
+ data.func = stackFrame.functionName;
+ data.column = stackFrame.columnNumber;
+ data.args = stackFrame.args;
+
+ data.context = gatherContext();
+
+ return data;
+}
+
+function Stack(exception, skip) {
+ function getStack() {
+ var parserStack = [];
+
+ skip = skip || 0;
+
+ try {
+ parserStack = ErrorStackParser.parse(exception);
+ } catch (e) {
+ parserStack = [];
+ }
+
+ var stack = [];
+
+ for (var i = skip; i < parserStack.length; i++) {
+ stack.push(new Frame(parserStack[i]));
+ }
+
+ return stack;
+ }
+
+ return {
+ stack: getStack(),
+ message: exception.message,
+ name: _mostSpecificErrorName(exception),
+ rawStack: exception.stack,
+ rawException: exception,
+ };
+}
+
+function parse(e, skip) {
+ var err = e;
+
+ if (err.nested || err.cause) {
+ var traceChain = [];
+ while (err) {
+ traceChain.push(new Stack(err, skip));
+ err = err.nested || err.cause;
+
+ skip = 0; // Only apply skip value to primary error
+ }
+
+ // Return primary error with full trace chain attached.
+ traceChain[0].traceChain = traceChain;
+ return traceChain[0];
+ } else {
+ return new Stack(err, skip);
+ }
+}
+
+function guessErrorClass(errMsg) {
+ if (!errMsg || !errMsg.match) {
+ return ['Unknown error. There was no error message to display.', ''];
+ }
+ var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);
+ var errClass = '(unknown)';
+
+ if (errClassMatch) {
+ errClass = errClassMatch[errClassMatch.length - 1];
+ errMsg = errMsg.replace(
+ (errClassMatch[errClassMatch.length - 2] || '') + errClass + ':',
+ '',
);
+ errMsg = errMsg.replace(/(^[\s]+|[\s]+$)/g, '');
+ }
+ return [errClass, errMsg];
+}
- return v > 4 ? v : undef;
+// * Prefers any value over an empty string
+// * Prefers any value over 'Error' where possible
+// * Prefers name over constructor.name when both are more specific than 'Error'
+function _mostSpecificErrorName(error) {
+ var name = error.name && error.name.length && error.name;
+ var constructorName =
+ error.constructor.name &&
+ error.constructor.name.length &&
+ error.constructor.name;
+
+ if (!name || !constructorName) {
+ return name || constructorName;
+ }
+
+ if (name === 'Error') {
+ return constructorName;
+ }
+ return name;
}
-var Detection = {
- ieVersion: getIEVersion
+module.exports = {
+ guessFunctionName: guessFunctionName,
+ guessErrorClass: guessErrorClass,
+ gatherContext: gatherContext,
+ parse: parse,
+ Stack: Stack,
+ Frame: Frame,
};
-module.exports = Detection;
-
/***/ }),
-/* 18 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 420:
+/***/ ((module) => {
"use strict";
-function captureUncaughtExceptions(window, handler, shim) {
- if (!window) { return; }
- var oldOnError;
+'use strict';
- if (typeof handler._rollbarOldOnError === 'function') {
- oldOnError = handler._rollbarOldOnError;
- } else if (window.onerror) {
- oldOnError = window.onerror;
- while (oldOnError._rollbarOldOnError) {
- oldOnError = oldOnError._rollbarOldOnError;
- }
- handler._rollbarOldOnError = oldOnError;
+var hasOwn = Object.prototype.hasOwnProperty;
+var toStr = Object.prototype.toString;
+
+var isPlainObject = function isPlainObject(obj) {
+ if (!obj || toStr.call(obj) !== '[object Object]') {
+ return false;
}
- handler.handleAnonymousErrors();
+ var hasOwnConstructor = hasOwn.call(obj, 'constructor');
+ var hasIsPrototypeOf =
+ obj.constructor &&
+ obj.constructor.prototype &&
+ hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
+ // Not own constructor property must be Object
+ if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
+ return false;
+ }
- var fn = function() {
- var args = Array.prototype.slice.call(arguments, 0);
- _rollbarWindowOnError(window, handler, oldOnError, args);
- };
- if (shim) {
- fn._rollbarOldOnError = oldOnError;
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+ var key;
+ for (key in obj) {
+ /**/
}
- window.onerror = fn;
-}
-function _rollbarWindowOnError(window, r, old, args) {
- if (window._rollbarWrappedError) {
- if (!args[4]) {
- args[4] = window._rollbarWrappedError;
+ return typeof key === 'undefined' || hasOwn.call(obj, key);
+};
+
+function merge() {
+ var i,
+ src,
+ copy,
+ clone,
+ name,
+ result = {},
+ current = null,
+ length = arguments.length;
+
+ for (i = 0; i < length; i++) {
+ current = arguments[i];
+ if (current == null) {
+ continue;
}
- if (!args[5]) {
- args[5] = window._rollbarWrappedError._rollbarContext;
+
+ for (name in current) {
+ src = result[name];
+ copy = current[name];
+ if (result !== copy) {
+ if (copy && isPlainObject(copy)) {
+ clone = src && isPlainObject(src) ? src : {};
+ result[name] = merge(clone, copy);
+ } else if (typeof copy !== 'undefined') {
+ result[name] = copy;
+ }
+ }
}
- window._rollbarWrappedError = null;
}
+ return result;
+}
- var ret = r.handleUncaughtException.apply(r, args);
+module.exports = merge;
- if (old) {
- old.apply(window, args);
- }
- // Let other chained onerror handlers above run before setting this.
- // If an error is thrown and caught within a chained onerror handler,
- // Error.prepareStackTrace() will see that one before the one we want.
- if (ret === 'anonymous') {
- r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()
- }
+/***/ }),
+
+/***/ 314:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+var _ = __webpack_require__(702);
+
+/*
+ * Notifier - the internal object responsible for delegating between the client exposed API, the
+ * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the
+ * queue which handles the communcation with the Rollbar API servers.
+ *
+ * @param queue - an object that conforms to the interface: addItem(item, callback)
+ * @param options - an object representing the options to be set for this notifier, this should have
+ * any defaults already set by the caller
+ */
+function Notifier(queue, options) {
+ this.queue = queue;
+ this.options = options;
+ this.transforms = [];
+ this.diagnostic = {};
}
-function captureUnhandledRejections(window, handler, shim) {
- if (!window) { return; }
+/*
+ * configure - updates the options for this notifier with the passed in object
+ *
+ * @param options - an object which gets merged with the current options set on this notifier
+ * @returns this
+ */
+Notifier.prototype.configure = function (options) {
+ this.queue && this.queue.configure(options);
+ var oldOptions = this.options;
+ this.options = _.merge(oldOptions, options);
+ return this;
+};
- if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {
- window.removeEventListener('unhandledrejection', window._rollbarURH);
+/*
+ * addTransform - adds a transform onto the end of the queue of transforms for this notifier
+ *
+ * @param transform - a function which takes three arguments:
+ * * item: An Object representing the data to eventually be sent to Rollbar
+ * * options: The current value of the options for this notifier
+ * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this
+ * callback with a null value for error if it wants the processing chain to continue, otherwise
+ * with an error to terminate the processing. The item should be the updated item after this
+ * transform is finished modifying it.
+ */
+Notifier.prototype.addTransform = function (transform) {
+ if (_.isFunction(transform)) {
+ this.transforms.push(transform);
}
+ return this;
+};
- var rejectionHandler = function (evt) {
- var reason, promise, detail;
- try {
- reason = evt.reason;
- } catch (e) {
- reason = undefined;
- }
- try {
- promise = evt.promise;
- } catch (e) {
- promise = '[unhandledrejection] error getting `promise` from event';
- }
- try {
- detail = evt.detail;
- if (!reason && detail) {
- reason = detail.reason;
- promise = detail.promise;
+/*
+ * log - the internal log function which applies the configured transforms and then pushes onto the
+ * queue to be sent to the backend.
+ *
+ * @param item - An object with the following structure:
+ * message [String] - An optional string to be sent to rollbar
+ * error [Error] - An optional error
+ *
+ * @param callback - A function of type function(err, resp) which will be called with exactly one
+ * null argument and one non-null argument. The callback will be called once, either during the
+ * transform stage if an error occurs inside a transform, or in response to the communication with
+ * the backend. The second argument will be the response from the backend in case of success.
+ */
+Notifier.prototype.log = function (item, callback) {
+ if (!callback || !_.isFunction(callback)) {
+ callback = function () {};
+ }
+
+ if (!this.options.enabled) {
+ return callback(new Error('Rollbar is not enabled'));
+ }
+
+ this.queue.addPendingItem(item);
+ var originalError = item.err;
+ this._applyTransforms(
+ item,
+ function (err, i) {
+ if (err) {
+ this.queue.removePendingItem(item);
+ return callback(err, null);
}
- } catch (e) {
- // Ignore
- }
- if (!reason) {
- reason = '[unhandledrejection] error getting `reason` from event';
+ this.queue.addItem(i, callback, originalError, item);
+ }.bind(this),
+ );
+};
+
+/* Internal */
+
+/*
+ * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See
+ * `addTransform` for more information.
+ *
+ * @param item - An item to be transformed
+ * @param callback - A function of type function(err, item) which will be called with a non-null
+ * error and a null item in the case of a transform failure, or a null error and non-null item after
+ * all transforms have been applied.
+ */
+Notifier.prototype._applyTransforms = function (item, callback) {
+ var transformIndex = -1;
+ var transformsLength = this.transforms.length;
+ var transforms = this.transforms;
+ var options = this.options;
+
+ var cb = function (err, i) {
+ if (err) {
+ callback(err, null);
+ return;
}
- if (handler && handler.handleUnhandledRejection) {
- handler.handleUnhandledRejection(reason, promise);
+ transformIndex++;
+
+ if (transformIndex === transformsLength) {
+ callback(null, i);
+ return;
}
- };
- rejectionHandler.belongsToShim = shim;
- window._rollbarURH = rejectionHandler;
- window.addEventListener('unhandledrejection', rejectionHandler);
-}
+ transforms[transformIndex](i, options, cb);
+ };
-module.exports = {
- captureUncaughtExceptions: captureUncaughtExceptions,
- captureUnhandledRejections: captureUnhandledRejections
+ cb(null, item);
};
+module.exports = Notifier;
+
/***/ }),
-/* 19 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 61:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-/*global XDomainRequest*/
+var _ = __webpack_require__(702);
-var _ = __webpack_require__(0);
-var logger = __webpack_require__(1);
+function checkLevel(item, settings) {
+ var level = item.level;
+ var levelVal = _.LEVELS[level] || 0;
+ var reportLevel = settings.reportLevel;
+ var reportLevelVal = _.LEVELS[reportLevel] || 0;
-/*
- * accessToken may be embedded in payload but that should not
- * be assumed
- *
- * options: {
- * hostname
- * protocol
- * path
- * port
- * method
- * }
- *
- * params is an object containing key/value pairs. These
- * will be appended to the path as 'key=value&key=value'
- *
- * payload is an unserialized object
- */
-function Transport(truncation) {
- this.truncation = truncation;
+ if (levelVal < reportLevelVal) {
+ return false;
+ }
+ return true;
+}
+
+function userCheckIgnore(logger) {
+ return function (item, settings) {
+ var isUncaught = !!item._isUncaught;
+ delete item._isUncaught;
+ var args = item._originalArgs;
+ delete item._originalArgs;
+ try {
+ if (_.isFunction(settings.onSendCallback)) {
+ settings.onSendCallback(isUncaught, args, item);
+ }
+ } catch (e) {
+ settings.onSendCallback = null;
+ logger.error('Error while calling onSendCallback, removing', e);
+ }
+ try {
+ if (
+ _.isFunction(settings.checkIgnore) &&
+ settings.checkIgnore(isUncaught, args, item)
+ ) {
+ return false;
+ }
+ } catch (e) {
+ settings.checkIgnore = null;
+ logger.error('Error while calling custom checkIgnore(), removing', e);
+ }
+ return true;
+ };
}
-Transport.prototype.get = function(accessToken, options, params, callback, requestFactory) {
- if (!callback || !_.isFunction(callback)) {
- callback = function() {};
- }
- _.addParamsAndAccessTokenToPath(accessToken, options, params);
+function urlIsNotBlockListed(logger) {
+ return function (item, settings) {
+ return !urlIsOnAList(item, settings, 'blocklist', logger);
+ };
+}
- var method = 'GET';
- var url = _.formatUrl(options);
- _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);
+function urlIsSafeListed(logger) {
+ return function (item, settings) {
+ return urlIsOnAList(item, settings, 'safelist', logger);
+ };
}
-Transport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {
- if (!callback || !_.isFunction(callback)) {
- callback = function() {};
+function matchFrames(trace, list, block) {
+ if (!trace) {
+ return !block;
}
- if (!payload) {
- return callback(new Error('Cannot send empty request'));
- }
+ var frames = trace.frames;
- var stringifyResult;
- if (this.truncation) {
- stringifyResult = this.truncation.truncate(payload);
- } else {
- stringifyResult = _.stringify(payload)
- }
- if (stringifyResult.error) {
- return callback(stringifyResult.error);
+ if (!frames || frames.length === 0) {
+ return !block;
}
- var writeData = stringifyResult.value;
- var method = 'POST';
- var url = _.formatUrl(options);
- _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);
-}
+ var frame, filename, url, urlRegex;
+ var listLength = list.length;
+ var frameLength = frames.length;
+ for (var i = 0; i < frameLength; i++) {
+ frame = frames[i];
+ filename = frame.filename;
-Transport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {
- if (!callback || !_.isFunction(callback)) {
- callback = function() {};
- }
+ if (!_.isType(filename, 'string')) {
+ return !block;
+ }
- var method = 'POST';
- var url = _.formatUrl(options);
- _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);
+ for (var j = 0; j < listLength; j++) {
+ url = list[j];
+ urlRegex = new RegExp(url);
+
+ if (urlRegex.test(filename)) {
+ return true;
+ }
+ }
+ }
+ return false;
}
+function urlIsOnAList(item, settings, safeOrBlock, logger) {
+ // safelist is the default
+ var block = false;
+ if (safeOrBlock === 'blocklist') {
+ block = true;
+ }
-// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope
-// so Angular change detection isn't triggered on each API call.
-// This is the equivalent of runOutsideAngular().
-//
-function _makeZoneRequest() {
- var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);
- var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;
- var args = Array.prototype.slice.call(arguments);
+ var list, traces;
+ try {
+ list = block ? settings.hostBlockList : settings.hostSafeList;
+ traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];
- if (currentZone && currentZone._name === 'angular') {
- var rootZone = currentZone._parent;
- rootZone.run(function () {
- _makeRequest.apply(undefined, args);
- });
- } else {
- _makeRequest.apply(undefined, args);
- }
-}
+ // These two checks are important to come first as they are defaults
+ // in case the list is missing or the trace is missing or not well-formed
+ if (!list || list.length === 0) {
+ return !block;
+ }
+ if (traces.length === 0 || !traces[0]) {
+ return !block;
+ }
-/* global RollbarProxy */
-function _proxyRequest(json, callback) {
- var rollbarProxy = new RollbarProxy();
- rollbarProxy.sendJsonPayload(
- json,
- function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars
- function(err) {
- callback(new Error(err));
+ var tracesLength = traces.length;
+ for (var i = 0; i < tracesLength; i++) {
+ if (matchFrames(traces[i], list, block)) {
+ return true;
+ }
}
- );
+ } catch (
+ e
+ /* istanbul ignore next */
+ ) {
+ if (block) {
+ settings.hostBlockList = null;
+ } else {
+ settings.hostSafeList = null;
+ }
+ var listName = block ? 'hostBlockList' : 'hostSafeList';
+ logger.error(
+ "Error while reading your configuration's " +
+ listName +
+ ' option. Removing custom ' +
+ listName +
+ '.',
+ e,
+ );
+ return !block;
+ }
+ return false;
}
-function _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {
- if (typeof RollbarProxy !== 'undefined') {
- return _proxyRequest(data, callback);
- }
+function messageIsIgnored(logger) {
+ return function (item, settings) {
+ var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;
- var request;
- if (requestFactory) {
- request = requestFactory();
- } else {
- request = _createXMLHTTPObject();
- }
- if (!request) {
- // Give up, no way to send requests
- return callback(new Error('No way to send a request'));
- }
- try {
try {
- var onreadystatechange = function() {
- try {
- if (onreadystatechange && request.readyState === 4) {
- onreadystatechange = undefined;
-
- var parseResponse = _.jsonParse(request.responseText);
- if (_isSuccess(request)) {
- callback(parseResponse.error, parseResponse.value);
- return;
- } else if (_isNormalFailure(request)) {
- if (request.status === 403) {
- // likely caused by using a server access token
- var message = parseResponse.value && parseResponse.value.message;
- logger.error(message);
- }
- // return valid http status codes
- callback(new Error(String(request.status)));
- } else {
- // IE will return a status 12000+ on some sort of connection failure,
- // so we return a blank error
- // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx
- var msg = 'XHR response had no status code (likely connection failure)';
- callback(_newRetriableError(msg));
- }
- }
- } catch (ex) {
- //jquery source mentions firefox may error out while accessing the
- //request members if there is a network error
- //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111
- var exc;
- if (ex && ex.stack) {
- exc = ex;
- } else {
- exc = new Error(ex);
- }
- callback(exc);
- }
- };
+ messageIsIgnored = false;
+ ignoredMessages = settings.ignoredMessages;
- request.open(method, url, true);
- if (request.setRequestHeader) {
- request.setRequestHeader('Content-Type', 'application/json');
- request.setRequestHeader('X-Rollbar-Access-Token', accessToken);
+ if (!ignoredMessages || ignoredMessages.length === 0) {
+ return true;
}
- if(_.isFiniteNumber(timeout)) {
- request.timeout = timeout;
- }
+ messages = messagesFromItem(item);
- request.onreadystatechange = onreadystatechange;
- request.send(data);
- } catch (e1) {
- // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest
- if (typeof XDomainRequest !== 'undefined') {
+ if (messages.length === 0) {
+ return true;
+ }
- // Assume we are in a really old browser which has a bunch of limitations:
- // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx
+ len = ignoredMessages.length;
+ for (i = 0; i < len; i++) {
+ rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');
- // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case
- if (!window || !window.location) {
- return callback(new Error('No window available during request, unknown environment'));
- }
+ for (j = 0; j < messages.length; j++) {
+ messageIsIgnored = rIgnoredMessage.test(messages[j]);
- // If the current page is http, try and send over http
- if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {
- url = 'http' + url.substring(5);
+ if (messageIsIgnored) {
+ return false;
+ }
}
-
- var xdomainrequest = new XDomainRequest();
- xdomainrequest.onprogress = function() {};
- xdomainrequest.ontimeout = function() {
- var msg = 'Request timed out';
- var code = 'ETIMEDOUT';
- callback(_newRetriableError(msg, code));
- };
- xdomainrequest.onerror = function() {
- callback(new Error('Error during request'));
- };
- xdomainrequest.onload = function() {
- var parseResponse = _.jsonParse(xdomainrequest.responseText);
- callback(parseResponse.error, parseResponse.value);
- };
- xdomainrequest.open(method, url, true);
- xdomainrequest.send(data);
- } else {
- callback(new Error('Cannot find a method to transport a request'));
}
+ } catch (
+ e
+ /* istanbul ignore next */
+ ) {
+ settings.ignoredMessages = null;
+ logger.error(
+ "Error while reading your configuration's ignoredMessages option. Removing custom ignoredMessages.",
+ );
}
- } catch (e2) {
- callback(e2);
- }
+
+ return true;
+ };
}
-function _createXMLHTTPObject() {
- /* global ActiveXObject:false */
+function messagesFromItem(item) {
+ var body = item.body;
+ var messages = [];
- var factories = [
- function () {
- return new XMLHttpRequest();
- },
- function () {
- return new ActiveXObject('Msxml2.XMLHTTP');
- },
- function () {
- return new ActiveXObject('Msxml3.XMLHTTP');
- },
- function () {
- return new ActiveXObject('Microsoft.XMLHTTP');
- }
- ];
- var xmlhttp;
- var i;
- var numFactories = factories.length;
- for (i = 0; i < numFactories; i++) {
- /* eslint-disable no-empty */
- try {
- xmlhttp = factories[i]();
- break;
- } catch (e) {
- // pass
+ // The payload schema only allows one of trace_chain, message, or trace.
+ // However, existing test cases are based on having both trace and message present.
+ // So here we preserve the ability to collect strings from any combination of these keys.
+ if (body.trace_chain) {
+ var traceChain = body.trace_chain;
+ for (var i = 0; i < traceChain.length; i++) {
+ var trace = traceChain[i];
+ messages.push(_.get(trace, 'exception.message'));
}
- /* eslint-enable no-empty */
}
- return xmlhttp;
-}
-
-function _isSuccess(r) {
- return r && r.status && r.status === 200;
-}
-
-function _isNormalFailure(r) {
- return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;
-}
-
-function _newRetriableError(message, code) {
- var err = new Error(message);
- err.code = code || 'ENOTFOUND';
- return err;
+ if (body.trace) {
+ messages.push(_.get(body, 'trace.exception.message'));
+ }
+ if (body.message) {
+ messages.push(_.get(body, 'message.body'));
+ }
+ return messages;
}
-module.exports = Transport;
+module.exports = {
+ checkLevel: checkLevel,
+ userCheckIgnore: userCheckIgnore,
+ urlIsNotBlockListed: urlIsNotBlockListed,
+ urlIsSafeListed: urlIsSafeListed,
+ messageIsIgnored: messageIsIgnored,
+};
/***/ }),
-/* 20 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 358:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var _ = __webpack_require__(0);
-var errorParser = __webpack_require__(3);
-var logger = __webpack_require__(1);
+var _ = __webpack_require__(702);
-function handleDomException(item, options, callback) {
- if(item.err && errorParser.Stack(item.err).name === 'DOMException') {
- var originalError = new Error();
- originalError.name = item.err.name;
- originalError.message = item.err.message;
- originalError.stack = item.err.stack;
- originalError.nested = item.err;
- item.err = originalError;
- }
- callback(null, item);
+/*
+ * Queue - an object which handles which handles a queue of items to be sent to Rollbar.
+ * This object handles rate limiting via a passed in rate limiter, retries based on connection
+ * errors, and filtering of items based on a set of configurable predicates. The communication to
+ * the backend is performed via a given API object.
+ *
+ * @param rateLimiter - An object which conforms to the interface
+ * rateLimiter.shouldSend(item) -> bool
+ * @param api - An object which conforms to the interface
+ * api.postItem(payload, function(err, response))
+ * @param logger - An object used to log verbose messages if desired
+ * @param options - see Queue.prototype.configure
+ */
+function Queue(rateLimiter, api, logger, options) {
+ this.rateLimiter = rateLimiter;
+ this.api = api;
+ this.logger = logger;
+ this.options = options;
+ this.predicates = [];
+ this.pendingItems = [];
+ this.pendingRequests = [];
+ this.retryQueue = [];
+ this.retryHandle = null;
+ this.waitCallback = null;
+ this.waitIntervalID = null;
}
-function handleItemWithError(item, options, callback) {
- item.data = item.data || {};
- if (item.err) {
- try {
- item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);
+/*
+ * configure - updates the options this queue uses
+ *
+ * @param options
+ */
+Queue.prototype.configure = function (options) {
+ this.api && this.api.configure(options);
+ var oldOptions = this.options;
+ this.options = _.merge(oldOptions, options);
+ return this;
+};
- if (options.addErrorContext) {
- addErrorContext(item);
- }
- } catch (e) {
- logger.error('Error while parsing the error object.', e);
- try {
- item.message = item.err.message || item.err.description || item.message || String(item.err);
- } catch (e2) {
- item.message = String(item.err) || String(e2);
- }
- delete item.err;
- }
+/*
+ * addPredicate - adds a predicate to the end of the list of predicates for this queue
+ *
+ * @param predicate - function(item, options) -> (bool|{err: Error})
+ * Returning true means that this predicate passes and the item is okay to go on the queue
+ * Returning false means do not add the item to the queue, but it is not an error
+ * Returning {err: Error} means do not add the item to the queue, and the given error explains why
+ * Returning {err: undefined} is equivalent to returning true but don't do that
+ */
+Queue.prototype.addPredicate = function (predicate) {
+ if (_.isFunction(predicate)) {
+ this.predicates.push(predicate);
}
- callback(null, item);
-}
-
-function addErrorContext(item) {
- var chain = [];
- var err = item.err;
+ return this;
+};
- chain.push(err);
+Queue.prototype.addPendingItem = function (item) {
+ this.pendingItems.push(item);
+};
- while (err.nested) {
- err = err.nested;
- chain.push(err);
+Queue.prototype.removePendingItem = function (item) {
+ var idx = this.pendingItems.indexOf(item);
+ if (idx !== -1) {
+ this.pendingItems.splice(idx, 1);
}
+};
- _.addErrorContext(item, chain);
-}
-
-function ensureItemHasSomethingToSay(item, options, callback) {
- if (!item.message && !item.stackInfo && !item.custom) {
- callback(new Error('No message, stack info, or custom data'), null);
+/*
+ * addItem - Send an item to the Rollbar API if all of the predicates are satisfied
+ *
+ * @param item - The payload to send to the backend
+ * @param callback - function(error, repsonse) which will be called with the response from the API
+ * in the case of a success, otherwise response will be null and error will have a value. If both
+ * error and response are null then the item was stopped by a predicate which did not consider this
+ * to be an error condition, but nonetheless did not send the item to the API.
+ * @param originalError - The original error before any transformations that is to be logged if any
+ */
+Queue.prototype.addItem = function (
+ item,
+ callback,
+ originalError,
+ originalItem,
+) {
+ if (!callback || !_.isFunction(callback)) {
+ callback = function () {
+ return;
+ };
}
- callback(null, item);
-}
-
-function addBaseInfo(item, options, callback) {
- var environment = (options.payload && options.payload.environment) || options.environment;
- item.data = _.merge(item.data, {
- environment: environment,
- level: item.level,
- endpoint: options.endpoint,
- platform: 'browser',
- framework: 'browser-js',
- language: 'javascript',
- server: {},
- uuid: item.uuid,
- notifier: {
- name: 'rollbar-browser-js',
- version: options.version
- },
- custom: item.custom
- });
- callback(null, item);
-}
-
-function addRequestInfo(window) {
- return function(item, options, callback) {
- if (!window || !window.location) {
- return callback(null, item);
- }
- var remoteString = '$remote_ip';
- if (!options.captureIp) {
- remoteString = null;
- } else if (options.captureIp !== true) {
- remoteString += '_anonymize';
- }
- _.set(item, 'data.request', {
- url: window.location.href,
- query_string: window.location.search,
- user_ip: remoteString
- });
- callback(null, item);
- };
-}
-
-function addClientInfo(window) {
- return function(item, options, callback) {
- if (!window) {
- return callback(null, item);
- }
- var nav = window.navigator || {};
- var scr = window.screen || {};
- _.set(item, 'data.client', {
- runtime_ms: item.timestamp - window._rollbarStartTime,
- timestamp: Math.round(item.timestamp / 1000),
- javascript: {
- browser: nav.userAgent,
- language: nav.language,
- cookie_enabled: nav.cookieEnabled,
- screen: {
- width: scr.width,
- height: scr.height
- }
- }
- });
- callback(null, item);
- };
-}
+ var predicateResult = this._applyPredicates(item);
+ if (predicateResult.stop) {
+ this.removePendingItem(originalItem);
+ callback(predicateResult.err);
+ return;
+ }
+ this._maybeLog(item, originalError);
+ this.removePendingItem(originalItem);
+ if (!this.options.transmit) {
+ callback(new Error('Transmit disabled'));
+ return;
+ }
+ this.pendingRequests.push(item);
+ try {
+ this._makeApiRequest(
+ item,
+ function (err, resp) {
+ this._dequeuePendingRequest(item);
+ callback(err, resp);
+ }.bind(this),
+ );
+ } catch (e) {
+ this._dequeuePendingRequest(item);
+ callback(e);
+ }
+};
-function addPluginInfo(window) {
- return function(item, options, callback) {
- if (!window || !window.navigator) {
- return callback(null, item);
- }
- var plugins = [];
- var navPlugins = window.navigator.plugins || [];
- var cur;
- for (var i=0, l=navPlugins.length; i < l; ++i) {
- cur = navPlugins[i];
- plugins.push({name: cur.name, description: cur.description});
- }
- _.set(item, 'data.client.javascript.plugins', plugins);
- callback(null, item);
- };
-}
+/*
+ * wait - Stop any further errors from being added to the queue, and get called back when all items
+ * currently processing have finished sending to the backend.
+ *
+ * @param callback - function() called when all pending items have been sent
+ */
+Queue.prototype.wait = function (callback) {
+ if (!_.isFunction(callback)) {
+ return;
+ }
+ this.waitCallback = callback;
+ if (this._maybeCallWait()) {
+ return;
+ }
+ if (this.waitIntervalID) {
+ this.waitIntervalID = clearInterval(this.waitIntervalID);
+ }
+ this.waitIntervalID = setInterval(
+ function () {
+ this._maybeCallWait();
+ }.bind(this),
+ 500,
+ );
+};
-function addBody(item, options, callback) {
- if (item.stackInfo) {
- if (item.stackInfo.traceChain) {
- addBodyTraceChain(item, options, callback);
- } else {
- addBodyTrace(item, options, callback);
+/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the
+ * given item with the currently configured options.
+ *
+ * @param item - An item in the queue
+ * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,
+ * the error value should be passed up to a callbak if we are stopping.
+ */
+Queue.prototype._applyPredicates = function (item) {
+ var p = null;
+ for (var i = 0, len = this.predicates.length; i < len; i++) {
+ p = this.predicates[i](item, this.options);
+ if (!p || p.err !== undefined) {
+ return { stop: true, err: p.err };
}
+ }
+ return { stop: false, err: null };
+};
+
+/*
+ * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an
+ * effort to retry if we are configured to do so.
+ *
+ * @param item - an item ready to send to the backend
+ * @param callback - function(err, response)
+ */
+Queue.prototype._makeApiRequest = function (item, callback) {
+ var rateLimitResponse = this.rateLimiter.shouldSend(item);
+ if (rateLimitResponse.shouldSend) {
+ this.api.postItem(
+ item,
+ function (err, resp) {
+ if (err) {
+ this._maybeRetry(err, item, callback);
+ } else {
+ callback(err, resp);
+ }
+ }.bind(this),
+ );
+ } else if (rateLimitResponse.error) {
+ callback(rateLimitResponse.error);
} else {
- addBodyMessage(item, options, callback);
+ this.api.postItem(rateLimitResponse.payload, callback);
}
-}
+};
-function addBodyMessage(item, options, callback) {
- var message = item.message;
- var custom = item.custom;
+// These are errors basically mean there is no internet connection
+var RETRIABLE_ERRORS = [
+ 'ECONNRESET',
+ 'ENOTFOUND',
+ 'ESOCKETTIMEDOUT',
+ 'ETIMEDOUT',
+ 'ECONNREFUSED',
+ 'EHOSTUNREACH',
+ 'EPIPE',
+ 'EAI_AGAIN',
+];
- if (!message) {
- message = 'Item sent with null or missing arguments.';
+/*
+ * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback
+ * with the error.
+ *
+ * @param err - an error returned by the API transport
+ * @param item - the item that was trying to be sent when this error occured
+ * @param callback - function(err, response)
+ */
+Queue.prototype._maybeRetry = function (err, item, callback) {
+ var shouldRetry = false;
+ if (this.options.retryInterval) {
+ for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {
+ if (err.code === RETRIABLE_ERRORS[i]) {
+ shouldRetry = true;
+ break;
+ }
+ }
+ if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {
+ item.retries = item.retries ? item.retries + 1 : 1;
+ if (item.retries > this.options.maxRetries) {
+ shouldRetry = false;
+ }
+ }
}
- var result = {
- body: message
- };
-
- if (custom) {
- result.extra = _.merge(custom);
+ if (shouldRetry) {
+ this._retryApiRequest(item, callback);
+ } else {
+ callback(err);
}
+};
- _.set(item, 'data.body', {message: result});
- callback(null, item);
-}
+/*
+ * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process
+ * that queue based on the retryInterval in the options for this queue.
+ *
+ * @param item - an item that failed to send due to an error we deem retriable
+ * @param callback - function(err, response)
+ */
+Queue.prototype._retryApiRequest = function (item, callback) {
+ this.retryQueue.push({ item: item, callback: callback });
-function stackFromItem(item) {
- // Transform a TraceKit stackInfo object into a Rollbar trace
- var stack = item.stackInfo.stack;
- if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {
- stack = item._unhandledStackInfo.stack;
+ if (!this.retryHandle) {
+ this.retryHandle = setInterval(
+ function () {
+ while (this.retryQueue.length) {
+ var retryObject = this.retryQueue.shift();
+ this._makeApiRequest(retryObject.item, retryObject.callback);
+ }
+ }.bind(this),
+ this.options.retryInterval,
+ );
}
- return stack;
-}
+};
-function addBodyTraceChain(item, options, callback) {
- var traceChain = item.stackInfo.traceChain;
- var traces = [];
+/*
+ * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to
+ * enable to functionality of providing a callback that clients can pass to `wait` to be notified
+ * when the pending request queue has been emptied. This must be called when the API finishes
+ * processing this item. If a `wait` callback is configured, it is called by this function.
+ *
+ * @param item - the item previously added to the pending request queue
+ */
+Queue.prototype._dequeuePendingRequest = function (item) {
+ var idx = this.pendingRequests.indexOf(item);
+ if (idx !== -1) {
+ this.pendingRequests.splice(idx, 1);
+ this._maybeCallWait();
+ }
+};
- var traceChainLength = traceChain.length;
- for (var i = 0; i < traceChainLength; i++) {
- var trace = buildTrace(item, traceChain[i], options);
- traces.push(trace);
+Queue.prototype._maybeLog = function (data, originalError) {
+ if (this.logger && this.options.verbose) {
+ var message = originalError;
+ message = message || _.get(data, 'body.trace.exception.message');
+ message = message || _.get(data, 'body.trace_chain.0.exception.message');
+ if (message) {
+ this.logger.error(message);
+ return;
+ }
+ message = _.get(data, 'body.message.body');
+ if (message) {
+ this.logger.log(message);
+ }
}
+};
- _.set(item, 'data.body', {trace_chain: traces});
- callback(null, item);
-}
+Queue.prototype._maybeCallWait = function () {
+ if (
+ _.isFunction(this.waitCallback) &&
+ this.pendingItems.length === 0 &&
+ this.pendingRequests.length === 0
+ ) {
+ if (this.waitIntervalID) {
+ this.waitIntervalID = clearInterval(this.waitIntervalID);
+ }
+ this.waitCallback();
+ return true;
+ }
+ return false;
+};
-function addBodyTrace(item, options, callback) {
- var stack = stackFromItem(item);
+module.exports = Queue;
- if (stack) {
- var trace = buildTrace(item, item.stackInfo, options);
- _.set(item, 'data.body', {trace: trace});
- callback(null, item);
- } else {
- var stackInfo = item.stackInfo;
- var guess = errorParser.guessErrorClass(stackInfo.message);
- var className = errorClass(stackInfo, guess[0], options);
- var message = guess[1];
- item.message = className + ': ' + message;
- addBodyMessage(item, options, callback);
- }
-}
+/***/ }),
-function buildTrace(item, stackInfo, options) {
- var description = item && item.data.description;
- var custom = item && item.custom;
- var stack = stackFromItem(item);
+/***/ 790:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- var guess = errorParser.guessErrorClass(stackInfo.message);
- var className = errorClass(stackInfo, guess[0], options);
- var message = guess[1];
- var trace = {
- exception: {
- 'class': className,
- message: message
- }
- };
+"use strict";
- if (description) {
- trace.exception.description = description;
- }
- if (stack) {
- if (stack.length === 0) {
- trace.exception.stack = stackInfo.rawStack;
- trace.exception.raw = String(stackInfo.rawException);
- }
- var stackFrame;
- var frame;
- var code;
- var pre;
- var post;
- var contextLength;
- var i, mid;
+var _ = __webpack_require__(702);
- trace.frames = [];
- for (i = 0; i < stack.length; ++i) {
- stackFrame = stack[i];
- frame = {
- filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',
- lineno: stackFrame.line || null,
- method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,
- colno: stackFrame.column
- };
- if (options.sendFrameUrl) {
- frame.url = stackFrame.url;
- }
- if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {
- continue;
- }
+/*
+ * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar
+ *
+ * @param options - the same options that are accepted by configureGlobal offered as a convenience
+ */
+function RateLimiter(options) {
+ this.startTime = _.now();
+ this.counter = 0;
+ this.perMinCounter = 0;
+ this.platform = null;
+ this.platformOptions = {};
+ this.configureGlobal(options);
+}
- code = pre = post = null;
- contextLength = stackFrame.context ? stackFrame.context.length : 0;
- if (contextLength) {
- mid = Math.floor(contextLength / 2);
- pre = stackFrame.context.slice(0, mid);
- code = stackFrame.context[mid];
- post = stackFrame.context.slice(mid);
- }
+RateLimiter.globalSettings = {
+ startTime: _.now(),
+ maxItems: undefined,
+ itemsPerMinute: undefined,
+};
- if (code) {
- frame.code = code;
- }
+/*
+ * configureGlobal - set the global rate limiter options
+ *
+ * @param options - Only the following values are recognized:
+ * startTime: a timestamp of the form returned by (new Date()).getTime()
+ * maxItems: the maximum items
+ * itemsPerMinute: the max number of items to send in a given minute
+ */
+RateLimiter.prototype.configureGlobal = function (options) {
+ if (options.startTime !== undefined) {
+ RateLimiter.globalSettings.startTime = options.startTime;
+ }
+ if (options.maxItems !== undefined) {
+ RateLimiter.globalSettings.maxItems = options.maxItems;
+ }
+ if (options.itemsPerMinute !== undefined) {
+ RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;
+ }
+};
- if (pre || post) {
- frame.context = {};
- if (pre && pre.length) {
- frame.context.pre = pre;
- }
- if (post && post.length) {
- frame.context.post = post;
- }
- }
+/*
+ * shouldSend - determine if we should send a given item based on rate limit settings
+ *
+ * @param item - the item we are about to send
+ * @returns An object with the following structure:
+ * error: (Error|null)
+ * shouldSend: bool
+ * payload: (Object|null)
+ * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and
+ * exactly one of error or payload will be non-null. If error is non-null, the returned Error will
+ * describe the situation, but it means that we were already over a rate limit (either globally or
+ * per minute) when this item was checked. If error is null, and therefore payload is non-null, it
+ * means this item put us over the global rate limit and the payload should be sent to Rollbar in
+ * place of the passed in item.
+ */
+RateLimiter.prototype.shouldSend = function (item, now) {
+ now = now || _.now();
+ var elapsedTime = now - this.startTime;
+ if (elapsedTime < 0 || elapsedTime >= 60000) {
+ this.startTime = now;
+ this.perMinCounter = 0;
+ }
- if (stackFrame.args) {
- frame.args = stackFrame.args;
- }
+ var globalRateLimit = RateLimiter.globalSettings.maxItems;
+ var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;
- trace.frames.push(frame);
- }
+ if (checkRate(item, globalRateLimit, this.counter)) {
+ return shouldSendValue(
+ this.platform,
+ this.platformOptions,
+ globalRateLimit + ' max items reached',
+ false,
+ );
+ } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {
+ return shouldSendValue(
+ this.platform,
+ this.platformOptions,
+ globalRateLimitPerMin + ' items per minute reached',
+ false,
+ );
+ }
+ this.counter++;
+ this.perMinCounter++;
- // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last
- trace.frames.reverse();
+ var shouldSend = !checkRate(item, globalRateLimit, this.counter);
+ var perMinute = shouldSend;
+ shouldSend =
+ shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);
+ return shouldSendValue(
+ this.platform,
+ this.platformOptions,
+ null,
+ shouldSend,
+ globalRateLimit,
+ globalRateLimitPerMin,
+ perMinute,
+ );
+};
- if (custom) {
- trace.extra = _.merge(custom);
- }
- }
+RateLimiter.prototype.setPlatformOptions = function (platform, options) {
+ this.platform = platform;
+ this.platformOptions = options;
+};
- return trace;
+/* Helpers */
+
+function checkRate(item, limit, counter) {
+ return !item.ignoreRateLimit && limit >= 1 && counter > limit;
}
-function errorClass(stackInfo, guess, options) {
- if (stackInfo.name) {
- return stackInfo.name;
- } else if (options.guessErrorClass) {
- return guess;
- } else {
- return '(unknown)';
+function shouldSendValue(
+ platform,
+ options,
+ error,
+ shouldSend,
+ globalRateLimit,
+ limitPerMin,
+ perMinute,
+) {
+ var payload = null;
+ if (error) {
+ error = new Error(error);
}
+ if (!error && !shouldSend) {
+ payload = rateLimitPayload(
+ platform,
+ options,
+ globalRateLimit,
+ limitPerMin,
+ perMinute,
+ );
+ }
+ return { error: error, shouldSend: shouldSend, payload: payload };
}
-function addScrubber(scrubFn) {
- return function (item, options, callback) {
- if (scrubFn) {
- var scrubFields = options.scrubFields || [];
- var scrubPaths = options.scrubPaths || [];
- item.data = scrubFn(item.data, scrubFields, scrubPaths);
- }
- callback(null, item);
+function rateLimitPayload(
+ platform,
+ options,
+ globalRateLimit,
+ limitPerMin,
+ perMinute,
+) {
+ var environment =
+ options.environment || (options.payload && options.payload.environment);
+ var msg;
+ if (perMinute) {
+ msg = 'item per minute limit reached, ignoring errors until timeout';
+ } else {
+ msg = 'maxItems has been hit, ignoring errors until reset.';
+ }
+ var item = {
+ body: {
+ message: {
+ body: msg,
+ extra: {
+ maxItems: globalRateLimit,
+ itemsPerMinute: limitPerMin,
+ },
+ },
+ },
+ language: 'javascript',
+ environment: environment,
+ notifier: {
+ version:
+ (options.notifier && options.notifier.version) || options.version,
+ },
+ };
+ if (platform === 'browser') {
+ item.platform = 'browser';
+ item.framework = 'browser-js';
+ item.notifier.name = 'rollbar-browser-js';
+ } else if (platform === 'server') {
+ item.framework = options.framework || 'node-js';
+ item.notifier.name = options.notifier.name;
+ } else if (platform === 'react-native') {
+ item.framework = options.framework || 'react-native';
+ item.notifier.name = options.notifier.name;
}
+ return item;
}
-module.exports = {
- handleDomException: handleDomException,
- handleItemWithError: handleItemWithError,
- ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,
- addBaseInfo: addBaseInfo,
- addRequestInfo: addRequestInfo,
- addClientInfo: addClientInfo,
- addPluginInfo: addPluginInfo,
- addBody: addBody,
- addScrubber: addScrubber
-};
+module.exports = RateLimiter;
/***/ }),
-/* 21 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {
- 'use strict';
- // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
-
- /* istanbul ignore next */
- if (true) {
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(22)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- } else {}
-}(this, function ErrorStackParser(StackFrame) {
- 'use strict';
-
- var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\S+:\d+/;
- var CHROME_IE_STACK_REGEXP = /^\s*at .*(\S+:\d+|\(native\))/m;
- var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\[native code])?$/;
-
- return {
- /**
- * Given an Error object, extract the most information from it.
- *
- * @param {Error} error object
- * @return {Array} of StackFrames
- */
- parse: function ErrorStackParser$$parse(error) {
- if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {
- return this.parseOpera(error);
- } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {
- return this.parseV8OrIE(error);
- } else if (error.stack) {
- return this.parseFFOrSafari(error);
- } else {
- throw new Error('Cannot parse given Error object');
- }
- },
-
- // Separate line and column numbers from a string of the form: (URI:Line:Column)
- extractLocation: function ErrorStackParser$$extractLocation(urlLike) {
- // Fail-fast but return locations like "(native)"
- if (urlLike.indexOf(':') === -1) {
- return [urlLike];
- }
-
- var regExp = /(.+?)(?::(\d+))?(?::(\d+))?$/;
- var parts = regExp.exec(urlLike.replace(/[()]/g, ''));
- return [parts[1], parts[2] || undefined, parts[3] || undefined];
- },
-
- parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {
- var filtered = error.stack.split('\n').filter(function(line) {
- return !!line.match(CHROME_IE_STACK_REGEXP);
- }, this);
-
- return filtered.map(function(line) {
- if (line.indexOf('(eval ') > -1) {
- // Throw away eval information until we implement stacktrace.js/stackframe#8
- line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(\),.*$)/g, '');
- }
- var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '(');
-
- // capture and preseve the parenthesized location "(/foo/my bar.js:12:87)" in
- // case it has spaces in it, as the string is split on \s+ later on
- var location = sanitizedLine.match(/ (\((.+):(\d+):(\d+)\)$)/);
-
- // remove the parenthesized location from the line, if it was matched
- sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;
-
- var tokens = sanitizedLine.split(/\s+/).slice(1);
- // if a location was matched, pass it to extractLocation() otherwise pop the last token
- var locationParts = this.extractLocation(location ? location[1] : tokens.pop());
- var functionName = tokens.join(' ') || undefined;
- var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];
-
- return new StackFrame({
- functionName: functionName,
- fileName: fileName,
- lineNumber: locationParts[1],
- columnNumber: locationParts[2],
- source: line
- });
- }, this);
- },
-
- parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {
- var filtered = error.stack.split('\n').filter(function(line) {
- return !line.match(SAFARI_NATIVE_CODE_REGEXP);
- }, this);
- return filtered.map(function(line) {
- // Throw away eval information until we implement stacktrace.js/stackframe#8
- if (line.indexOf(' > eval') > -1) {
- line = line.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ':$1');
- }
+/***/ 562:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {
- // Safari eval frames only have function names and nothing else
- return new StackFrame({
- functionName: line
- });
- } else {
- var functionNameRegex = /((.*".+"[^@]*)?[^@]*)(?:@)/;
- var matches = line.match(functionNameRegex);
- var functionName = matches && matches[1] ? matches[1] : undefined;
- var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));
+"use strict";
- return new StackFrame({
- functionName: functionName,
- fileName: locationParts[0],
- lineNumber: locationParts[1],
- columnNumber: locationParts[2],
- source: line
- });
- }
- }, this);
- },
- parseOpera: function ErrorStackParser$$parseOpera(e) {
- if (!e.stacktrace || (e.message.indexOf('\n') > -1 &&
- e.message.split('\n').length > e.stacktrace.split('\n').length)) {
- return this.parseOpera9(e);
- } else if (!e.stack) {
- return this.parseOpera10(e);
- } else {
- return this.parseOpera11(e);
- }
- },
+var RateLimiter = __webpack_require__(790);
+var Queue = __webpack_require__(358);
+var Notifier = __webpack_require__(314);
+var _ = __webpack_require__(702);
- parseOpera9: function ErrorStackParser$$parseOpera9(e) {
- var lineRE = /Line (\d+).*script (?:in )?(\S+)/i;
- var lines = e.message.split('\n');
- var result = [];
+/*
+ * Rollbar - the interface to Rollbar
+ *
+ * @param options
+ * @param api
+ * @param logger
+ */
+function Rollbar(options, api, logger, telemeter, platform) {
+ this.options = _.merge(options);
+ this.logger = logger;
+ Rollbar.rateLimiter.configureGlobal(this.options);
+ Rollbar.rateLimiter.setPlatformOptions(platform, this.options);
+ this.api = api;
+ this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);
- for (var i = 2, len = lines.length; i < len; i += 2) {
- var match = lineRE.exec(lines[i]);
- if (match) {
- result.push(new StackFrame({
- fileName: match[2],
- lineNumber: match[1],
- source: lines[i]
- }));
- }
- }
+ // This must happen before the Notifier is created
+ var tracer = this.options.tracer || null;
+ if (validateTracer(tracer)) {
+ this.tracer = tracer;
+ // set to a string for api response serialization
+ this.options.tracer = 'opentracing-tracer-enabled';
+ this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';
+ } else {
+ this.tracer = null;
+ }
- return result;
- },
+ this.notifier = new Notifier(this.queue, this.options);
+ this.telemeter = telemeter;
+ setStackTraceLimit(options);
+ this.lastError = null;
+ this.lastErrorHash = 'none';
+}
- parseOpera10: function ErrorStackParser$$parseOpera10(e) {
- var lineRE = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i;
- var lines = e.stacktrace.split('\n');
- var result = [];
+var defaultOptions = {
+ maxItems: 0,
+ itemsPerMinute: 60,
+};
- for (var i = 0, len = lines.length; i < len; i += 2) {
- var match = lineRE.exec(lines[i]);
- if (match) {
- result.push(
- new StackFrame({
- functionName: match[3] || undefined,
- fileName: match[2],
- lineNumber: match[1],
- source: lines[i]
- })
- );
- }
- }
+Rollbar.rateLimiter = new RateLimiter(defaultOptions);
- return result;
- },
+Rollbar.prototype.global = function (options) {
+ Rollbar.rateLimiter.configureGlobal(options);
+ return this;
+};
- // Opera 10.65+ Error.stack very similar to FF/Safari
- parseOpera11: function ErrorStackParser$$parseOpera11(error) {
- var filtered = error.stack.split('\n').filter(function(line) {
- return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);
- }, this);
+Rollbar.prototype.configure = function (options, payloadData) {
+ var oldOptions = this.options;
+ var payload = {};
+ if (payloadData) {
+ payload = { payload: payloadData };
+ }
- return filtered.map(function(line) {
- var tokens = line.split('@');
- var locationParts = this.extractLocation(tokens.pop());
- var functionCall = (tokens.shift() || '');
- var functionName = functionCall
- .replace(//, '$2')
- .replace(/\([^)]*\)/g, '') || undefined;
- var argsRaw;
- if (functionCall.match(/\(([^)]*)\)/)) {
- argsRaw = functionCall.replace(/^[^(]+\(([^)]*)\)$/, '$1');
- }
- var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?
- undefined : argsRaw.split(',');
+ this.options = _.merge(oldOptions, options, payload);
- return new StackFrame({
- functionName: functionName,
- args: args,
- fileName: locationParts[0],
- lineNumber: locationParts[1],
- columnNumber: locationParts[2],
- source: line
- });
- }, this);
- }
- };
-}));
+ // This must happen before the Notifier is configured
+ var tracer = this.options.tracer || null;
+ if (validateTracer(tracer)) {
+ this.tracer = tracer;
+ // set to a string for api response serialization
+ this.options.tracer = 'opentracing-tracer-enabled';
+ this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';
+ } else {
+ this.tracer = null;
+ }
+ this.notifier && this.notifier.configure(this.options);
+ this.telemeter && this.telemeter.configure(this.options);
+ setStackTraceLimit(options);
+ this.global(this.options);
-/***/ }),
-/* 22 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (validateTracer(options.tracer)) {
+ this.tracer = options.tracer;
+ }
-var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {
- 'use strict';
- // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
+ return this;
+};
- /* istanbul ignore next */
- if (true) {
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- } else {}
-}(this, function() {
- 'use strict';
- function _isNumber(n) {
- return !isNaN(parseFloat(n)) && isFinite(n);
- }
+Rollbar.prototype.log = function (item) {
+ var level = this._defaultLogLevel();
+ return this._log(level, item);
+};
- function _capitalize(str) {
- return str.charAt(0).toUpperCase() + str.substring(1);
- }
+Rollbar.prototype.debug = function (item) {
+ this._log('debug', item);
+};
- function _getter(p) {
- return function() {
- return this[p];
- };
- }
+Rollbar.prototype.info = function (item) {
+ this._log('info', item);
+};
- var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];
- var numericProps = ['columnNumber', 'lineNumber'];
- var stringProps = ['fileName', 'functionName', 'source'];
- var arrayProps = ['args'];
- var objectProps = ['evalOrigin'];
+Rollbar.prototype.warn = function (item) {
+ this._log('warning', item);
+};
- var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);
+Rollbar.prototype.warning = function (item) {
+ this._log('warning', item);
+};
- function StackFrame(obj) {
- if (!obj) return;
- for (var i = 0; i < props.length; i++) {
- if (obj[props[i]] !== undefined) {
- this['set' + _capitalize(props[i])](obj[props[i]]);
- }
- }
- }
+Rollbar.prototype.error = function (item) {
+ this._log('error', item);
+};
- StackFrame.prototype = {
- getArgs: function() {
- return this.args;
- },
- setArgs: function(v) {
- if (Object.prototype.toString.call(v) !== '[object Array]') {
- throw new TypeError('Args must be an Array');
- }
- this.args = v;
- },
+Rollbar.prototype.critical = function (item) {
+ this._log('critical', item);
+};
- getEvalOrigin: function() {
- return this.evalOrigin;
- },
- setEvalOrigin: function(v) {
- if (v instanceof StackFrame) {
- this.evalOrigin = v;
- } else if (v instanceof Object) {
- this.evalOrigin = new StackFrame(v);
- } else {
- throw new TypeError('Eval Origin must be an Object or StackFrame');
- }
- },
+Rollbar.prototype.wait = function (callback) {
+ this.queue.wait(callback);
+};
- toString: function() {
- var fileName = this.getFileName() || '';
- var lineNumber = this.getLineNumber() || '';
- var columnNumber = this.getColumnNumber() || '';
- var functionName = this.getFunctionName() || '';
- if (this.getIsEval()) {
- if (fileName) {
- return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';
- }
- return '[eval]:' + lineNumber + ':' + columnNumber;
- }
- if (functionName) {
- return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';
- }
- return fileName + ':' + lineNumber + ':' + columnNumber;
- }
- };
+Rollbar.prototype.captureEvent = function (type, metadata, level) {
+ return this.telemeter && this.telemeter.captureEvent(type, metadata, level);
+};
- StackFrame.fromString = function StackFrame$$fromString(str) {
- var argsStartIndex = str.indexOf('(');
- var argsEndIndex = str.lastIndexOf(')');
+Rollbar.prototype.captureDomContentLoaded = function (ts) {
+ return this.telemeter && this.telemeter.captureDomContentLoaded(ts);
+};
- var functionName = str.substring(0, argsStartIndex);
- var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');
- var locationString = str.substring(argsEndIndex + 1);
+Rollbar.prototype.captureLoad = function (ts) {
+ return this.telemeter && this.telemeter.captureLoad(ts);
+};
- if (locationString.indexOf('@') === 0) {
- var parts = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(locationString, '');
- var fileName = parts[1];
- var lineNumber = parts[2];
- var columnNumber = parts[3];
- }
+Rollbar.prototype.buildJsonPayload = function (item) {
+ return this.api.buildJsonPayload(item);
+};
- return new StackFrame({
- functionName: functionName,
- args: args || undefined,
- fileName: fileName,
- lineNumber: lineNumber || undefined,
- columnNumber: columnNumber || undefined
- });
- };
+Rollbar.prototype.sendJsonPayload = function (jsonPayload) {
+ this.api.postJsonPayload(jsonPayload);
+};
- for (var i = 0; i < booleanProps.length; i++) {
- StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);
- StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {
- return function(v) {
- this[p] = Boolean(v);
- };
- })(booleanProps[i]);
- }
+/* Internal */
- for (var j = 0; j < numericProps.length; j++) {
- StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);
- StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {
- return function(v) {
- if (!_isNumber(v)) {
- throw new TypeError(p + ' must be a Number');
- }
- this[p] = Number(v);
- };
- })(numericProps[j]);
+Rollbar.prototype._log = function (defaultLevel, item) {
+ var callback;
+ if (item.callback) {
+ callback = item.callback;
+ delete item.callback;
+ }
+ if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {
+ if (callback) {
+ var error = new Error('ignored identical item');
+ error.item = item;
+ callback(error);
}
-
- for (var k = 0; k < stringProps.length; k++) {
- StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);
- StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {
- return function(v) {
- this[p] = String(v);
- };
- })(stringProps[k]);
+ return;
+ }
+ try {
+ this._addTracingInfo(item);
+ item.level = item.level || defaultLevel;
+ this.telemeter && this.telemeter._captureRollbarItem(item);
+ item.telemetryEvents =
+ (this.telemeter && this.telemeter.copyEvents()) || [];
+ this.notifier.log(item, callback);
+ } catch (e) {
+ if (callback) {
+ callback(e);
}
+ this.logger.error(e);
+ }
+};
- return StackFrame;
-}));
-
+Rollbar.prototype._defaultLogLevel = function () {
+ return this.options.logLevel || 'debug';
+};
-/***/ }),
-/* 23 */
-/***/ (function(module, exports, __webpack_require__) {
+Rollbar.prototype._sameAsLastError = function (item) {
+ if (!item._isUncaught) {
+ return false;
+ }
+ var itemHash = generateItemHash(item);
+ if (this.lastErrorHash === itemHash) {
+ return true;
+ }
+ this.lastError = item.err;
+ this.lastErrorHash = itemHash;
+ return false;
+};
-"use strict";
+Rollbar.prototype._addTracingInfo = function (item) {
+ // Tracer validation occurs in the constructor
+ // or in the Rollbar.prototype.configure methods
+ if (this.tracer) {
+ // add rollbar occurrence uuid to span
+ var span = this.tracer.scope().active();
+ if (validateSpan(span)) {
+ span.setTag('rollbar.error_uuid', item.uuid);
+ span.setTag('rollbar.has_error', true);
+ span.setTag('error', true);
+ span.setTag(
+ 'rollbar.item_url',
+ `https://rollbar.com/item/uuid/?uuid=${item.uuid}`,
+ );
+ span.setTag(
+ 'rollbar.occurrence_url',
+ `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`,
+ );
-var _ = __webpack_require__(0);
+ // add span ID & trace ID to occurrence
+ var opentracingSpanId = span.context().toSpanId();
+ var opentracingTraceId = span.context().toTraceId();
-function itemToPayload(item, options, callback) {
- var payloadOptions = options.payload || {};
- if (payloadOptions.body) {
- delete payloadOptions.body;
+ if (item.custom) {
+ item.custom.opentracing_span_id = opentracingSpanId;
+ item.custom.opentracing_trace_id = opentracingTraceId;
+ } else {
+ item.custom = {
+ opentracing_span_id: opentracingSpanId,
+ opentracing_trace_id: opentracingTraceId,
+ };
+ }
+ }
}
+};
- var data = _.merge(item.data, payloadOptions);
- if (item._isUncaught) {
- data._isUncaught = true;
- }
- if (item._originalArgs) {
- data._originalArgs = item._originalArgs;
- }
- callback(null, data);
+function generateItemHash(item) {
+ var message = item.message || '';
+ var stack = (item.err || {}).stack || String(item.err);
+ return message + '::' + stack;
}
-function addTelemetryData(item, options, callback) {
- if (item.telemetryEvents) {
- _.set(item, 'data.body.telemetry', item.telemetryEvents);
+// Node.js, Chrome, Safari, and some other browsers support this property
+// which globally sets the number of stack frames returned in an Error object.
+// If a browser can't use it, no harm done.
+function setStackTraceLimit(options) {
+ if (options.stackTraceLimit) {
+ Error.stackTraceLimit = options.stackTraceLimit;
}
- callback(null, item);
}
-function addMessageWithError(item, options, callback) {
- if (!item.message) {
- callback(null, item);
- return;
- }
- var tracePath = 'data.body.trace_chain.0';
- var trace = _.get(item, tracePath);
- if (!trace) {
- tracePath = 'data.body.trace';
- trace = _.get(item, tracePath);
+/**
+ * Validate the Tracer object provided to the Client
+ * is valid for our Opentracing use case.
+ * @param {opentracer.Tracer} tracer
+ */
+function validateTracer(tracer) {
+ if (!tracer) {
+ return false;
}
- if (trace) {
- if (!(trace.exception && trace.exception.description)) {
- _.set(item, tracePath+'.exception.description', item.message);
- callback(null, item);
- return;
- }
- var extra = _.get(item, tracePath+'.extra') || {};
- var newExtra = _.merge(extra, {message: item.message});
- _.set(item, tracePath+'.extra', newExtra);
+
+ if (!tracer.scope || typeof tracer.scope !== 'function') {
+ return false;
}
- callback(null, item);
-}
-function userTransform(logger) {
- return function(item, options, callback) {
- var newItem = _.merge(item);
- var response = null;
- try {
- if (_.isFunction(options.transform)) {
- response = options.transform(newItem.data, item);
- }
- } catch (e) {
- options.transform = null;
- logger.error('Error while calling custom transform() function. Removing custom transform().', e);
- callback(null, item);
- return;
- }
- if(_.isPromise(response)) {
- response.then(function (promisedItem) {
- if(promisedItem) {
- newItem.data = promisedItem;
- }
- callback(null, newItem);
- }, function (error) {
- callback(error, item);
- });
- } else {
- callback(null, newItem);
- }
+ var scope = tracer.scope();
+
+ if (!scope || !scope.active || typeof scope.active !== 'function') {
+ return false;
}
+
+ return true;
}
-function addConfigToPayload(item, options, callback) {
- if (!options.sendConfig) {
- return callback(null, item);
+/**
+ * Validate the Span object provided
+ * @param {opentracer.Span} span
+ */
+function validateSpan(span) {
+ if (!span || !span.context || typeof span.context !== 'function') {
+ return false;
}
- var configKey = '_rollbarConfig';
- var custom = _.get(item, 'data.custom') || {};
- custom[configKey] = options;
- item.data.custom = custom;
- callback(null, item);
-}
-function addFunctionOption(options, name) {
- if(_.isFunction(options[name])) {
- options[name] = options[name].toString();
+ var spanContext = span.context();
+
+ if (
+ !spanContext ||
+ !spanContext.toSpanId ||
+ !spanContext.toTraceId ||
+ typeof spanContext.toSpanId !== 'function' ||
+ typeof spanContext.toTraceId !== 'function'
+ ) {
+ return false;
}
+
+ return true;
}
-function addConfiguredOptions(item, options, callback) {
- var configuredOptions = options._configuredOptions;
+module.exports = Rollbar;
- // These must be stringified or they'll get dropped during serialization.
- addFunctionOption(configuredOptions, 'transform');
- addFunctionOption(configuredOptions, 'checkIgnore');
- addFunctionOption(configuredOptions, 'onSendCallback');
- delete configuredOptions.accessToken;
- item.data.notifier.configured_options = configuredOptions;
- callback(null, item);
-}
+/***/ }),
-function addDiagnosticKeys(item, options, callback) {
- var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);
+/***/ 369:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- if (_.get(item, 'err._isAnonymous')) {
- diagnostic.is_anonymous = true;
- }
+"use strict";
- if (item._isUncaught) {
- diagnostic.is_uncaught = item._isUncaught;
- }
- if (item.err) {
- try {
- diagnostic.raw_error = {
- message: item.err.message,
- name: item.err.name,
- constructor_name: item.err.constructor && item.err.constructor.name,
- filename: item.err.fileName,
- line: item.err.lineNumber,
- column: item.err.columnNumber,
- stack: item.err.stack
- };
- } catch (e) {
- diagnostic.raw_error = { failed: String(e) };
+var _ = __webpack_require__(702);
+var traverse = __webpack_require__(267);
+
+function scrub(data, scrubFields, scrubPaths) {
+ scrubFields = scrubFields || [];
+
+ if (scrubPaths) {
+ for (var i = 0; i < scrubPaths.length; ++i) {
+ scrubPath(data, scrubPaths[i]);
}
}
- item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);
- callback(null, item);
-}
+ var paramRes = _getScrubFieldRegexs(scrubFields);
+ var queryRes = _getScrubQueryParamRegexs(scrubFields);
-module.exports = {
- itemToPayload: itemToPayload,
- addTelemetryData: addTelemetryData,
- addMessageWithError: addMessageWithError,
- userTransform: userTransform,
- addConfigToPayload: addConfigToPayload,
- addConfiguredOptions: addConfiguredOptions,
- addDiagnosticKeys: addDiagnosticKeys
-};
+ function redactQueryParam(dummy0, paramPart) {
+ return paramPart + _.redact();
+ }
+
+ function paramScrubber(v) {
+ var i;
+ if (_.isType(v, 'string')) {
+ for (i = 0; i < queryRes.length; ++i) {
+ v = v.replace(queryRes[i], redactQueryParam);
+ }
+ }
+ return v;
+ }
+ function valScrubber(k, v) {
+ var i;
+ for (i = 0; i < paramRes.length; ++i) {
+ if (paramRes[i].test(k)) {
+ v = _.redact();
+ break;
+ }
+ }
+ return v;
+ }
-/***/ }),
-/* 24 */
-/***/ (function(module, exports, __webpack_require__) {
+ function scrubber(k, v, seen) {
+ var tmpV = valScrubber(k, v);
+ if (tmpV === v) {
+ if (_.isType(v, 'object') || _.isType(v, 'array')) {
+ return traverse(v, scrubber, seen);
+ }
+ return paramScrubber(tmpV);
+ } else {
+ return tmpV;
+ }
+ }
-"use strict";
+ return traverse(data, scrubber);
+}
+function scrubPath(obj, path) {
+ var keys = path.split('.');
+ var last = keys.length - 1;
+ try {
+ for (var i = 0; i <= last; ++i) {
+ if (i < last) {
+ obj = obj[keys[i]];
+ } else {
+ obj[keys[i]] = _.redact();
+ }
+ }
+ } catch (e) {
+ // Missing key is OK;
+ }
+}
-var _ = __webpack_require__(0);
+function _getScrubFieldRegexs(scrubFields) {
+ var ret = [];
+ var pat;
+ for (var i = 0; i < scrubFields.length; ++i) {
+ pat = '^\\[?(%5[bB])?' + scrubFields[i] + '\\[?(%5[bB])?\\]?(%5[dD])?$';
+ ret.push(new RegExp(pat, 'i'));
+ }
+ return ret;
+}
-function checkIgnore(item, settings) {
- if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {
- return !_.get(item, 'body.message.extra.isAjax');
+function _getScrubQueryParamRegexs(scrubFields) {
+ var ret = [];
+ var pat;
+ for (var i = 0; i < scrubFields.length; ++i) {
+ pat = '\\[?(%5[bB])?' + scrubFields[i] + '\\[?(%5[bB])?\\]?(%5[dD])?';
+ ret.push(new RegExp('(' + pat + '=)([^&\\n]+)', 'igm'));
}
- return true;
+ return ret;
}
-module.exports = {
- checkIgnore: checkIgnore
-};
+module.exports = scrub;
/***/ }),
-/* 25 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 773:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var _ = __webpack_require__(0);
+var _ = __webpack_require__(702);
-function checkLevel(item, settings) {
- var level = item.level;
- var levelVal = _.LEVELS[level] || 0;
- var reportLevel = settings.reportLevel;
- var reportLevelVal = _.LEVELS[reportLevel] || 0;
+var MAX_EVENTS = 100;
- if (levelVal < reportLevelVal) {
- return false;
- }
- return true;
+function Telemeter(options) {
+ this.queue = [];
+ this.options = _.merge(options);
+ var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;
+ this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));
}
-function userCheckIgnore(logger) {
- return function(item, settings) {
- var isUncaught = !!item._isUncaught;
- delete item._isUncaught;
- var args = item._originalArgs;
- delete item._originalArgs;
- try {
- if (_.isFunction(settings.onSendCallback)) {
- settings.onSendCallback(isUncaught, args, item);
- }
- } catch (e) {
- settings.onSendCallback = null;
- logger.error('Error while calling onSendCallback, removing', e);
- }
+Telemeter.prototype.configure = function (options) {
+ var oldOptions = this.options;
+ this.options = _.merge(oldOptions, options);
+ var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;
+ var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));
+ var deleteCount = 0;
+ if (this.queue.length > newMaxEvents) {
+ deleteCount = this.queue.length - newMaxEvents;
+ }
+ this.maxQueueSize = newMaxEvents;
+ this.queue.splice(0, deleteCount);
+};
+
+Telemeter.prototype.copyEvents = function () {
+ var events = Array.prototype.slice.call(this.queue, 0);
+ if (_.isFunction(this.options.filterTelemetry)) {
try {
- if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {
- return false;
+ var i = events.length;
+ while (i--) {
+ if (this.options.filterTelemetry(events[i])) {
+ events.splice(i, 1);
+ }
}
} catch (e) {
- settings.checkIgnore = null;
- logger.error('Error while calling custom checkIgnore(), removing', e);
+ this.options.filterTelemetry = null;
}
- return true;
}
-}
+ return events;
+};
-function urlIsNotBlockListed(logger) {
- return function(item, settings) {
- return !urlIsOnAList(item, settings, 'blocklist', logger);
+Telemeter.prototype.capture = function (
+ type,
+ metadata,
+ level,
+ rollbarUUID,
+ timestamp,
+) {
+ var e = {
+ level: getLevel(type, level),
+ type: type,
+ timestamp_ms: timestamp || _.now(),
+ body: metadata,
+ source: 'client',
+ };
+ if (rollbarUUID) {
+ e.uuid = rollbarUUID;
}
-}
-function urlIsSafeListed(logger) {
- return function(item, settings) {
- return urlIsOnAList(item, settings, 'safelist', logger);
+ try {
+ if (
+ _.isFunction(this.options.filterTelemetry) &&
+ this.options.filterTelemetry(e)
+ ) {
+ return false;
+ }
+ } catch (exc) {
+ this.options.filterTelemetry = null;
}
-}
-
-function matchFrames(trace, list, block) {
- if (!trace) { return !block }
- var frames = trace.frames;
+ this.push(e);
+ return e;
+};
- if (!frames || frames.length === 0) { return !block; }
+Telemeter.prototype.captureEvent = function (
+ type,
+ metadata,
+ level,
+ rollbarUUID,
+) {
+ return this.capture(type, metadata, level, rollbarUUID);
+};
- var frame, filename, url, urlRegex;
- var listLength = list.length;
- var frameLength = frames.length;
- for (var i = 0; i < frameLength; i++) {
- frame = frames[i];
- filename = frame.filename;
+Telemeter.prototype.captureError = function (
+ err,
+ level,
+ rollbarUUID,
+ timestamp,
+) {
+ var metadata = {
+ message: err.message || String(err),
+ };
+ if (err.stack) {
+ metadata.stack = err.stack;
+ }
+ return this.capture('error', metadata, level, rollbarUUID, timestamp);
+};
- if (!_.isType(filename, 'string')) { return !block; }
+Telemeter.prototype.captureLog = function (
+ message,
+ level,
+ rollbarUUID,
+ timestamp,
+) {
+ return this.capture(
+ 'log',
+ {
+ message: message,
+ },
+ level,
+ rollbarUUID,
+ timestamp,
+ );
+};
- for (var j = 0; j < listLength; j++) {
- url = list[j];
- urlRegex = new RegExp(url);
+Telemeter.prototype.captureNetwork = function (
+ metadata,
+ subtype,
+ rollbarUUID,
+ requestData,
+) {
+ subtype = subtype || 'xhr';
+ metadata.subtype = metadata.subtype || subtype;
+ if (requestData) {
+ metadata.request = requestData;
+ }
+ var level = this.levelFromStatus(metadata.status_code);
+ return this.capture('network', metadata, level, rollbarUUID);
+};
- if (urlRegex.test(filename)) {
- return true;
- }
- }
+Telemeter.prototype.levelFromStatus = function (statusCode) {
+ if (statusCode >= 200 && statusCode < 400) {
+ return 'info';
}
- return false;
-}
+ if (statusCode === 0 || statusCode >= 400) {
+ return 'error';
+ }
+ return 'info';
+};
-function urlIsOnAList(item, settings, safeOrBlock, logger) {
- // safelist is the default
- var block = false;
- if (safeOrBlock === 'blocklist') {
- block = true;
+Telemeter.prototype.captureDom = function (
+ subtype,
+ element,
+ value,
+ checked,
+ rollbarUUID,
+) {
+ var metadata = {
+ subtype: subtype,
+ element: element,
+ };
+ if (value !== undefined) {
+ metadata.value = value;
}
+ if (checked !== undefined) {
+ metadata.checked = checked;
+ }
+ return this.capture('dom', metadata, 'info', rollbarUUID);
+};
- var list, traces;
- try {
- list = block ? settings.hostBlockList : settings.hostSafeList;
- traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];
+Telemeter.prototype.captureNavigation = function (from, to, rollbarUUID) {
+ return this.capture(
+ 'navigation',
+ { from: from, to: to },
+ 'info',
+ rollbarUUID,
+ );
+};
- // These two checks are important to come first as they are defaults
- // in case the list is missing or the trace is missing or not well-formed
- if (!list || list.length === 0) {
- return !block;
- }
- if (traces.length === 0 || !traces[0]) {
- return !block;
- }
+Telemeter.prototype.captureDomContentLoaded = function (ts) {
+ return this.capture(
+ 'navigation',
+ { subtype: 'DOMContentLoaded' },
+ 'info',
+ undefined,
+ ts && ts.getTime(),
+ );
+ /**
+ * If we decide to make this a dom event instead, then use the line below:
+ return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());
+ */
+};
+Telemeter.prototype.captureLoad = function (ts) {
+ return this.capture(
+ 'navigation',
+ { subtype: 'load' },
+ 'info',
+ undefined,
+ ts && ts.getTime(),
+ );
+ /**
+ * If we decide to make this a dom event instead, then use the line below:
+ return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());
+ */
+};
- var tracesLength = traces.length;
- for (var i = 0; i < tracesLength; i++) {
- if(matchFrames(traces[i], list, block)) {
- return true;
- }
- }
- } catch (e)
- /* istanbul ignore next */
- {
- if (block) {
- settings.hostBlockList = null;
- } else {
- settings.hostSafeList = null;
- }
- var listName = block ? 'hostBlockList' : 'hostSafeList';
- logger.error('Error while reading your configuration\'s ' + listName + ' option. Removing custom ' + listName + '.', e);
- return !block;
+Telemeter.prototype.captureConnectivityChange = function (type, rollbarUUID) {
+ return this.captureNetwork({ change: type }, 'connectivity', rollbarUUID);
+};
+
+// Only intended to be used internally by the notifier
+Telemeter.prototype._captureRollbarItem = function (item) {
+ if (!this.options.includeItemsInTelemetry) {
+ return;
}
- return false;
+ if (item.err) {
+ return this.captureError(item.err, item.level, item.uuid, item.timestamp);
+ }
+ if (item.message) {
+ return this.captureLog(item.message, item.level, item.uuid, item.timestamp);
+ }
+ if (item.custom) {
+ return this.capture(
+ 'log',
+ item.custom,
+ item.level,
+ item.uuid,
+ item.timestamp,
+ );
+ }
+};
+
+Telemeter.prototype.push = function (e) {
+ this.queue.push(e);
+ if (this.queue.length > this.maxQueueSize) {
+ this.queue.shift();
+ }
+};
+
+function getLevel(type, level) {
+ if (level) {
+ return level;
+ }
+ var defaultLevel = {
+ error: 'error',
+ manual: 'info',
+ };
+ return defaultLevel[type] || 'info';
}
-function messageIsIgnored(logger) {
- return function(item, settings) {
- var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;
+module.exports = Telemeter;
+
- try {
- messageIsIgnored = false;
- ignoredMessages = settings.ignoredMessages;
+/***/ }),
- if (!ignoredMessages || ignoredMessages.length === 0) {
- return true;
- }
+/***/ 417:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- messages = messagesFromItem(item);
+"use strict";
- if (messages.length === 0){
- return true;
- }
- len = ignoredMessages.length;
- for (i = 0; i < len; i++) {
- rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');
+var _ = __webpack_require__(702);
- for (j = 0; j < messages.length; j++) {
- messageIsIgnored = rIgnoredMessage.test(messages[j]);
+function itemToPayload(item, options, callback) {
+ var data = item.data;
- if (messageIsIgnored) {
- return false;
- }
- }
- }
- } catch(e)
- /* istanbul ignore next */
- {
- settings.ignoredMessages = null;
- logger.error('Error while reading your configuration\'s ignoredMessages option. Removing custom ignoredMessages.');
- }
+ if (item._isUncaught) {
+ data._isUncaught = true;
+ }
+ if (item._originalArgs) {
+ data._originalArgs = item._originalArgs;
+ }
+ callback(null, data);
+}
- return true;
+function addPayloadOptions(item, options, callback) {
+ var payloadOptions = options.payload || {};
+ if (payloadOptions.body) {
+ delete payloadOptions.body;
}
+
+ item.data = _.merge(item.data, payloadOptions);
+ callback(null, item);
}
-function messagesFromItem(item) {
- var body = item.body;
- var messages = [];
+function addTelemetryData(item, options, callback) {
+ if (item.telemetryEvents) {
+ _.set(item, 'data.body.telemetry', item.telemetryEvents);
+ }
+ callback(null, item);
+}
- // The payload schema only allows one of trace_chain, message, or trace.
- // However, existing test cases are based on having both trace and message present.
- // So here we preserve the ability to collect strings from any combination of these keys.
- if (body.trace_chain) {
- var traceChain = body.trace_chain;
- for (var i = 0; i < traceChain.length; i++) {
- var trace = traceChain[i];
- messages.push(_.get(trace, 'exception.message'));
- }
+function addMessageWithError(item, options, callback) {
+ if (!item.message) {
+ callback(null, item);
+ return;
}
- if (body.trace) {
- messages.push(_.get(body, 'trace.exception.message'));
+ var tracePath = 'data.body.trace_chain.0';
+ var trace = _.get(item, tracePath);
+ if (!trace) {
+ tracePath = 'data.body.trace';
+ trace = _.get(item, tracePath);
}
- if (body.message) {
- messages.push(_.get(body, 'message.body'));
+ if (trace) {
+ if (!(trace.exception && trace.exception.description)) {
+ _.set(item, tracePath + '.exception.description', item.message);
+ callback(null, item);
+ return;
+ }
+ var extra = _.get(item, tracePath + '.extra') || {};
+ var newExtra = _.merge(extra, { message: item.message });
+ _.set(item, tracePath + '.extra', newExtra);
}
- return messages;
+ callback(null, item);
}
-module.exports = {
- checkLevel: checkLevel,
- userCheckIgnore: userCheckIgnore,
- urlIsNotBlockListed: urlIsNotBlockListed,
- urlIsSafeListed: urlIsSafeListed,
- messageIsIgnored: messageIsIgnored
-};
+function userTransform(logger) {
+ return function (item, options, callback) {
+ var newItem = _.merge(item);
+ var response = null;
+ try {
+ if (_.isFunction(options.transform)) {
+ response = options.transform(newItem.data, item);
+ }
+ } catch (e) {
+ options.transform = null;
+ logger.error(
+ 'Error while calling custom transform() function. Removing custom transform().',
+ e,
+ );
+ callback(null, item);
+ return;
+ }
+ if (_.isPromise(response)) {
+ response.then(
+ function (promisedItem) {
+ if (promisedItem) {
+ newItem.data = promisedItem;
+ }
+ callback(null, newItem);
+ },
+ function (error) {
+ callback(error, item);
+ },
+ );
+ } else {
+ callback(null, newItem);
+ }
+ };
+}
+function addConfigToPayload(item, options, callback) {
+ if (!options.sendConfig) {
+ return callback(null, item);
+ }
+ var configKey = '_rollbarConfig';
+ var custom = _.get(item, 'data.custom') || {};
+ custom[configKey] = options;
+ item.data.custom = custom;
+ callback(null, item);
+}
-/***/ }),
-/* 26 */
-/***/ (function(module, exports, __webpack_require__) {
+function addFunctionOption(options, name) {
+ if (_.isFunction(options[name])) {
+ options[name] = options[name].toString();
+ }
+}
-"use strict";
+function addConfiguredOptions(item, options, callback) {
+ var configuredOptions = options._configuredOptions;
+ // These must be stringified or they'll get dropped during serialization.
+ addFunctionOption(configuredOptions, 'transform');
+ addFunctionOption(configuredOptions, 'checkIgnore');
+ addFunctionOption(configuredOptions, 'onSendCallback');
-module.exports = {
- version: '2.24.0',
- endpoint: 'api.rollbar.com/api/1/item/',
- logLevel: 'debug',
- reportLevel: 'debug',
- uncaughtErrorLevel: 'error',
- maxItems: 0,
- itemsPerMin: 60
+ delete configuredOptions.accessToken;
+ item.data.notifier.configured_options = configuredOptions;
+ callback(null, item);
}
+function addDiagnosticKeys(item, options, callback) {
+ var diagnostic = _.merge(
+ item.notifier.client.notifier.diagnostic,
+ item.diagnostic,
+ );
-/***/ }),
-/* 27 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (_.get(item, 'err._isAnonymous')) {
+ diagnostic.is_anonymous = true;
+ }
-"use strict";
+ if (item._isUncaught) {
+ diagnostic.is_uncaught = item._isUncaught;
+ }
+ if (item.err) {
+ try {
+ diagnostic.raw_error = {
+ message: item.err.message,
+ name: item.err.name,
+ constructor_name: item.err.constructor && item.err.constructor.name,
+ filename: item.err.fileName,
+ line: item.err.lineNumber,
+ column: item.err.columnNumber,
+ stack: item.err.stack,
+ };
+ } catch (e) {
+ diagnostic.raw_error = { failed: String(e) };
+ }
+ }
-module.exports = {
- scrubFields: [
- 'pw',
- 'pass',
- 'passwd',
- 'password',
- 'secret',
- 'confirm_password',
- 'confirmPassword',
- 'password_confirmation',
- 'passwordConfirmation',
- 'access_token',
- 'accessToken',
- 'X-Rollbar-Access-Token',
- 'secret_key',
- 'secretKey',
- 'secretToken',
- 'cc-number',
- 'card number',
- 'cardnumber',
- 'cardnum',
- 'ccnum',
- 'ccnumber',
- 'cc num',
- 'creditcardnumber',
- 'credit card number',
- 'newcreditcardnumber',
- 'new credit card',
- 'creditcardno',
- 'credit card no',
- 'card#',
- 'card #',
- 'cc-csc',
- 'cvc',
- 'cvc2',
- 'cvv2',
- 'ccv2',
- 'security code',
- 'card verification',
- 'name on credit card',
- 'name on card',
- 'nameoncard',
- 'cardholder',
- 'card holder',
- 'name des karteninhabers',
- 'ccname',
- 'card type',
- 'cardtype',
- 'cc type',
- 'cctype',
- 'payment type',
- 'expiration date',
- 'expirationdate',
- 'expdate',
- 'cc-exp',
- 'ccmonth',
- 'ccyear'
- ]
+ item.data.notifier.diagnostic = _.merge(
+ item.data.notifier.diagnostic,
+ diagnostic,
+ );
+ callback(null, item);
}
+module.exports = {
+ itemToPayload: itemToPayload,
+ addPayloadOptions: addPayloadOptions,
+ addTelemetryData: addTelemetryData,
+ addMessageWithError: addMessageWithError,
+ userTransform: userTransform,
+ addConfigToPayload: addConfigToPayload,
+ addConfiguredOptions: addConfiguredOptions,
+ addDiagnosticKeys: addDiagnosticKeys,
+};
+
/***/ }),
-/* 28 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 473:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var _ = __webpack_require__(0);
+var _ = __webpack_require__(702);
+var traverse = __webpack_require__(267);
-var MAX_EVENTS = 100;
+function raw(payload, jsonBackup) {
+ return [payload, _.stringify(payload, jsonBackup)];
+}
-function Telemeter(options) {
- this.queue = [];
- this.options = _.merge(options);
- var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;
- this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));
+function selectFrames(frames, range) {
+ var len = frames.length;
+ if (len > range * 2) {
+ return frames.slice(0, range).concat(frames.slice(len - range));
+ }
+ return frames;
+}
+
+function truncateFrames(payload, jsonBackup, range) {
+ range = typeof range === 'undefined' ? 30 : range;
+ var body = payload.data.body;
+ var frames;
+ if (body.trace_chain) {
+ var chain = body.trace_chain;
+ for (var i = 0; i < chain.length; i++) {
+ frames = chain[i].frames;
+ frames = selectFrames(frames, range);
+ chain[i].frames = frames;
+ }
+ } else if (body.trace) {
+ frames = body.trace.frames;
+ frames = selectFrames(frames, range);
+ body.trace.frames = frames;
+ }
+ return [payload, _.stringify(payload, jsonBackup)];
}
-Telemeter.prototype.configure = function(options) {
- var oldOptions = this.options;
- this.options = _.merge(oldOptions, options);
- var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;
- var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));
- var deleteCount = 0;
- if (this.maxQueueSize > newMaxEvents) {
- deleteCount = this.maxQueueSize - newMaxEvents;
+function maybeTruncateValue(len, val) {
+ if (!val) {
+ return val;
}
- this.maxQueueSize = newMaxEvents;
- this.queue.splice(0, deleteCount);
-};
+ if (val.length > len) {
+ return val.slice(0, len - 3).concat('...');
+ }
+ return val;
+}
-Telemeter.prototype.copyEvents = function() {
- var events = Array.prototype.slice.call(this.queue, 0);
- if (_.isFunction(this.options.filterTelemetry)) {
- try {
- var i = events.length;
- while (i--) {
- if (this.options.filterTelemetry(events[i])) {
- events.splice(i, 1);
- }
- }
- } catch (e) {
- this.options.filterTelemetry = null;
+function truncateStrings(len, payload, jsonBackup) {
+ function truncator(k, v, seen) {
+ switch (_.typeName(v)) {
+ case 'string':
+ return maybeTruncateValue(len, v);
+ case 'object':
+ case 'array':
+ return traverse(v, truncator, seen);
+ default:
+ return v;
}
}
- return events;
-};
+ payload = traverse(payload, truncator);
+ return [payload, _.stringify(payload, jsonBackup)];
+}
-Telemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {
- var e = {
- level: getLevel(type, level),
- type: type,
- timestamp_ms: timestamp || _.now(),
- body: metadata,
- source: 'client'
- };
- if (rollbarUUID) {
- e.uuid = rollbarUUID;
+function truncateTraceData(traceData) {
+ if (traceData.exception) {
+ delete traceData.exception.description;
+ traceData.exception.message = maybeTruncateValue(
+ 255,
+ traceData.exception.message,
+ );
}
+ traceData.frames = selectFrames(traceData.frames, 1);
+ return traceData;
+}
- try {
- if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {
- return false;
+function minBody(payload, jsonBackup) {
+ var body = payload.data.body;
+ if (body.trace_chain) {
+ var chain = body.trace_chain;
+ for (var i = 0; i < chain.length; i++) {
+ chain[i] = truncateTraceData(chain[i]);
}
- } catch (exc) {
- this.options.filterTelemetry = null;
+ } else if (body.trace) {
+ body.trace = truncateTraceData(body.trace);
}
+ return [payload, _.stringify(payload, jsonBackup)];
+}
- this.push(e);
- return e;
-};
+function needsTruncation(payload, maxSize) {
+ return _.maxByteSize(payload) > maxSize;
+}
-Telemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {
- return this.capture(type, metadata, level, rollbarUUID);
-};
+function truncate(payload, jsonBackup, maxSize) {
+ maxSize = typeof maxSize === 'undefined' ? 512 * 1024 : maxSize;
+ var strategies = [
+ raw,
+ truncateFrames,
+ truncateStrings.bind(null, 1024),
+ truncateStrings.bind(null, 512),
+ truncateStrings.bind(null, 256),
+ minBody,
+ ];
+ var strategy, results, result;
-Telemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {
- var metadata = {
- message: err.message || String(err)
- };
- if (err.stack) {
- metadata.stack = err.stack;
+ while ((strategy = strategies.shift())) {
+ results = strategy(payload, jsonBackup);
+ payload = results[0];
+ result = results[1];
+ if (result.error || !needsTruncation(result.value, maxSize)) {
+ return result;
+ }
}
- return this.capture('error', metadata, level, rollbarUUID, timestamp);
-};
+ return result;
+}
-Telemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {
- return this.capture('log', {
- message: message
- }, level, rollbarUUID, timestamp);
-};
+module.exports = {
+ truncate: truncate,
-Telemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {
- subtype = subtype || 'xhr';
- metadata.subtype = metadata.subtype || subtype;
- if (requestData) {
- metadata.request = requestData;
- }
- var level = this.levelFromStatus(metadata.status_code);
- return this.capture('network', metadata, level, rollbarUUID);
+ /* for testing */
+ raw: raw,
+ truncateFrames: truncateFrames,
+ truncateStrings: truncateStrings,
+ maybeTruncateValue: maybeTruncateValue,
};
-Telemeter.prototype.levelFromStatus = function(statusCode) {
- if (statusCode >= 200 && statusCode < 400) {
- return 'info';
- }
- if (statusCode === 0 || statusCode >= 400) {
- return 'error';
- }
- return 'info';
-};
-Telemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {
- var metadata = {
- subtype: subtype,
- element: element
- };
- if (value !== undefined) {
- metadata.value = value;
- }
- if (checked !== undefined) {
- metadata.checked = checked;
- }
- return this.capture('dom', metadata, 'info', rollbarUUID);
-};
+/***/ }),
-Telemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {
- return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);
-};
+/***/ 702:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-Telemeter.prototype.captureDomContentLoaded = function(ts) {
- return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());
- /**
- * If we decide to make this a dom event instead, then use the line below:
- return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());
- */
-};
-Telemeter.prototype.captureLoad = function(ts) {
- return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());
- /**
- * If we decide to make this a dom event instead, then use the line below:
- return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());
- */
-};
+"use strict";
-Telemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {
- return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);
-};
-// Only intended to be used internally by the notifier
-Telemeter.prototype._captureRollbarItem = function(item) {
- if (!this.options.includeItemsInTelemetry) {
+var merge = __webpack_require__(420);
+
+var RollbarJSON = {};
+function setupJSON(polyfillJSON) {
+ if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {
return;
}
- if (item.err) {
- return this.captureError(item.err, item.level, item.uuid, item.timestamp);
+
+ if (isDefined(JSON)) {
+ // If polyfill is provided, prefer it over existing non-native shims.
+ if (polyfillJSON) {
+ if (isNativeFunction(JSON.stringify)) {
+ RollbarJSON.stringify = JSON.stringify;
+ }
+ if (isNativeFunction(JSON.parse)) {
+ RollbarJSON.parse = JSON.parse;
+ }
+ } else {
+ // else accept any interface that is present.
+ if (isFunction(JSON.stringify)) {
+ RollbarJSON.stringify = JSON.stringify;
+ }
+ if (isFunction(JSON.parse)) {
+ RollbarJSON.parse = JSON.parse;
+ }
+ }
}
- if (item.message) {
- return this.captureLog(item.message, item.level, item.uuid, item.timestamp);
+ if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {
+ polyfillJSON && polyfillJSON(RollbarJSON);
}
- if (item.custom) {
- return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);
+}
+
+/*
+ * isType - Given a Javascript value and a string, returns true if the type of the value matches the
+ * given string.
+ *
+ * @param x - any value
+ * @param t - a lowercase string containing one of the following type names:
+ * - undefined
+ * - null
+ * - error
+ * - number
+ * - boolean
+ * - string
+ * - symbol
+ * - function
+ * - object
+ * - array
+ * @returns true if x is of type t, otherwise false
+ */
+function isType(x, t) {
+ return t === typeName(x);
+}
+
+/*
+ * typeName - Given a Javascript value, returns the type of the object as a string
+ */
+function typeName(x) {
+ var name = typeof x;
+ if (name !== 'object') {
+ return name;
}
-};
+ if (!x) {
+ return 'null';
+ }
+ if (x instanceof Error) {
+ return 'error';
+ }
+ return {}.toString
+ .call(x)
+ .match(/\s([a-zA-Z]+)/)[1]
+ .toLowerCase();
+}
+
+/* isFunction - a convenience function for checking if a value is a function
+ *
+ * @param f - any value
+ * @returns true if f is a function, otherwise false
+ */
+function isFunction(f) {
+ 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');
+}
-Telemeter.prototype.push = function(e) {
- this.queue.push(e);
- if (this.queue.length > this.maxQueueSize) {
- this.queue.shift();
- }
-};
+/* isString - Checks if the argument is a string
+ *
+ * @param value - any value
+ * @returns true if value is a string
+ */
+function isString(value) {
+ return typeof value === 'string' || value instanceof String;
+}
-function getLevel(type, level) {
- if (level) {
- return level;
- }
- var defaultLevel = {
- error: 'error',
- manual: 'info'
- };
- return defaultLevel[type] || 'info';
+/**
+ * isFiniteNumber - determines whether the passed value is a finite number
+ *
+ * @param {*} n - any value
+ * @returns true if value is a finite number
+ */
+function isFiniteNumber(n) {
+ return Number.isFinite(n);
}
-module.exports = Telemeter;
+/*
+ * isDefined - a convenience function for checking if a value is not equal to undefined
+ *
+ * @param u - any value
+ * @returns true if u is anything other than undefined
+ */
+function isDefined(u) {
+ return !isType(u, 'undefined');
+}
+/*
+ * isIterable - convenience function for checking if a value can be iterated, essentially
+ * whether it is an object or an array.
+ *
+ * @param i - any value
+ * @returns true if i is an object or an array as determined by `typeName`
+ */
+function isIterable(i) {
+ var type = typeName(i);
+ return type === 'object' || type === 'array';
+}
-/***/ }),
-/* 29 */
-/***/ (function(module, exports, __webpack_require__) {
+/*
+ * isError - convenience function for checking if a value is of an error type
+ *
+ * @param e - any value
+ * @returns true if e is an error
+ */
+function isError(e) {
+ // Detect both Error and Firefox Exception type
+ return isType(e, 'error') || isType(e, 'exception');
+}
-"use strict";
+/* isPromise - a convenience function for checking if a value is a promise
+ *
+ * @param p - any value
+ * @returns true if f is a function, otherwise false
+ */
+function isPromise(p) {
+ return isObject(p) && isType(p.then, 'function');
+}
+function redact() {
+ return '********';
+}
-var _ = __webpack_require__(0);
-var scrub = __webpack_require__(4);
-var urlparser = __webpack_require__(2);
-var domUtil = __webpack_require__(30);
+// from http://stackoverflow.com/a/8809472/1138191
+function uuid4() {
+ var d = now();
+ var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(
+ /[xy]/g,
+ function (c) {
+ var r = (d + Math.random() * 16) % 16 | 0;
+ d = Math.floor(d / 16);
+ return (c === 'x' ? r : (r & 0x7) | 0x8).toString(16);
+ },
+ );
+ return uuid;
+}
-var defaults = {
- network: true,
- networkResponseHeaders: false,
- networkResponseBody: false,
- networkRequestHeaders: false,
- networkRequestBody: false,
- networkErrorOnHttp5xx: false,
- networkErrorOnHttp4xx: false,
- networkErrorOnHttp0: false,
- log: true,
- dom: true,
- navigation: true,
- connectivity: true,
- contentSecurityPolicy: true,
- errorOnContentSecurityPolicy: false
+var LEVELS = {
+ debug: 0,
+ info: 1,
+ warning: 2,
+ error: 3,
+ critical: 4,
};
-function replace(obj, name, replacement, replacements, type) {
- var orig = obj[name];
- obj[name] = replacement(orig);
- if (replacements) {
- replacements[type].push([obj, name, orig]);
+function sanitizeUrl(url) {
+ var baseUrlParts = parseUri(url);
+ if (!baseUrlParts) {
+ return '(unknown)';
}
-}
-function restore(replacements, type) {
- var b;
- while (replacements[type].length) {
- b = replacements[type].shift();
- b[0][b[1]] = b[2];
+ // remove a trailing # if there is no anchor
+ if (baseUrlParts.anchor === '') {
+ baseUrlParts.source = baseUrlParts.source.replace('#', '');
}
+
+ url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');
+ return url;
}
-function nameFromDescription(description) {
- if (!description || !description.attributes) { return null; }
- var attrs = description.attributes;
- for (var a = 0; a < attrs.length; ++a) {
- if (attrs[a].key === 'name') {
- return attrs[a].value;
- }
+var parseUriOptions = {
+ strictMode: false,
+ key: [
+ 'source',
+ 'protocol',
+ 'authority',
+ 'userInfo',
+ 'user',
+ 'password',
+ 'host',
+ 'port',
+ 'relative',
+ 'path',
+ 'directory',
+ 'file',
+ 'query',
+ 'anchor',
+ ],
+ q: {
+ name: 'queryKey',
+ parser: /(?:^|&)([^&=]*)=?([^&]*)/g,
+ },
+ parser: {
+ strict:
+ /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
+ loose:
+ /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,
+ },
+};
+
+function parseUri(str) {
+ if (!isType(str, 'string')) {
+ return undefined;
}
- return null;
-}
-function defaultValueScrubber(scrubFields) {
- var patterns = [];
- for (var i = 0; i < scrubFields.length; ++i) {
- patterns.push(new RegExp(scrubFields[i], 'i'));
+ var o = parseUriOptions;
+ var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);
+ var uri = {};
+
+ for (var i = 0, l = o.key.length; i < l; ++i) {
+ uri[o.key[i]] = m[i] || '';
}
- return function(description) {
- var name = nameFromDescription(description);
- if (!name) { return false; }
- for (var i = 0; i < patterns.length; ++i) {
- if (patterns[i].test(name)) {
- return true;
- }
+
+ uri[o.q.name] = {};
+ uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
+ if ($1) {
+ uri[o.q.name][$1] = $2;
}
- return false;
- };
+ });
+
+ return uri;
}
-function Instrumenter(options, telemeter, rollbar, _window, _document) {
- this.options = options;
- var autoInstrument = options.autoInstrument;
- if (options.enabled === false || autoInstrument === false) {
- this.autoInstrument = {};
- } else {
- if (!_.isType(autoInstrument, 'object')) {
- autoInstrument = defaults;
+function addParamsAndAccessTokenToPath(accessToken, options, params) {
+ params = params || {};
+ params.access_token = accessToken;
+ var paramsArray = [];
+ var k;
+ for (k in params) {
+ if (Object.prototype.hasOwnProperty.call(params, k)) {
+ paramsArray.push([k, params[k]].join('='));
}
- this.autoInstrument = _.merge(defaults, autoInstrument);
}
- this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;
- this.telemetryScrubber = options.telemetryScrubber;
- this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);
- this.telemeter = telemeter;
- this.rollbar = rollbar;
- this.diagnostic = rollbar.client.notifier.diagnostic;
- this._window = _window || {};
- this._document = _document || {};
- this.replacements = {
- network: [],
- log: [],
- navigation: [],
- connectivity: []
- };
- this.eventRemovers = {
- dom: [],
- connectivity: [],
- contentsecuritypolicy: []
- };
+ var query = '?' + paramsArray.sort().join('&');
- this._location = this._window.location;
- this._lastHref = this._location && this._location.href;
+ options = options || {};
+ options.path = options.path || '';
+ var qs = options.path.indexOf('?');
+ var h = options.path.indexOf('#');
+ var p;
+ if (qs !== -1 && (h === -1 || h > qs)) {
+ p = options.path;
+ options.path = p.substring(0, qs) + query + '&' + p.substring(qs + 1);
+ } else {
+ if (h !== -1) {
+ p = options.path;
+ options.path = p.substring(0, h) + query + p.substring(h);
+ } else {
+ options.path = options.path + query;
+ }
+ }
}
-Instrumenter.prototype.configure = function(options) {
- this.options = _.merge(this.options, options);
- var autoInstrument = options.autoInstrument;
- var oldSettings = _.merge(this.autoInstrument);
- if (options.enabled === false || autoInstrument === false) {
- this.autoInstrument = {};
- } else {
- if (!_.isType(autoInstrument, 'object')) {
- autoInstrument = defaults;
+function formatUrl(u, protocol) {
+ protocol = protocol || u.protocol;
+ if (!protocol && u.port) {
+ if (u.port === 80) {
+ protocol = 'http:';
+ } else if (u.port === 443) {
+ protocol = 'https:';
}
- this.autoInstrument = _.merge(defaults, autoInstrument);
}
- this.instrument(oldSettings);
- if (options.scrubTelemetryInputs !== undefined) {
- this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;
+ protocol = protocol || 'https:';
+
+ if (!u.hostname) {
+ return null;
}
- if (options.telemetryScrubber !== undefined) {
- this.telemetryScrubber = options.telemetryScrubber;
+ var result = protocol + '//' + u.hostname;
+ if (u.port) {
+ result = result + ':' + u.port;
}
-};
-
-// eslint-disable-next-line complexity
-Instrumenter.prototype.instrument = function(oldSettings) {
- if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {
- this.instrumentNetwork();
- } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {
- this.deinstrumentNetwork();
+ if (u.path) {
+ result = result + u.path;
}
+ return result;
+}
- if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {
- this.instrumentConsole();
- } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {
- this.deinstrumentConsole();
+function stringify(obj, backup) {
+ var value, error;
+ try {
+ value = RollbarJSON.stringify(obj);
+ } catch (jsonError) {
+ if (backup && isFunction(backup)) {
+ try {
+ value = backup(obj);
+ } catch (backupError) {
+ error = backupError;
+ }
+ } else {
+ error = jsonError;
+ }
}
+ return { error: error, value: value };
+}
- if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {
- this.instrumentDom();
- } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {
- this.deinstrumentDom();
- }
+function maxByteSize(string) {
+ // The transport will use utf-8, so assume utf-8 encoding.
+ //
+ // This minimal implementation will accurately count bytes for all UCS-2 and
+ // single code point UTF-16. If presented with multi code point UTF-16,
+ // which should be rare, it will safely overcount, not undercount.
+ //
+ // While robust utf-8 encoders exist, this is far smaller and far more performant.
+ // For quickly counting payload size for truncation, smaller is better.
- if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {
- this.instrumentNavigation();
- } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {
- this.deinstrumentNavigation();
- }
+ var count = 0;
+ var length = string.length;
- if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {
- this.instrumentConnectivity();
- } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {
- this.deinstrumentConnectivity();
+ for (var i = 0; i < length; i++) {
+ var code = string.charCodeAt(i);
+ if (code < 128) {
+ // up to 7 bits
+ count = count + 1;
+ } else if (code < 2048) {
+ // up to 11 bits
+ count = count + 2;
+ } else if (code < 65536) {
+ // up to 16 bits
+ count = count + 3;
+ }
}
- if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {
- this.instrumentContentSecurityPolicy();
- } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {
- this.deinstrumentContentSecurityPolicy();
- }
-};
+ return count;
+}
-Instrumenter.prototype.deinstrumentNetwork = function() {
- restore(this.replacements, 'network');
-};
+function jsonParse(s) {
+ var value, error;
+ try {
+ value = RollbarJSON.parse(s);
+ } catch (e) {
+ error = e;
+ }
+ return { error: error, value: value };
+}
-Instrumenter.prototype.instrumentNetwork = function() {
- var self = this;
+function makeUnhandledStackInfo(
+ message,
+ url,
+ lineno,
+ colno,
+ error,
+ mode,
+ backupMessage,
+ errorParser,
+) {
+ var location = {
+ url: url || '',
+ line: lineno,
+ column: colno,
+ };
+ location.func = errorParser.guessFunctionName(location.url, location.line);
+ location.context = errorParser.gatherContext(location.url, location.line);
+ var href =
+ typeof document !== 'undefined' &&
+ document &&
+ document.location &&
+ document.location.href;
+ var useragent =
+ typeof window !== 'undefined' &&
+ window &&
+ window.navigator &&
+ window.navigator.userAgent;
+ return {
+ mode: mode,
+ message: error ? String(error) : message || backupMessage,
+ url: href,
+ stack: [location],
+ useragent: useragent,
+ };
+}
- function wrapProp(prop, xhr) {
- if (prop in xhr && _.isFunction(xhr[prop])) {
- replace(xhr, prop, function(orig) {
- return self.rollbar.wrap(orig);
- });
+function wrapCallback(logger, f) {
+ return function (err, resp) {
+ try {
+ f(err, resp);
+ } catch (e) {
+ logger.error(e);
}
- }
+ };
+}
- if ('XMLHttpRequest' in this._window) {
- var xhrp = this._window.XMLHttpRequest.prototype;
- replace(xhrp, 'open', function(orig) {
- return function(method, url) {
- if (_.isType(url, 'string')) {
- if (this.__rollbar_xhr) {
- this.__rollbar_xhr.method = method;
- this.__rollbar_xhr.url = url;
- this.__rollbar_xhr.status_code = null;
- this.__rollbar_xhr.start_time_ms = _.now();
- this.__rollbar_xhr.end_time_ms = null;
+function nonCircularClone(obj) {
+ var seen = [obj];
+
+ function clone(obj, seen) {
+ var value,
+ name,
+ newSeen,
+ result = {};
+
+ try {
+ for (name in obj) {
+ value = obj[name];
+
+ if (value && (isType(value, 'object') || isType(value, 'array'))) {
+ if (seen.includes(value)) {
+ result[name] = 'Removed circular reference: ' + typeName(value);
} else {
- this.__rollbar_xhr = {
- method: method,
- url: url,
- status_code: null,
- start_time_ms: _.now(),
- end_time_ms: null
- };
+ newSeen = seen.slice();
+ newSeen.push(value);
+ result[name] = clone(value, newSeen);
}
+ continue;
}
- return orig.apply(this, arguments);
- };
- }, this.replacements, 'network');
- replace(xhrp, 'setRequestHeader', function(orig) {
- return function(header, value) {
- // If xhr.open is async, __rollbar_xhr may not be initialized yet.
- if (!this.__rollbar_xhr) {
- this.__rollbar_xhr = {};
+ result[name] = value;
+ }
+ } catch (e) {
+ result = 'Failed cloning custom data: ' + e.message;
+ }
+ return result;
+ }
+ return clone(obj, seen);
+}
+
+function createItem(args, logger, notifier, requestKeys, lambdaContext) {
+ var message, err, custom, callback, request;
+ var arg;
+ var extraArgs = [];
+ var diagnostic = {};
+ var argTypes = [];
+
+ for (var i = 0, l = args.length; i < l; ++i) {
+ arg = args[i];
+
+ var typ = typeName(arg);
+ argTypes.push(typ);
+ switch (typ) {
+ case 'undefined':
+ break;
+ case 'string':
+ message ? extraArgs.push(arg) : (message = arg);
+ break;
+ case 'function':
+ callback = wrapCallback(logger, arg);
+ break;
+ case 'date':
+ extraArgs.push(arg);
+ break;
+ case 'error':
+ case 'domexception':
+ case 'exception': // Firefox Exception type
+ err ? extraArgs.push(arg) : (err = arg);
+ break;
+ case 'object':
+ case 'array':
+ if (
+ arg instanceof Error ||
+ (typeof DOMException !== 'undefined' && arg instanceof DOMException)
+ ) {
+ err ? extraArgs.push(arg) : (err = arg);
+ break;
}
- if (_.isType(header, 'string') && _.isType(value, 'string')) {
- if (self.autoInstrument.networkRequestHeaders) {
- if (!this.__rollbar_xhr.request_headers) {
- this.__rollbar_xhr.request_headers = {};
+ if (requestKeys && typ === 'object' && !request) {
+ for (var j = 0, len = requestKeys.length; j < len; ++j) {
+ if (arg[requestKeys[j]] !== undefined) {
+ request = arg;
+ break;
}
- this.__rollbar_xhr.request_headers[header] = value;
}
- // We want the content type even if request header telemetry is off.
- if (header.toLowerCase() === 'content-type') {
- this.__rollbar_xhr.request_content_type = value;
+ if (request) {
+ break;
}
}
- return orig.apply(this, arguments);
- };
- }, this.replacements, 'network');
-
- replace(xhrp, 'send', function(orig) {
- /* eslint-disable no-unused-vars */
- return function(data) {
- /* eslint-enable no-unused-vars */
- var xhr = this;
-
- function onreadystatechangeHandler() {
- if (xhr.__rollbar_xhr) {
- if (xhr.__rollbar_xhr.status_code === null) {
- xhr.__rollbar_xhr.status_code = 0;
- if (self.autoInstrument.networkRequestBody) {
- xhr.__rollbar_xhr.request = data;
- }
- xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);
- }
- if (xhr.readyState < 2) {
- xhr.__rollbar_xhr.start_time_ms = _.now();
- }
- if (xhr.readyState > 3) {
- xhr.__rollbar_xhr.end_time_ms = _.now();
-
- var headers = null;
- xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');
- if (self.autoInstrument.networkResponseHeaders) {
- var headersConfig = self.autoInstrument.networkResponseHeaders;
- headers = {};
- try {
- var header, i;
- if (headersConfig === true) {
- var allHeaders = xhr.getAllResponseHeaders();
- if (allHeaders) {
- var arr = allHeaders.trim().split(/[\r\n]+/);
- var parts, value;
- for (i=0; i < arr.length; i++) {
- parts = arr[i].split(': ');
- header = parts.shift();
- value = parts.join(': ');
- headers[header] = value;
- }
- }
- } else {
- for (i=0; i < headersConfig.length; i++) {
- header = headersConfig[i];
- headers[header] = xhr.getResponseHeader(header);
- }
- }
- } catch (e) {
- /* we ignore the errors here that could come from different
- * browser issues with the xhr methods */
- }
- }
- var body = null;
- if (self.autoInstrument.networkResponseBody) {
- try {
- body = xhr.responseText;
- } catch (e) {
- /* ignore errors from reading responseText */
- }
- }
- var response = null;
- if (body || headers) {
- response = {};
- if (body) {
- if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {
- response.body = self.scrubJson(body);
- } else {
- response.body = body;
- }
- }
- if (headers) {
- response.headers = headers;
- }
- }
- if (response) {
- xhr.__rollbar_xhr.response = response;
- }
- try {
- var code = xhr.status;
- code = code === 1223 ? 204 : code;
- xhr.__rollbar_xhr.status_code = code;
- xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);
- self.errorOnHttpStatus(xhr.__rollbar_xhr);
- } catch (e) {
- /* ignore possible exception from xhr.status */
- }
- }
- }
+ custom ? extraArgs.push(arg) : (custom = arg);
+ break;
+ default:
+ if (
+ arg instanceof Error ||
+ (typeof DOMException !== 'undefined' && arg instanceof DOMException)
+ ) {
+ err ? extraArgs.push(arg) : (err = arg);
+ break;
}
+ extraArgs.push(arg);
+ }
+ }
- wrapProp('onload', xhr);
- wrapProp('onerror', xhr);
- wrapProp('onprogress', xhr);
+ // if custom is an array this turns it into an object with integer keys
+ if (custom) custom = nonCircularClone(custom);
- if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {
- replace(xhr, 'onreadystatechange', function(orig) {
- return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);
- });
- } else {
- xhr.onreadystatechange = onreadystatechangeHandler;
- }
- if (xhr.__rollbar_xhr && self.trackHttpErrors()) {
- xhr.__rollbar_xhr.stack = (new Error()).stack;
- }
- return orig.apply(this, arguments);
- }
- }, this.replacements, 'network');
+ if (extraArgs.length > 0) {
+ if (!custom) custom = nonCircularClone({});
+ custom.extraArgs = nonCircularClone(extraArgs);
}
- if ('fetch' in this._window) {
- replace(this._window, 'fetch', function(orig) {
- /* eslint-disable no-unused-vars */
- return function(fn, t) {
- /* eslint-enable no-unused-vars */
- var args = new Array(arguments.length);
- for (var i=0, len=args.length; i < len; i++) {
- args[i] = arguments[i];
- }
- var input = args[0];
- var method = 'GET';
- var url;
- if (_.isType(input, 'string')) {
- url = input;
- } else if (input) {
- url = input.url;
- if (input.method) {
- method = input.method;
- }
- }
- if (args[1] && args[1].method) {
- method = args[1].method;
- }
- var metadata = {
- method: method,
- url: url,
- status_code: null,
- start_time_ms: _.now(),
- end_time_ms: null
- };
- if (args[1] && args[1].headers) {
- // Argument may be a Headers object, or plain object. Ensure here that
- // we are working with a Headers object with case-insensitive keys.
- var reqHeaders = new Headers(args[1].headers);
-
- metadata.request_content_type = reqHeaders.get('Content-Type');
+ var item = {
+ message: message,
+ err: err,
+ custom: custom,
+ timestamp: now(),
+ callback: callback,
+ notifier: notifier,
+ diagnostic: diagnostic,
+ uuid: uuid4(),
+ };
- if (self.autoInstrument.networkRequestHeaders) {
- metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)
- }
- }
+ setCustomItemKeys(item, custom);
- if (self.autoInstrument.networkRequestBody) {
- if (args[1] && args[1].body) {
- metadata.request = args[1].body;
- } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {
- metadata.request = args[0].body;
- }
- }
- self.captureNetwork(metadata, 'fetch', undefined);
- if (self.trackHttpErrors()) {
- metadata.stack = (new Error()).stack;
- }
- return orig.apply(this, args).then(function (resp) {
- metadata.end_time_ms = _.now();
- metadata.status_code = resp.status;
- metadata.response_content_type = resp.headers.get('Content-Type');
- var headers = null;
- if (self.autoInstrument.networkResponseHeaders) {
- headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);
- }
- var body = null;
- if (self.autoInstrument.networkResponseBody) {
- if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms
- // The response must be cloned to prevent reading (and locking) the original stream.
- body = resp.clone().text(); //returns a Promise
- }
- }
- if (headers || body) {
- metadata.response = {};
- if (body) {
- // Test to ensure body is a Promise, which it should always be.
- if (typeof body.then === 'function') {
- body.then(function (text) {
- if (self.isJsonContentType(metadata.response_content_type)) {
- metadata.response.body = self.scrubJson(text);
- }
- });
- } else {
- metadata.response.body = body;
- }
- }
- if (headers) {
- metadata.response.headers = headers;
- }
- }
- self.errorOnHttpStatus(metadata);
- return resp;
- });
- };
- }, this.replacements, 'network');
+ if (requestKeys && request) {
+ item.request = request;
}
-};
-
-Instrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {
- if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {
- metadata.request = this.scrubJson(metadata.request);
+ if (lambdaContext) {
+ item.lambdaContext = lambdaContext;
}
- return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);
-};
+ item._originalArgs = args;
+ item.diagnostic.original_arg_types = argTypes;
+ return item;
+}
-Instrumenter.prototype.isJsonContentType = function(contentType) {
- return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;
+function setCustomItemKeys(item, custom) {
+ if (custom && custom.level !== undefined) {
+ item.level = custom.level;
+ delete custom.level;
+ }
+ if (custom && custom.skipFrames !== undefined) {
+ item.skipFrames = custom.skipFrames;
+ delete custom.skipFrames;
+ }
}
-Instrumenter.prototype.scrubJson = function(json) {
- return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));
-}
+function addErrorContext(item, errors) {
+ var custom = item.data.custom || {};
+ var contextAdded = false;
-Instrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {
- var outHeaders = {};
try {
- var i;
- if (headersConfig === true) {
- if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE
- var allHeaders = inHeaders.entries();
- var currentHeader = allHeaders.next();
- while (!currentHeader.done) {
- outHeaders[currentHeader.value[0]] = currentHeader.value[1];
- currentHeader = allHeaders.next();
- }
- }
- } else {
- for (i=0; i < headersConfig.length; i++) {
- var header = headersConfig[i];
- outHeaders[header] = inHeaders.get(header);
+ for (var i = 0; i < errors.length; ++i) {
+ if (errors[i].hasOwnProperty('rollbarContext')) {
+ custom = merge(custom, nonCircularClone(errors[i].rollbarContext));
+ contextAdded = true;
}
}
+
+ // Avoid adding an empty object to the data.
+ if (contextAdded) {
+ item.data.custom = custom;
+ }
} catch (e) {
- /* ignore probable IE errors */
+ item.diagnostic.error_context = 'Failed: ' + e.message;
}
- return outHeaders;
-}
-
-Instrumenter.prototype.trackHttpErrors = function() {
- return this.autoInstrument.networkErrorOnHttp5xx ||
- this.autoInstrument.networkErrorOnHttp4xx ||
- this.autoInstrument.networkErrorOnHttp0;
}
-Instrumenter.prototype.errorOnHttpStatus = function(metadata) {
- var status = metadata.status_code;
+var TELEMETRY_TYPES = [
+ 'log',
+ 'network',
+ 'dom',
+ 'navigation',
+ 'error',
+ 'manual',
+];
+var TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];
- if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||
- (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||
- (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {
- var error = new Error('HTTP request failed with Status ' + status);
- error.stack = metadata.stack;
- this.rollbar.error(error, { skipFrames: 1 });
+function arrayIncludes(arr, val) {
+ for (var k = 0; k < arr.length; ++k) {
+ if (arr[k] === val) {
+ return true;
+ }
}
+
+ return false;
}
-Instrumenter.prototype.deinstrumentConsole = function() {
- if (!('console' in this._window && this._window.console.log)) {
- return;
- }
- var b;
- while (this.replacements['log'].length) {
- b = this.replacements['log'].shift();
- this._window.console[b[0]] = b[1];
- }
-};
+function createTelemetryEvent(args) {
+ var type, metadata, level;
+ var arg;
-Instrumenter.prototype.instrumentConsole = function() {
- if (!('console' in this._window && this._window.console.log)) {
- return;
- }
+ for (var i = 0, l = args.length; i < l; ++i) {
+ arg = args[i];
- var self = this;
- var c = this._window.console;
+ var typ = typeName(arg);
+ switch (typ) {
+ case 'string':
+ if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {
+ type = arg;
+ } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {
+ level = arg;
+ }
+ break;
+ case 'object':
+ metadata = arg;
+ break;
+ default:
+ break;
+ }
+ }
+ var event = {
+ type: type || 'manual',
+ metadata: metadata || {},
+ level: level,
+ };
- function wrapConsole(method) {
- 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778
+ return event;
+}
- var orig = c[method];
- var origConsole = c;
- var level = method === 'warn' ? 'warning' : method;
- c[method] = function() {
- var args = Array.prototype.slice.call(arguments);
- var message = _.formatArgsAsString(args);
- self.telemeter.captureLog(message, level);
- if (orig) {
- Function.prototype.apply.call(orig, origConsole, args);
- }
- };
- self.replacements['log'].push([method, orig]);
+/*
+ * get - given an obj/array and a keypath, return the value at that keypath or
+ * undefined if not possible.
+ *
+ * @param obj - an object or array
+ * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'
+ * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`
+ */
+function get(obj, path) {
+ if (!obj) {
+ return undefined;
}
- var methods = ['debug','info','warn','error','log'];
+ var keys = path.split('.');
+ var result = obj;
try {
- for (var i=0, len=methods.length; i < len; i++) {
- wrapConsole(methods[i]);
+ for (var i = 0, len = keys.length; i < len; ++i) {
+ result = result[keys[i]];
}
} catch (e) {
- this.diagnostic.instrumentConsole = { error: e.message };
+ result = undefined;
}
-};
+ return result;
+}
-Instrumenter.prototype.deinstrumentDom = function() {
- if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {
+function set(obj, path, value) {
+ if (!obj) {
return;
}
- this.removeListeners('dom');
-};
-
-Instrumenter.prototype.instrumentDom = function() {
- if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {
+ var keys = path.split('.');
+ var len = keys.length;
+ if (len < 1) {
return;
}
- var clickHandler = this.handleClick.bind(this);
- var blurHandler = this.handleBlur.bind(this);
- this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);
- this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);
-};
-
-Instrumenter.prototype.handleClick = function(evt) {
- try {
- var e = domUtil.getElementFromEvent(evt, this._document);
- var hasTag = e && e.tagName;
- 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 (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {
- this.captureDomEvent('input', e, e.value, e.checked);
- }
- } catch (exc) {
- // TODO: Not sure what to do here
+ if (len === 1) {
+ obj[keys[0]] = value;
+ return;
}
-};
-
-Instrumenter.prototype.handleBlur = function(evt) {
try {
- var e = domUtil.getElementFromEvent(evt, this._document);
- if (e && e.tagName) {
- if (domUtil.isDescribedElement(e, 'textarea')) {
- this.captureDomEvent('input', e, e.value);
- } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {
- this.handleSelectInputChanged(e);
- } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {
- this.captureDomEvent('input', e, e.value);
- }
- }
- } catch (exc) {
- // TODO: Not sure what to do here
- }
-};
-
-Instrumenter.prototype.handleSelectInputChanged = function(elem) {
- if (elem.multiple) {
- for (var i = 0; i < elem.options.length; i++) {
- if (elem.options[i].selected) {
- this.captureDomEvent('input', elem, elem.options[i].value);
- }
+ var temp = obj[keys[0]] || {};
+ var replacement = temp;
+ for (var i = 1; i < len - 1; ++i) {
+ temp[keys[i]] = temp[keys[i]] || {};
+ temp = temp[keys[i]];
}
- } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {
- this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);
+ temp[keys[len - 1]] = value;
+ obj[keys[0]] = replacement;
+ } catch (e) {
+ return;
}
-};
+}
-Instrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {
- if (value !== undefined) {
- if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {
- value = '[scrubbed]';
- } else {
- var description = domUtil.describeElement(element);
- if (this.telemetryScrubber) {
- if (this.telemetryScrubber(description)) {
- value = '[scrubbed]';
+function formatArgsAsString(args) {
+ var i, len, arg;
+ var result = [];
+ for (i = 0, len = args.length; i < len; ++i) {
+ arg = args[i];
+ switch (typeName(arg)) {
+ case 'object':
+ arg = stringify(arg);
+ arg = arg.error || arg.value;
+ if (arg.length > 500) {
+ arg = arg.substr(0, 497) + '...';
}
- } else if (this.defaultValueScrubber(description)) {
- value = '[scrubbed]';
- }
+ break;
+ case 'null':
+ arg = 'null';
+ break;
+ case 'undefined':
+ arg = 'undefined';
+ break;
+ case 'symbol':
+ arg = arg.toString();
+ break;
}
+ result.push(arg);
}
- var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));
- this.telemeter.captureDom(subtype, elementString, value, isChecked);
-};
-
-Instrumenter.prototype.deinstrumentNavigation = function() {
- var chrome = this._window.chrome;
- var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;
- // See https://github.com/angular/angular.js/pull/13945/files
- var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;
- if (!hasPushState) {
- return;
- }
- restore(this.replacements, 'navigation');
-};
-
-Instrumenter.prototype.instrumentNavigation = function() {
- var chrome = this._window.chrome;
- var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;
- // See https://github.com/angular/angular.js/pull/13945/files
- var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;
- if (!hasPushState) {
- return;
- }
- var self = this;
- replace(this._window, 'onpopstate', function(orig) {
- return function() {
- var current = self._location.href;
- self.handleUrlChange(self._lastHref, current);
- if (orig) {
- orig.apply(this, arguments);
- }
- };
- }, this.replacements, 'navigation');
-
- replace(this._window.history, 'pushState', function(orig) {
- return function() {
- var url = arguments.length > 2 ? arguments[2] : undefined;
- if (url) {
- self.handleUrlChange(self._lastHref, url + '');
- }
- return orig.apply(this, arguments);
- };
- }, this.replacements, 'navigation');
-};
-
-Instrumenter.prototype.handleUrlChange = function(from, to) {
- var parsedHref = urlparser.parse(this._location.href);
- var parsedTo = urlparser.parse(to);
- var parsedFrom = urlparser.parse(from);
- this._lastHref = to;
- if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {
- to = parsedTo.path + (parsedTo.hash || '');
- }
- if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {
- from = parsedFrom.path + (parsedFrom.hash || '');
- }
- this.telemeter.captureNavigation(from, to);
-};
-
-Instrumenter.prototype.deinstrumentConnectivity = function() {
- if (!('addEventListener' in this._window || 'body' in this._document)) {
- return;
- }
- if (this._window.addEventListener) {
- this.removeListeners('connectivity');
- } else {
- restore(this.replacements, 'connectivity');
- }
-};
+ return result.join(' ');
+}
-Instrumenter.prototype.instrumentConnectivity = function() {
- if (!('addEventListener' in this._window || 'body' in this._document)) {
+function now() {
+ if (Date.now) {
+ return +Date.now();
+ }
+ return +new Date();
+}
+
+function filterIp(requestData, captureIp) {
+ if (!requestData || !requestData['user_ip'] || captureIp === true) {
return;
}
- if (this._window.addEventListener) {
- this.addListener('connectivity', this._window, 'online', undefined, function() {
- this.telemeter.captureConnectivityChange('online');
- }.bind(this), true);
- this.addListener('connectivity', this._window, 'offline', undefined, function() {
- this.telemeter.captureConnectivityChange('offline');
- }.bind(this), true);
+ var newIp = requestData['user_ip'];
+ if (!captureIp) {
+ newIp = null;
} else {
- var self = this;
- replace(this._document.body, 'ononline', function(orig) {
- return function() {
- self.telemeter.captureConnectivityChange('online');
- if (orig) {
- orig.apply(this, arguments);
- }
- }
- }, this.replacements, 'connectivity');
- replace(this._document.body, 'onoffline', function(orig) {
- return function() {
- self.telemeter.captureConnectivityChange('offline');
- if (orig) {
- orig.apply(this, arguments);
+ try {
+ var parts;
+ if (newIp.indexOf('.') !== -1) {
+ parts = newIp.split('.');
+ parts.pop();
+ parts.push('0');
+ newIp = parts.join('.');
+ } else if (newIp.indexOf(':') !== -1) {
+ parts = newIp.split(':');
+ if (parts.length > 2) {
+ var beginning = parts.slice(0, 3);
+ var slashIdx = beginning[2].indexOf('/');
+ if (slashIdx !== -1) {
+ beginning[2] = beginning[2].substring(0, slashIdx);
+ }
+ var terminal = '0000:0000:0000:0000:0000';
+ newIp = beginning.concat(terminal).join(':');
}
+ } else {
+ newIp = null;
}
- }, this.replacements, 'connectivity');
- }
-};
-
-Instrumenter.prototype.handleCspEvent = function(cspEvent) {
- var message = 'Security Policy Violation: ' +
- 'blockedURI: ' + cspEvent.blockedURI + ', ' +
- 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +
- 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';
-
- if (cspEvent.sourceFile) {
- message += 'location: ' + cspEvent.sourceFile + ', ' +
- 'line: ' + cspEvent.lineNumber + ', ' +
- 'col: ' + cspEvent.columnNumber + ', ';
+ } catch (e) {
+ newIp = null;
+ }
}
-
- message += 'originalPolicy: ' + cspEvent.originalPolicy;
-
- this.telemeter.captureLog(message, 'error');
- this.handleCspError(message);
+ requestData['user_ip'] = newIp;
}
-Instrumenter.prototype.handleCspError = function(message) {
- if (this.autoInstrument.errorOnContentSecurityPolicy) {
- this.rollbar.error(message);
+function handleOptions(current, input, payload, logger) {
+ var result = merge(current, input, payload);
+ result = updateDeprecatedOptions(result, logger);
+ if (!input || input.overwriteScrubFields) {
+ return result;
+ }
+ if (input.scrubFields) {
+ result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);
}
+ return result;
}
-Instrumenter.prototype.deinstrumentContentSecurityPolicy = function() {
- if (!('addEventListener' in this._window)) { return; }
-
- this.removeListeners('contentsecuritypolicy');
-};
-
-Instrumenter.prototype.instrumentContentSecurityPolicy = function() {
- if (!('addEventListener' in this._window)) { return; }
-
- var cspHandler = this.handleCspEvent.bind(this);
- this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);
-};
-
-Instrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {
- if (obj.addEventListener) {
- obj.addEventListener(type, handler, capture);
- this.eventRemovers[section].push(function() {
- obj.removeEventListener(type, handler, capture);
- });
- } else if (altType) {
- obj.attachEvent(altType, handler);
- this.eventRemovers[section].push(function() {
- obj.detachEvent(altType, handler);
- });
+function updateDeprecatedOptions(options, logger) {
+ if (options.hostWhiteList && !options.hostSafeList) {
+ options.hostSafeList = options.hostWhiteList;
+ options.hostWhiteList = undefined;
+ logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');
}
-};
-
-Instrumenter.prototype.removeListeners = function(section) {
- var r;
- while (this.eventRemovers[section].length) {
- r = this.eventRemovers[section].shift();
- r();
+ if (options.hostBlackList && !options.hostBlockList) {
+ options.hostBlockList = options.hostBlackList;
+ options.hostBlackList = undefined;
+ logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');
}
-};
+ return options;
+}
-module.exports = Instrumenter;
+module.exports = {
+ addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,
+ createItem: createItem,
+ addErrorContext: addErrorContext,
+ createTelemetryEvent: createTelemetryEvent,
+ filterIp: filterIp,
+ formatArgsAsString: formatArgsAsString,
+ formatUrl: formatUrl,
+ get: get,
+ handleOptions: handleOptions,
+ isError: isError,
+ isFiniteNumber: isFiniteNumber,
+ isFunction: isFunction,
+ isIterable: isIterable,
+ isNativeFunction: isNativeFunction,
+ isObject: isObject,
+ isString: isString,
+ isType: isType,
+ isPromise: isPromise,
+ jsonParse: jsonParse,
+ LEVELS: LEVELS,
+ makeUnhandledStackInfo: makeUnhandledStackInfo,
+ merge: merge,
+ now: now,
+ redact: redact,
+ RollbarJSON: RollbarJSON,
+ sanitizeUrl: sanitizeUrl,
+ set: set,
+ setupJSON: setupJSON,
+ stringify: stringify,
+ maxByteSize: maxByteSize,
+ typeName: typeName,
+ uuid4: uuid4,
+};
/***/ }),
-/* 30 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 650:
+/***/ ((module) => {
"use strict";
-function getElementType(e) {
- return (e.getAttribute('type') || '').toLowerCase();
+/*
+ * headers - Detect when fetch Headers are undefined and use a partial polyfill.
+ *
+ * A full polyfill is not used in order to keep package size as small as possible.
+ * Since this is only used internally and is not added to the window object,
+ * the full interface doesn't need to be supported.
+ *
+ * This implementation is modified from whatwg-fetch:
+ * https://github.com/github/fetch
+ */
+function headers(headers) {
+ if (typeof Headers === 'undefined') {
+ return new FetchHeaders(headers);
+ }
+
+ return new Headers(headers);
}
-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;
- }
+function normalizeName(name) {
+ if (typeof name !== 'string') {
+ name = String(name);
}
- return false;
+ return name.toLowerCase();
}
-function getElementFromEvent(evt, doc) {
- if (evt.target) {
- return evt.target;
- }
- if (doc && doc.elementFromPoint) {
- return doc.elementFromPoint(evt.clientX, evt.clientY);
+function normalizeValue(value) {
+ if (typeof value !== 'string') {
+ value = String(value);
}
- return undefined;
+ return value;
}
-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 iteratorFor(items) {
+ var iterator = {
+ next: function () {
+ var value = items.shift();
+ return { done: value === undefined, value: value };
+ },
+ };
+
+ return iterator;
}
-function elementArrayToString(a) {
- var MAX_LENGTH = 80;
- var separator = ' > ', separatorLength = separator.length;
- var out = [], len = 0, nextStr, totalLength;
+function FetchHeaders(headers) {
+ this.map = {};
- 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;
+ if (headers instanceof FetchHeaders) {
+ headers.forEach(function (value, name) {
+ this.append(name, value);
+ }, this);
+ } else if (Array.isArray(headers)) {
+ headers.forEach(function (header) {
+ this.append(header[0], header[1]);
+ }, this);
+ } else if (headers) {
+ Object.getOwnPropertyNames(headers).forEach(function (name) {
+ this.append(name, headers[name]);
+ }, this);
}
- 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 + '"]');
- }
+FetchHeaders.prototype.append = function (name, value) {
+ name = normalizeName(name);
+ value = normalizeValue(value);
+ var oldValue = this.map[name];
+ this.map[name] = oldValue ? oldValue + ', ' + value : value;
+};
- return out.join('');
-}
+FetchHeaders.prototype.get = function (name) {
+ name = normalizeName(name);
+ return this.has(name) ? this.map[name] : null;
+};
-/**
- * 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});
+FetchHeaders.prototype.has = function (name) {
+ return this.map.hasOwnProperty(normalizeName(name));
+};
+
+FetchHeaders.prototype.forEach = function (callback, thisArg) {
+ for (var name in this.map) {
+ if (this.map.hasOwnProperty(name)) {
+ callback.call(thisArg, this.map[name], name, this);
}
}
- return out;
+};
+
+FetchHeaders.prototype.entries = function () {
+ var items = [];
+ this.forEach(function (value, name) {
+ items.push([name, value]);
+ });
+ return iteratorFor(items);
+};
+
+module.exports = headers;
+
+
+/***/ }),
+
+/***/ 876:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+var polyfillJSON = __webpack_require__(708);
+
+module.exports = polyfillJSON;
+
+
+/***/ }),
+
+/***/ 297:
+/***/ ((module) => {
+
+"use strict";
+
+
+function replace(obj, name, replacement, replacements, type) {
+ var orig = obj[name];
+ obj[name] = replacement(orig);
+ if (replacements) {
+ replacements[type].push([obj, name, orig]);
+ }
}
-module.exports = {
- describeElement: describeElement,
- descriptionToString: descriptionToString,
- elementArrayToString: elementArrayToString,
- treeToArray: treeToArray,
- getElementFromEvent: getElementFromEvent,
- isDescribedElement: isDescribedElement,
- getElementType: getElementType
-};
+module.exports = replace;
/***/ }),
-/* 31 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 267:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var polyfillJSON = __webpack_require__(32);
+var _ = __webpack_require__(702);
-module.exports = polyfillJSON;
+function traverse(obj, func, seen) {
+ var k, v, i;
+ var isObj = _.isType(obj, 'object');
+ var isArray = _.isType(obj, 'array');
+ var keys = [];
+ var seenIndex;
+
+ // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.
+ seen = seen || { obj: [], mapped: [] };
+
+ if (isObj) {
+ seenIndex = seen.obj.indexOf(obj);
+
+ if (isObj && seenIndex !== -1) {
+ // Prefer the mapped object if there is one.
+ return seen.mapped[seenIndex] || seen.obj[seenIndex];
+ }
+
+ seen.obj.push(obj);
+ seenIndex = seen.obj.length - 1;
+ }
+
+ if (isObj) {
+ for (k in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, k)) {
+ keys.push(k);
+ }
+ }
+ } else if (isArray) {
+ for (i = 0; i < obj.length; ++i) {
+ keys.push(i);
+ }
+ }
+
+ var result = isObj ? {} : [];
+ var same = true;
+ for (i = 0; i < keys.length; ++i) {
+ k = keys[i];
+ v = obj[k];
+ result[k] = func(k, v, seen);
+ same = same && result[k] === obj[k];
+ }
+
+ if (isObj && !same) {
+ seen.mapped[seenIndex] = result;
+ }
+
+ return !same ? result : obj;
+}
+
+module.exports = traverse;
/***/ }),
-/* 32 */
-/***/ (function(module, exports) {
+
+/***/ 708:
+/***/ ((module) => {
// json3.js
// 2017-02-21
@@ -6505,182 +7546,40 @@ var setupCustomJSON = function(JSON) {
module.exports = setupCustomJSON;
-/***/ }),
-/* 33 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-function wrapGlobals(window, handler, shim) {
- if (!window) { return; }
- // Adapted from https://github.com/bugsnag/bugsnag-js
- 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(',');
- var i, global;
- for (i = 0; i < globals.length; ++i) {
- global = globals[i];
-
- if (window[global] && window[global].prototype) {
- _extendListenerPrototype(handler, window[global].prototype, shim);
- }
- }
-}
-
-function _extendListenerPrototype(handler, prototype, shim) {
- if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {
- var oldAddEventListener = prototype.addEventListener;
- while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {
- oldAddEventListener = oldAddEventListener._rollbarOldAdd;
- }
- var addFn = function(event, callback, bubble) {
- oldAddEventListener.call(this, event, handler.wrap(callback), bubble);
- };
- addFn._rollbarOldAdd = oldAddEventListener;
- addFn.belongsToShim = shim;
- prototype.addEventListener = addFn;
-
- var oldRemoveEventListener = prototype.removeEventListener;
- while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {
- oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;
- }
- var removeFn = function(event, callback, bubble) {
- oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);
- };
- removeFn._rollbarOldRemove = oldRemoveEventListener;
- removeFn.belongsToShim = shim;
- prototype.removeEventListener = removeFn;
- }
-}
-
-module.exports = wrapGlobals;
-
-
-/***/ }),
-/* 34 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var _ = __webpack_require__(0);
-var traverse = __webpack_require__(5);
-
-function raw(payload, jsonBackup) {
- return [payload, _.stringify(payload, jsonBackup)];
-}
-
-function selectFrames(frames, range) {
- var len = frames.length;
- if (len > range * 2) {
- return frames.slice(0, range).concat(frames.slice(len - range));
- }
- return frames;
-}
-
-function truncateFrames(payload, jsonBackup, range) {
- range = (typeof range === 'undefined') ? 30 : range;
- var body = payload.data.body;
- var frames;
- if (body.trace_chain) {
- var chain = body.trace_chain;
- for (var i = 0; i < chain.length; i++) {
- frames = chain[i].frames;
- frames = selectFrames(frames, range);
- chain[i].frames = frames;
- }
- } else if (body.trace) {
- frames = body.trace.frames;
- frames = selectFrames(frames, range);
- body.trace.frames = frames;
- }
- return [payload, _.stringify(payload, jsonBackup)];
-}
-
-function maybeTruncateValue(len, val) {
- if (!val) {
- return val;
- }
- if (val.length > len) {
- return val.slice(0, len - 3).concat('...');
- }
- return val;
-}
-
-function truncateStrings(len, payload, jsonBackup) {
- function truncator(k, v, seen) {
- switch (_.typeName(v)) {
- case 'string':
- return maybeTruncateValue(len, v);
- case 'object':
- case 'array':
- return traverse(v, truncator, seen);
- default:
- return v;
- }
- }
- payload = traverse(payload, truncator);
- return [payload, _.stringify(payload, jsonBackup)];
-}
-
-function truncateTraceData(traceData) {
- if (traceData.exception) {
- delete traceData.exception.description;
- traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);
- }
- traceData.frames = selectFrames(traceData.frames, 1);
- return traceData;
-}
-
-function minBody(payload, jsonBackup) {
- var body = payload.data.body;
- if (body.trace_chain) {
- var chain = body.trace_chain;
- for (var i = 0; i < chain.length; i++) {
- chain[i] = truncateTraceData(chain[i]);
- }
- } else if (body.trace) {
- body.trace = truncateTraceData(body.trace);
- }
- return [payload, _.stringify(payload, jsonBackup)];
-}
-
-function needsTruncation(payload, maxSize) {
- return _.maxByteSize(payload) > maxSize;
-}
-
-function truncate(payload, jsonBackup, maxSize) {
- maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;
- var strategies = [
- raw,
- truncateFrames,
- truncateStrings.bind(null, 1024),
- truncateStrings.bind(null, 512),
- truncateStrings.bind(null, 256),
- minBody
- ];
- var strategy, results, result;
-
- while ((strategy = strategies.shift())) {
- results = strategy(payload, jsonBackup);
- payload = results[0];
- result = results[1];
- if (result.error || !needsTruncation(result.value, maxSize)) {
- return result;
- }
- }
- return result;
-}
-
-module.exports = {
- truncate: truncate,
-
- /* for testing */
- raw: raw,
- truncateFrames: truncateFrames,
- truncateStrings: truncateStrings,
- maybeTruncateValue: maybeTruncateValue
-};
-
-
/***/ })
-/******/ ]);
\ No newline at end of file
+
+/******/ });
+/************************************************************************/
+/******/ // The module cache
+/******/ var __webpack_module_cache__ = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/ // Check if module is in cache
+/******/ var cachedModule = __webpack_module_cache__[moduleId];
+/******/ if (cachedModule !== undefined) {
+/******/ return cachedModule.exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = __webpack_module_cache__[moduleId] = {
+/******/ // no module.id needed
+/******/ // no module.loaded needed
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/************************************************************************/
+/******/
+/******/ // startup
+/******/ // Load entry module and return exports
+/******/ // This entry module is referenced by other modules so it can't be inlined
+/******/ var __webpack_exports__ = __webpack_require__(409);
+/******/
+/******/ })()
+;
\ No newline at end of file
diff --git a/dist/rollbar.js.map b/dist/rollbar.js.map
index b468a8ead..2f4f4c094 100644
--- a/dist/rollbar.js.map
+++ b/dist/rollbar.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/utility.js","webpack:///./src/browser/logger.js","webpack:///./src/browser/url.js","webpack:///./src/errorParser.js","webpack:///./src/scrub.js","webpack:///./src/utility/traverse.js","webpack:///./src/browser/bundles/rollbar.js","webpack:///./src/browser/rollbar.js","webpack:///./src/browser/core.js","webpack:///./src/rollbar.js","webpack:///./src/rateLimiter.js","webpack:///./src/merge.js","webpack:///./src/queue.js","webpack:///./src/notifier.js","webpack:///./src/api.js","webpack:///./src/apiUtility.js","webpack:///./node_modules/console-polyfill/index.js","webpack:///./src/browser/detection.js","webpack:///./src/browser/globalSetup.js","webpack:///./src/browser/transport.js","webpack:///./src/browser/transforms.js","webpack:///./node_modules/error-stack-parser/error-stack-parser.js","webpack:///./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack:///./src/transforms.js","webpack:///./src/browser/predicates.js","webpack:///./src/predicates.js","webpack:///./src/defaults.js","webpack:///./src/browser/defaults/scrubFields.js","webpack:///./src/telemetry.js","webpack:///./src/browser/telemetry.js","webpack:///./src/browser/domUtility.js","webpack:///./src/utility/polyfillJSON.js","webpack:///./vendor/JSON-js/json3.js","webpack:///./src/browser/wrapGlobals.js","webpack:///./src/truncation.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3uBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Fa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,eAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,yBAAyB;AACzB;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACtDa;;AAEb,cAAc,mBAAO,CAAC,CAAY;;AAElC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;;;;;;;;ACvBa;;AAEb,cAAc,mBAAO,CAAC,CAAQ;AAC9B,gBAAgB,mBAAO,CAAC,EAAc;AACtC,mBAAmB,mBAAO,CAAC,EAAa;AACxC,mBAAmB,mBAAO,CAAC,EAAyB;AACpD,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,CAAU;AAC9B,iBAAiB,mBAAO,CAAC,EAAe;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;ACnBa;;AAEb,aAAa,mBAAO,CAAC,CAAY;AACjC,QAAQ,mBAAO,CAAC,CAAY;AAC5B,UAAU,mBAAO,CAAC,EAAQ;AAC1B,aAAa,mBAAO,CAAC,CAAU;AAC/B,cAAc,mBAAO,CAAC,EAAe;;AAErC,gBAAgB,mBAAO,CAAC,EAAa;AACrC,aAAa,mBAAO,CAAC,CAAO;;AAE5B,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,iBAAiB,mBAAO,CAAC,EAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,kBAAkB,mBAAO,CAAC,CAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;ACvGa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAY;AAC5B,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvQa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9UA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrJa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC/vBa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n if (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = merge(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 notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, errors[i].rollbarContext);\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"rollbar.js","mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,wBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,kGAAC;AAC7D,MAAM,KAAK,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,kGAAC;AACzC,MAAM,KAAK,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,oBAAoB,wBAAwB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,GAAW;AAC3B,cAAc,mBAAO,CAAC,GAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;;AAEA;;;;;;;;;ACvHa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7Ga;;AAEb,cAAc,mBAAO,CAAC,GAAY;;AAElC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;;;;;;;;;ACvBa;;AAEb,aAAa,mBAAO,CAAC,GAAY;AACjC,QAAQ,mBAAO,CAAC,GAAY;AAC5B,UAAU,mBAAO,CAAC,GAAQ;AAC1B,aAAa,mBAAO,CAAC,GAAU;AAC/B,cAAc,mBAAO,CAAC,GAAe;;AAErC,gBAAgB,mBAAO,CAAC,GAAa;AACrC,aAAa,mBAAO,CAAC,GAAO;;AAE5B,iBAAiB,mBAAO,CAAC,GAAc;AACvC,uBAAuB,mBAAO,CAAC,GAAe;AAC9C,iBAAiB,mBAAO,CAAC,GAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,kBAAkB,mBAAO,CAAC,GAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;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;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,GAAa;AACpC,kBAAkB,mBAAO,CAAC,GAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AC9lBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5Da;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;AC9Ba;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,6BAA6B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAA6B,QAAQ;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7Ia;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;A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AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,gBAAgB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,kCAAkC,0BAA0B;AAC5D;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;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,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,mBAAmB;AACnB,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kBAAkB,0BAA0B;AAC5C;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,eAAe;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,SAAS;AACnD;AACA;AACA,IAAI;AACJ,0CAA0C;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;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,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;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,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;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,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;ACj+Ba;;AAEb,QAAQ,mBAAO,CAAC,GAAY;AAC5B,kBAAkB,mBAAO,CAAC,GAAgB;AAC1C,aAAa,mBAAO,CAAC,GAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA,qBAAqB,8CAA8C;AACnE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAA6B,iBAAiB;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;;AAEA,6BAA6B,qBAAqB;AAClD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,kBAAkB;AAClC;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;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtWa;;AAEb,QAAQ,mBAAO,CAAC,GAAY;AAC5B,uBAAuB,mBAAO,CAAC,GAAmB;AAClD,qBAAqB,mBAAO,CAAC,EAAiB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;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;;AAEA;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;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;;ACxLa;;AAEb,aAAa,mBAAO,CAAC,GAAW;AAChC,QAAQ,mBAAO,CAAC,GAAe;;AAE/B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;;AAEA;;;;;;;;;ACtCa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,GAAe;AAC/B,aAAa,mBAAO,CAAC,GAAW;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AChLa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;ACxFa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,oBAAoB;AAClC;;AAEA;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;;AAEA;;;;;;;;;AC7Da;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACVa;;AAEb,uBAAuB,mBAAO,CAAC,GAAoB;;AAEnD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA,uBAAuB,wBAAwB;AAC/C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChIa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;;AAEA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AChEa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;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;;;;;;;;;AC3Ha;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;AACA;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAkB,SAAS;AAC3B;;AAEA,oBAAoB,qBAAqB;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtNa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,YAAY;AAC3B,eAAe,gBAAgB;AAC/B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA,eAAe;AACf;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,gCAAgC;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AC7Sa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;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;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACzLa;;AAEb,kBAAkB,mBAAO,CAAC,GAAe;AACzC,YAAY,mBAAO,CAAC,GAAS;AAC7B,eAAe,mBAAO,CAAC,GAAY;AACnC,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,UAAU;AACzD;AACA;AACA;AACA,qDAAqD,UAAU;AAC/D;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;AC5Ra;;AAEb,QAAQ,mBAAO,CAAC,GAAW;AAC3B,eAAe,mBAAO,CAAC,GAAoB;;AAE3C;AACA;;AAEA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AC7Fa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;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,KAAK;AACL;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,oBAAoB;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,6BAA6B;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA;AACA;AACA,MAAM,iBAAiB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,+BAA+B,cAAc;AAC7C;;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AClPa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,uBAAuB;AAC3D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,+BAA+B;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxKa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;AAC3B,eAAe,mBAAO,CAAC,GAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1Ha;;AAEb,YAAY,mBAAO,CAAC,GAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;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,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oCAAoC,OAAO;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,SAAS;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,SAAS;AAChD;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAiC,SAAS;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjzBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;AC/Fa;;AAEb,mBAAmB,mBAAO,CAAC,GAA4B;;AAEvD;;;;;;;;;ACJa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACVa;;AAEb,QAAQ,mBAAO,CAAC,GAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,gBAAgB,gBAAgB;AAChC;AACA;AACA;;AAEA,0BAA0B;AAC1B;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,oBAAoB;AACpB,oBAAoB;AACpB,oBAAoB;AACpB;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,sBAAsB,YAAY;AAClC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,sBAAsB,YAAY;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oBAAoB,WAAW;AAC/B;AACA;;AAEA;;AAEA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,cAAc;;AAEd;AACA;;AAEA;AACA;AACA,cAAc;;AAEd;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,UAAU;AACV;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,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;UC1vBA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transport/fetch.js","webpack://rollbar/./src/browser/transport/xhr.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/truncation.js","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./src/utility/replace.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/webpack/bootstrap","webpack://rollbar/webpack/before-startup","webpack://rollbar/webpack/startup","webpack://rollbar/webpack/after-startup"],"sourcesContent":["// 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","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443,\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function (data, callback) {\n var transportOptions = helpers.transportOptions(\n this.transportOptions,\n 'POST',\n );\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function () {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function (data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload);\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function (jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(\n this.transportOptions,\n 'POST',\n );\n this.transport.postJsonPayload(\n this.accessToken,\n transportOptions,\n jsonPayload,\n callback,\n );\n};\n\nApi.prototype.configure = function (options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = \"Error: could not serialize 'context'\";\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data,\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options);\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport,\n };\n}\n\nfunction detectTransport(options) {\n var gWindow =\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port =\n transport.port ||\n (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI,\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath,\n};\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client =\n client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = typeof document != 'undefined' && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(\n this.options,\n this.client.telemeter,\n this,\n gWindow,\n gDocument,\n );\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n\n // Used with rollbar-react for rollbar-react-native compatibility.\n this.rollbar = this;\n}\n\nvar _instance = null;\nRollbar.init = function (options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function (components) {\n Rollbar.prototype.components = components;\n};\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function (options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function (options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(\n oldOptions._configuredOptions,\n options,\n payload,\n );\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function (options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function () {\n return this.client.lastError;\n};\nRollbar.lastError = function () {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return { uuid: uuid };\n};\nRollbar.log = function () {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return { uuid: uuid };\n};\nRollbar.debug = function () {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return { uuid: uuid };\n};\nRollbar.info = function () {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return { uuid: uuid };\n};\nRollbar.warn = function () {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return { uuid: uuid };\n};\nRollbar.warning = function () {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return { uuid: uuid };\n};\nRollbar.error = function () {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return { uuid: uuid };\n};\nRollbar.critical = function () {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function () {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function () {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function () {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (\n this.options.captureUnhandledRejections ||\n this.options.handleUnhandledRejections\n ) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function (\n message,\n url,\n lineno,\n colno,\n error,\n context,\n) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (\n this.options.inspectAnonymousErrors &&\n this.isChrome &&\n error === null &&\n url === ''\n ) {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser,\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function () {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) {\n // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n};\n\nRollbar.prototype.handleUnhandledRejection = function (reason, promise) {\n if (\n !this.options.captureUnhandledRejections &&\n !this.options.handleUnhandledRejections\n ) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context =\n (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 () {\n return context || {};\n };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch (exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function (f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function () {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function () {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function (e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.addPayloadOptions)\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function () {\n logger.info(\n 'Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.',\n );\n};\n\nRollbar.prototype._createItem = function (args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return (\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self)\n );\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false,\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear',\n ],\n};\n","'use strict';\n\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 var undef;\n if (typeof document === 'undefined') {\n return undef;\n }\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n ((div.innerHTML = ''), all[0])\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion,\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction 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 = ' > ',\n separatorLength = separator.length;\n var out = [],\n len = 0,\n nextStr,\n 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(\n '[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]',\n );\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 = {},\n className,\n key,\n attr,\n i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && typeof className === 'string') {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({ key: key, value: attr });\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType,\n};\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) {\n return;\n }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function () {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) {\n return;\n }\n\n if (\n typeof window._rollbarURH === 'function' &&\n window._rollbarURH.belongsToShim\n ) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections,\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log,\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore,\n};\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation,\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar replace = require('../utility/replace');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false,\n};\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) {\n return null;\n }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function (description) {\n var name = nameFromDescription(description);\n if (!name) {\n return false;\n }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: [],\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: [],\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function (options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function (oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (\n !this.autoInstrument.network &&\n oldSettings &&\n oldSettings.network\n ) {\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 (\n this.autoInstrument.navigation &&\n !(oldSettings && oldSettings.navigation)\n ) {\n this.instrumentNavigation();\n } else if (\n !this.autoInstrument.navigation &&\n oldSettings &&\n oldSettings.navigation\n ) {\n this.deinstrumentNavigation();\n }\n\n if (\n this.autoInstrument.connectivity &&\n !(oldSettings && oldSettings.connectivity)\n ) {\n this.instrumentConnectivity();\n } else if (\n !this.autoInstrument.connectivity &&\n oldSettings &&\n oldSettings.connectivity\n ) {\n this.deinstrumentConnectivity();\n }\n\n if (\n this.autoInstrument.contentSecurityPolicy &&\n !(oldSettings && oldSettings.contentSecurityPolicy)\n ) {\n this.instrumentContentSecurityPolicy();\n } else if (\n !this.autoInstrument.contentSecurityPolicy &&\n oldSettings &&\n oldSettings.contentSecurityPolicy\n ) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function () {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function () {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function (orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(\n xhrp,\n 'open',\n function (orig) {\n return function (method, url) {\n var isUrlObject = _isUrlObject(url);\n if (_.isType(url, 'string') || isUrlObject) {\n url = isUrlObject ? url.toString() : url;\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null,\n };\n }\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n\n replace(\n xhrp,\n 'setRequestHeader',\n function (orig) {\n return function (header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n\n replace(\n xhrp,\n 'send',\n function (orig) {\n /* eslint-disable no-unused-vars */\n return function (data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(\n xhr.__rollbar_xhr,\n 'xhr',\n undefined,\n );\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type =\n xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig =\n self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i = 0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i = 0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (\n self.isJsonContentType(\n xhr.__rollbar_xhr.response_content_type,\n )\n ) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level =\n self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if (\n 'onreadystatechange' in xhr &&\n _.isFunction(xhr.onreadystatechange)\n ) {\n replace(xhr, 'onreadystatechange', function (orig) {\n return self.rollbar.wrap(\n orig,\n undefined,\n onreadystatechangeHandler,\n );\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = new Error().stack;\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n }\n\n if ('fetch' in this._window) {\n replace(\n this._window,\n 'fetch',\n 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 var isUrlObject = _isUrlObject(input);\n if (_.isType(input, 'string') || isUrlObject) {\n url = isUrlObject ? input.toString() : input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null,\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(\n reqHeaders,\n self.autoInstrument.networkRequestHeaders,\n );\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (\n args[0] &&\n !_.isType(args[0], 'string') &&\n args[0].body\n ) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = new Error().stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(\n resp.headers,\n self.autoInstrument.networkResponseHeaders,\n );\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') {\n // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (\n text &&\n self.isJsonContentType(metadata.response_content_type)\n ) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n },\n this.replacements,\n 'network',\n );\n }\n};\n\nInstrumenter.prototype.captureNetwork = function (\n metadata,\n subtype,\n rollbarUUID,\n) {\n if (\n metadata.request &&\n this.isJsonContentType(metadata.request_content_type)\n ) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function (contentType) {\n return contentType &&\n _.isType(contentType, 'string') &&\n contentType.toLowerCase().includes('json')\n ? true\n : false;\n};\n\nInstrumenter.prototype.scrubJson = function (json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n};\n\nInstrumenter.prototype.fetchHeaders = function (inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') {\n // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i = 0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n};\n\nInstrumenter.prototype.trackHttpErrors = function () {\n return (\n this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0\n );\n};\n\nInstrumenter.prototype.errorOnHttpStatus = function (metadata) {\n var status = metadata.status_code;\n\n if (\n (status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)\n ) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n};\n\nInstrumenter.prototype.deinstrumentConsole = function () {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function () {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function () {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug', 'info', 'warn', 'error', 'log'];\n try {\n for (var i = 0, len = methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function () {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function () {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener(\n 'dom',\n this._window,\n 'blur',\n 'onfocusout',\n blurHandler,\n true,\n );\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 =\n domUtil.isDescribedElement(e, 'a') ||\n domUtil.isDescribedElement(e, 'button');\n if (\n hasTag &&\n (anchorOrButton ||\n domUtil.isDescribedElement(e, 'input', ['button', 'submit']))\n ) {\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 (\n domUtil.isDescribedElement(e, 'select') &&\n e.options &&\n e.options.length\n ) {\n this.handleSelectInputChanged(e);\n } else if (\n domUtil.isDescribedElement(e, 'input') &&\n !domUtil.isDescribedElement(e, 'input', [\n 'button',\n 'submit',\n 'hidden',\n 'checkbox',\n 'radio',\n ])\n ) {\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 (\n subtype,\n element,\n value,\n isChecked,\n) {\n if (value !== undefined) {\n if (\n this.scrubTelemetryInputs ||\n domUtil.getElementType(element) === 'password'\n ) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(\n domUtil.treeToArray(element),\n );\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 =\n !chromePackagedApp &&\n this._window.history &&\n 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 =\n !chromePackagedApp &&\n this._window.history &&\n this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(\n this._window,\n 'onpopstate',\n 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 },\n this.replacements,\n 'navigation',\n );\n\n replace(\n this._window.history,\n 'pushState',\n 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 },\n this.replacements,\n 'navigation',\n );\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 (\n parsedHref.protocol === parsedTo.protocol &&\n parsedHref.host === parsedTo.host\n ) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (\n parsedHref.protocol === parsedFrom.protocol &&\n parsedHref.host === parsedFrom.host\n ) {\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(\n 'connectivity',\n this._window,\n 'online',\n undefined,\n function () {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this),\n true,\n );\n this.addListener(\n 'connectivity',\n this._window,\n 'offline',\n undefined,\n function () {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this),\n true,\n );\n } else {\n var self = this;\n replace(\n this._document.body,\n 'ononline',\n function (orig) {\n return function () {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n },\n this.replacements,\n 'connectivity',\n );\n replace(\n this._document.body,\n 'onoffline',\n function (orig) {\n return function () {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n },\n this.replacements,\n 'connectivity',\n );\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function (cspEvent) {\n var message =\n 'Security Policy Violation: ' +\n 'blockedURI: ' +\n cspEvent.blockedURI +\n ', ' +\n 'violatedDirective: ' +\n cspEvent.violatedDirective +\n ', ' +\n 'effectiveDirective: ' +\n cspEvent.effectiveDirective +\n ', ';\n\n if (cspEvent.sourceFile) {\n message +=\n 'location: ' +\n cspEvent.sourceFile +\n ', ' +\n 'line: ' +\n cspEvent.lineNumber +\n ', ' +\n 'col: ' +\n cspEvent.columnNumber +\n ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n};\n\nInstrumenter.prototype.handleCspError = function (message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n};\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function () {\n if (!('addEventListener' in this._document)) {\n return;\n }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function () {\n if (!('addEventListener' in this._document)) {\n return;\n }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener(\n 'contentsecuritypolicy',\n this._document,\n 'securitypolicyviolation',\n null,\n cspHandler,\n false,\n );\n};\n\nInstrumenter.prototype.addListener = function (\n section,\n obj,\n type,\n altType,\n handler,\n capture,\n) {\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\nfunction _isUrlObject(input) {\n return typeof URL !== 'undefined' && input instanceof URL;\n}\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if (item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo =\n item.err._savedStackTrace ||\n errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message =\n item.err.message ||\n item.err.description ||\n item.message ||\n String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment =\n (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version,\n },\n custom: item.custom,\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function (item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function (item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height,\n },\n },\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function (item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i = 0, l = navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({ name: cur.name, description: cur.description });\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message,\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', { message: result });\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (\n stack &&\n stack.length === 0 &&\n item._unhandledStackInfo &&\n item._unhandledStackInfo.stack\n ) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', { trace_chain: traces });\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', { trace: trace });\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n class: className,\n message: message,\n },\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method:\n !stackFrame.func || stackFrame.func === '?'\n ? '[anonymous]'\n : stackFrame.func,\n colno: stackFrame.column,\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (\n frame.method &&\n frame.method.endsWith &&\n frame.method.endsWith('_rollbar_wrapped')\n ) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n };\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber,\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function (\n accessToken,\n options,\n params,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n null,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\nTransport.prototype.post = function (\n accessToken,\n options,\n payload,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload);\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n writeData,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\nTransport.prototype.postJsonPayload = function (\n accessToken,\n options,\n jsonPayload,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n jsonPayload,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow =\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n var self = this;\n rootZone.run(function () {\n self._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n};\n\nTransport.prototype._makeRequest = function (\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n transport,\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout);\n } else {\n makeXhrRequest(\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n );\n }\n};\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function (_msg) {\n /* do nothing */\n }, // eslint-disable-line no-unused-vars\n function (err) {\n callback(new Error(err));\n },\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if (_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(function () {\n controller.abort();\n }, timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal,\n },\n body: data,\n })\n .then(function (response) {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then(function (data) {\n callback(null, data);\n })\n .catch(function (error) {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function () {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message =\n 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 =\n 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if (_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n // 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(\n new Error(\n 'No window available during request, unknown environment',\n ),\n );\n }\n\n // If the current page is http, try and send over http\n if (\n window.location.href.substring(0, 5) === 'http:' &&\n url.substring(0, 5) === 'https'\n ) {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function () {};\n xdomainrequest.ontimeout = function () {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function () {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function () {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n },\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null,\n auth: null,\n host: null,\n path: null,\n hash: null,\n href: url,\n hostname: null,\n port: null,\n pathname: null,\n search: null,\n query: null,\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0, i);\n last = i + 2;\n } else {\n last = 0;\n }\n\n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i + 1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse,\n};\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) {\n return;\n }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals =\n '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 ',',\n );\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 (\n prototype.hasOwnProperty &&\n prototype.hasOwnProperty('addEventListener')\n ) {\n var oldAddEventListener = prototype.addEventListener;\n while (\n oldAddEventListener._rollbarOldAdd &&\n oldAddEventListener.belongsToShim\n ) {\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 (\n oldRemoveEventListener._rollbarOldRemove &&\n oldRemoveEventListener.belongsToShim\n ) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function (event, callback, bubble) {\n oldRemoveEventListener.call(\n this,\n event,\n (callback && callback._rollbar_wrapped) || callback,\n bubble,\n );\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nmodule.exports = {\n version: '2.26.4',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60,\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp(\n '^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ',\n);\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\nfunction gatherContext() {\n return null;\n}\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch (e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception,\n };\n}\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace(\n (errClassMatch[errClassMatch.length - 2] || '') + errClass + ':',\n '',\n );\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName =\n error.constructor.name &&\n error.constructor.name.length &&\n error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame,\n};\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n if (!obj || toStr.call(obj) !== '[object Object]') {\n return false;\n }\n\n var hasOwnConstructor = hasOwn.call(obj, 'constructor');\n var hasIsPrototypeOf =\n obj.constructor &&\n obj.constructor.prototype &&\n hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n // Not own constructor property must be Object\n if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n return false;\n }\n\n // Own properties are enumerated firstly, so to speed up,\n // if last one is own, then all properties are own.\n var key;\n for (key in obj) {\n /**/\n }\n\n return typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i,\n src,\n copy,\n clone,\n name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i = 0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function (options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function (transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function (item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(\n item,\n 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\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function (item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function (err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function (item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (\n _.isFunction(settings.checkIgnore) &&\n settings.checkIgnore(isUncaught, args, item)\n ) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n };\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function (item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n };\n}\n\nfunction urlIsSafeListed(logger) {\n return function (item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n };\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) {\n return !block;\n }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) {\n return !block;\n }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) {\n return !block;\n }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if (matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (\n e\n /* istanbul ignore next */\n ) {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error(\n \"Error while reading your configuration's \" +\n listName +\n ' option. Removing custom ' +\n listName +\n '.',\n e,\n );\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function (item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0) {\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch (\n e\n /* istanbul ignore next */\n ) {\n settings.ignoredMessages = null;\n logger.error(\n \"Error while reading your configuration's ignoredMessages option. Removing custom ignoredMessages.\",\n );\n }\n\n return true;\n };\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored,\n};\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function (options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function (predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function (item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function (item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function (\n item,\n callback,\n originalError,\n originalItem,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {\n return;\n };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(\n item,\n function (err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this),\n );\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(\n function () {\n this._maybeCallWait();\n }.bind(this),\n 500,\n );\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(\n item,\n function (err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this),\n );\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 = [\n 'ECONNRESET',\n 'ENOTFOUND',\n 'ESOCKETTIMEDOUT',\n 'ETIMEDOUT',\n 'ECONNREFUSED',\n 'EHOSTUNREACH',\n 'EPIPE',\n 'EAI_AGAIN',\n];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function (err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function (item, callback) {\n this.retryQueue.push({ item: item, callback: callback });\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(\n function () {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this),\n this.options.retryInterval,\n );\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 (\n _.isFunction(this.waitCallback) &&\n this.pendingItems.length === 0 &&\n this.pendingRequests.length === 0\n ) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined,\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function (options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function (item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n globalRateLimit + ' max items reached',\n false,\n );\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n globalRateLimitPerMin + ' items per minute reached',\n false,\n );\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend =\n shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n null,\n shouldSend,\n globalRateLimit,\n globalRateLimitPerMin,\n perMinute,\n );\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(\n platform,\n options,\n error,\n shouldSend,\n globalRateLimit,\n limitPerMin,\n perMinute,\n) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(\n platform,\n options,\n globalRateLimit,\n limitPerMin,\n perMinute,\n );\n }\n return { error: error, shouldSend: shouldSend, payload: payload };\n}\n\nfunction rateLimitPayload(\n platform,\n options,\n globalRateLimit,\n limitPerMin,\n perMinute,\n) {\n var environment =\n options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin,\n },\n },\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version:\n (options.notifier && options.notifier.version) || options.version,\n },\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60,\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer;\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents =\n (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag(\n 'rollbar.item_url',\n `https://rollbar.com/item/uuid/?uuid=${item.uuid}`,\n );\n span.setTag(\n 'rollbar.occurrence_url',\n `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`,\n );\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId,\n };\n }\n }\n }\n};\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (\n !spanContext ||\n !spanContext.toSpanId ||\n !spanContext.toTraceId ||\n typeof spanContext.toSpanId !== 'function' ||\n typeof spanContext.toTraceId !== 'function'\n ) {\n return false;\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function (options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.queue.length > newMaxEvents) {\n deleteCount = this.queue.length - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function () {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function (\n type,\n metadata,\n level,\n rollbarUUID,\n timestamp,\n) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client',\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (\n _.isFunction(this.options.filterTelemetry) &&\n this.options.filterTelemetry(e)\n ) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function (\n type,\n metadata,\n level,\n rollbarUUID,\n) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function (\n err,\n level,\n rollbarUUID,\n timestamp,\n) {\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 (\n message,\n level,\n rollbarUUID,\n timestamp,\n) {\n return this.capture(\n 'log',\n {\n message: message,\n },\n level,\n rollbarUUID,\n timestamp,\n );\n};\n\nTelemeter.prototype.captureNetwork = function (\n metadata,\n subtype,\n rollbarUUID,\n requestData,\n) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function (statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function (\n subtype,\n element,\n value,\n checked,\n rollbarUUID,\n) {\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(\n 'navigation',\n { from: from, to: to },\n 'info',\n rollbarUUID,\n );\n};\n\nTelemeter.prototype.captureDomContentLoaded = function (ts) {\n return this.capture(\n 'navigation',\n { subtype: 'DOMContentLoaded' },\n 'info',\n undefined,\n ts && ts.getTime(),\n );\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(\n 'navigation',\n { subtype: 'load' },\n 'info',\n undefined,\n ts && ts.getTime(),\n );\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function (type, rollbarUUID) {\n return this.captureNetwork({ change: type }, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function (item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture(\n 'log',\n item.custom,\n item.level,\n item.uuid,\n item.timestamp,\n );\n }\n};\n\nTelemeter.prototype.push = function (e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info',\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var data = item.data;\n\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 addPayloadOptions(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n item.data = _.merge(item.data, payloadOptions);\n callback(null, item);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath + '.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath + '.extra') || {};\n var newExtra = _.merge(extra, { message: item.message });\n _.set(item, tracePath + '.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function (item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error(\n 'Error while calling custom transform() function. Removing custom transform().',\n e,\n );\n callback(null, item);\n return;\n }\n if (_.isPromise(response)) {\n response.then(\n function (promisedItem) {\n if (promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n },\n function (error) {\n callback(error, item);\n },\n );\n } else {\n callback(null, newItem);\n }\n };\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if (_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(\n item.notifier.client.notifier.diagnostic,\n item.diagnostic,\n );\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack,\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(\n item.data.notifier.diagnostic,\n diagnostic,\n );\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addPayloadOptions: addPayloadOptions,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys,\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = typeof range === 'undefined' ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(\n 255,\n traceData.exception.message,\n );\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = typeof maxSize === 'undefined' ? 512 * 1024 : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody,\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue,\n};\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if (polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else {\n // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return {}.toString\n .call(x)\n .match(/\\s([a-zA-Z]+)/)[1]\n .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\n .call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n */\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String;\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\nfunction isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return type === 'object' || type === 'array';\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(\n /[xy]/g,\n 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 );\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4,\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor',\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g,\n },\n parser: {\n strict:\n /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose:\n /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n },\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0, qs) + query + '&' + p.substring(qs + 1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0, h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return { error: error, value: value };\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) {\n // up to 7 bits\n count = count + 1;\n } else if (code < 2048) {\n // up to 11 bits\n count = count + 2;\n } else if (code < 65536) {\n // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return { error: error, value: value };\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser,\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno,\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href =\n typeof document !== 'undefined' &&\n document &&\n document.location &&\n document.location.href;\n var useragent =\n typeof window !== 'undefined' &&\n window &&\n window.navigator &&\n window.navigator.userAgent;\n return {\n mode: mode,\n message: error ? String(error) : message || backupMessage,\n url: href,\n stack: [location],\n useragent: useragent,\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function (err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value,\n name,\n newSeen,\n result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : (message = arg);\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : (err = arg);\n break;\n case 'object':\n case 'array':\n if (\n arg instanceof Error ||\n (typeof DOMException !== 'undefined' && arg instanceof DOMException)\n ) {\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 (\n arg instanceof Error ||\n (typeof DOMException !== 'undefined' && arg instanceof DOMException)\n ) {\n err ? extraArgs.push(arg) : (err = arg);\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4(),\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = [\n 'log',\n 'network',\n 'dom',\n 'navigation',\n 'error',\n 'manual',\n];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level,\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len - 1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if (options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if (options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4,\n};\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n return name.toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value;\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function () {\n var value = items.shift();\n return { done: value === undefined, value: value };\n },\n };\n\n return iterator;\n}\n\nfunction FetchHeaders(headers) {\n this.map = {};\n\n if (headers instanceof FetchHeaders) {\n headers.forEach(function (value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function (header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function (name) {\n this.append(name, headers[name]);\n }, this);\n }\n}\n\nFetchHeaders.prototype.append = function (name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n};\n\nFetchHeaders.prototype.get = function (name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null;\n};\n\nFetchHeaders.prototype.has = function (name) {\n return this.map.hasOwnProperty(normalizeName(name));\n};\n\nFetchHeaders.prototype.forEach = function (callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n};\n\nFetchHeaders.prototype.entries = function () {\n var items = [];\n this.forEach(function (value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items);\n};\n\nmodule.exports = headers;\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","'use strict';\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\nmodule.exports = replace;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: [] };\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","// 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","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(409);\n",""],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/dist/rollbar.min.js b/dist/rollbar.min.js
index f75f7e99a..fd5ce7066 100644
--- a/dist/rollbar.min.js
+++ b/dist/rollbar.min.js
@@ -1 +1 @@
-!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(11),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=v();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}var d=["log","network","dom","navigation","error","manual"],m=["critical","error","warning","info","debug"];function g(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,o,i){for(var a,u,c,p,f,d,m=[],g=[],y=0,b=t.length;y0&&((c=n(c)).extraArgs=m);var k={message:a,err:u,custom:c,timestamp:v(),callback:p,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,c),o&&f&&(k.request=f),i&&(k.lambdaContext=i),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(15),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,r,n,e)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=t.proxy;if(t.endpoint){var l=r.parse(t.endpoint);n=l.hostname,o=l.protocol,i=l.port,s=l.pathname,a=l.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]> 4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t){this.truncation=t}function s(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){a.apply(void 0,r)}))}else a.apply(void 0,r)}function a(t,e,r,i,s,a,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(i,s);var l;if(!(l=a?a():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}s(new Error(String(l.status)))}else{s(u("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),s(r)}var i};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(i)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return s(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){s(u("Request timed out","ETIMEDOUT"))},f.onerror=function(){s(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);s(t.error,t.value)},f.open(r,e,!0),f.send(i)}else s(new Error("Cannot find a method to transport a request"))}}catch(t){s(t)}}function u(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}i.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);s(t,n.formatUrl(e),"GET",null,o,i,e.timeout)},i.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var a;if((a=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(a.error);var u=a.value;s(t,n.formatUrl(e),"POST",u,o,i,e.timeout)},i.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});s(t,n.formatUrl(e),"POST",r,o,i,e.timeout)},t.exports=i},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(" ")||void 0,a=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(4),i=r(2),s=r(30),a={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function u(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function c(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function l(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=a),this.autoInstrument=n.merge(a,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},l.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},l.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},l.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===s.getElementType(e))r="[scrubbed]";else{var o=s.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=s.elementArrayToString(s.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},l.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&c(this.replacements,"navigation")},l.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;u(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),u(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},l.prototype.handleUrlChange=function(t,e){var r=i.parse(this._location.href),n=i.parse(e),o=i.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},l.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):c(this.replacements,"connectivity"))},l.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;u(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),u(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},l.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},l.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},l.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._window&&this.removeListeners("contentsecuritypolicy")},l.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._window){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._window,"securitypolicyviolation",null,t,!1)}},l.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},l.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=l},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r ".length,i=[],s=0,a=t.length-1;a>=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}]);
\ No newline at end of file
+(()=>{var t={276:function(){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},180:function(t,e,r){var n,o,i;!function(s,a){"use strict";o=[r(124)],void 0===(i="function"==typeof(n=function(t){var e=/(^|@)\S+:\d+/,r=/^\s*at .*(\S+:\d+|\(native\))/m,n=/^(eval@)?(\[native code])?$/;return{parse:function(t){if(void 0!==t.stacktrace||void 0!==t["opera#sourceloc"])return this.parseOpera(t);if(t.stack&&t.stack.match(r))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")},extractLocation:function(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));return[e[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(t){return!!t.match(r)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(" ")||void 0,a=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},124:function(t,e){var r,n,o;!function(i,s){"use strict";n=[],void 0===(o="function"==typeof(r=function(){function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t){return t.charAt(0).toUpperCase()+t.substring(1)}function r(t){return function(){return this[t]}}var n=["isConstructor","isEval","isNative","isToplevel"],o=["columnNumber","lineNumber"],i=["fileName","functionName","source"],s=["args"],a=["evalOrigin"],u=n.concat(o,i,s,a);function c(t){if(t)for(var r=0;r{"use strict";var n=r(702),o=r(817),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup),i=this;setTimeout((function(){i.transport.post(i.accessToken,r,n,e)}),0)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},817:(t,e,r)=>{"use strict";var n=r(702);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=function(t){var e="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,r=t.defaultTransport||"xhr";void 0===e.fetch&&(r="xhr");void 0===e.XMLHttpRequest&&(r="fetch");return r}(t),l=t.proxy;if(t.endpoint){var p=r.parse(t.endpoint);n=p.hostname,o=p.protocol,i=p.port,s=p.pathname,a=p.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:l,transport:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout,a=t.transport;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e,transport:a}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},409:(t,e,r)=>{"use strict";var n=r(343),o="undefined"!=typeof window&&window._rollbarConfig,i=o&&o.globalAlias||"Rollbar",s="undefined"!=typeof window&&window[i]&&"function"==typeof window[i].shimId&&void 0!==window[i].shimId();if("undefined"==typeof window||window._rollbarStartTime||(window._rollbarStartTime=(new Date).getTime()),!s&&o){var a=new n(o);window[i]=a}else"undefined"!=typeof window?(window.rollbar=n,window._rollbarDidLoad=!0):"undefined"!=typeof self&&(self.rollbar=n,self._rollbarDidLoad=!0);t.exports=n},403:(t,e,r)=>{"use strict";var n=r(562),o=r(702),i=r(815),s=r(802),a=r(349),u=r(477),c=r(509),l=r(860),p=r(417),h=r(172),f=r(61),d=r(303);function m(t,e){this.options=o.handleOptions(x,t,null,s),this.options._configuredOptions=t;var r=this.components.telemeter,a=this.components.instrumenter,d=this.components.polyfillJSON;this.wrapGlobals=this.components.wrapGlobals,this.scrub=this.components.scrub;var m=this.components.truncation,g=new u(m),v=new i(this.options,g,c,m);r&&(this.telemeter=new r(this.options)),this.client=e||new n(this.options,v,s,this.telemeter,"browser");var y=b(),w="undefined"!=typeof document&&document;this.isChrome=y.chrome&&y.chrome.runtime,this.anonymousErrorsPending=0,function(t,e,r){t.addTransform(l.handleDomException).addTransform(l.handleItemWithError).addTransform(l.ensureItemHasSomethingToSay).addTransform(l.addBaseInfo).addTransform(l.addRequestInfo(r)).addTransform(l.addClientInfo(r)).addTransform(l.addPluginInfo(r)).addTransform(l.addBody).addTransform(p.addMessageWithError).addTransform(p.addTelemetryData).addTransform(p.addConfigToPayload).addTransform(l.addScrubber(e.scrub)).addTransform(p.addPayloadOptions).addTransform(p.userTransform(s)).addTransform(p.addConfiguredOptions).addTransform(p.addDiagnosticKeys).addTransform(p.itemToPayload)}(this.client.notifier,this,y),this.client.queue.addPredicate(f.checkLevel).addPredicate(h.checkIgnore).addPredicate(f.userCheckIgnore(s)).addPredicate(f.urlIsNotBlockListed(s)).addPredicate(f.urlIsSafeListed(s)).addPredicate(f.messageIsIgnored(s)),this.setupUnhandledCapture(),a&&(this.instrumenter=new a(this.options,this.client.telemeter,this,y,w),this.instrumenter.instrument()),o.setupJSON(d),this.rollbar=this}var g=null;function v(t){var e="Rollbar is not initialized";s.error(e),t&&t(new Error(e))}function y(t){for(var e=0,r=t.length;e{"use strict";t.exports={scrubFields:["pw","pass","passwd","password","secret","confirm_password","confirmPassword","password_confirmation","passwordConfirmation","access_token","accessToken","X-Rollbar-Access-Token","secret_key","secretKey","secretToken","cc-number","card number","cardnumber","cardnum","ccnum","ccnumber","cc num","creditcardnumber","credit card number","newcreditcardnumber","new credit card","creditcardno","credit card no","card#","card #","cc-csc","cvc","cvc2","cvv2","ccv2","security code","card verification","name on credit card","name on card","nameoncard","cardholder","card holder","name des karteninhabers","ccname","card type","cardtype","cc type","cctype","payment type","expiration date","expirationdate","expdate","cc-exp","ccmonth","ccyear"]}},616:t=>{"use strict";var e={ieVersion:function(){var t;if("undefined"==typeof document)return t;for(var e=3,r=document.createElement("div"),n=r.getElementsByTagName("i");r.innerHTML="\x3c!--[if gt IE "+ ++e+"]> 4?e:t}};t.exports=e},300:t=>{"use strict";function e(t){return(t.getAttribute("type")||"").toLowerCase()}function r(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;s--){if(e=r(t[s]),n=i+3*o.length+e.length,s=83){o.unshift("...");break}o.unshift(e),i+=e.length}return o.join(" > ")},treeToArray:function(t){for(var e,r=[],o=0;t&&o<5&&"html"!==(e=n(t)).tagName;o++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,r,n){if(t.tagName.toLowerCase()!==r.toLowerCase())return!1;if(!n)return!0;t=e(t);for(var o=0;o{"use strict";t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var n;if("function"==typeof e._rollbarOldOnError)n=e._rollbarOldOnError;else if(t.onerror){for(n=t.onerror;n._rollbarOldOnError;)n=n._rollbarOldOnError;e._rollbarOldOnError=n}e.handleAnonymousErrors();var o=function(){var r=Array.prototype.slice.call(arguments,0);!function(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n);"anonymous"===o&&(e.anonymousErrorsPending+=1)}(t,e,n,r)};r&&(o._rollbarOldOnError=n),t.onerror=o}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},802:(t,e,r)=>{"use strict";r(276);var n=r(616),o=r(702);t.exports={error:function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),n.ieVersion()<=8?console.error(o.formatArgsAsString(t)):console.error.apply(console,t)},info:function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),n.ieVersion()<=8?console.info(o.formatArgsAsString(t)):console.info.apply(console,t)},log:function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),n.ieVersion()<=8?console.log(o.formatArgsAsString(t)):console.log.apply(console,t)}}},172:(t,e,r)=>{"use strict";var n=r(702);t.exports={checkIgnore:function(t,e){return!n.get(e,"plugins.jquery.ignoreAjaxErrors")||!n.get(t,"body.message.extra.isAjax")}}},343:(t,e,r)=>{"use strict";var n=r(403),o=r(773),i=r(568),s=r(876),a=r(965),u=r(369),c=r(473);n.setComponents({telemeter:o,instrumenter:i,polyfillJSON:s,wrapGlobals:a,scrub:u,truncation:c}),t.exports=n},568:(t,e,r)=>{"use strict";var n=r(702),o=r(650),i=r(297),s=r(369),a=r(509),u=r(300),c={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function l(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function p(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=c),this.autoInstrument=n.merge(c,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){s.__rollbar_xhr.end_time_ms=n.now();var e=null;if(s.__rollbar_xhr.response_content_type=s.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var i,a;if(!0===r){var u=s.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},p.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},p.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},p.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===u.getElementType(e))r="[scrubbed]";else{var o=u.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=u.elementArrayToString(u.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},p.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&l(this.replacements,"navigation")},p.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;i(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),i(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},p.prototype.handleUrlChange=function(t,e){var r=a.parse(this._location.href),n=a.parse(e),o=a.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},p.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):l(this.replacements,"connectivity"))},p.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;i(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),i(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},p.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},p.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},p.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._document&&this.removeListeners("contentsecuritypolicy")},p.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._document){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._document,"securitypolicyviolation",null,t,!1)}},p.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},p.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=p},860:(t,e,r)=>{"use strict";var n=r(702),o=r(303),i=r(802);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var h,f,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y0&&n.set(e,"data.request",i),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u{"use strict";var n=r(702),o=r(656),i=r(86);function s(t){this.truncation=t}s.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);var s=n.formatUrl(e);this._makeZoneRequest(t,s,"GET",null,o,i,e.timeout,e.transport)},s.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var s;if((s=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(s.error);var a=s.value,u=n.formatUrl(e);this._makeZoneRequest(t,u,"POST",a,o,i,e.timeout,e.transport)},s.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});var s=n.formatUrl(e);this._makeZoneRequest(t,s,"POST",r,o,i,e.timeout,e.transport)},s.prototype._makeZoneRequest=function(){var t="undefined"!=typeof window&&window||void 0!==o&&o,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent,o=this;n.run((function(){o._makeRequest.apply(void 0,r)}))}else this._makeRequest.apply(void 0,r)},s.prototype._makeRequest=function(t,e,r,n,s,a,u,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(n,s);"fetch"===c?o(t,e,r,n,s,u):i(t,e,r,n,s,a,u)},t.exports=s},656:(t,e,r)=>{"use strict";var n=r(802),o=r(702);t.exports=function(t,e,r,i,s,a){var u,c;o.isFiniteNumber(a)&&(u=new AbortController,c=setTimeout((function(){u.abort()}),a)),fetch(e,{method:r,headers:{"Content-Type":"application/json","X-Rollbar-Access-Token":t,signal:u&&u.signal},body:i}).then((function(t){return c&&clearTimeout(c),t.json()})).then((function(t){s(null,t)})).catch((function(t){n.error(t.message),s(t)}))}},86:(t,e,r)=>{"use strict";var n=r(702),o=r(802);function i(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}t.exports=function(t,e,r,s,a,u,c){var l;if(!(l=u?u():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}a(new Error(String(l.status)))}else{a(i("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),a(r)}var s};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(s)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return a(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var h=new XDomainRequest;h.onprogress=function(){},h.ontimeout=function(){a(i("Request timed out","ETIMEDOUT"))},h.onerror=function(){a(new Error("Error during request"))},h.onload=function(){var t=n.jsonParse(h.responseText);a(t.error,t.value)},h.open(r,e,!0),h.send(s)}else a(new Error("Cannot find a method to transport a request"))}}catch(t){a(t)}}},509:t=>{"use strict";t.exports={parse:function(t){var e,r,n={protocol:null,auth:null,host:null,path:null,hash:null,href:t,hostname:null,port:null,pathname:null,search:null,query:null};if(-1!==(e=t.indexOf("//"))?(n.protocol=t.substring(0,e),r=e+2):r=0,-1!==(e=t.indexOf("@",r))&&(n.auth=t.substring(r,e),r=e+1),-1===(e=t.indexOf("/",r))){if(-1===(e=t.indexOf("?",r)))return-1===(e=t.indexOf("#",r))?n.host=t.substring(r):(n.host=t.substring(r,e),n.hash=t.substring(e)),n.hostname=n.host.split(":")[0],n.port=n.host.split(":")[1],n.port&&(n.port=parseInt(n.port,10)),n;n.host=t.substring(r,e),n.hostname=n.host.split(":")[0],n.port=n.host.split(":")[1],n.port&&(n.port=parseInt(n.port,10)),r=e}else n.host=t.substring(r,e),n.hostname=n.host.split(":")[0],n.port=n.host.split(":")[1],n.port&&(n.port=parseInt(n.port,10)),r=e;if(-1===(e=t.indexOf("#",r))?n.path=t.substring(r):(n.path=t.substring(r,e),n.hash=t.substring(e)),n.path){var o=n.path.split("?");n.pathname=o[0],n.query=o[1],n.search=n.query?"?"+n.query:null}return n}}},965:t=>{"use strict";function e(t,e,r){if(e.hasOwnProperty&&e.hasOwnProperty("addEventListener")){for(var n=e.addEventListener;n._rollbarOldAdd&&n.belongsToShim;)n=n._rollbarOldAdd;var o=function(e,r,o){n.call(this,e,t.wrap(r),o)};o._rollbarOldAdd=n,o.belongsToShim=r,e.addEventListener=o;for(var i=e.removeEventListener;i._rollbarOldRemove&&i.belongsToShim;)i=i._rollbarOldRemove;var s=function(t,e,r){i.call(this,t,e&&e._rollbar_wrapped||e,r)};s._rollbarOldRemove=i,s.belongsToShim=r,e.removeEventListener=s}}t.exports=function(t,r,n){if(t){var o,i,s="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(o=0;o{"use strict";t.exports={version:"2.26.4",endpoint:"api.rollbar.com/api/1/item/",logLevel:"debug",reportLevel:"debug",uncaughtErrorLevel:"error",maxItems:0,itemsPerMin:60}},303:(t,e,r)=>{"use strict";var n=r(180),o=new RegExp("^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ");function i(){return null}function s(t){var e={};return e._stackFrame=t,e.url=t.fileName,e.line=t.lineNumber,e.func=t.functionName,e.column=t.columnNumber,e.args=t.args,e.context=null,e}function a(t,e){return{stack:function(){var r=[];e=e||0;try{r=n.parse(t)}catch(t){r=[]}for(var o=[],i=e;i{"use strict";var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var n,o=e.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&e.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!o&&!i)return!1;for(n in t);return void 0===n||e.call(t,n)};t.exports=function t(){var e,r,o,i,s,a={},u=null,c=arguments.length;for(e=0;e{"use strict";var n=r(702);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},61:(t,e,r)=>{"use strict";var n=r(702);function o(t,e,r){if(!t)return!r;var o,i,s=t.frames;if(!s||0===s.length)return!r;for(var a=e.length,u=s.length,c=0;c{"use strict";var n=r(702);function o(t,e,r,n){this.rateLimiter=t,this.api=e,this.logger=r,this.options=n,this.predicates=[],this.pendingItems=[],this.pendingRequests=[],this.retryQueue=[],this.retryHandle=null,this.waitCallback=null,this.waitIntervalID=null}o.prototype.configure=function(t){this.api&&this.api.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addPredicate=function(t){return n.isFunction(t)&&this.predicates.push(t),this},o.prototype.addPendingItem=function(t){this.pendingItems.push(t)},o.prototype.removePendingItem=function(t){var e=this.pendingItems.indexOf(t);-1!==e&&this.pendingItems.splice(e,1)},o.prototype.addItem=function(t,e,r,o){e&&n.isFunction(e)||(e=function(){});var i=this._applyPredicates(t);if(i.stop)return this.removePendingItem(o),void e(i.err);if(this._maybeLog(t,r),this.removePendingItem(o),this.options.transmit){this.pendingRequests.push(t);try{this._makeApiRequest(t,function(r,n){this._dequeuePendingRequest(t),e(r,n)}.bind(this))}catch(r){this._dequeuePendingRequest(t),e(r)}}else e(new Error("Transmit disabled"))},o.prototype.wait=function(t){n.isFunction(t)&&(this.waitCallback=t,this._maybeCallWait()||(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitIntervalID=setInterval(function(){this._maybeCallWait()}.bind(this),500)))},o.prototype._applyPredicates=function(t){for(var e=null,r=0,n=this.predicates.length;rthis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},790:(t,e,r)=>{"use strict";var n=r(702);function o(t){this.startTime=n.now(),this.counter=0,this.perMinCounter=0,this.platform=null,this.platformOptions={},this.configureGlobal(t)}function i(t,e,r){return!t.ignoreRateLimit&&e>=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},562:(t,e,r)=>{"use strict";var n=r(790),o=r(358),i=r(314),s=r(702);function a(t,e,r,n,l){this.options=s.merge(t),this.logger=r,a.rateLimiter.configureGlobal(this.options),a.rateLimiter.setPlatformOptions(l,this.options),this.api=e,this.queue=new o(a.rateLimiter,e,r,this.options);var p=this.options.tracer||null;c(p)?(this.tracer=p,this.options.tracer="opentracing-tracer-enabled",this.options._configuredOptions.tracer="opentracing-tracer-enabled"):this.tracer=null,this.notifier=new i(this.queue,this.options),this.telemeter=n,u(t),this.lastError=null,this.lastErrorHash="none"}function u(t){t.stackTraceLimit&&(Error.stackTraceLimit=t.stackTraceLimit)}function c(t){if(!t)return!1;if(!t.scope||"function"!=typeof t.scope)return!1;var e=t.scope();return!(!e||!e.active||"function"!=typeof e.active)}a.rateLimiter=new n({maxItems:0,itemsPerMinute:60}),a.prototype.global=function(t){return a.rateLimiter.configureGlobal(t),this},a.prototype.configure=function(t,e){var r=this.options,n={};e&&(n={payload:e}),this.options=s.merge(r,t,n);var o=this.options.tracer||null;return c(o)?(this.tracer=o,this.options.tracer="opentracing-tracer-enabled",this.options._configuredOptions.tracer="opentracing-tracer-enabled"):this.tracer=null,this.notifier&&this.notifier.configure(this.options),this.telemeter&&this.telemeter.configure(this.options),u(t),this.global(this.options),c(t.tracer)&&(this.tracer=t.tracer),this},a.prototype.log=function(t){var e=this._defaultLogLevel();return this._log(e,t)},a.prototype.debug=function(t){this._log("debug",t)},a.prototype.info=function(t){this._log("info",t)},a.prototype.warn=function(t){this._log("warning",t)},a.prototype.warning=function(t){this._log("warning",t)},a.prototype.error=function(t){this._log("error",t)},a.prototype.critical=function(t){this._log("critical",t)},a.prototype.wait=function(t){this.queue.wait(t)},a.prototype.captureEvent=function(t,e,r){return this.telemeter&&this.telemeter.captureEvent(t,e,r)},a.prototype.captureDomContentLoaded=function(t){return this.telemeter&&this.telemeter.captureDomContentLoaded(t)},a.prototype.captureLoad=function(t){return this.telemeter&&this.telemeter.captureLoad(t)},a.prototype.buildJsonPayload=function(t){return this.api.buildJsonPayload(t)},a.prototype.sendJsonPayload=function(t){this.api.postJsonPayload(t)},a.prototype._log=function(t,e){var r;if(e.callback&&(r=e.callback,delete e.callback),this.options.ignoreDuplicateErrors&&this._sameAsLastError(e)){if(r){var n=new Error("ignored identical item");n.item=e,r(n)}}else try{this._addTracingInfo(e),e.level=e.level||t,this.telemeter&&this.telemeter._captureRollbarItem(e),e.telemetryEvents=this.telemeter&&this.telemeter.copyEvents()||[],this.notifier.log(e,r)}catch(t){r&&r(t),this.logger.error(t)}},a.prototype._defaultLogLevel=function(){return this.options.logLevel||"debug"},a.prototype._sameAsLastError=function(t){if(!t._isUncaught)return!1;var e=function(t){var e=t.message||"",r=(t.err||{}).stack||String(t.err);return e+"::"+r}(t);return this.lastErrorHash===e||(this.lastError=t.err,this.lastErrorHash=e,!1)},a.prototype._addTracingInfo=function(t){if(this.tracer){var e=this.tracer.scope().active();if(function(t){if(!t||!t.context||"function"!=typeof t.context)return!1;var e=t.context();if(!e||!e.toSpanId||!e.toTraceId||"function"!=typeof e.toSpanId||"function"!=typeof e.toTraceId)return!1;return!0}(e)){e.setTag("rollbar.error_uuid",t.uuid),e.setTag("rollbar.has_error",!0),e.setTag("error",!0),e.setTag("rollbar.item_url",`https://rollbar.com/item/uuid/?uuid=${t.uuid}`),e.setTag("rollbar.occurrence_url",`https://rollbar.com/occurrence/uuid/?uuid=${t.uuid}`);var r=e.context().toSpanId(),n=e.context().toTraceId();t.custom?(t.custom.opentracing_span_id=r,t.custom.opentracing_trace_id=n):t.custom={opentracing_span_id:r,opentracing_trace_id:n}}}},t.exports=a},369:(t,e,r)=>{"use strict";var n=r(702),o=r(267);function i(t,e){var r=e.split("."),o=r.length-1;try{for(var i=0;i<=o;++i)i{"use strict";var n=r(702),o=100;function i(t){this.queue=[],this.options=n.merge(t);var e=this.options.maxTelemetryEvents||o;this.maxQueueSize=Math.max(0,Math.min(e,o))}function s(t,e){if(e)return e;return{error:"error",manual:"info"}[t]||"info"}i.prototype.configure=function(t){var e=this.options;this.options=n.merge(e,t);var r=this.options.maxTelemetryEvents||o,i=Math.max(0,Math.min(r,o)),s=0;this.queue.length>i&&(s=this.queue.length-i),this.maxQueueSize=i,this.queue.splice(0,s)},i.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},i.prototype.capture=function(t,e,r,o,i){var a={level:s(t,r),type:t,timestamp_ms:i||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},i.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},i.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},i.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},i.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},i.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},i.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},i.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},i.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},i.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},i.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},i.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},i.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=i},417:(t,e,r)=>{"use strict";var n=r(702);function o(t,e){n.isFunction(t[e])&&(t[e]=t[e].toString())}t.exports={itemToPayload:function(t,e,r){var n=t.data;t._isUncaught&&(n._isUncaught=!0),t._originalArgs&&(n._originalArgs=t._originalArgs),r(null,n)},addPayloadOptions:function(t,e,r){var o=e.payload||{};o.body&&delete o.body,t.data=n.merge(t.data,o),r(null,t)},addTelemetryData:function(t,e,r){t.telemetryEvents&&n.set(t,"data.body.telemetry",t.telemetryEvents),r(null,t)},addMessageWithError:function(t,e,r){if(t.message){var o="data.body.trace_chain.0",i=n.get(t,o);if(i||(o="data.body.trace",i=n.get(t,o)),i){if(!i.exception||!i.exception.description)return n.set(t,o+".exception.description",t.message),void r(null,t);var s=n.get(t,o+".extra")||{},a=n.merge(s,{message:t.message});n.set(t,o+".extra",a)}r(null,t)}else r(null,t)},userTransform:function(t){return function(e,r,o){var i=n.merge(e),s=null;try{n.isFunction(r.transform)&&(s=r.transform(i.data,e))}catch(n){return r.transform=null,t.error("Error while calling custom transform() function. Removing custom transform().",n),void o(null,e)}n.isPromise(s)?s.then((function(t){t&&(i.data=t),o(null,i)}),(function(t){o(t,e)})):o(null,i)}},addConfigToPayload:function(t,e,r){if(!e.sendConfig)return r(null,t);var o=n.get(t,"data.custom")||{};o._rollbarConfig=e,t.data.custom=o,r(null,t)},addConfiguredOptions:function(t,e,r){var n=e._configuredOptions;o(n,"transform"),o(n,"checkIgnore"),o(n,"onSendCallback"),delete n.accessToken,t.data.notifier.configured_options=n,r(null,t)},addDiagnosticKeys:function(t,e,r){var o=n.merge(t.notifier.client.notifier.diagnostic,t.diagnostic);if(n.get(t,"err._isAnonymous")&&(o.is_anonymous=!0),t._isUncaught&&(o.is_uncaught=t._isUncaught),t.err)try{o.raw_error={message:t.err.message,name:t.err.name,constructor_name:t.err.constructor&&t.err.constructor.name,filename:t.err.fileName,line:t.err.lineNumber,column:t.err.columnNumber,stack:t.err.stack}}catch(t){o.raw_error={failed:String(t)}}t.data.notifier.diagnostic=n.merge(t.data.notifier.diagnostic,o),r(null,t)}}},473:(t,e,r)=>{"use strict";var n=r(702),o=r(267);function i(t,e){return[t,n.stringify(t,e)]}function s(t,e){var r=t.length;return r>2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),[e,n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!h(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}},702:(t,e,r)=>{"use strict";var n=r(420),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function h(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function f(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,h,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o{"use strict";function e(t){return"string"!=typeof t&&(t=String(t)),t.toLowerCase()}function r(t){this.map={},t instanceof r?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}r.prototype.append=function(t,r){t=e(t),r=function(t){return"string"!=typeof t&&(t=String(t)),t}(r);var n=this.map[t];this.map[t]=n?n+", "+r:r},r.prototype.get=function(t){return t=e(t),this.has(t)?this.map[t]:null},r.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},r.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},r.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),function(t){return{next:function(){var e=t.shift();return{done:void 0===e,value:e}}}}(t)},t.exports=function(t){return"undefined"==typeof Headers?new r(t):new Headers(t)}},876:(t,e,r)=>{"use strict";var n=r(708);t.exports=n},297:t=>{"use strict";t.exports=function(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}},267:(t,e,r)=>{"use strict";var n=r(702);t.exports=function(t,e,r){var o,i,s,a,u=n.isType(t,"object"),c=n.isType(t,"array"),l=[];if(r=r||{obj:[],mapped:[]},u){if(a=r.obj.indexOf(t),u&&-1!==a)return r.mapped[a]||r.obj[a];r.obj.push(t),a=r.obj.length-1}if(u)for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&l.push(o);else if(c)for(s=0;s{t.exports=function(t){var e,r,n,o,i,s,a,u,c,l,p,h,f,d=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function m(t){return t<10?"0"+t:t}function g(){return this.valueOf()}function v(t){return d.lastIndex=0,d.test(t)?'"'+t.replace(d,(function(t){var e=n[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}function y(t,n){var i,s,a,u,c,l=e,p=n[t];switch(p&&"object"==typeof p&&"function"==typeof p.toJSON&&(p=p.toJSON(t)),"function"==typeof o&&(p=o.call(n,t,p)),typeof p){case"string":return v(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(e+=r,c=[],"[object Array]"===Object.prototype.toString.apply(p)){for(u=p.length,i=0;i qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n if (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = merge(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 notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, errors[i].rollbarContext);\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"rollbar.min.js","mappings":"6BAGA,SAAUA,GACR,aACKA,EAAOC,UACVD,EAAOC,QAAU,CAAC,GASpB,IAPA,IACIC,EAAMC,EADNC,EAAMJ,EAAOC,QAEbI,EAAQ,WAAY,EACpBC,EAAa,CAAC,UACdC,EAAU,wMAE0DC,MAAM,KACvEN,EAAOI,EAAWG,OAAYL,EAAIF,KAAOE,EAAIF,GAAQ,CAAC,GAC7D,KAAOC,EAASI,EAAQE,OAAYL,EAAID,KAASC,EAAID,GAAUE,EAEhE,CAfD,CAeqB,oBAAXK,OAAyBC,KAAOD,O,sBClB1C,yBACI,aAKI,EAA6B,CAAC,aAAsB,0BAAP,EAM7C,SAA0BE,GAG9B,IAAIC,EAA8B,eAC9BC,EAAyB,iCACzBC,EAA4B,8BAEhC,MAAO,CAOHC,MAAO,SAAiCC,GACpC,QAAgC,IAArBA,EAAMC,iBAAkE,IAA7BD,EAAM,mBACxD,OAAON,KA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,GAA9BsF,EA5DCqV,EAAKrc,QAAQ,yBAAyB,SAAUy8B,EAAQhlB,EAAG2F,GAChE,OAAO3F,EACH1S,OAAO23B,aAAa1U,SAASvQ,EAAG,KAChCgjB,EAAQrd,EACd,IAyDM2b,EAAOwB,MAOTx5B,EAASA,EAAOP,MAAMkB,EAAO,GAAGN,OAMpC,CAAE,MAAOF,GACPq5B,EAAQr5B,CACV,CAMA,GAAc,OAAVq5B,GAAmB,kBAAkB1xB,KAAK9H,GAC5C,MAAOw5B,aAAiB+B,YACpB/B,EACA,IAAI+B,YAAY,QAStB,MAA2B,mBAAZC,EACV,SAASI,EAAK1B,EAAQxnB,GACvB,IAAI3O,EACArB,EACAswB,EAAMkH,EAAOxnB,GACjB,GAAIsgB,GAAsB,iBAARA,EAChB,IAAKjvB,KAAKkC,EACJtD,OAAOJ,UAAU4N,eAAetN,KAAKmwB,EAAKjvB,UAElC7E,KADVwD,EAAIk5B,EAAK5I,EAAKjvB,IAEZivB,EAAIjvB,GAAKrB,SAEFswB,EAAIjvB,IAKnB,OAAOy3B,EAAQ34B,KAAKq3B,EAAQxnB,EAAKsgB,EACnC,CAjBE,CAiBA,CAAC,GAAI/sB,GAAQ,IACfA,CACJ,GAGN,C,GCvvBI41B,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqB78B,IAAjB88B,EACH,OAAOA,EAAax1B,QAGrB,IAAID,EAASs1B,EAAyBE,GAAY,CAGjDv1B,QAAS,CAAC,GAOX,OAHAy1B,EAAoBF,GAAUl5B,KAAK0D,EAAOC,QAASD,EAAQA,EAAOC,QAASs1B,GAGpEv1B,EAAOC,OACf,ECnB0Bs1B,CAAoB,I","sources":["webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transport/fetch.js","webpack://rollbar/./src/browser/transport/xhr.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/truncation.js","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./src/utility/replace.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/webpack/bootstrap","webpack://rollbar/webpack/startup"],"sourcesContent":["// 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","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443,\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function (data, callback) {\n var transportOptions = helpers.transportOptions(\n this.transportOptions,\n 'POST',\n );\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function () {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function (data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload);\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function (jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(\n this.transportOptions,\n 'POST',\n );\n this.transport.postJsonPayload(\n this.accessToken,\n transportOptions,\n jsonPayload,\n callback,\n );\n};\n\nApi.prototype.configure = function (options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = \"Error: could not serialize 'context'\";\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data,\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options);\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport,\n };\n}\n\nfunction detectTransport(options) {\n var gWindow =\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port =\n transport.port ||\n (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI,\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath,\n};\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client =\n client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = typeof document != 'undefined' && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(\n this.options,\n this.client.telemeter,\n this,\n gWindow,\n gDocument,\n );\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n\n // Used with rollbar-react for rollbar-react-native compatibility.\n this.rollbar = this;\n}\n\nvar _instance = null;\nRollbar.init = function (options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function (components) {\n Rollbar.prototype.components = components;\n};\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function (options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function (options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(\n oldOptions._configuredOptions,\n options,\n payload,\n );\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function (options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function () {\n return this.client.lastError;\n};\nRollbar.lastError = function () {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return { uuid: uuid };\n};\nRollbar.log = function () {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return { uuid: uuid };\n};\nRollbar.debug = function () {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return { uuid: uuid };\n};\nRollbar.info = function () {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return { uuid: uuid };\n};\nRollbar.warn = function () {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return { uuid: uuid };\n};\nRollbar.warning = function () {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return { uuid: uuid };\n};\nRollbar.error = function () {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return { uuid: uuid };\n};\nRollbar.critical = function () {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function () {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function () {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function () {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (\n this.options.captureUnhandledRejections ||\n this.options.handleUnhandledRejections\n ) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function (\n message,\n url,\n lineno,\n colno,\n error,\n context,\n) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (\n this.options.inspectAnonymousErrors &&\n this.isChrome &&\n error === null &&\n url === ''\n ) {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser,\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function () {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) {\n // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n};\n\nRollbar.prototype.handleUnhandledRejection = function (reason, promise) {\n if (\n !this.options.captureUnhandledRejections &&\n !this.options.handleUnhandledRejections\n ) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context =\n (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 () {\n return context || {};\n };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch (exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function (f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function () {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function () {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function (e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.addPayloadOptions)\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function () {\n logger.info(\n 'Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.',\n );\n};\n\nRollbar.prototype._createItem = function (args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return (\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self)\n );\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false,\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear',\n ],\n};\n","'use strict';\n\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 var undef;\n if (typeof document === 'undefined') {\n return undef;\n }\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n ((div.innerHTML = ''), all[0])\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion,\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction 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 = ' > ',\n separatorLength = separator.length;\n var out = [],\n len = 0,\n nextStr,\n 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(\n '[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]',\n );\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 = {},\n className,\n key,\n attr,\n i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && typeof className === 'string') {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({ key: key, value: attr });\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType,\n};\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) {\n return;\n }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function () {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) {\n return;\n }\n\n if (\n typeof window._rollbarURH === 'function' &&\n window._rollbarURH.belongsToShim\n ) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections,\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log,\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore,\n};\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation,\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar replace = require('../utility/replace');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false,\n};\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) {\n return null;\n }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function (description) {\n var name = nameFromDescription(description);\n if (!name) {\n return false;\n }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: [],\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: [],\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function (options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function (oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (\n !this.autoInstrument.network &&\n oldSettings &&\n oldSettings.network\n ) {\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 (\n this.autoInstrument.navigation &&\n !(oldSettings && oldSettings.navigation)\n ) {\n this.instrumentNavigation();\n } else if (\n !this.autoInstrument.navigation &&\n oldSettings &&\n oldSettings.navigation\n ) {\n this.deinstrumentNavigation();\n }\n\n if (\n this.autoInstrument.connectivity &&\n !(oldSettings && oldSettings.connectivity)\n ) {\n this.instrumentConnectivity();\n } else if (\n !this.autoInstrument.connectivity &&\n oldSettings &&\n oldSettings.connectivity\n ) {\n this.deinstrumentConnectivity();\n }\n\n if (\n this.autoInstrument.contentSecurityPolicy &&\n !(oldSettings && oldSettings.contentSecurityPolicy)\n ) {\n this.instrumentContentSecurityPolicy();\n } else if (\n !this.autoInstrument.contentSecurityPolicy &&\n oldSettings &&\n oldSettings.contentSecurityPolicy\n ) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function () {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function () {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function (orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(\n xhrp,\n 'open',\n function (orig) {\n return function (method, url) {\n var isUrlObject = _isUrlObject(url);\n if (_.isType(url, 'string') || isUrlObject) {\n url = isUrlObject ? url.toString() : url;\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null,\n };\n }\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n\n replace(\n xhrp,\n 'setRequestHeader',\n function (orig) {\n return function (header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n\n replace(\n xhrp,\n 'send',\n function (orig) {\n /* eslint-disable no-unused-vars */\n return function (data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(\n xhr.__rollbar_xhr,\n 'xhr',\n undefined,\n );\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type =\n xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig =\n self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i = 0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i = 0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (\n self.isJsonContentType(\n xhr.__rollbar_xhr.response_content_type,\n )\n ) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level =\n self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if (\n 'onreadystatechange' in xhr &&\n _.isFunction(xhr.onreadystatechange)\n ) {\n replace(xhr, 'onreadystatechange', function (orig) {\n return self.rollbar.wrap(\n orig,\n undefined,\n onreadystatechangeHandler,\n );\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = new Error().stack;\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n }\n\n if ('fetch' in this._window) {\n replace(\n this._window,\n 'fetch',\n 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 var isUrlObject = _isUrlObject(input);\n if (_.isType(input, 'string') || isUrlObject) {\n url = isUrlObject ? input.toString() : input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null,\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(\n reqHeaders,\n self.autoInstrument.networkRequestHeaders,\n );\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (\n args[0] &&\n !_.isType(args[0], 'string') &&\n args[0].body\n ) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = new Error().stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(\n resp.headers,\n self.autoInstrument.networkResponseHeaders,\n );\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') {\n // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (\n text &&\n self.isJsonContentType(metadata.response_content_type)\n ) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n },\n this.replacements,\n 'network',\n );\n }\n};\n\nInstrumenter.prototype.captureNetwork = function (\n metadata,\n subtype,\n rollbarUUID,\n) {\n if (\n metadata.request &&\n this.isJsonContentType(metadata.request_content_type)\n ) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function (contentType) {\n return contentType &&\n _.isType(contentType, 'string') &&\n contentType.toLowerCase().includes('json')\n ? true\n : false;\n};\n\nInstrumenter.prototype.scrubJson = function (json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n};\n\nInstrumenter.prototype.fetchHeaders = function (inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') {\n // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i = 0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n};\n\nInstrumenter.prototype.trackHttpErrors = function () {\n return (\n this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0\n );\n};\n\nInstrumenter.prototype.errorOnHttpStatus = function (metadata) {\n var status = metadata.status_code;\n\n if (\n (status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)\n ) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n};\n\nInstrumenter.prototype.deinstrumentConsole = function () {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function () {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function () {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug', 'info', 'warn', 'error', 'log'];\n try {\n for (var i = 0, len = methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function () {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function () {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener(\n 'dom',\n this._window,\n 'blur',\n 'onfocusout',\n blurHandler,\n true,\n );\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 =\n domUtil.isDescribedElement(e, 'a') ||\n domUtil.isDescribedElement(e, 'button');\n if (\n hasTag &&\n (anchorOrButton ||\n domUtil.isDescribedElement(e, 'input', ['button', 'submit']))\n ) {\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 (\n domUtil.isDescribedElement(e, 'select') &&\n e.options &&\n e.options.length\n ) {\n this.handleSelectInputChanged(e);\n } else if (\n domUtil.isDescribedElement(e, 'input') &&\n !domUtil.isDescribedElement(e, 'input', [\n 'button',\n 'submit',\n 'hidden',\n 'checkbox',\n 'radio',\n ])\n ) {\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 (\n subtype,\n element,\n value,\n isChecked,\n) {\n if (value !== undefined) {\n if (\n this.scrubTelemetryInputs ||\n domUtil.getElementType(element) === 'password'\n ) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(\n domUtil.treeToArray(element),\n );\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 =\n !chromePackagedApp &&\n this._window.history &&\n 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 =\n !chromePackagedApp &&\n this._window.history &&\n this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(\n this._window,\n 'onpopstate',\n 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 },\n this.replacements,\n 'navigation',\n );\n\n replace(\n this._window.history,\n 'pushState',\n 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 },\n this.replacements,\n 'navigation',\n );\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 (\n parsedHref.protocol === parsedTo.protocol &&\n parsedHref.host === parsedTo.host\n ) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (\n parsedHref.protocol === parsedFrom.protocol &&\n parsedHref.host === parsedFrom.host\n ) {\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(\n 'connectivity',\n this._window,\n 'online',\n undefined,\n function () {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this),\n true,\n );\n this.addListener(\n 'connectivity',\n this._window,\n 'offline',\n undefined,\n function () {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this),\n true,\n );\n } else {\n var self = this;\n replace(\n this._document.body,\n 'ononline',\n function (orig) {\n return function () {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n },\n this.replacements,\n 'connectivity',\n );\n replace(\n this._document.body,\n 'onoffline',\n function (orig) {\n return function () {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n },\n this.replacements,\n 'connectivity',\n );\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function (cspEvent) {\n var message =\n 'Security Policy Violation: ' +\n 'blockedURI: ' +\n cspEvent.blockedURI +\n ', ' +\n 'violatedDirective: ' +\n cspEvent.violatedDirective +\n ', ' +\n 'effectiveDirective: ' +\n cspEvent.effectiveDirective +\n ', ';\n\n if (cspEvent.sourceFile) {\n message +=\n 'location: ' +\n cspEvent.sourceFile +\n ', ' +\n 'line: ' +\n cspEvent.lineNumber +\n ', ' +\n 'col: ' +\n cspEvent.columnNumber +\n ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n};\n\nInstrumenter.prototype.handleCspError = function (message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n};\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function () {\n if (!('addEventListener' in this._document)) {\n return;\n }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function () {\n if (!('addEventListener' in this._document)) {\n return;\n }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener(\n 'contentsecuritypolicy',\n this._document,\n 'securitypolicyviolation',\n null,\n cspHandler,\n false,\n );\n};\n\nInstrumenter.prototype.addListener = function (\n section,\n obj,\n type,\n altType,\n handler,\n capture,\n) {\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\nfunction _isUrlObject(input) {\n return typeof URL !== 'undefined' && input instanceof URL;\n}\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if (item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo =\n item.err._savedStackTrace ||\n errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message =\n item.err.message ||\n item.err.description ||\n item.message ||\n String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment =\n (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version,\n },\n custom: item.custom,\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function (item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function (item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height,\n },\n },\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function (item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i = 0, l = navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({ name: cur.name, description: cur.description });\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message,\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', { message: result });\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (\n stack &&\n stack.length === 0 &&\n item._unhandledStackInfo &&\n item._unhandledStackInfo.stack\n ) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', { trace_chain: traces });\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', { trace: trace });\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n class: className,\n message: message,\n },\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method:\n !stackFrame.func || stackFrame.func === '?'\n ? '[anonymous]'\n : stackFrame.func,\n colno: stackFrame.column,\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (\n frame.method &&\n frame.method.endsWith &&\n frame.method.endsWith('_rollbar_wrapped')\n ) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n };\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber,\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function (\n accessToken,\n options,\n params,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n null,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\nTransport.prototype.post = function (\n accessToken,\n options,\n payload,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload);\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n writeData,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\nTransport.prototype.postJsonPayload = function (\n accessToken,\n options,\n jsonPayload,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n jsonPayload,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow =\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n var self = this;\n rootZone.run(function () {\n self._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n};\n\nTransport.prototype._makeRequest = function (\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n transport,\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout);\n } else {\n makeXhrRequest(\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n );\n }\n};\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function (_msg) {\n /* do nothing */\n }, // eslint-disable-line no-unused-vars\n function (err) {\n callback(new Error(err));\n },\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if (_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(function () {\n controller.abort();\n }, timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal,\n },\n body: data,\n })\n .then(function (response) {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then(function (data) {\n callback(null, data);\n })\n .catch(function (error) {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function () {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message =\n 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 =\n 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if (_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n // 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(\n new Error(\n 'No window available during request, unknown environment',\n ),\n );\n }\n\n // If the current page is http, try and send over http\n if (\n window.location.href.substring(0, 5) === 'http:' &&\n url.substring(0, 5) === 'https'\n ) {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function () {};\n xdomainrequest.ontimeout = function () {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function () {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function () {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n },\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null,\n auth: null,\n host: null,\n path: null,\n hash: null,\n href: url,\n hostname: null,\n port: null,\n pathname: null,\n search: null,\n query: null,\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0, i);\n last = i + 2;\n } else {\n last = 0;\n }\n\n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i + 1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse,\n};\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) {\n return;\n }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals =\n '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 ',',\n );\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 (\n prototype.hasOwnProperty &&\n prototype.hasOwnProperty('addEventListener')\n ) {\n var oldAddEventListener = prototype.addEventListener;\n while (\n oldAddEventListener._rollbarOldAdd &&\n oldAddEventListener.belongsToShim\n ) {\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 (\n oldRemoveEventListener._rollbarOldRemove &&\n oldRemoveEventListener.belongsToShim\n ) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function (event, callback, bubble) {\n oldRemoveEventListener.call(\n this,\n event,\n (callback && callback._rollbar_wrapped) || callback,\n bubble,\n );\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nmodule.exports = {\n version: '2.26.4',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60,\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp(\n '^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ',\n);\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\nfunction gatherContext() {\n return null;\n}\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch (e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception,\n };\n}\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace(\n (errClassMatch[errClassMatch.length - 2] || '') + errClass + ':',\n '',\n );\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName =\n error.constructor.name &&\n error.constructor.name.length &&\n error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame,\n};\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n if (!obj || toStr.call(obj) !== '[object Object]') {\n return false;\n }\n\n var hasOwnConstructor = hasOwn.call(obj, 'constructor');\n var hasIsPrototypeOf =\n obj.constructor &&\n obj.constructor.prototype &&\n hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n // Not own constructor property must be Object\n if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n return false;\n }\n\n // Own properties are enumerated firstly, so to speed up,\n // if last one is own, then all properties are own.\n var key;\n for (key in obj) {\n /**/\n }\n\n return typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i,\n src,\n copy,\n clone,\n name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i = 0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function (options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function (transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function (item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(\n item,\n 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\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function (item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function (err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function (item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (\n _.isFunction(settings.checkIgnore) &&\n settings.checkIgnore(isUncaught, args, item)\n ) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n };\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function (item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n };\n}\n\nfunction urlIsSafeListed(logger) {\n return function (item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n };\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) {\n return !block;\n }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) {\n return !block;\n }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) {\n return !block;\n }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if (matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (\n e\n /* istanbul ignore next */\n ) {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error(\n \"Error while reading your configuration's \" +\n listName +\n ' option. Removing custom ' +\n listName +\n '.',\n e,\n );\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function (item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0) {\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch (\n e\n /* istanbul ignore next */\n ) {\n settings.ignoredMessages = null;\n logger.error(\n \"Error while reading your configuration's ignoredMessages option. Removing custom ignoredMessages.\",\n );\n }\n\n return true;\n };\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored,\n};\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function (options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function (predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function (item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function (item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function (\n item,\n callback,\n originalError,\n originalItem,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {\n return;\n };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(\n item,\n function (err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this),\n );\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(\n function () {\n this._maybeCallWait();\n }.bind(this),\n 500,\n );\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(\n item,\n function (err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this),\n );\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 = [\n 'ECONNRESET',\n 'ENOTFOUND',\n 'ESOCKETTIMEDOUT',\n 'ETIMEDOUT',\n 'ECONNREFUSED',\n 'EHOSTUNREACH',\n 'EPIPE',\n 'EAI_AGAIN',\n];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function (err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function (item, callback) {\n this.retryQueue.push({ item: item, callback: callback });\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(\n function () {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this),\n this.options.retryInterval,\n );\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 (\n _.isFunction(this.waitCallback) &&\n this.pendingItems.length === 0 &&\n this.pendingRequests.length === 0\n ) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined,\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function (options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function (item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n globalRateLimit + ' max items reached',\n false,\n );\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n globalRateLimitPerMin + ' items per minute reached',\n false,\n );\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend =\n shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n null,\n shouldSend,\n globalRateLimit,\n globalRateLimitPerMin,\n perMinute,\n );\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(\n platform,\n options,\n error,\n shouldSend,\n globalRateLimit,\n limitPerMin,\n perMinute,\n) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(\n platform,\n options,\n globalRateLimit,\n limitPerMin,\n perMinute,\n );\n }\n return { error: error, shouldSend: shouldSend, payload: payload };\n}\n\nfunction rateLimitPayload(\n platform,\n options,\n globalRateLimit,\n limitPerMin,\n perMinute,\n) {\n var environment =\n options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin,\n },\n },\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version:\n (options.notifier && options.notifier.version) || options.version,\n },\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60,\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer;\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents =\n (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag(\n 'rollbar.item_url',\n `https://rollbar.com/item/uuid/?uuid=${item.uuid}`,\n );\n span.setTag(\n 'rollbar.occurrence_url',\n `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`,\n );\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId,\n };\n }\n }\n }\n};\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (\n !spanContext ||\n !spanContext.toSpanId ||\n !spanContext.toTraceId ||\n typeof spanContext.toSpanId !== 'function' ||\n typeof spanContext.toTraceId !== 'function'\n ) {\n return false;\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function (options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.queue.length > newMaxEvents) {\n deleteCount = this.queue.length - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function () {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function (\n type,\n metadata,\n level,\n rollbarUUID,\n timestamp,\n) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client',\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (\n _.isFunction(this.options.filterTelemetry) &&\n this.options.filterTelemetry(e)\n ) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function (\n type,\n metadata,\n level,\n rollbarUUID,\n) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function (\n err,\n level,\n rollbarUUID,\n timestamp,\n) {\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 (\n message,\n level,\n rollbarUUID,\n timestamp,\n) {\n return this.capture(\n 'log',\n {\n message: message,\n },\n level,\n rollbarUUID,\n timestamp,\n );\n};\n\nTelemeter.prototype.captureNetwork = function (\n metadata,\n subtype,\n rollbarUUID,\n requestData,\n) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function (statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function (\n subtype,\n element,\n value,\n checked,\n rollbarUUID,\n) {\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(\n 'navigation',\n { from: from, to: to },\n 'info',\n rollbarUUID,\n );\n};\n\nTelemeter.prototype.captureDomContentLoaded = function (ts) {\n return this.capture(\n 'navigation',\n { subtype: 'DOMContentLoaded' },\n 'info',\n undefined,\n ts && ts.getTime(),\n );\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(\n 'navigation',\n { subtype: 'load' },\n 'info',\n undefined,\n ts && ts.getTime(),\n );\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function (type, rollbarUUID) {\n return this.captureNetwork({ change: type }, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function (item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture(\n 'log',\n item.custom,\n item.level,\n item.uuid,\n item.timestamp,\n );\n }\n};\n\nTelemeter.prototype.push = function (e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info',\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var data = item.data;\n\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 addPayloadOptions(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n item.data = _.merge(item.data, payloadOptions);\n callback(null, item);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath + '.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath + '.extra') || {};\n var newExtra = _.merge(extra, { message: item.message });\n _.set(item, tracePath + '.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function (item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error(\n 'Error while calling custom transform() function. Removing custom transform().',\n e,\n );\n callback(null, item);\n return;\n }\n if (_.isPromise(response)) {\n response.then(\n function (promisedItem) {\n if (promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n },\n function (error) {\n callback(error, item);\n },\n );\n } else {\n callback(null, newItem);\n }\n };\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if (_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(\n item.notifier.client.notifier.diagnostic,\n item.diagnostic,\n );\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack,\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(\n item.data.notifier.diagnostic,\n diagnostic,\n );\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addPayloadOptions: addPayloadOptions,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys,\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = typeof range === 'undefined' ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(\n 255,\n traceData.exception.message,\n );\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = typeof maxSize === 'undefined' ? 512 * 1024 : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody,\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue,\n};\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if (polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else {\n // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return {}.toString\n .call(x)\n .match(/\\s([a-zA-Z]+)/)[1]\n .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\n .call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n */\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String;\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\nfunction isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return type === 'object' || type === 'array';\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(\n /[xy]/g,\n 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 );\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4,\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor',\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g,\n },\n parser: {\n strict:\n /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose:\n /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n },\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0, qs) + query + '&' + p.substring(qs + 1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0, h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return { error: error, value: value };\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) {\n // up to 7 bits\n count = count + 1;\n } else if (code < 2048) {\n // up to 11 bits\n count = count + 2;\n } else if (code < 65536) {\n // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return { error: error, value: value };\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser,\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno,\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href =\n typeof document !== 'undefined' &&\n document &&\n document.location &&\n document.location.href;\n var useragent =\n typeof window !== 'undefined' &&\n window &&\n window.navigator &&\n window.navigator.userAgent;\n return {\n mode: mode,\n message: error ? String(error) : message || backupMessage,\n url: href,\n stack: [location],\n useragent: useragent,\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function (err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value,\n name,\n newSeen,\n result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : (message = arg);\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : (err = arg);\n break;\n case 'object':\n case 'array':\n if (\n arg instanceof Error ||\n (typeof DOMException !== 'undefined' && arg instanceof DOMException)\n ) {\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 (\n arg instanceof Error ||\n (typeof DOMException !== 'undefined' && arg instanceof DOMException)\n ) {\n err ? extraArgs.push(arg) : (err = arg);\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4(),\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = [\n 'log',\n 'network',\n 'dom',\n 'navigation',\n 'error',\n 'manual',\n];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level,\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len - 1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if (options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if (options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4,\n};\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n return name.toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value;\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function () {\n var value = items.shift();\n return { done: value === undefined, value: value };\n },\n };\n\n return iterator;\n}\n\nfunction FetchHeaders(headers) {\n this.map = {};\n\n if (headers instanceof FetchHeaders) {\n headers.forEach(function (value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function (header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function (name) {\n this.append(name, headers[name]);\n }, this);\n }\n}\n\nFetchHeaders.prototype.append = function (name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n};\n\nFetchHeaders.prototype.get = function (name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null;\n};\n\nFetchHeaders.prototype.has = function (name) {\n return this.map.hasOwnProperty(normalizeName(name));\n};\n\nFetchHeaders.prototype.forEach = function (callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n};\n\nFetchHeaders.prototype.entries = function () {\n var items = [];\n this.forEach(function (value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items);\n};\n\nmodule.exports = headers;\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","'use strict';\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\nmodule.exports = replace;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: [] };\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","// 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","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(409);\n"],"names":["global","console","prop","method","con","dummy","properties","methods","split","pop","window","this","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","parse","error","stacktrace","parseOpera","stack","match","parseV8OrIE","parseFFOrSafari","Error","extractLocation","urlLike","indexOf","parts","exec","replace","undefined","filter","line","map","sanitizedLine","location","tokens","slice","locationParts","functionName","join","fileName","lineNumber","columnNumber","source","functionNameRegex","matches","e","message","length","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","result","i","len","push","argsRaw","functionCall","shift","args","_isNumber","n","isNaN","parseFloat","isFinite","_capitalize","str","charAt","toUpperCase","substring","_getter","p","booleanProps","numericProps","stringProps","arrayProps","objectProps","props","concat","obj","prototype","getArgs","setArgs","v","Object","toString","call","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","lastIndexOf","locationString","Boolean","j","Number","k","String","_","helpers","defaultOptions","hostname","path","search","version","protocol","port","Api","options","transport","urllib","truncation","jsonBackup","url","accessToken","transportOptions","_getTransport","getTransportFromOptions","postItem","data","callback","payload","buildPayload","self","setTimeout","post","buildJsonPayload","stringifyResult","truncate","stringify","value","postJsonPayload","jsonPayload","configure","oldOptions","merge","module","exports","isType","context","contextResult","substr","access_token","defaults","timeout","gWindow","defaultTransport","fetch","XMLHttpRequest","detectTransport","proxy","endpoint","opts","pathname","transportAPI","host","appendPathToPath","base","baseTrailingSlash","test","pathBeginningSlash","rollbar","_rollbarConfig","alias","globalAlias","shimRunning","shimId","_rollbarStartTime","Date","getTime","Rollbar","_rollbarDidLoad","Client","API","logger","globals","Transport","transforms","sharedTransforms","predicates","sharedPredicates","errorParser","client","handleOptions","_configuredOptions","Telemeter","components","telemeter","Instrumenter","instrumenter","polyfillJSON","wrapGlobals","scrub","api","_gWindow","gDocument","document","isChrome","chrome","runtime","anonymousErrorsPending","notifier","addTransform","handleDomException","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","addConfigToPayload","addScrubber","addPayloadOptions","userTransform","addConfiguredOptions","addDiagnosticKeys","itemToPayload","addTransformsToNotifier","queue","addPredicate","checkLevel","checkIgnore","userCheckIgnore","urlIsNotBlockListed","urlIsSafeListed","messageIsIgnored","setupUnhandledCapture","instrument","setupJSON","_instance","handleUninitialized","maybeCallback","_getFirstFunction","isFunction","init","setComponents","payloadData","lastError","log","item","_createItem","arguments","uuid","apply","debug","info","warn","warning","critical","sendJsonPayload","unhandledExceptionsInitialized","captureUncaught","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobalEventHandlers","unhandledRejectionsInitialized","captureUnhandledRejections","handleUnhandledRejections","handleUncaughtException","lineno","colno","inspectAnonymousErrors","stackInfo","makeUnhandledStackInfo","isError","_unhandledStackInfo","level","uncaughtErrorLevel","_isUncaught","handleAnonymousErrors","r","prepareStackTrace","_stack","_isAnonymous","handleUnhandledRejection","reason","promise","reasonResult","_rollbarContext","_originalArgs","wrap","f","_before","ctxFn","_isWrap","_rollbar_wrapped","exc","_rollbarWrappedError","_wrappedSource","hasOwnProperty","captureEvent","event","createTelemetryEvent","type","metadata","captureDomContentLoaded","ts","captureLoad","loadFull","createItem","scrubFields","logLevel","reportLevel","verbose","enabled","transmit","sendConfig","includeItemsInTelemetry","captureIp","ignoreDuplicateErrors","Detection","ieVersion","undef","div","createElement","all","getElementsByTagName","innerHTML","getElementType","getAttribute","toLowerCase","descriptionToString","desc","tagName","out","id","classes","attributes","key","describeElement","elem","className","attr","elementArrayToString","a","nextStr","totalLength","separator","MAX_LENGTH","unshift","treeToArray","nextDescription","height","parentNode","getElementFromEvent","evt","doc","target","elementFromPoint","clientX","clientY","isDescribedElement","element","subtypes","handler","shim","oldOnError","_rollbarOldOnError","onerror","fn","Array","old","ret","_rollbarWindowOnError","_rollbarURH","belongsToShim","removeEventListener","rejectionHandler","detail","addEventListener","detection","formatArgsAsString","settings","get","headers","urlparser","domUtil","network","networkResponseHeaders","networkResponseBody","networkRequestHeaders","networkRequestBody","networkErrorOnHttp5xx","networkErrorOnHttp4xx","networkErrorOnHttp0","dom","navigation","connectivity","contentSecurityPolicy","errorOnContentSecurityPolicy","restore","replacements","b","_window","_document","autoInstrument","scrubTelemetryInputs","telemetryScrubber","defaultValueScrubber","patterns","RegExp","description","name","attrs","nameFromDescription","diagnostic","eventRemovers","contentsecuritypolicy","_location","_lastHref","href","_isUrlObject","input","URL","oldSettings","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","deinstrumentContentSecurityPolicy","instrumentContentSecurityPolicy","wrapProp","xhr","orig","xhrp","isUrlObject","__rollbar_xhr","status_code","start_time_ms","now","end_time_ms","header","request_headers","request_content_type","onreadystatechangeHandler","request","__rollbar_event","captureNetwork","readyState","response_content_type","getResponseHeader","headersConfig","allHeaders","getAllResponseHeaders","arr","trim","body","responseText","response","isJsonContentType","scrubJson","code","status","levelFromStatus","errorOnHttpStatus","onreadystatechange","trackHttpErrors","t","reqHeaders","fetchHeaders","then","resp","text","clone","subtype","rollbarUUID","contentType","includes","json","JSON","inHeaders","outHeaders","entries","currentHeader","next","done","skipFrames","c","wrapConsole","origConsole","captureLog","Function","removeListeners","clickHandler","handleClick","bind","blurHandler","handleBlur","addListener","hasTag","anchorOrButton","captureDomEvent","checked","handleSelectInputChanged","multiple","selected","selectedIndex","isChecked","elementString","captureDom","app","history","pushState","current","handleUrlChange","from","to","parsedHref","parsedTo","parsedFrom","hash","captureNavigation","captureConnectivityChange","handleCspEvent","cspEvent","blockedURI","violatedDirective","effectiveDirective","sourceFile","originalPolicy","handleCspError","cspHandler","section","altType","capture","attachEvent","detachEvent","addBodyMessage","custom","extra","set","stackFromItem","buildTrace","guess","guessErrorClass","trace","exception","class","errorClass","stackFrame","frame","pre","contextLength","mid","rawStack","raw","rawException","frames","filename","sanitizeUrl","func","column","sendFrameUrl","endsWith","Math","floor","reverse","err","Stack","originalError","nested","_savedStackTrace","addErrorContext","chain","cause","e2","environment","platform","framework","language","server","requestInfo","query_string","remoteString","user_ip","keys","nav","navigator","scr","screen","runtime_ms","timestamp","round","javascript","browser","userAgent","cookie_enabled","cookieEnabled","width","cur","plugins","navPlugins","l","traceChain","traces","traceChainLength","trace_chain","addBodyTraceChain","addBodyTrace","scrubFn","scrubPaths","makeFetchRequest","makeXhrRequest","params","requestFactory","addParamsAndAccessTokenToPath","formatUrl","_makeZoneRequest","writeData","currentZone","Zone","_name","rootZone","_parent","run","_makeRequest","RollbarProxy","_msg","_proxyRequest","controller","timeoutId","isFiniteNumber","AbortController","abort","signal","clearTimeout","catch","_newRetriableError","xmlhttp","factories","ActiveXObject","numFactories","_createXMLHTTPObject","parseResponse","jsonParse","_isNormalFailure","ex","open","setRequestHeader","send","e1","XDomainRequest","xdomainrequest","onprogress","ontimeout","onload","last","auth","query","parseInt","pathParts","_extendListenerPrototype","oldAddEventListener","_rollbarOldAdd","addFn","bubble","oldRemoveEventListener","_rollbarOldRemove","removeFn","maxItems","itemsPerMin","ErrorStackParser","ERR_CLASS_REGEXP","gatherContext","Frame","_stackFrame","skip","parserStack","getStack","_mostSpecificErrorName","constructorName","constructor","guessFunctionName","errMsg","errClassMatch","errClass","hasOwn","toStr","isPlainObject","hasOwnConstructor","hasIsPrototypeOf","src","copy","Notifier","transform","addPendingItem","_applyTransforms","removePendingItem","addItem","transformIndex","transformsLength","cb","matchFrames","list","block","listLength","frameLength","urlIsOnAList","safeOrBlock","hostBlockList","hostSafeList","tracesLength","listName","levelVal","LEVELS","isUncaught","onSendCallback","ignoredMessages","rIgnoredMessage","messages","messagesFromItem","Queue","rateLimiter","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","predicate","idx","splice","originalItem","predicateResult","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","wait","_maybeCallWait","clearInterval","setInterval","rateLimitResponse","shouldSend","_maybeRetry","RETRIABLE_ERRORS","shouldRetry","retryInterval","maxRetries","retries","_retryApiRequest","retryObject","RateLimiter","startTime","counter","perMinCounter","platformOptions","configureGlobal","checkRate","limit","ignoreRateLimit","shouldSendValue","globalRateLimit","limitPerMin","perMinute","msg","itemsPerMinute","rateLimitPayload","globalSettings","elapsedTime","globalRateLimitPerMin","setPlatformOptions","tracer","validateTracer","setStackTraceLimit","lastErrorHash","stackTraceLimit","scope","active","_defaultLogLevel","_log","defaultLevel","_sameAsLastError","_addTracingInfo","_captureRollbarItem","telemetryEvents","copyEvents","itemHash","generateItemHash","span","spanContext","toSpanId","toTraceId","validateSpan","setTag","opentracingSpanId","opentracingTraceId","opentracing_span_id","opentracing_trace_id","traverse","scrubPath","redact","paramRes","pat","_getScrubFieldRegexs","queryRes","_getScrubQueryParamRegexs","redactQueryParam","dummy0","paramPart","scrubber","seen","tmpV","valScrubber","paramScrubber","MAX_EVENTS","maxTelemetryEvents","maxQueueSize","max","min","getLevel","manual","newMaxEvents","deleteCount","events","filterTelemetry","timestamp_ms","captureError","requestData","statusCode","change","addFunctionOption","payloadOptions","tracePath","newExtra","newItem","isPromise","promisedItem","configuredOptions","configured_options","is_anonymous","is_uncaught","raw_error","constructor_name","failed","selectFrames","range","truncateFrames","maybeTruncateValue","val","truncateStrings","truncator","typeName","truncateTraceData","traceData","minBody","needsTruncation","maxSize","maxByteSize","strategy","results","strategies","RollbarJSON","x","isNativeFunction","funcMatchString","reIsNative","isObject","uuid4","d","random","parseUriOptions","strictMode","q","parser","strict","loose","backup","jsonError","backupError","wrapCallback","nonCircularClone","newSeen","TELEMETRY_TYPES","TELEMETRY_LEVELS","arrayIncludes","paramsArray","sort","qs","h","requestKeys","lambdaContext","arg","extraArgs","argTypes","typ","DOMException","setCustomItemKeys","original_arg_types","errors","contextAdded","rollbarContext","error_context","filterIp","newIp","beginning","slashIdx","u","hostWhiteList","hostBlackList","updateDeprecatedOptions","overwriteScrubFields","isIterable","isString","s","mode","backupMessage","useragent","baseUrlParts","o","m","uri","$0","$1","$2","parseUri","anchor","temp","replacement","string","count","charCodeAt","normalizeName","FetchHeaders","forEach","append","isArray","getOwnPropertyNames","normalizeValue","oldValue","has","thisArg","items","iteratorFor","Headers","seenIndex","isObj","mapped","same","gap","indent","meta","rep","state","container","escapes","number","action","rx_escapable","this_value","valueOf","quote","lastIndex","holder","partial","mind","toJSON","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","replacer","space","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","reviver","tx","ignore","fromCharCode","walk","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__"],"sourceRoot":""}
\ No newline at end of file
diff --git a/dist/rollbar.named-amd.js b/dist/rollbar.named-amd.js
index 97df1c1f7..0c5e363d6 100644
--- a/dist/rollbar.named-amd.js
+++ b/dist/rollbar.named-amd.js
@@ -1,5751 +1,6785 @@
-define("rollbar", [], function() { return /******/ (function(modules) { // webpackBootstrap
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {}
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
-/******/ }
-/******/ };
-/******/
-/******/ // define __esModule on exports
-/******/ __webpack_require__.r = function(exports) {
-/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
-/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
-/******/ }
-/******/ Object.defineProperty(exports, '__esModule', { value: true });
-/******/ };
-/******/
-/******/ // create a fake namespace object
-/******/ // mode & 1: value is a module id, require it
-/******/ // mode & 2: merge all properties of value into the ns
-/******/ // mode & 4: return value when already ns object
-/******/ // mode & 8|1: behave like require
-/******/ __webpack_require__.t = function(value, mode) {
-/******/ if(mode & 1) value = __webpack_require__(value);
-/******/ if(mode & 8) return value;
-/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
-/******/ var ns = Object.create(null);
-/******/ __webpack_require__.r(ns);
-/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
-/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
-/******/ return ns;
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/
-/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 6);
-/******/ })
-/************************************************************************/
-/******/ ([
-/* 0 */
+define("rollbar", [], () => { return /******/ (() => { // webpackBootstrap
+/******/ var __webpack_modules__ = ({
+
+/***/ 276:
+/***/ (function() {
+
+// Console-polyfill. MIT license.
+// https://github.com/paulmillr/console-polyfill
+// Make it safe to do console.log() always.
+(function(global) {
+ 'use strict';
+ if (!global.console) {
+ global.console = {};
+ }
+ var con = global.console;
+ var prop, method;
+ var dummy = function() {};
+ var properties = ['memory'];
+ var methods = ('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(',');
+ while (prop = properties.pop()) if (!con[prop]) con[prop] = {};
+ while (method = methods.pop()) if (!con[method]) con[method] = dummy;
+ // Using `this` for web workers & supports Browserify / Webpack.
+})(typeof window === 'undefined' ? this : window);
+
+
+/***/ }),
+
+/***/ 180:
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {
+ 'use strict';
+ // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
+ /* istanbul ignore next */
+ if (true) {
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(124)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
+ (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else {}
+}(this, function ErrorStackParser(StackFrame) {
+ 'use strict';
-var merge = __webpack_require__(12);
+ var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\S+:\d+/;
+ var CHROME_IE_STACK_REGEXP = /^\s*at .*(\S+:\d+|\(native\))/m;
+ var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\[native code])?$/;
-var RollbarJSON = {};
-function setupJSON(polyfillJSON) {
- if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {
- return;
- }
+ return {
+ /**
+ * Given an Error object, extract the most information from it.
+ *
+ * @param {Error} error object
+ * @return {Array} of StackFrames
+ */
+ parse: function ErrorStackParser$$parse(error) {
+ if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {
+ return this.parseOpera(error);
+ } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {
+ return this.parseV8OrIE(error);
+ } else if (error.stack) {
+ return this.parseFFOrSafari(error);
+ } else {
+ throw new Error('Cannot parse given Error object');
+ }
+ },
- if (isDefined(JSON)) {
- // If polyfill is provided, prefer it over existing non-native shims.
- if(polyfillJSON) {
- if (isNativeFunction(JSON.stringify)) {
- RollbarJSON.stringify = JSON.stringify;
- }
- if (isNativeFunction(JSON.parse)) {
- RollbarJSON.parse = JSON.parse;
- }
- } else { // else accept any interface that is present.
- if (isFunction(JSON.stringify)) {
- RollbarJSON.stringify = JSON.stringify;
- }
- if (isFunction(JSON.parse)) {
- RollbarJSON.parse = JSON.parse;
- }
+ // Separate line and column numbers from a string of the form: (URI:Line:Column)
+ extractLocation: function ErrorStackParser$$extractLocation(urlLike) {
+ // Fail-fast but return locations like "(native)"
+ if (urlLike.indexOf(':') === -1) {
+ return [urlLike];
+ }
+
+ var regExp = /(.+?)(?::(\d+))?(?::(\d+))?$/;
+ var parts = regExp.exec(urlLike.replace(/[()]/g, ''));
+ return [parts[1], parts[2] || undefined, parts[3] || undefined];
+ },
+
+ parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {
+ var filtered = error.stack.split('\n').filter(function(line) {
+ return !!line.match(CHROME_IE_STACK_REGEXP);
+ }, this);
+
+ return filtered.map(function(line) {
+ if (line.indexOf('(eval ') > -1) {
+ // Throw away eval information until we implement stacktrace.js/stackframe#8
+ line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(\),.*$)/g, '');
+ }
+ var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '(');
+
+ // capture and preseve the parenthesized location "(/foo/my bar.js:12:87)" in
+ // case it has spaces in it, as the string is split on \s+ later on
+ var location = sanitizedLine.match(/ (\((.+):(\d+):(\d+)\)$)/);
+
+ // remove the parenthesized location from the line, if it was matched
+ sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;
+
+ var tokens = sanitizedLine.split(/\s+/).slice(1);
+ // if a location was matched, pass it to extractLocation() otherwise pop the last token
+ var locationParts = this.extractLocation(location ? location[1] : tokens.pop());
+ var functionName = tokens.join(' ') || undefined;
+ var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];
+
+ return new StackFrame({
+ functionName: functionName,
+ fileName: fileName,
+ lineNumber: locationParts[1],
+ columnNumber: locationParts[2],
+ source: line
+ });
+ }, this);
+ },
+
+ parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {
+ var filtered = error.stack.split('\n').filter(function(line) {
+ return !line.match(SAFARI_NATIVE_CODE_REGEXP);
+ }, this);
+
+ return filtered.map(function(line) {
+ // Throw away eval information until we implement stacktrace.js/stackframe#8
+ if (line.indexOf(' > eval') > -1) {
+ line = line.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ':$1');
+ }
+
+ if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {
+ // Safari eval frames only have function names and nothing else
+ return new StackFrame({
+ functionName: line
+ });
+ } else {
+ var functionNameRegex = /((.*".+"[^@]*)?[^@]*)(?:@)/;
+ var matches = line.match(functionNameRegex);
+ var functionName = matches && matches[1] ? matches[1] : undefined;
+ var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));
+
+ return new StackFrame({
+ functionName: functionName,
+ fileName: locationParts[0],
+ lineNumber: locationParts[1],
+ columnNumber: locationParts[2],
+ source: line
+ });
+ }
+ }, this);
+ },
+
+ parseOpera: function ErrorStackParser$$parseOpera(e) {
+ if (!e.stacktrace || (e.message.indexOf('\n') > -1 &&
+ e.message.split('\n').length > e.stacktrace.split('\n').length)) {
+ return this.parseOpera9(e);
+ } else if (!e.stack) {
+ return this.parseOpera10(e);
+ } else {
+ return this.parseOpera11(e);
+ }
+ },
+
+ parseOpera9: function ErrorStackParser$$parseOpera9(e) {
+ var lineRE = /Line (\d+).*script (?:in )?(\S+)/i;
+ var lines = e.message.split('\n');
+ var result = [];
+
+ for (var i = 2, len = lines.length; i < len; i += 2) {
+ var match = lineRE.exec(lines[i]);
+ if (match) {
+ result.push(new StackFrame({
+ fileName: match[2],
+ lineNumber: match[1],
+ source: lines[i]
+ }));
+ }
+ }
+
+ return result;
+ },
+
+ parseOpera10: function ErrorStackParser$$parseOpera10(e) {
+ var lineRE = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i;
+ var lines = e.stacktrace.split('\n');
+ var result = [];
+
+ for (var i = 0, len = lines.length; i < len; i += 2) {
+ var match = lineRE.exec(lines[i]);
+ if (match) {
+ result.push(
+ new StackFrame({
+ functionName: match[3] || undefined,
+ fileName: match[2],
+ lineNumber: match[1],
+ source: lines[i]
+ })
+ );
+ }
+ }
+
+ return result;
+ },
+
+ // Opera 10.65+ Error.stack very similar to FF/Safari
+ parseOpera11: function ErrorStackParser$$parseOpera11(error) {
+ var filtered = error.stack.split('\n').filter(function(line) {
+ return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);
+ }, this);
+
+ return filtered.map(function(line) {
+ var tokens = line.split('@');
+ var locationParts = this.extractLocation(tokens.pop());
+ var functionCall = (tokens.shift() || '');
+ var functionName = functionCall
+ .replace(//, '$2')
+ .replace(/\([^)]*\)/g, '') || undefined;
+ var argsRaw;
+ if (functionCall.match(/\(([^)]*)\)/)) {
+ argsRaw = functionCall.replace(/^[^(]+\(([^)]*)\)$/, '$1');
+ }
+ var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?
+ undefined : argsRaw.split(',');
+
+ return new StackFrame({
+ functionName: functionName,
+ args: args,
+ fileName: locationParts[0],
+ lineNumber: locationParts[1],
+ columnNumber: locationParts[2],
+ source: line
+ });
+ }, this);
+ }
+ };
+}));
+
+
+/***/ }),
+
+/***/ 124:
+/***/ (function(module, exports) {
+
+var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {
+ 'use strict';
+ // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
+
+ /* istanbul ignore next */
+ if (true) {
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
+ (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else {}
+}(this, function() {
+ 'use strict';
+ function _isNumber(n) {
+ return !isNaN(parseFloat(n)) && isFinite(n);
}
- }
- if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {
- polyfillJSON && polyfillJSON(RollbarJSON);
- }
-}
-/*
- * isType - Given a Javascript value and a string, returns true if the type of the value matches the
- * given string.
- *
- * @param x - any value
- * @param t - a lowercase string containing one of the following type names:
- * - undefined
- * - null
- * - error
- * - number
- * - boolean
- * - string
- * - symbol
- * - function
- * - object
- * - array
- * @returns true if x is of type t, otherwise false
- */
-function isType(x, t) {
- return t === typeName(x);
-}
+ function _capitalize(str) {
+ return str.charAt(0).toUpperCase() + str.substring(1);
+ }
+
+ function _getter(p) {
+ return function() {
+ return this[p];
+ };
+ }
+
+ var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];
+ var numericProps = ['columnNumber', 'lineNumber'];
+ var stringProps = ['fileName', 'functionName', 'source'];
+ var arrayProps = ['args'];
+ var objectProps = ['evalOrigin'];
+
+ var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);
+
+ function StackFrame(obj) {
+ if (!obj) return;
+ for (var i = 0; i < props.length; i++) {
+ if (obj[props[i]] !== undefined) {
+ this['set' + _capitalize(props[i])](obj[props[i]]);
+ }
+ }
+ }
+
+ StackFrame.prototype = {
+ getArgs: function() {
+ return this.args;
+ },
+ setArgs: function(v) {
+ if (Object.prototype.toString.call(v) !== '[object Array]') {
+ throw new TypeError('Args must be an Array');
+ }
+ this.args = v;
+ },
+
+ getEvalOrigin: function() {
+ return this.evalOrigin;
+ },
+ setEvalOrigin: function(v) {
+ if (v instanceof StackFrame) {
+ this.evalOrigin = v;
+ } else if (v instanceof Object) {
+ this.evalOrigin = new StackFrame(v);
+ } else {
+ throw new TypeError('Eval Origin must be an Object or StackFrame');
+ }
+ },
+
+ toString: function() {
+ var fileName = this.getFileName() || '';
+ var lineNumber = this.getLineNumber() || '';
+ var columnNumber = this.getColumnNumber() || '';
+ var functionName = this.getFunctionName() || '';
+ if (this.getIsEval()) {
+ if (fileName) {
+ return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';
+ }
+ return '[eval]:' + lineNumber + ':' + columnNumber;
+ }
+ if (functionName) {
+ return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';
+ }
+ return fileName + ':' + lineNumber + ':' + columnNumber;
+ }
+ };
+
+ StackFrame.fromString = function StackFrame$$fromString(str) {
+ var argsStartIndex = str.indexOf('(');
+ var argsEndIndex = str.lastIndexOf(')');
+
+ var functionName = str.substring(0, argsStartIndex);
+ var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');
+ var locationString = str.substring(argsEndIndex + 1);
+
+ if (locationString.indexOf('@') === 0) {
+ var parts = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(locationString, '');
+ var fileName = parts[1];
+ var lineNumber = parts[2];
+ var columnNumber = parts[3];
+ }
+
+ return new StackFrame({
+ functionName: functionName,
+ args: args || undefined,
+ fileName: fileName,
+ lineNumber: lineNumber || undefined,
+ columnNumber: columnNumber || undefined
+ });
+ };
+
+ for (var i = 0; i < booleanProps.length; i++) {
+ StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);
+ StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {
+ return function(v) {
+ this[p] = Boolean(v);
+ };
+ })(booleanProps[i]);
+ }
+
+ for (var j = 0; j < numericProps.length; j++) {
+ StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);
+ StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {
+ return function(v) {
+ if (!_isNumber(v)) {
+ throw new TypeError(p + ' must be a Number');
+ }
+ this[p] = Number(v);
+ };
+ })(numericProps[j]);
+ }
+
+ for (var k = 0; k < stringProps.length; k++) {
+ StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);
+ StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {
+ return function(v) {
+ this[p] = String(v);
+ };
+ })(stringProps[k]);
+ }
-/*
- * typeName - Given a Javascript value, returns the type of the object as a string
- */
-function typeName(x) {
- var name = typeof x;
- if (name !== 'object') {
- return name;
- }
- if (!x) {
- return 'null';
- }
- if (x instanceof Error) {
- return 'error';
- }
- return ({}).toString.call(x).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
-}
+ return StackFrame;
+}));
-/* isFunction - a convenience function for checking if a value is a function
- *
- * @param f - any value
- * @returns true if f is a function, otherwise false
- */
-function isFunction(f) {
- 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');
-}
+/***/ 815:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-/* isString - Checks if the argument is a string
- *
- * @param value - any value
- * @returns true if value is a string
-*/
-function isString(value) {
- return typeof value === 'string' || value instanceof String
-}
+"use strict";
-/**
- * isFiniteNumber - determines whether the passed value is a finite number
- *
- * @param {*} n - any value
- * @returns true if value is a finite number
- */
- function isFiniteNumber(n) {
- return Number.isFinite(n);
-}
-/*
- * isDefined - a convenience function for checking if a value is not equal to undefined
- *
- * @param u - any value
- * @returns true if u is anything other than undefined
- */
-function isDefined(u) {
- return !isType(u, 'undefined');
-}
+var _ = __webpack_require__(702);
+var helpers = __webpack_require__(817);
-/*
- * isIterable - convenience function for checking if a value can be iterated, essentially
- * whether it is an object or an array.
+var defaultOptions = {
+ hostname: 'api.rollbar.com',
+ path: '/api/1/item/',
+ search: null,
+ version: '1',
+ protocol: 'https:',
+ port: 443,
+};
+
+/**
+ * Api is an object that encapsulates methods of communicating with
+ * the Rollbar API. It is a standard interface with some parts implemented
+ * differently for server or browser contexts. It is an object that should
+ * be instantiated when used so it can contain non-global options that may
+ * be different for another instance of RollbarApi.
*
- * @param i - any value
- * @returns true if i is an object or an array as determined by `typeName`
+ * @param options {
+ * accessToken: the accessToken to use for posting items to rollbar
+ * endpoint: an alternative endpoint to send errors to
+ * must be a valid, fully qualified URL.
+ * The default is: https://api.rollbar.com/api/1/item
+ * proxy: if you wish to proxy requests provide an object
+ * with the following keys:
+ * host or hostname (required): foo.example.com
+ * port (optional): 123
+ * protocol (optional): https
+ * }
*/
-function isIterable(i) {
- var type = typeName(i);
- return (type === 'object' || type === 'array');
+function Api(options, transport, urllib, truncation, jsonBackup) {
+ this.options = options;
+ this.transport = transport;
+ this.url = urllib;
+ this.truncation = truncation;
+ this.jsonBackup = jsonBackup;
+ this.accessToken = options.accessToken;
+ this.transportOptions = _getTransport(options, urllib);
}
-/*
- * isError - convenience function for checking if a value is of an error type
+/**
*
- * @param e - any value
- * @returns true if e is an error
+ * @param data
+ * @param callback
*/
-function isError(e) {
- // Detect both Error and Firefox Exception type
- return isType(e, 'error') || isType(e, 'exception');
-}
+Api.prototype.postItem = function (data, callback) {
+ var transportOptions = helpers.transportOptions(
+ this.transportOptions,
+ 'POST',
+ );
+ var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);
+ var self = this;
-/* isPromise - a convenience function for checking if a value is a promise
+ // ensure the network request is scheduled after the current tick.
+ setTimeout(function () {
+ self.transport.post(self.accessToken, transportOptions, payload, callback);
+ }, 0);
+};
+
+/**
*
- * @param p - any value
- * @returns true if f is a function, otherwise false
+ * @param data
+ * @param callback
*/
-function isPromise(p) {
- return isObject(p) && isType(p.then, 'function');
-}
+Api.prototype.buildJsonPayload = function (data, callback) {
+ var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);
-function redact() {
- return '********';
-}
+ var stringifyResult;
+ if (this.truncation) {
+ stringifyResult = this.truncation.truncate(payload);
+ } else {
+ stringifyResult = _.stringify(payload);
+ }
-// from http://stackoverflow.com/a/8809472/1138191
-function uuid4() {
- var d = now();
- var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
- var r = (d + Math.random() * 16) % 16 | 0;
- d = Math.floor(d / 16);
- return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);
- });
- return uuid;
-}
+ if (stringifyResult.error) {
+ if (callback) {
+ callback(stringifyResult.error);
+ }
+ return null;
+ }
-var LEVELS = {
- debug: 0,
- info: 1,
- warning: 2,
- error: 3,
- critical: 4
+ return stringifyResult.value;
};
-function sanitizeUrl(url) {
- var baseUrlParts = parseUri(url);
- if (!baseUrlParts) {
- return '(unknown)';
- }
+/**
+ *
+ * @param jsonPayload
+ * @param callback
+ */
+Api.prototype.postJsonPayload = function (jsonPayload, callback) {
+ var transportOptions = helpers.transportOptions(
+ this.transportOptions,
+ 'POST',
+ );
+ this.transport.postJsonPayload(
+ this.accessToken,
+ transportOptions,
+ jsonPayload,
+ callback,
+ );
+};
- // remove a trailing # if there is no anchor
- if (baseUrlParts.anchor === '') {
- baseUrlParts.source = baseUrlParts.source.replace('#', '');
+Api.prototype.configure = function (options) {
+ var oldOptions = this.oldOptions;
+ this.options = _.merge(oldOptions, options);
+ this.transportOptions = _getTransport(this.options, this.url);
+ if (this.options.accessToken !== undefined) {
+ this.accessToken = this.options.accessToken;
}
+ return this;
+};
- url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');
- return url;
+function _getTransport(options, url) {
+ return helpers.getTransportFromOptions(options, defaultOptions, url);
}
-var parseUriOptions = {
- strictMode: false,
- 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*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
- }
-};
+module.exports = Api;
-function parseUri(str) {
- if (!isType(str, 'string')) {
- return undefined;
- }
- var o = parseUriOptions;
- var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);
- var uri = {};
+/***/ }),
- for (var i = 0, l = o.key.length; i < l; ++i) {
- uri[o.key[i]] = m[i] || '';
- }
+/***/ 817:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- uri[o.q.name] = {};
- uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
- if ($1) {
- uri[o.q.name][$1] = $2;
- }
- });
+"use strict";
- return uri;
-}
-function addParamsAndAccessTokenToPath(accessToken, options, params) {
- params = params || {};
- params.access_token = accessToken;
- var paramsArray = [];
- var k;
- for (k in params) {
- if (Object.prototype.hasOwnProperty.call(params, k)) {
- paramsArray.push([k, params[k]].join('='));
- }
- }
- var query = '?' + paramsArray.sort().join('&');
+var _ = __webpack_require__(702);
- options = options || {};
- options.path = options.path || '';
- var qs = options.path.indexOf('?');
- var h = options.path.indexOf('#');
- var p;
- if (qs !== -1 && (h === -1 || h > qs)) {
- p = options.path;
- options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);
- } else {
- if (h !== -1) {
- p = options.path;
- options.path = p.substring(0,h) + query + p.substring(h);
+function buildPayload(accessToken, data, jsonBackup) {
+ if (!_.isType(data.context, 'string')) {
+ var contextResult = _.stringify(data.context, jsonBackup);
+ if (contextResult.error) {
+ data.context = "Error: could not serialize 'context'";
} else {
- options.path = options.path + query;
+ data.context = contextResult.value || '';
+ }
+ if (data.context.length > 255) {
+ data.context = data.context.substr(0, 255);
}
}
+ return {
+ access_token: accessToken,
+ data: data,
+ };
}
-function formatUrl(u, protocol) {
- protocol = protocol || u.protocol;
- if (!protocol && u.port) {
- if (u.port === 80) {
- protocol = 'http:';
- } else if (u.port === 443) {
- protocol = 'https:';
- }
- }
- protocol = protocol || 'https:';
+function getTransportFromOptions(options, defaults, url) {
+ var hostname = defaults.hostname;
+ var protocol = defaults.protocol;
+ var port = defaults.port;
+ var path = defaults.path;
+ var search = defaults.search;
+ var timeout = options.timeout;
+ var transport = detectTransport(options);
- if (!u.hostname) {
- return null;
+ var proxy = options.proxy;
+ if (options.endpoint) {
+ var opts = url.parse(options.endpoint);
+ hostname = opts.hostname;
+ protocol = opts.protocol;
+ port = opts.port;
+ path = opts.pathname;
+ search = opts.search;
}
- var result = protocol + '//' + u.hostname;
- if (u.port) {
- result = result + ':' + u.port;
+ return {
+ timeout: timeout,
+ hostname: hostname,
+ protocol: protocol,
+ port: port,
+ path: path,
+ search: search,
+ proxy: proxy,
+ transport: transport,
+ };
+}
+
+function detectTransport(options) {
+ var gWindow =
+ (typeof window != 'undefined' && window) ||
+ (typeof self != 'undefined' && self);
+ var transport = options.defaultTransport || 'xhr';
+ if (typeof gWindow.fetch === 'undefined') transport = 'xhr';
+ if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';
+ return transport;
+}
+
+function transportOptions(transport, method) {
+ var protocol = transport.protocol || 'https:';
+ var port =
+ transport.port ||
+ (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);
+ var hostname = transport.hostname;
+ var path = transport.path;
+ var timeout = transport.timeout;
+ var transportAPI = transport.transport;
+ if (transport.search) {
+ path = path + transport.search;
}
- if (u.path) {
- result = result + u.path;
+ if (transport.proxy) {
+ path = protocol + '//' + hostname + path;
+ hostname = transport.proxy.host || transport.proxy.hostname;
+ port = transport.proxy.port;
+ protocol = transport.proxy.protocol || protocol;
}
- return result;
+ return {
+ timeout: timeout,
+ protocol: protocol,
+ hostname: hostname,
+ path: path,
+ port: port,
+ method: method,
+ transport: transportAPI,
+ };
}
-function stringify(obj, backup) {
- var value, error;
- try {
- value = RollbarJSON.stringify(obj);
- } catch (jsonError) {
- if (backup && isFunction(backup)) {
- try {
- value = backup(obj);
- } catch (backupError) {
- error = backupError;
- }
- } else {
- error = jsonError;
- }
+function appendPathToPath(base, path) {
+ var baseTrailingSlash = /\/$/.test(base);
+ var pathBeginningSlash = /^\//.test(path);
+
+ if (baseTrailingSlash && pathBeginningSlash) {
+ path = path.substring(1);
+ } else if (!baseTrailingSlash && !pathBeginningSlash) {
+ path = '/' + path;
}
- return {error: error, value: value};
+
+ return base + path;
}
-function maxByteSize(string) {
- // The transport will use utf-8, so assume utf-8 encoding.
- //
- // This minimal implementation will accurately count bytes for all UCS-2 and
- // single code point UTF-16. If presented with multi code point UTF-16,
- // which should be rare, it will safely overcount, not undercount.
- //
- // While robust utf-8 encoders exist, this is far smaller and far more performant.
- // For quickly counting payload size for truncation, smaller is better.
+module.exports = {
+ buildPayload: buildPayload,
+ getTransportFromOptions: getTransportFromOptions,
+ transportOptions: transportOptions,
+ appendPathToPath: appendPathToPath,
+};
- var count = 0;
- var length = string.length;
- for (var i = 0; i < length; i++) {
- var code = string.charCodeAt(i);
- if (code < 128) { // up to 7 bits
- count = count + 1;
- } else if (code < 2048) { // up to 11 bits
- count = count + 2;
- } else if (code < 65536) { // up to 16 bits
- count = count + 3;
- }
- }
+/***/ }),
- return count;
-}
+/***/ 409:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-function jsonParse(s) {
- var value, error;
- try {
- value = RollbarJSON.parse(s);
- } catch (e) {
- error = e;
- }
- return {error: error, value: value};
-}
+"use strict";
-function makeUnhandledStackInfo(
- message,
- url,
- lineno,
- colno,
- error,
- mode,
- backupMessage,
- errorParser
-) {
- var location = {
- url: url || '',
- line: lineno,
- column: colno
- };
- location.func = errorParser.guessFunctionName(location.url, location.line);
- location.context = errorParser.gatherContext(location.url, location.line);
- var href = typeof document !== 'undefined' && document && document.location && document.location.href;
- var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;
- return {
- 'mode': mode,
- 'message': error ? String(error) : (message || backupMessage),
- 'url': href,
- 'stack': [location],
- 'useragent': useragent
- };
+
+var rollbar = __webpack_require__(343);
+
+var options = (typeof window !== 'undefined') && window._rollbarConfig;
+var alias = options && options.globalAlias || 'Rollbar';
+var shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;
+
+if ((typeof window !== 'undefined') && !window._rollbarStartTime) {
+ window._rollbarStartTime = (new Date()).getTime();
}
-function wrapCallback(logger, f) {
- return function(err, resp) {
- try {
- f(err, resp);
- } catch (e) {
- logger.error(e);
- }
- };
+if (!shimRunning && options) {
+ var Rollbar = new rollbar(options);
+ window[alias] = Rollbar;
+} else if (typeof window !== 'undefined') {
+ window.rollbar = rollbar;
+ window._rollbarDidLoad = true;
+} else if (typeof self !== 'undefined') {
+ self.rollbar = rollbar;
+ self._rollbarDidLoad = true;
}
-function createItem(args, logger, notifier, requestKeys, lambdaContext) {
- var message, err, custom, callback, request;
- var arg;
- var extraArgs = [];
- var diagnostic = {};
- var argTypes = [];
+module.exports = rollbar;
- for (var i = 0, l = args.length; i < l; ++i) {
- arg = args[i];
- var typ = typeName(arg);
- argTypes.push(typ);
- switch (typ) {
- case 'undefined':
- break;
- case 'string':
- message ? extraArgs.push(arg) : message = arg;
- break;
- case 'function':
- callback = wrapCallback(logger, arg);
- break;
- case 'date':
- extraArgs.push(arg);
- break;
- case 'error':
- case 'domexception':
- case 'exception': // Firefox Exception type
- err ? extraArgs.push(arg) : err = arg;
- break;
- case 'object':
- case 'array':
- if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {
- err ? extraArgs.push(arg) : err = arg;
- break;
- }
- if (requestKeys && typ === 'object' && !request) {
- for (var j = 0, len = requestKeys.length; j < len; ++j) {
- if (arg[requestKeys[j]] !== undefined) {
- request = arg;
- break;
- }
- }
- if (request) {
- break;
- }
- }
- custom ? extraArgs.push(arg) : custom = arg;
- break;
- default:
- if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {
- err ? extraArgs.push(arg) : err = arg;
- break;
- }
- extraArgs.push(arg);
- }
- }
+/***/ }),
- if (extraArgs.length > 0) {
- // if custom is an array this turns it into an object with integer keys
- custom = merge(custom);
- custom.extraArgs = extraArgs;
- }
+/***/ 403:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- var item = {
- message: message,
- err: err,
- custom: custom,
- timestamp: now(),
- callback: callback,
- notifier: notifier,
- diagnostic: diagnostic,
- uuid: uuid4()
- };
+"use strict";
- setCustomItemKeys(item, custom);
- if (requestKeys && request) {
- item.request = request;
+var Client = __webpack_require__(562);
+var _ = __webpack_require__(702);
+var API = __webpack_require__(815);
+var logger = __webpack_require__(802);
+var globals = __webpack_require__(349);
+
+var Transport = __webpack_require__(477);
+var urllib = __webpack_require__(509);
+
+var transforms = __webpack_require__(860);
+var sharedTransforms = __webpack_require__(417);
+var predicates = __webpack_require__(172);
+var sharedPredicates = __webpack_require__(61);
+var errorParser = __webpack_require__(303);
+
+function Rollbar(options, client) {
+ this.options = _.handleOptions(defaultOptions, options, null, logger);
+ this.options._configuredOptions = options;
+ var Telemeter = this.components.telemeter;
+ var Instrumenter = this.components.instrumenter;
+ var polyfillJSON = this.components.polyfillJSON;
+ this.wrapGlobals = this.components.wrapGlobals;
+ this.scrub = this.components.scrub;
+ var truncation = this.components.truncation;
+
+ var transport = new Transport(truncation);
+ var api = new API(this.options, transport, urllib, truncation);
+ if (Telemeter) {
+ this.telemeter = new Telemeter(this.options);
}
- if (lambdaContext) {
- item.lambdaContext = lambdaContext;
+ this.client =
+ client || new Client(this.options, api, logger, this.telemeter, 'browser');
+ var gWindow = _gWindow();
+ var gDocument = typeof document != 'undefined' && document;
+ this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers
+ this.anonymousErrorsPending = 0;
+ addTransformsToNotifier(this.client.notifier, this, gWindow);
+ addPredicatesToQueue(this.client.queue);
+ this.setupUnhandledCapture();
+ if (Instrumenter) {
+ this.instrumenter = new Instrumenter(
+ this.options,
+ this.client.telemeter,
+ this,
+ gWindow,
+ gDocument,
+ );
+ this.instrumenter.instrument();
}
- item._originalArgs = args;
- item.diagnostic.original_arg_types = argTypes;
- return item;
+ _.setupJSON(polyfillJSON);
+
+ // Used with rollbar-react for rollbar-react-native compatibility.
+ this.rollbar = this;
}
-function setCustomItemKeys(item, custom) {
- if (custom && custom.level !== undefined) {
- item.level = custom.level;
- delete custom.level;
- }
- if (custom && custom.skipFrames !== undefined) {
- item.skipFrames = custom.skipFrames;
- delete custom.skipFrames;
+var _instance = null;
+Rollbar.init = function (options, client) {
+ if (_instance) {
+ return _instance.global(options).configure(options);
}
-}
+ _instance = new Rollbar(options, client);
+ return _instance;
+};
-function addErrorContext(item, errors) {
- var custom = item.data.custom || {};
- var contextAdded = false;
+Rollbar.prototype.components = {};
- try {
- for (var i = 0; i < errors.length; ++i) {
- if (errors[i].hasOwnProperty('rollbarContext')) {
- custom = merge(custom, errors[i].rollbarContext);
- contextAdded = true;
- }
- }
+Rollbar.setComponents = function (components) {
+ Rollbar.prototype.components = components;
+};
- // Avoid adding an empty object to the data.
- if (contextAdded) {
- item.data.custom = custom;
- }
- } catch (e) {
- item.diagnostic.error_context = 'Failed: ' + e.message;
+function handleUninitialized(maybeCallback) {
+ var message = 'Rollbar is not initialized';
+ logger.error(message);
+ if (maybeCallback) {
+ maybeCallback(new Error(message));
}
}
-var TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];
-var TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];
+Rollbar.prototype.global = function (options) {
+ this.client.global(options);
+ return this;
+};
+Rollbar.global = function (options) {
+ if (_instance) {
+ return _instance.global(options);
+ } else {
+ handleUninitialized();
+ }
+};
-function arrayIncludes(arr, val) {
- for (var k = 0; k < arr.length; ++k) {
- if (arr[k] === val) {
- return true;
- }
+Rollbar.prototype.configure = function (options, payloadData) {
+ var oldOptions = this.options;
+ var payload = {};
+ if (payloadData) {
+ payload = { payload: payloadData };
+ }
+ this.options = _.handleOptions(oldOptions, options, payload, logger);
+ this.options._configuredOptions = _.handleOptions(
+ oldOptions._configuredOptions,
+ options,
+ payload,
+ );
+ this.client.configure(this.options, payloadData);
+ this.instrumenter && this.instrumenter.configure(this.options);
+ this.setupUnhandledCapture();
+ return this;
+};
+Rollbar.configure = function (options, payloadData) {
+ if (_instance) {
+ return _instance.configure(options, payloadData);
+ } else {
+ handleUninitialized();
}
+};
- return false;
-}
+Rollbar.prototype.lastError = function () {
+ return this.client.lastError;
+};
+Rollbar.lastError = function () {
+ if (_instance) {
+ return _instance.lastError();
+ } else {
+ handleUninitialized();
+ }
+};
-function createTelemetryEvent(args) {
- var type, metadata, level;
- var arg;
+Rollbar.prototype.log = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.log(item);
+ return { uuid: uuid };
+};
+Rollbar.log = function () {
+ if (_instance) {
+ return _instance.log.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
+ }
+};
- for (var i = 0, l = args.length; i < l; ++i) {
- arg = args[i];
+Rollbar.prototype.debug = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.debug(item);
+ return { uuid: uuid };
+};
+Rollbar.debug = function () {
+ if (_instance) {
+ return _instance.debug.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
+ }
+};
- var typ = typeName(arg);
- switch (typ) {
- case 'string':
- if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {
- type = arg;
- } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {
- level = arg;
- }
- break;
- case 'object':
- metadata = arg;
- break;
- default:
- break;
- }
+Rollbar.prototype.info = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.info(item);
+ return { uuid: uuid };
+};
+Rollbar.info = function () {
+ if (_instance) {
+ return _instance.info.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
}
- var event = {
- type: type || 'manual',
- metadata: metadata || {},
- level: level
- };
+};
- return event;
-}
+Rollbar.prototype.warn = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.warn(item);
+ return { uuid: uuid };
+};
+Rollbar.warn = function () {
+ if (_instance) {
+ return _instance.warn.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
+ }
+};
-/*
- * get - given an obj/array and a keypath, return the value at that keypath or
- * undefined if not possible.
- *
- * @param obj - an object or array
- * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'
- * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`
- */
-function get(obj, path) {
- if (!obj) {
- return undefined;
+Rollbar.prototype.warning = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.warning(item);
+ return { uuid: uuid };
+};
+Rollbar.warning = function () {
+ if (_instance) {
+ return _instance.warning.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
}
- var keys = path.split('.');
- var result = obj;
- try {
- for (var i = 0, len = keys.length; i < len; ++i) {
- result = result[keys[i]];
- }
- } catch (e) {
- result = undefined;
+};
+
+Rollbar.prototype.error = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.error(item);
+ return { uuid: uuid };
+};
+Rollbar.error = function () {
+ if (_instance) {
+ return _instance.error.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
}
- return result;
-}
+};
-function set(obj, path, value) {
- if (!obj) {
- return;
+Rollbar.prototype.critical = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.critical(item);
+ return { uuid: uuid };
+};
+Rollbar.critical = function () {
+ if (_instance) {
+ return _instance.critical.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
}
- var keys = path.split('.');
- var len = keys.length;
- if (len < 1) {
- return;
+};
+
+Rollbar.prototype.buildJsonPayload = function (item) {
+ return this.client.buildJsonPayload(item);
+};
+Rollbar.buildJsonPayload = function () {
+ if (_instance) {
+ return _instance.buildJsonPayload.apply(_instance, arguments);
+ } else {
+ handleUninitialized();
}
- if (len === 1) {
- obj[keys[0]] = value;
- return;
+};
+
+Rollbar.prototype.sendJsonPayload = function (jsonPayload) {
+ return this.client.sendJsonPayload(jsonPayload);
+};
+Rollbar.sendJsonPayload = function () {
+ if (_instance) {
+ return _instance.sendJsonPayload.apply(_instance, arguments);
+ } else {
+ handleUninitialized();
+ }
+};
+
+Rollbar.prototype.setupUnhandledCapture = function () {
+ var gWindow = _gWindow();
+
+ if (!this.unhandledExceptionsInitialized) {
+ if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {
+ globals.captureUncaughtExceptions(gWindow, this);
+ if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {
+ this.wrapGlobals(gWindow, this);
+ }
+ this.unhandledExceptionsInitialized = true;
+ }
}
- try {
- var temp = obj[keys[0]] || {};
- var replacement = temp;
- for (var i = 1; i < len - 1; ++i) {
- temp[keys[i]] = temp[keys[i]] || {};
- temp = temp[keys[i]];
+ if (!this.unhandledRejectionsInitialized) {
+ if (
+ this.options.captureUnhandledRejections ||
+ this.options.handleUnhandledRejections
+ ) {
+ globals.captureUnhandledRejections(gWindow, this);
+ this.unhandledRejectionsInitialized = true;
}
- temp[keys[len-1]] = value;
- obj[keys[0]] = replacement;
- } catch (e) {
+ }
+};
+
+Rollbar.prototype.handleUncaughtException = function (
+ message,
+ url,
+ lineno,
+ colno,
+ error,
+ context,
+) {
+ if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {
return;
}
-}
-function formatArgsAsString(args) {
- var i, len, arg;
- var result = [];
- for (i = 0, len = args.length; i < len; ++i) {
- arg = args[i];
- switch (typeName(arg)) {
- case 'object':
- arg = stringify(arg);
- arg = arg.error || arg.value;
- if (arg.length > 500) {
- arg = arg.substr(0, 497) + '...';
- }
- break;
- case 'null':
- arg = 'null';
- break;
- case 'undefined':
- arg = 'undefined';
- break;
- case 'symbol':
- arg = arg.toString();
- break;
- }
- result.push(arg);
+ // Chrome will always send 5+ arguments and error will be valid or null, not undefined.
+ // If error is undefined, we have a different caller.
+ // Chrome also sends errors from web workers with null error, but does not invoke
+ // prepareStackTrace() for these. Test for empty url to skip them.
+ if (
+ this.options.inspectAnonymousErrors &&
+ this.isChrome &&
+ error === null &&
+ url === ''
+ ) {
+ return 'anonymous';
}
- return result.join(' ');
-}
-function now() {
- if (Date.now) {
- return +Date.now();
+ var item;
+ var stackInfo = _.makeUnhandledStackInfo(
+ message,
+ url,
+ lineno,
+ colno,
+ error,
+ 'onerror',
+ 'uncaught exception',
+ errorParser,
+ );
+ if (_.isError(error)) {
+ item = this._createItem([message, error, context]);
+ item._unhandledStackInfo = stackInfo;
+ } else if (_.isError(url)) {
+ item = this._createItem([message, url, context]);
+ item._unhandledStackInfo = stackInfo;
+ } else {
+ item = this._createItem([message, context]);
+ item.stackInfo = stackInfo;
}
- return +new Date();
-}
+ item.level = this.options.uncaughtErrorLevel;
+ item._isUncaught = true;
+ this.client.log(item);
+};
-function filterIp(requestData, captureIp) {
- if (!requestData || !requestData['user_ip'] || captureIp === true) {
+/**
+ * Chrome only. Other browsers will ignore.
+ *
+ * Use Error.prepareStackTrace to extract information about errors that
+ * do not have a valid error object in onerror().
+ *
+ * In tested version of Chrome, onerror is called first but has no way
+ * to communicate with prepareStackTrace. Use a counter to let this
+ * handler know which errors to send to Rollbar.
+ *
+ * In config options, set inspectAnonymousErrors to enable.
+ */
+Rollbar.prototype.handleAnonymousErrors = function () {
+ if (!this.options.inspectAnonymousErrors || !this.isChrome) {
return;
}
- var newIp = requestData['user_ip'];
- if (!captureIp) {
- newIp = null;
- } else {
- try {
- var parts;
- if (newIp.indexOf('.') !== -1) {
- parts = newIp.split('.');
- parts.pop();
- parts.push('0');
- newIp = parts.join('.');
- } else if (newIp.indexOf(':') !== -1) {
- parts = newIp.split(':');
- if (parts.length > 2) {
- var beginning = parts.slice(0, 3);
- var slashIdx = beginning[2].indexOf('/');
- if (slashIdx !== -1) {
- beginning[2] = beginning[2].substring(0, slashIdx);
- }
- var terminal = '0000:0000:0000:0000:0000';
- newIp = beginning.concat(terminal).join(':');
+
+ var r = this;
+ function prepareStackTrace(error, _stack) {
+ // eslint-disable-line no-unused-vars
+ if (r.options.inspectAnonymousErrors) {
+ if (r.anonymousErrorsPending) {
+ // This is the only known way to detect that onerror saw an anonymous error.
+ // It depends on onerror reliably being called before Error.prepareStackTrace,
+ // which so far holds true on tested versions of Chrome. If versions of Chrome
+ // are tested that behave differently, this logic will need to be updated
+ // accordingly.
+ r.anonymousErrorsPending -= 1;
+
+ if (!error) {
+ // Not likely to get here, but calling handleUncaughtException from here
+ // without an error object would throw off the anonymousErrorsPending counter,
+ // so return now.
+ return;
}
- } else {
- newIp = null;
+
+ // Allow this to be tracked later.
+ error._isAnonymous = true;
+
+ // url, lineno, colno shouldn't be needed for these errors.
+ // If that changes, update this accordingly, using the unused
+ // _stack param as needed (rather than parse error.toString()).
+ r.handleUncaughtException(error.message, null, null, null, error);
}
- } catch (e) {
- newIp = null;
}
- }
- requestData['user_ip'] = newIp;
-}
-function handleOptions(current, input, payload, logger) {
- var result = merge(current, input, payload);
- result = updateDeprecatedOptions(result, logger);
- if (!input || input.overwriteScrubFields) {
- return result;
+ // Workaround to ensure stack is preserved for normal errors.
+ return error.stack;
}
- if (input.scrubFields) {
- result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);
+
+ // https://v8.dev/docs/stack-trace-api
+ try {
+ Error.prepareStackTrace = prepareStackTrace;
+ } catch (e) {
+ this.options.inspectAnonymousErrors = false;
+ this.error('anonymous error handler failed', e);
}
- return result;
-}
+};
-function updateDeprecatedOptions(options, logger) {
- if(options.hostWhiteList && !options.hostSafeList) {
- options.hostSafeList = options.hostWhiteList;
- options.hostWhiteList = undefined;
- logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');
+Rollbar.prototype.handleUnhandledRejection = function (reason, promise) {
+ if (
+ !this.options.captureUnhandledRejections &&
+ !this.options.handleUnhandledRejections
+ ) {
+ return;
}
- if(options.hostBlackList && !options.hostBlockList) {
- options.hostBlockList = options.hostBlackList;
- options.hostBlackList = undefined;
- logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');
+
+ var message = 'unhandled rejection was null or undefined!';
+ if (reason) {
+ if (reason.message) {
+ message = reason.message;
+ } else {
+ var reasonResult = _.stringify(reason);
+ if (reasonResult.value) {
+ message = reasonResult.value;
+ }
+ }
}
- return options;
-}
+ var context =
+ (reason && reason._rollbarContext) || (promise && promise._rollbarContext);
-module.exports = {
- addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,
- createItem: createItem,
- addErrorContext: addErrorContext,
- createTelemetryEvent: createTelemetryEvent,
- filterIp: filterIp,
- formatArgsAsString: formatArgsAsString,
- formatUrl: formatUrl,
- get: get,
- handleOptions: handleOptions,
- isError: isError,
- isFiniteNumber: isFiniteNumber,
- isFunction: isFunction,
- isIterable: isIterable,
- isNativeFunction: isNativeFunction,
- isObject: isObject,
- isString: isString,
- isType: isType,
- isPromise: isPromise,
- jsonParse: jsonParse,
- LEVELS: LEVELS,
- makeUnhandledStackInfo: makeUnhandledStackInfo,
- merge: merge,
- now: now,
- redact: redact,
- RollbarJSON: RollbarJSON,
- sanitizeUrl: sanitizeUrl,
- set: set,
- setupJSON: setupJSON,
- stringify: stringify,
- maxByteSize: maxByteSize,
- typeName: typeName,
- uuid4: uuid4
+ var item;
+ if (_.isError(reason)) {
+ item = this._createItem([message, reason, context]);
+ } else {
+ item = this._createItem([message, reason, context]);
+ item.stackInfo = _.makeUnhandledStackInfo(
+ message,
+ '',
+ 0,
+ 0,
+ null,
+ 'unhandledrejection',
+ '',
+ errorParser,
+ );
+ }
+ item.level = this.options.uncaughtErrorLevel;
+ item._isUncaught = true;
+ item._originalArgs = item._originalArgs || [];
+ item._originalArgs.push(promise);
+ this.client.log(item);
};
+Rollbar.prototype.wrap = function (f, context, _before) {
+ try {
+ var ctxFn;
+ if (_.isFunction(context)) {
+ ctxFn = context;
+ } else {
+ ctxFn = function () {
+ return context || {};
+ };
+ }
+
+ if (!_.isFunction(f)) {
+ return f;
+ }
+
+ if (f._isWrap) {
+ return f;
+ }
-/***/ }),
-/* 1 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (!f._rollbar_wrapped) {
+ f._rollbar_wrapped = function () {
+ if (_before && _.isFunction(_before)) {
+ _before.apply(this, arguments);
+ }
+ try {
+ return f.apply(this, arguments);
+ } catch (exc) {
+ var e = exc;
+ if (e && window._rollbarWrappedError !== e) {
+ if (_.isType(e, 'string')) {
+ e = new String(e);
+ }
+ e._rollbarContext = ctxFn() || {};
+ e._rollbarContext._wrappedSource = f.toString();
-"use strict";
+ window._rollbarWrappedError = e;
+ }
+ throw e;
+ }
+ };
+ f._rollbar_wrapped._isWrap = true;
-/* eslint-disable no-console */
-__webpack_require__(17);
-var detection = __webpack_require__(18);
-var _ = __webpack_require__(0);
+ if (f.hasOwnProperty) {
+ for (var prop in f) {
+ if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {
+ f._rollbar_wrapped[prop] = f[prop];
+ }
+ }
+ }
+ }
-function error() {
- var args = Array.prototype.slice.call(arguments, 0);
- args.unshift('Rollbar:');
- if (detection.ieVersion() <= 8) {
- console.error(_.formatArgsAsString(args));
+ return f._rollbar_wrapped;
+ } catch (e) {
+ // Return the original function if the wrap fails.
+ return f;
+ }
+};
+Rollbar.wrap = function (f, context) {
+ if (_instance) {
+ return _instance.wrap(f, context);
} else {
- console.error.apply(console, args);
+ handleUninitialized();
}
-}
+};
-function info() {
- var args = Array.prototype.slice.call(arguments, 0);
- args.unshift('Rollbar:');
- if (detection.ieVersion() <= 8) {
- console.info(_.formatArgsAsString(args));
+Rollbar.prototype.captureEvent = function () {
+ var event = _.createTelemetryEvent(arguments);
+ return this.client.captureEvent(event.type, event.metadata, event.level);
+};
+Rollbar.captureEvent = function () {
+ if (_instance) {
+ return _instance.captureEvent.apply(_instance, arguments);
} else {
- console.info.apply(console, args);
+ handleUninitialized();
}
-}
+};
-function log() {
- var args = Array.prototype.slice.call(arguments, 0);
- args.unshift('Rollbar:');
- if (detection.ieVersion() <= 8) {
- console.log(_.formatArgsAsString(args));
- } else {
- console.log.apply(console, args);
+// The following two methods are used internally and are not meant for public use
+Rollbar.prototype.captureDomContentLoaded = function (e, ts) {
+ if (!ts) {
+ ts = new Date();
+ }
+ return this.client.captureDomContentLoaded(ts);
+};
+
+Rollbar.prototype.captureLoad = function (e, ts) {
+ if (!ts) {
+ ts = new Date();
}
+ return this.client.captureLoad(ts);
+};
+
+/* Internal */
+
+function addTransformsToNotifier(notifier, rollbar, gWindow) {
+ notifier
+ .addTransform(transforms.handleDomException)
+ .addTransform(transforms.handleItemWithError)
+ .addTransform(transforms.ensureItemHasSomethingToSay)
+ .addTransform(transforms.addBaseInfo)
+ .addTransform(transforms.addRequestInfo(gWindow))
+ .addTransform(transforms.addClientInfo(gWindow))
+ .addTransform(transforms.addPluginInfo(gWindow))
+ .addTransform(transforms.addBody)
+ .addTransform(sharedTransforms.addMessageWithError)
+ .addTransform(sharedTransforms.addTelemetryData)
+ .addTransform(sharedTransforms.addConfigToPayload)
+ .addTransform(transforms.addScrubber(rollbar.scrub))
+ .addTransform(sharedTransforms.addPayloadOptions)
+ .addTransform(sharedTransforms.userTransform(logger))
+ .addTransform(sharedTransforms.addConfiguredOptions)
+ .addTransform(sharedTransforms.addDiagnosticKeys)
+ .addTransform(sharedTransforms.itemToPayload);
}
-/* eslint-enable no-console */
+function addPredicatesToQueue(queue) {
+ queue
+ .addPredicate(sharedPredicates.checkLevel)
+ .addPredicate(predicates.checkIgnore)
+ .addPredicate(sharedPredicates.userCheckIgnore(logger))
+ .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))
+ .addPredicate(sharedPredicates.urlIsSafeListed(logger))
+ .addPredicate(sharedPredicates.messageIsIgnored(logger));
+}
-module.exports = {
- error: error,
- info: info,
- log: log
+Rollbar.prototype.loadFull = function () {
+ logger.info(
+ 'Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.',
+ );
};
+Rollbar.prototype._createItem = function (args) {
+ return _.createItem(args, logger, this);
+};
-/***/ }),
-/* 2 */
-/***/ (function(module, exports, __webpack_require__) {
+function _getFirstFunction(args) {
+ for (var i = 0, len = args.length; i < len; ++i) {
+ if (_.isFunction(args[i])) {
+ return args[i];
+ }
+ }
+ return undefined;
+}
-"use strict";
+function _gWindow() {
+ return (
+ (typeof window != 'undefined' && window) ||
+ (typeof self != 'undefined' && self)
+ );
+}
+var defaults = __webpack_require__(948);
+var scrubFields = __webpack_require__(677);
-// See https://nodejs.org/docs/latest/api/url.html
-function parse(url) {
- var result = {
- protocol: null, auth: null, host: null, path: null,
- hash: null, href: url, hostname: null, port: null,
- pathname: null, search: null, query: null
- };
+var defaultOptions = {
+ version: defaults.version,
+ scrubFields: scrubFields.scrubFields,
+ logLevel: defaults.logLevel,
+ reportLevel: defaults.reportLevel,
+ uncaughtErrorLevel: defaults.uncaughtErrorLevel,
+ endpoint: defaults.endpoint,
+ verbose: false,
+ enabled: true,
+ transmit: true,
+ sendConfig: false,
+ includeItemsInTelemetry: true,
+ captureIp: true,
+ inspectAnonymousErrors: true,
+ ignoreDuplicateErrors: true,
+ wrapGlobalEventHandlers: false,
+};
- var i, last;
- i = url.indexOf('//');
- if (i !== -1) {
- result.protocol = url.substring(0,i);
- last = i+2;
- } else {
- last = 0;
- }
-
- i = url.indexOf('@', last);
- if (i !== -1) {
- result.auth = url.substring(last, i);
- last = i+1;
- }
+module.exports = Rollbar;
- i = url.indexOf('/', last);
- if (i === -1) {
- i = url.indexOf('?', last);
- if (i === -1) {
- i = url.indexOf('#', last);
- if (i === -1) {
- result.host = url.substring(last);
- } else {
- result.host = url.substring(last, i);
- result.hash = url.substring(i);
- }
- result.hostname = result.host.split(':')[0];
- result.port = result.host.split(':')[1];
- if (result.port) {
- result.port = parseInt(result.port, 10);
- }
- return result;
- } else {
- result.host = url.substring(last, i);
- result.hostname = result.host.split(':')[0];
- result.port = result.host.split(':')[1];
- if (result.port) {
- result.port = parseInt(result.port, 10);
- }
- last = i;
- }
- } else {
- result.host = url.substring(last, i);
- result.hostname = result.host.split(':')[0];
- result.port = result.host.split(':')[1];
- if (result.port) {
- result.port = parseInt(result.port, 10);
- }
- last = i;
- }
- i = url.indexOf('#', last);
- if (i === -1) {
- result.path = url.substring(last);
- } else {
- result.path = url.substring(last, i);
- result.hash = url.substring(i);
- }
+/***/ }),
+
+/***/ 677:
+/***/ ((module) => {
+
+"use strict";
- if (result.path) {
- var pathParts = result.path.split('?');
- result.pathname = pathParts[0];
- result.query = pathParts[1];
- result.search = result.query ? '?' + result.query : null;
- }
- return result;
-}
module.exports = {
- parse: parse
+ scrubFields: [
+ 'pw',
+ 'pass',
+ 'passwd',
+ 'password',
+ 'secret',
+ 'confirm_password',
+ 'confirmPassword',
+ 'password_confirmation',
+ 'passwordConfirmation',
+ 'access_token',
+ 'accessToken',
+ 'X-Rollbar-Access-Token',
+ 'secret_key',
+ 'secretKey',
+ 'secretToken',
+ 'cc-number',
+ 'card number',
+ 'cardnumber',
+ 'cardnum',
+ 'ccnum',
+ 'ccnumber',
+ 'cc num',
+ 'creditcardnumber',
+ 'credit card number',
+ 'newcreditcardnumber',
+ 'new credit card',
+ 'creditcardno',
+ 'credit card no',
+ 'card#',
+ 'card #',
+ 'cc-csc',
+ 'cvc',
+ 'cvc2',
+ 'cvv2',
+ 'ccv2',
+ 'security code',
+ 'card verification',
+ 'name on credit card',
+ 'name on card',
+ 'nameoncard',
+ 'cardholder',
+ 'card holder',
+ 'name des karteninhabers',
+ 'ccname',
+ 'card type',
+ 'cardtype',
+ 'cc type',
+ 'cctype',
+ 'payment type',
+ 'expiration date',
+ 'expirationdate',
+ 'expdate',
+ 'cc-exp',
+ 'ccmonth',
+ 'ccyear',
+ ],
};
/***/ }),
-/* 3 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var ErrorStackParser = __webpack_require__(22);
-
-var UNKNOWN_FUNCTION = '?';
-var ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');
-
-function guessFunctionName() {
- return UNKNOWN_FUNCTION;
-}
+/***/ 616:
+/***/ ((module) => {
-function gatherContext() {
- return null;
-}
+"use strict";
-function Frame(stackFrame) {
- var data = {};
+// This detection.js module is used to encapsulate any ugly browser/feature
+// detection we may need to do.
- data._stackFrame = stackFrame;
+// Figure out which version of IE we're using, if any.
+// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library
+// Will return an integer on IE (i.e. 8)
+// Will return undefined otherwise
+function getIEVersion() {
+ var undef;
+ if (typeof document === 'undefined') {
+ return undef;
+ }
- data.url = stackFrame.fileName;
- data.line = stackFrame.lineNumber;
- data.func = stackFrame.functionName;
- data.column = stackFrame.columnNumber;
- data.args = stackFrame.args;
+ var v = 3,
+ div = document.createElement('div'),
+ all = div.getElementsByTagName('i');
- data.context = gatherContext();
+ while (
+ ((div.innerHTML = ''), all[0])
+ );
- return data;
+ return v > 4 ? v : undef;
}
+var Detection = {
+ ieVersion: getIEVersion,
+};
-function Stack(exception, skip) {
- function getStack() {
- var parserStack = [];
+module.exports = Detection;
- skip = skip || 0;
- try {
- parserStack = ErrorStackParser.parse(exception);
- } catch(e) {
- parserStack = [];
- }
+/***/ }),
- var stack = [];
+/***/ 300:
+/***/ ((module) => {
- for (var i = skip; i < parserStack.length; i++) {
- stack.push(new Frame(parserStack[i]));
- }
+"use strict";
- return stack;
- }
- return {
- stack: getStack(),
- message: exception.message,
- name: _mostSpecificErrorName(exception),
- rawStack: exception.stack,
- rawException: exception
- };
+function getElementType(e) {
+ return (e.getAttribute('type') || '').toLowerCase();
}
-
-function parse(e, skip) {
- var err = e;
-
- if (err.nested) {
- var traceChain = [];
- while (err) {
- traceChain.push(new Stack(err, skip));
- err = err.nested;
-
- skip = 0; // Only apply skip value to primary error
+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 primary error with full trace chain attached.
- traceChain[0].traceChain = traceChain;
- return traceChain[0];
- } else {
- return new Stack(err, skip);
}
+ return false;
}
-
-function guessErrorClass(errMsg) {
- if (!errMsg || !errMsg.match) {
- return ['Unknown error. There was no error message to display.', ''];
+function getElementFromEvent(evt, doc) {
+ if (evt.target) {
+ return evt.target;
}
- var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);
- var errClass = '(unknown)';
-
- if (errClassMatch) {
- errClass = errClassMatch[errClassMatch.length - 1];
- errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');
- errMsg = errMsg.replace(/(^[\s]+|[\s]+$)/g, '');
+ if (doc && doc.elementFromPoint) {
+ return doc.elementFromPoint(evt.clientX, evt.clientY);
}
- return [errClass, errMsg];
+ return undefined;
}
-// * Prefers any value over an empty string
-// * Prefers any value over 'Error' where possible
-// * Prefers name over constructor.name when both are more specific than 'Error'
-function _mostSpecificErrorName(error) {
- var name = error.name && error.name.length && error.name;
- var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;
-
- if (!name || !constructorName) {
- return name || constructorName;
- }
-
- if (name === 'Error') {
- return constructorName;
+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 name;
+ return out;
}
-module.exports = {
- guessFunctionName: guessFunctionName,
- guessErrorClass: guessErrorClass,
- gatherContext: gatherContext,
- parse: parse,
- Stack: Stack,
- Frame: Frame
-};
-
-
-/***/ }),
-/* 4 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var _ = __webpack_require__(0);
-var traverse = __webpack_require__(5);
-
-function scrub(data, scrubFields, scrubPaths) {
- scrubFields = scrubFields || [];
+function elementArrayToString(a) {
+ var MAX_LENGTH = 80;
+ var separator = ' > ',
+ separatorLength = separator.length;
+ var out = [],
+ len = 0,
+ nextStr,
+ totalLength;
- if (scrubPaths) {
- for (var i = 0; i < scrubPaths.length; ++i) {
- scrubPath(data, scrubPaths[i]);
+ 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);
+}
- var paramRes = _getScrubFieldRegexs(scrubFields);
- var queryRes = _getScrubQueryParamRegexs(scrubFields);
-
- function redactQueryParam(dummy0, paramPart) {
- return paramPart + _.redact();
+function descriptionToString(desc) {
+ if (!desc || !desc.tagName) {
+ return '';
}
-
- function paramScrubber(v) {
- var i;
- if (_.isType(v, 'string')) {
- for (i = 0; i < queryRes.length; ++i) {
- v = v.replace(queryRes[i], redactQueryParam);
- }
- }
- return v;
+ var out = [desc.tagName];
+ if (desc.id) {
+ out.push('#' + desc.id);
}
-
- function valScrubber(k, v) {
- var i;
- for (i = 0; i < paramRes.length; ++i) {
- if (paramRes[i].test(k)) {
- v = _.redact();
- break;
- }
- }
- return v;
+ if (desc.classes) {
+ out.push('.' + desc.classes.join('.'));
}
-
- function scrubber(k, v, seen) {
- var tmpV = valScrubber(k, v);
- if (tmpV === v) {
- if (_.isType(v, 'object') || _.isType(v, 'array')) {
- return traverse(v, scrubber, seen);
- }
- return paramScrubber(tmpV);
- } else {
- return tmpV;
- }
+ for (var i = 0; i < desc.attributes.length; i++) {
+ out.push(
+ '[' + desc.attributes[i].key + '="' + desc.attributes[i].value + '"]',
+ );
}
- return traverse(data, scrubber);
+ return out.join('');
}
-function scrubPath(obj, path) {
- var keys = path.split('.');
- var last = keys.length - 1;
- try {
- for (var i = 0; i <= last; ++i) {
- if (i < last) {
- obj = obj[keys[i]];
- } else {
- obj[keys[i]] = _.redact();
- }
- }
- } catch (e) {
- // Missing key is OK;
+/**
+ * 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;
}
-}
-
-function _getScrubFieldRegexs(scrubFields) {
- var ret = [];
- var pat;
- for (var i = 0; i < scrubFields.length; ++i) {
- pat = '^\\[?(%5[bB])?' + scrubFields[i] + '\\[?(%5[bB])?\\]?(%5[dD])?$';
- ret.push(new RegExp(pat, 'i'));
+ var out = {},
+ className,
+ key,
+ attr,
+ i;
+ out.tagName = elem.tagName.toLowerCase();
+ if (elem.id) {
+ out.id = elem.id;
}
- return ret;
-}
-
-
-function _getScrubQueryParamRegexs(scrubFields) {
- var ret = [];
- var pat;
- for (var i = 0; i < scrubFields.length; ++i) {
- pat = '\\[?(%5[bB])?' + scrubFields[i] + '\\[?(%5[bB])?\\]?(%5[dD])?';
- ret.push(new RegExp('(' + pat + '=)([^&\\n]+)', 'igm'));
+ className = elem.className;
+ if (className && typeof className === 'string') {
+ out.classes = className.split(/\s+/);
}
- return ret;
+ 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 = scrub;
+module.exports = {
+ describeElement: describeElement,
+ descriptionToString: descriptionToString,
+ elementArrayToString: elementArrayToString,
+ treeToArray: treeToArray,
+ getElementFromEvent: getElementFromEvent,
+ isDescribedElement: isDescribedElement,
+ getElementType: getElementType,
+};
/***/ }),
-/* 5 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
+/***/ 349:
+/***/ ((module) => {
-var _ = __webpack_require__(0);
-
-function traverse(obj, func, seen) {
- var k, v, i;
- var isObj = _.isType(obj, 'object');
- var isArray = _.isType(obj, 'array');
- var keys = [];
- var seenIndex;
+"use strict";
- // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.
- seen = seen || { obj: [], mapped: []};
- if (isObj) {
- seenIndex = seen.obj.indexOf(obj);
+function captureUncaughtExceptions(window, handler, shim) {
+ if (!window) {
+ return;
+ }
+ var oldOnError;
- if (isObj && seenIndex !== -1) {
- // Prefer the mapped object if there is one.
- return seen.mapped[seenIndex] || seen.obj[seenIndex];
+ if (typeof handler._rollbarOldOnError === 'function') {
+ oldOnError = handler._rollbarOldOnError;
+ } else if (window.onerror) {
+ oldOnError = window.onerror;
+ while (oldOnError._rollbarOldOnError) {
+ oldOnError = oldOnError._rollbarOldOnError;
}
+ handler._rollbarOldOnError = oldOnError;
+ }
- seen.obj.push(obj);
- seenIndex = seen.obj.length - 1;
+ handler.handleAnonymousErrors();
+
+ var fn = function () {
+ var args = Array.prototype.slice.call(arguments, 0);
+ _rollbarWindowOnError(window, handler, oldOnError, args);
+ };
+ if (shim) {
+ fn._rollbarOldOnError = oldOnError;
}
+ window.onerror = fn;
+}
- if (isObj) {
- for (k in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, k)) {
- keys.push(k);
- }
+function _rollbarWindowOnError(window, r, old, args) {
+ if (window._rollbarWrappedError) {
+ if (!args[4]) {
+ args[4] = window._rollbarWrappedError;
}
- } else if (isArray) {
- for (i = 0; i < obj.length; ++i) {
- keys.push(i);
+ if (!args[5]) {
+ args[5] = window._rollbarWrappedError._rollbarContext;
}
+ window._rollbarWrappedError = null;
}
- var result = isObj ? {} : [];
- var same = true;
- for (i = 0; i < keys.length; ++i) {
- k = keys[i];
- v = obj[k];
- result[k] = func(k, v, seen);
- same = same && result[k] === obj[k];
- }
+ var ret = r.handleUncaughtException.apply(r, args);
- if (isObj && !same) {
- seen.mapped[seenIndex] = result;
+ if (old) {
+ old.apply(window, args);
}
- return !same ? result : obj;
+ // Let other chained onerror handlers above run before setting this.
+ // If an error is thrown and caught within a chained onerror handler,
+ // Error.prepareStackTrace() will see that one before the one we want.
+ if (ret === 'anonymous') {
+ r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()
+ }
}
-module.exports = traverse;
-
-
-/***/ }),
-/* 6 */
-/***/ (function(module, exports, __webpack_require__) {
-
-module.exports = __webpack_require__(7);
-
-
-/***/ }),
-/* 7 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var rollbar = __webpack_require__(8);
+function captureUnhandledRejections(window, handler, shim) {
+ if (!window) {
+ return;
+ }
-var options = (typeof window !== 'undefined') && window._rollbarConfig;
-var alias = options && options.globalAlias || 'Rollbar';
-var shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;
+ if (
+ typeof window._rollbarURH === 'function' &&
+ window._rollbarURH.belongsToShim
+ ) {
+ window.removeEventListener('unhandledrejection', window._rollbarURH);
+ }
-if ((typeof window !== 'undefined') && !window._rollbarStartTime) {
- window._rollbarStartTime = (new Date()).getTime();
-}
+ var rejectionHandler = function (evt) {
+ var reason, promise, detail;
+ try {
+ reason = evt.reason;
+ } catch (e) {
+ reason = undefined;
+ }
+ try {
+ promise = evt.promise;
+ } catch (e) {
+ promise = '[unhandledrejection] error getting `promise` from event';
+ }
+ try {
+ detail = evt.detail;
+ if (!reason && detail) {
+ reason = detail.reason;
+ promise = detail.promise;
+ }
+ } catch (e) {
+ // Ignore
+ }
+ if (!reason) {
+ reason = '[unhandledrejection] error getting `reason` from event';
+ }
-if (!shimRunning && options) {
- var Rollbar = new rollbar(options);
- window[alias] = Rollbar;
-} else if (typeof window !== 'undefined') {
- window.rollbar = rollbar;
- window._rollbarDidLoad = true;
-} else if (typeof self !== 'undefined') {
- self.rollbar = rollbar;
- self._rollbarDidLoad = true;
+ if (handler && handler.handleUnhandledRejection) {
+ handler.handleUnhandledRejection(reason, promise);
+ }
+ };
+ rejectionHandler.belongsToShim = shim;
+ window._rollbarURH = rejectionHandler;
+ window.addEventListener('unhandledrejection', rejectionHandler);
}
-module.exports = rollbar;
+module.exports = {
+ captureUncaughtExceptions: captureUncaughtExceptions,
+ captureUnhandledRejections: captureUnhandledRejections,
+};
/***/ }),
-/* 8 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var Rollbar = __webpack_require__(9);
-var telemeter = __webpack_require__(29);
-var instrumenter = __webpack_require__(30);
-var polyfillJSON = __webpack_require__(32);
-var wrapGlobals = __webpack_require__(34);
-var scrub = __webpack_require__(4);
-var truncation = __webpack_require__(35);
-
-Rollbar.setComponents({
- telemeter: telemeter,
- instrumenter: instrumenter,
- polyfillJSON: polyfillJSON,
- wrapGlobals: wrapGlobals,
- scrub: scrub,
- truncation: truncation
-});
-
-module.exports = Rollbar;
-
-/***/ }),
-/* 9 */
-/***/ (function(module, exports, __webpack_require__) {
+/***/ 802:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var Client = __webpack_require__(10);
-var _ = __webpack_require__(0);
-var API = __webpack_require__(15);
-var logger = __webpack_require__(1);
-var globals = __webpack_require__(19);
-
-var Transport = __webpack_require__(20);
-var urllib = __webpack_require__(2);
-
-var transforms = __webpack_require__(21);
-var sharedTransforms = __webpack_require__(24);
-var predicates = __webpack_require__(25);
-var sharedPredicates = __webpack_require__(26);
-var errorParser = __webpack_require__(3);
+/* eslint-disable no-console */
+__webpack_require__(276);
+var detection = __webpack_require__(616);
+var _ = __webpack_require__(702);
-function Rollbar(options, client) {
- this.options = _.handleOptions(defaultOptions, options, null, logger);
- this.options._configuredOptions = options;
- var Telemeter = this.components.telemeter;
- var Instrumenter = this.components.instrumenter;
- var polyfillJSON = this.components.polyfillJSON;
- this.wrapGlobals = this.components.wrapGlobals;
- this.scrub = this.components.scrub;
- var truncation = this.components.truncation;
+function error() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ args.unshift('Rollbar:');
+ if (detection.ieVersion() <= 8) {
+ console.error(_.formatArgsAsString(args));
+ } else {
+ console.error.apply(console, args);
+ }
+}
- var transport = new Transport(truncation);
- var api = new API(this.options, transport, urllib, truncation);
- if (Telemeter) {
- this.telemeter = new Telemeter(this.options);
+function info() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ args.unshift('Rollbar:');
+ if (detection.ieVersion() <= 8) {
+ console.info(_.formatArgsAsString(args));
+ } else {
+ console.info.apply(console, args);
}
- this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');
- var gWindow = _gWindow();
- var gDocument = (typeof document != 'undefined') && document;
- this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers
- this.anonymousErrorsPending = 0;
- addTransformsToNotifier(this.client.notifier, this, gWindow);
- addPredicatesToQueue(this.client.queue);
- this.setupUnhandledCapture();
- if (Instrumenter) {
- this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);
- this.instrumenter.instrument();
+}
+
+function log() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ args.unshift('Rollbar:');
+ if (detection.ieVersion() <= 8) {
+ console.log(_.formatArgsAsString(args));
+ } else {
+ console.log.apply(console, args);
}
- _.setupJSON(polyfillJSON);
}
-var _instance = null;
-Rollbar.init = function(options, client) {
- if (_instance) {
- return _instance.global(options).configure(options);
- }
- _instance = new Rollbar(options, client);
- return _instance;
+/* eslint-enable no-console */
+
+module.exports = {
+ error: error,
+ info: info,
+ log: log,
};
-Rollbar.prototype.components = {};
-Rollbar.setComponents = function(components) {
- Rollbar.prototype.components = components;
-}
+/***/ }),
-function handleUninitialized(maybeCallback) {
- var message = 'Rollbar is not initialized';
- logger.error(message);
- if (maybeCallback) {
- maybeCallback(new Error(message));
+/***/ 172:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+var _ = __webpack_require__(702);
+
+function checkIgnore(item, settings) {
+ if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {
+ return !_.get(item, 'body.message.extra.isAjax');
}
+ return true;
}
-Rollbar.prototype.global = function(options) {
- this.client.global(options);
- return this;
-};
-Rollbar.global = function(options) {
- if (_instance) {
- return _instance.global(options);
- } else {
- handleUninitialized();
- }
+module.exports = {
+ checkIgnore: checkIgnore,
};
-Rollbar.prototype.configure = function(options, payloadData) {
- var oldOptions = this.options;
- var payload = {};
- if (payloadData) {
- payload = {payload: payloadData};
- }
- this.options = _.handleOptions(oldOptions, options, payload, logger);
- this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);
- this.client.configure(this.options, payloadData);
- this.instrumenter && this.instrumenter.configure(this.options);
- this.setupUnhandledCapture();
- return this;
-};
-Rollbar.configure = function(options, payloadData) {
- if (_instance) {
- return _instance.configure(options, payloadData);
- } else {
- handleUninitialized();
- }
-};
-Rollbar.prototype.lastError = function() {
- return this.client.lastError;
-};
-Rollbar.lastError = function() {
- if (_instance) {
- return _instance.lastError();
- } else {
- handleUninitialized();
- }
-};
+/***/ }),
-Rollbar.prototype.log = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.log(item);
- return {uuid: uuid};
-};
-Rollbar.log = function() {
- if (_instance) {
- return _instance.log.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
- }
-};
+/***/ 343:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-Rollbar.prototype.debug = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.debug(item);
- return {uuid: uuid};
-};
-Rollbar.debug = function() {
- if (_instance) {
- return _instance.debug.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
- }
-};
+"use strict";
-Rollbar.prototype.info = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.info(item);
- return {uuid: uuid};
-};
-Rollbar.info = function() {
- if (_instance) {
- return _instance.info.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
- }
-};
-Rollbar.prototype.warn = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.warn(item);
- return {uuid: uuid};
-};
-Rollbar.warn = function() {
- if (_instance) {
- return _instance.warn.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
- }
-};
+var Rollbar = __webpack_require__(403);
+var telemeter = __webpack_require__(773);
+var instrumenter = __webpack_require__(568);
+var polyfillJSON = __webpack_require__(876);
+var wrapGlobals = __webpack_require__(965);
+var scrub = __webpack_require__(369);
+var truncation = __webpack_require__(473);
-Rollbar.prototype.warning = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.warning(item);
- return {uuid: uuid};
-};
-Rollbar.warning = function() {
- if (_instance) {
- return _instance.warning.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
- }
-};
+Rollbar.setComponents({
+ telemeter: telemeter,
+ instrumenter: instrumenter,
+ polyfillJSON: polyfillJSON,
+ wrapGlobals: wrapGlobals,
+ scrub: scrub,
+ truncation: truncation,
+});
-Rollbar.prototype.error = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.error(item);
- return {uuid: uuid};
+module.exports = Rollbar;
+
+
+/***/ }),
+
+/***/ 568:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+var _ = __webpack_require__(702);
+var headers = __webpack_require__(650);
+var replace = __webpack_require__(297);
+var scrub = __webpack_require__(369);
+var urlparser = __webpack_require__(509);
+var domUtil = __webpack_require__(300);
+
+var defaults = {
+ network: true,
+ networkResponseHeaders: false,
+ networkResponseBody: false,
+ networkRequestHeaders: false,
+ networkRequestBody: false,
+ networkErrorOnHttp5xx: false,
+ networkErrorOnHttp4xx: false,
+ networkErrorOnHttp0: false,
+ log: true,
+ dom: true,
+ navigation: true,
+ connectivity: true,
+ contentSecurityPolicy: true,
+ errorOnContentSecurityPolicy: false,
};
-Rollbar.error = function() {
- if (_instance) {
- return _instance.error.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
+
+function restore(replacements, type) {
+ var b;
+ while (replacements[type].length) {
+ b = replacements[type].shift();
+ b[0][b[1]] = b[2];
}
-};
+}
-Rollbar.prototype.critical = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.critical(item);
- return {uuid: uuid};
-};
-Rollbar.critical = function() {
- if (_instance) {
- return _instance.critical.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
+function nameFromDescription(description) {
+ if (!description || !description.attributes) {
+ return null;
}
-};
+ var attrs = description.attributes;
+ for (var a = 0; a < attrs.length; ++a) {
+ if (attrs[a].key === 'name') {
+ return attrs[a].value;
+ }
+ }
+ return null;
+}
-Rollbar.prototype.buildJsonPayload = function(item) {
- return this.client.buildJsonPayload(item);
-};
-Rollbar.buildJsonPayload = function() {
- if (_instance) {
- return _instance.buildJsonPayload.apply(_instance, arguments);
- } else {
- handleUninitialized();
+function defaultValueScrubber(scrubFields) {
+ var patterns = [];
+ for (var i = 0; i < scrubFields.length; ++i) {
+ patterns.push(new RegExp(scrubFields[i], 'i'));
}
-};
+ return function (description) {
+ var name = nameFromDescription(description);
+ if (!name) {
+ return false;
+ }
+ for (var i = 0; i < patterns.length; ++i) {
+ if (patterns[i].test(name)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
-Rollbar.prototype.sendJsonPayload = function(jsonPayload) {
- return this.client.sendJsonPayload(jsonPayload);
-};
-Rollbar.sendJsonPayload = function() {
- if (_instance) {
- return _instance.sendJsonPayload.apply(_instance, arguments);
+function Instrumenter(options, telemeter, rollbar, _window, _document) {
+ this.options = options;
+ var autoInstrument = options.autoInstrument;
+ if (options.enabled === false || autoInstrument === false) {
+ this.autoInstrument = {};
} else {
- handleUninitialized();
+ if (!_.isType(autoInstrument, 'object')) {
+ autoInstrument = defaults;
+ }
+ this.autoInstrument = _.merge(defaults, autoInstrument);
}
-};
-
-Rollbar.prototype.setupUnhandledCapture = function() {
- var gWindow = _gWindow();
-
- if (!this.unhandledExceptionsInitialized) {
- if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {
- globals.captureUncaughtExceptions(gWindow, this);
- if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {
- this.wrapGlobals(gWindow, this);
- }
- this.unhandledExceptionsInitialized = true;
+ this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;
+ this.telemetryScrubber = options.telemetryScrubber;
+ this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);
+ this.telemeter = telemeter;
+ this.rollbar = rollbar;
+ this.diagnostic = rollbar.client.notifier.diagnostic;
+ this._window = _window || {};
+ this._document = _document || {};
+ this.replacements = {
+ network: [],
+ log: [],
+ navigation: [],
+ connectivity: [],
+ };
+ this.eventRemovers = {
+ dom: [],
+ connectivity: [],
+ contentsecuritypolicy: [],
+ };
+
+ this._location = this._window.location;
+ this._lastHref = this._location && this._location.href;
+}
+
+Instrumenter.prototype.configure = function (options) {
+ this.options = _.merge(this.options, options);
+ var autoInstrument = options.autoInstrument;
+ var oldSettings = _.merge(this.autoInstrument);
+ if (options.enabled === false || autoInstrument === false) {
+ this.autoInstrument = {};
+ } else {
+ if (!_.isType(autoInstrument, 'object')) {
+ autoInstrument = defaults;
}
+ this.autoInstrument = _.merge(defaults, autoInstrument);
}
- if (!this.unhandledRejectionsInitialized) {
- if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {
- globals.captureUnhandledRejections(gWindow, this);
- this.unhandledRejectionsInitialized = true;
- }
+ this.instrument(oldSettings);
+ if (options.scrubTelemetryInputs !== undefined) {
+ this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;
+ }
+ if (options.telemetryScrubber !== undefined) {
+ this.telemetryScrubber = options.telemetryScrubber;
}
};
-Rollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {
- if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {
- return;
+// eslint-disable-next-line complexity
+Instrumenter.prototype.instrument = function (oldSettings) {
+ if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {
+ this.instrumentNetwork();
+ } else if (
+ !this.autoInstrument.network &&
+ oldSettings &&
+ oldSettings.network
+ ) {
+ this.deinstrumentNetwork();
}
- // Chrome will always send 5+ arguments and error will be valid or null, not undefined.
- // If error is undefined, we have a different caller.
- // Chrome also sends errors from web workers with null error, but does not invoke
- // prepareStackTrace() for these. Test for empty url to skip them.
- if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {
- return 'anonymous';
+ if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {
+ this.instrumentConsole();
+ } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {
+ this.deinstrumentConsole();
}
- var item;
- var stackInfo = _.makeUnhandledStackInfo(
- message,
- url,
- lineno,
- colno,
- error,
- 'onerror',
- 'uncaught exception',
- errorParser
- );
- if (_.isError(error)) {
- item = this._createItem([message, error, context]);
- item._unhandledStackInfo = stackInfo;
- } else if (_.isError(url)) {
- item = this._createItem([message, url, context]);
- item._unhandledStackInfo = stackInfo;
- } else {
- item = this._createItem([message, context]);
- item.stackInfo = stackInfo;
+ if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {
+ this.instrumentDom();
+ } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {
+ this.deinstrumentDom();
}
- item.level = this.options.uncaughtErrorLevel;
- item._isUncaught = true;
- this.client.log(item);
-};
-/**
- * Chrome only. Other browsers will ignore.
- *
- * Use Error.prepareStackTrace to extract information about errors that
- * do not have a valid error object in onerror().
- *
- * In tested version of Chrome, onerror is called first but has no way
- * to communicate with prepareStackTrace. Use a counter to let this
- * handler know which errors to send to Rollbar.
- *
- * In config options, set inspectAnonymousErrors to enable.
- */
-Rollbar.prototype.handleAnonymousErrors = function() {
- if (!this.options.inspectAnonymousErrors || !this.isChrome) {
- return;
+ if (
+ this.autoInstrument.navigation &&
+ !(oldSettings && oldSettings.navigation)
+ ) {
+ this.instrumentNavigation();
+ } else if (
+ !this.autoInstrument.navigation &&
+ oldSettings &&
+ oldSettings.navigation
+ ) {
+ this.deinstrumentNavigation();
}
- var r = this;
- function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars
- if (r.options.inspectAnonymousErrors) {
- if (r.anonymousErrorsPending) {
- // This is the only known way to detect that onerror saw an anonymous error.
- // It depends on onerror reliably being called before Error.prepareStackTrace,
- // which so far holds true on tested versions of Chrome. If versions of Chrome
- // are tested that behave differently, this logic will need to be updated
- // accordingly.
- r.anonymousErrorsPending -= 1;
-
- if (!error) {
- // Not likely to get here, but calling handleUncaughtException from here
- // without an error object would throw off the anonymousErrorsPending counter,
- // so return now.
- return;
- }
-
- // Allow this to be tracked later.
- error._isAnonymous = true;
-
- // url, lineno, colno shouldn't be needed for these errors.
- // If that changes, update this accordingly, using the unused
- // _stack param as needed (rather than parse error.toString()).
- r.handleUncaughtException(error.message, null, null, null, error);
- }
- }
-
- // Workaround to ensure stack is preserved for normal errors.
- return error.stack;
+ if (
+ this.autoInstrument.connectivity &&
+ !(oldSettings && oldSettings.connectivity)
+ ) {
+ this.instrumentConnectivity();
+ } else if (
+ !this.autoInstrument.connectivity &&
+ oldSettings &&
+ oldSettings.connectivity
+ ) {
+ this.deinstrumentConnectivity();
}
- // https://v8.dev/docs/stack-trace-api
- try {
- Error.prepareStackTrace = prepareStackTrace;
- } catch (e) {
- this.options.inspectAnonymousErrors = false;
- this.error('anonymous error handler failed', e);
+ if (
+ this.autoInstrument.contentSecurityPolicy &&
+ !(oldSettings && oldSettings.contentSecurityPolicy)
+ ) {
+ this.instrumentContentSecurityPolicy();
+ } else if (
+ !this.autoInstrument.contentSecurityPolicy &&
+ oldSettings &&
+ oldSettings.contentSecurityPolicy
+ ) {
+ this.deinstrumentContentSecurityPolicy();
}
-}
+};
-Rollbar.prototype.handleUnhandledRejection = function(reason, promise) {
- if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {
- return;
- }
+Instrumenter.prototype.deinstrumentNetwork = function () {
+ restore(this.replacements, 'network');
+};
- var message = 'unhandled rejection was null or undefined!';
- if (reason) {
- if (reason.message) {
- message = reason.message;
- } else {
- var reasonResult = _.stringify(reason);
- if (reasonResult.value) {
- message = reasonResult.value;
- }
+Instrumenter.prototype.instrumentNetwork = function () {
+ var self = this;
+
+ function wrapProp(prop, xhr) {
+ if (prop in xhr && _.isFunction(xhr[prop])) {
+ replace(xhr, prop, function (orig) {
+ return self.rollbar.wrap(orig);
+ });
}
}
- var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);
- var item;
- if (_.isError(reason)) {
- item = this._createItem([message, reason, context]);
- } else {
- item = this._createItem([message, reason, context]);
- item.stackInfo = _.makeUnhandledStackInfo(
- message,
- '',
- 0,
- 0,
- null,
- 'unhandledrejection',
- '',
- errorParser
+ if ('XMLHttpRequest' in this._window) {
+ var xhrp = this._window.XMLHttpRequest.prototype;
+ replace(
+ xhrp,
+ 'open',
+ function (orig) {
+ return function (method, url) {
+ var isUrlObject = _isUrlObject(url);
+ if (_.isType(url, 'string') || isUrlObject) {
+ url = isUrlObject ? url.toString() : url;
+ if (this.__rollbar_xhr) {
+ this.__rollbar_xhr.method = method;
+ this.__rollbar_xhr.url = url;
+ this.__rollbar_xhr.status_code = null;
+ this.__rollbar_xhr.start_time_ms = _.now();
+ this.__rollbar_xhr.end_time_ms = null;
+ } else {
+ this.__rollbar_xhr = {
+ method: method,
+ url: url,
+ status_code: null,
+ start_time_ms: _.now(),
+ end_time_ms: null,
+ };
+ }
+ }
+ return orig.apply(this, arguments);
+ };
+ },
+ this.replacements,
+ 'network',
);
- }
- item.level = this.options.uncaughtErrorLevel;
- item._isUncaught = true;
- item._originalArgs = item._originalArgs || [];
- item._originalArgs.push(promise);
- this.client.log(item);
-};
-
-Rollbar.prototype.wrap = function(f, context, _before) {
- try {
- var ctxFn;
- if(_.isFunction(context)) {
- ctxFn = context;
- } else {
- ctxFn = function() { return context || {}; };
- }
-
- if (!_.isFunction(f)) {
- return f;
- }
- if (f._isWrap) {
- return f;
- }
+ replace(
+ xhrp,
+ 'setRequestHeader',
+ function (orig) {
+ return function (header, value) {
+ // If xhr.open is async, __rollbar_xhr may not be initialized yet.
+ if (!this.__rollbar_xhr) {
+ this.__rollbar_xhr = {};
+ }
+ if (_.isType(header, 'string') && _.isType(value, 'string')) {
+ if (self.autoInstrument.networkRequestHeaders) {
+ if (!this.__rollbar_xhr.request_headers) {
+ this.__rollbar_xhr.request_headers = {};
+ }
+ this.__rollbar_xhr.request_headers[header] = value;
+ }
+ // We want the content type even if request header telemetry is off.
+ if (header.toLowerCase() === 'content-type') {
+ this.__rollbar_xhr.request_content_type = value;
+ }
+ }
+ return orig.apply(this, arguments);
+ };
+ },
+ this.replacements,
+ 'network',
+ );
- if (!f._rollbar_wrapped) {
- f._rollbar_wrapped = function () {
- if (_before && _.isFunction(_before)) {
- _before.apply(this, arguments);
- }
- try {
- return f.apply(this, arguments);
- } catch(exc) {
- var e = exc;
- if (e && window._rollbarWrappedError !== e) {
- if (_.isType(e, 'string')) {
- e = new String(e);
+ replace(
+ xhrp,
+ 'send',
+ function (orig) {
+ /* eslint-disable no-unused-vars */
+ return function (data) {
+ /* eslint-enable no-unused-vars */
+ var xhr = this;
+
+ function onreadystatechangeHandler() {
+ if (xhr.__rollbar_xhr) {
+ if (xhr.__rollbar_xhr.status_code === null) {
+ xhr.__rollbar_xhr.status_code = 0;
+ if (self.autoInstrument.networkRequestBody) {
+ xhr.__rollbar_xhr.request = data;
+ }
+ xhr.__rollbar_event = self.captureNetwork(
+ xhr.__rollbar_xhr,
+ 'xhr',
+ undefined,
+ );
+ }
+ if (xhr.readyState < 2) {
+ xhr.__rollbar_xhr.start_time_ms = _.now();
+ }
+ if (xhr.readyState > 3) {
+ xhr.__rollbar_xhr.end_time_ms = _.now();
+
+ var headers = null;
+ xhr.__rollbar_xhr.response_content_type =
+ xhr.getResponseHeader('Content-Type');
+ if (self.autoInstrument.networkResponseHeaders) {
+ var headersConfig =
+ self.autoInstrument.networkResponseHeaders;
+ headers = {};
+ try {
+ var header, i;
+ if (headersConfig === true) {
+ var allHeaders = xhr.getAllResponseHeaders();
+ if (allHeaders) {
+ var arr = allHeaders.trim().split(/[\r\n]+/);
+ var parts, value;
+ for (i = 0; i < arr.length; i++) {
+ parts = arr[i].split(': ');
+ header = parts.shift();
+ value = parts.join(': ');
+ headers[header] = value;
+ }
+ }
+ } else {
+ for (i = 0; i < headersConfig.length; i++) {
+ header = headersConfig[i];
+ headers[header] = xhr.getResponseHeader(header);
+ }
+ }
+ } catch (e) {
+ /* we ignore the errors here that could come from different
+ * browser issues with the xhr methods */
+ }
+ }
+ var body = null;
+ if (self.autoInstrument.networkResponseBody) {
+ try {
+ body = xhr.responseText;
+ } catch (e) {
+ /* ignore errors from reading responseText */
+ }
+ }
+ var response = null;
+ if (body || headers) {
+ response = {};
+ if (body) {
+ if (
+ self.isJsonContentType(
+ xhr.__rollbar_xhr.response_content_type,
+ )
+ ) {
+ response.body = self.scrubJson(body);
+ } else {
+ response.body = body;
+ }
+ }
+ if (headers) {
+ response.headers = headers;
+ }
+ }
+ if (response) {
+ xhr.__rollbar_xhr.response = response;
+ }
+ try {
+ var code = xhr.status;
+ code = code === 1223 ? 204 : code;
+ xhr.__rollbar_xhr.status_code = code;
+ xhr.__rollbar_event.level =
+ self.telemeter.levelFromStatus(code);
+ self.errorOnHttpStatus(xhr.__rollbar_xhr);
+ } catch (e) {
+ /* ignore possible exception from xhr.status */
+ }
+ }
}
- e._rollbarContext = ctxFn() || {};
- e._rollbarContext._wrappedSource = f.toString();
+ }
- window._rollbarWrappedError = e;
+ wrapProp('onload', xhr);
+ wrapProp('onerror', xhr);
+ wrapProp('onprogress', xhr);
+
+ if (
+ 'onreadystatechange' in xhr &&
+ _.isFunction(xhr.onreadystatechange)
+ ) {
+ replace(xhr, 'onreadystatechange', function (orig) {
+ return self.rollbar.wrap(
+ orig,
+ undefined,
+ onreadystatechangeHandler,
+ );
+ });
+ } else {
+ xhr.onreadystatechange = onreadystatechangeHandler;
}
- throw e;
- }
- };
+ if (xhr.__rollbar_xhr && self.trackHttpErrors()) {
+ xhr.__rollbar_xhr.stack = new Error().stack;
+ }
+ return orig.apply(this, arguments);
+ };
+ },
+ this.replacements,
+ 'network',
+ );
+ }
- f._rollbar_wrapped._isWrap = true;
+ if ('fetch' in this._window) {
+ replace(
+ this._window,
+ 'fetch',
+ function (orig) {
+ /* eslint-disable no-unused-vars */
+ return function (fn, t) {
+ /* eslint-enable no-unused-vars */
+ var args = new Array(arguments.length);
+ for (var i = 0, len = args.length; i < len; i++) {
+ args[i] = arguments[i];
+ }
+ var input = args[0];
+ var method = 'GET';
+ var url;
+ var isUrlObject = _isUrlObject(input);
+ if (_.isType(input, 'string') || isUrlObject) {
+ url = isUrlObject ? input.toString() : input;
+ } else if (input) {
+ url = input.url;
+ if (input.method) {
+ method = input.method;
+ }
+ }
+ if (args[1] && args[1].method) {
+ method = args[1].method;
+ }
+ var metadata = {
+ method: method,
+ url: url,
+ status_code: null,
+ start_time_ms: _.now(),
+ end_time_ms: null,
+ };
+ if (args[1] && args[1].headers) {
+ // Argument may be a Headers object, or plain object. Ensure here that
+ // we are working with a Headers object with case-insensitive keys.
+ var reqHeaders = headers(args[1].headers);
+
+ metadata.request_content_type = reqHeaders.get('Content-Type');
+
+ if (self.autoInstrument.networkRequestHeaders) {
+ metadata.request_headers = self.fetchHeaders(
+ reqHeaders,
+ self.autoInstrument.networkRequestHeaders,
+ );
+ }
+ }
- if (f.hasOwnProperty) {
- for (var prop in f) {
- if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {
- f._rollbar_wrapped[prop] = f[prop];
+ if (self.autoInstrument.networkRequestBody) {
+ if (args[1] && args[1].body) {
+ metadata.request = args[1].body;
+ } else if (
+ args[0] &&
+ !_.isType(args[0], 'string') &&
+ args[0].body
+ ) {
+ metadata.request = args[0].body;
+ }
+ }
+ self.captureNetwork(metadata, 'fetch', undefined);
+ if (self.trackHttpErrors()) {
+ metadata.stack = new Error().stack;
}
- }
- }
- }
- return f._rollbar_wrapped;
- } catch (e) {
- // Return the original function if the wrap fails.
- return f;
+ // Start our handler before returning the promise. This allows resp.clone()
+ // to execute before other handlers touch the response.
+ return orig.apply(this, args).then(function (resp) {
+ metadata.end_time_ms = _.now();
+ metadata.status_code = resp.status;
+ metadata.response_content_type = resp.headers.get('Content-Type');
+ var headers = null;
+ if (self.autoInstrument.networkResponseHeaders) {
+ headers = self.fetchHeaders(
+ resp.headers,
+ self.autoInstrument.networkResponseHeaders,
+ );
+ }
+ var body = null;
+ if (self.autoInstrument.networkResponseBody) {
+ if (typeof resp.text === 'function') {
+ // Response.text() is not implemented on some platforms
+ // The response must be cloned to prevent reading (and locking) the original stream.
+ // This must be done before other handlers touch the response.
+ body = resp.clone().text(); //returns a Promise
+ }
+ }
+ if (headers || body) {
+ metadata.response = {};
+ if (body) {
+ // Test to ensure body is a Promise, which it should always be.
+ if (typeof body.then === 'function') {
+ body.then(function (text) {
+ if (
+ text &&
+ self.isJsonContentType(metadata.response_content_type)
+ ) {
+ metadata.response.body = self.scrubJson(text);
+ } else {
+ metadata.response.body = text;
+ }
+ });
+ } else {
+ metadata.response.body = body;
+ }
+ }
+ if (headers) {
+ metadata.response.headers = headers;
+ }
+ }
+ self.errorOnHttpStatus(metadata);
+ return resp;
+ });
+ };
+ },
+ this.replacements,
+ 'network',
+ );
}
};
-Rollbar.wrap = function(f, context) {
- if (_instance) {
- return _instance.wrap(f, context);
- } else {
- handleUninitialized();
+
+Instrumenter.prototype.captureNetwork = function (
+ metadata,
+ subtype,
+ rollbarUUID,
+) {
+ if (
+ metadata.request &&
+ this.isJsonContentType(metadata.request_content_type)
+ ) {
+ metadata.request = this.scrubJson(metadata.request);
}
+ return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);
};
-Rollbar.prototype.captureEvent = function() {
- var event = _.createTelemetryEvent(arguments);
- return this.client.captureEvent(event.type, event.metadata, event.level);
-};
-Rollbar.captureEvent = function() {
- if (_instance) {
- return _instance.captureEvent.apply(_instance, arguments);
- } else {
- handleUninitialized();
- }
+Instrumenter.prototype.isJsonContentType = function (contentType) {
+ return contentType &&
+ _.isType(contentType, 'string') &&
+ contentType.toLowerCase().includes('json')
+ ? true
+ : false;
};
-// The following two methods are used internally and are not meant for public use
-Rollbar.prototype.captureDomContentLoaded = function(e, ts) {
- if (!ts) {
- ts = new Date();
- }
- return this.client.captureDomContentLoaded(ts);
+Instrumenter.prototype.scrubJson = function (json) {
+ return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));
};
-Rollbar.prototype.captureLoad = function(e, ts) {
- if (!ts) {
- ts = new Date();
+Instrumenter.prototype.fetchHeaders = function (inHeaders, headersConfig) {
+ var outHeaders = {};
+ try {
+ var i;
+ if (headersConfig === true) {
+ if (typeof inHeaders.entries === 'function') {
+ // Headers.entries() is not implemented in IE
+ var allHeaders = inHeaders.entries();
+ var currentHeader = allHeaders.next();
+ while (!currentHeader.done) {
+ outHeaders[currentHeader.value[0]] = currentHeader.value[1];
+ currentHeader = allHeaders.next();
+ }
+ }
+ } else {
+ for (i = 0; i < headersConfig.length; i++) {
+ var header = headersConfig[i];
+ outHeaders[header] = inHeaders.get(header);
+ }
+ }
+ } catch (e) {
+ /* ignore probable IE errors */
}
- return this.client.captureLoad(ts);
+ return outHeaders;
};
-/* Internal */
-
-function addTransformsToNotifier(notifier, rollbar, gWindow) {
- notifier
- .addTransform(transforms.handleDomException)
- .addTransform(transforms.handleItemWithError)
- .addTransform(transforms.ensureItemHasSomethingToSay)
- .addTransform(transforms.addBaseInfo)
- .addTransform(transforms.addRequestInfo(gWindow))
- .addTransform(transforms.addClientInfo(gWindow))
- .addTransform(transforms.addPluginInfo(gWindow))
- .addTransform(transforms.addBody)
- .addTransform(sharedTransforms.addMessageWithError)
- .addTransform(sharedTransforms.addTelemetryData)
- .addTransform(sharedTransforms.addConfigToPayload)
- .addTransform(transforms.addScrubber(rollbar.scrub))
- .addTransform(sharedTransforms.userTransform(logger))
- .addTransform(sharedTransforms.addConfiguredOptions)
- .addTransform(sharedTransforms.addDiagnosticKeys)
- .addTransform(sharedTransforms.itemToPayload);
-}
+Instrumenter.prototype.trackHttpErrors = function () {
+ return (
+ this.autoInstrument.networkErrorOnHttp5xx ||
+ this.autoInstrument.networkErrorOnHttp4xx ||
+ this.autoInstrument.networkErrorOnHttp0
+ );
+};
-function addPredicatesToQueue(queue) {
- queue
- .addPredicate(sharedPredicates.checkLevel)
- .addPredicate(predicates.checkIgnore)
- .addPredicate(sharedPredicates.userCheckIgnore(logger))
- .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))
- .addPredicate(sharedPredicates.urlIsSafeListed(logger))
- .addPredicate(sharedPredicates.messageIsIgnored(logger));
-}
+Instrumenter.prototype.errorOnHttpStatus = function (metadata) {
+ var status = metadata.status_code;
-Rollbar.prototype.loadFull = function() {
- logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');
+ if (
+ (status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||
+ (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||
+ (status === 0 && this.autoInstrument.networkErrorOnHttp0)
+ ) {
+ var error = new Error('HTTP request failed with Status ' + status);
+ error.stack = metadata.stack;
+ this.rollbar.error(error, { skipFrames: 1 });
+ }
};
-Rollbar.prototype._createItem = function(args) {
- return _.createItem(args, logger, this);
+Instrumenter.prototype.deinstrumentConsole = function () {
+ if (!('console' in this._window && this._window.console.log)) {
+ return;
+ }
+ var b;
+ while (this.replacements['log'].length) {
+ b = this.replacements['log'].shift();
+ this._window.console[b[0]] = b[1];
+ }
};
-function _getFirstFunction(args) {
- for (var i = 0, len = args.length; i < len; ++i) {
- if (_.isFunction(args[i])) {
- return args[i];
- }
+Instrumenter.prototype.instrumentConsole = function () {
+ if (!('console' in this._window && this._window.console.log)) {
+ return;
}
- return undefined;
-}
-function _gWindow() {
- return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);
-}
+ var self = this;
+ var c = this._window.console;
-var defaults = __webpack_require__(27);
-var scrubFields = __webpack_require__(28);
+ function wrapConsole(method) {
+ 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778
-var defaultOptions = {
- version: defaults.version,
- scrubFields: scrubFields.scrubFields,
- logLevel: defaults.logLevel,
- reportLevel: defaults.reportLevel,
- uncaughtErrorLevel: defaults.uncaughtErrorLevel,
- endpoint: defaults.endpoint,
- verbose: false,
- enabled: true,
- transmit: true,
- sendConfig: false,
- includeItemsInTelemetry: true,
- captureIp: true,
- inspectAnonymousErrors: true,
- ignoreDuplicateErrors: true,
- wrapGlobalEventHandlers: false
+ var orig = c[method];
+ var origConsole = c;
+ var level = method === 'warn' ? 'warning' : method;
+ c[method] = function () {
+ var args = Array.prototype.slice.call(arguments);
+ var message = _.formatArgsAsString(args);
+ self.telemeter.captureLog(message, level);
+ if (orig) {
+ Function.prototype.apply.call(orig, origConsole, args);
+ }
+ };
+ self.replacements['log'].push([method, orig]);
+ }
+ var methods = ['debug', 'info', 'warn', 'error', 'log'];
+ try {
+ for (var i = 0, len = methods.length; i < len; i++) {
+ wrapConsole(methods[i]);
+ }
+ } catch (e) {
+ this.diagnostic.instrumentConsole = { error: e.message };
+ }
};
-module.exports = Rollbar;
-
-
-/***/ }),
-/* 10 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var RateLimiter = __webpack_require__(11);
-var Queue = __webpack_require__(13);
-var Notifier = __webpack_require__(14);
-var _ = __webpack_require__(0);
-
-/*
- * Rollbar - the interface to Rollbar
- *
- * @param options
- * @param api
- * @param logger
- */
-function Rollbar(options, api, logger, telemeter, platform) {
- this.options = _.merge(options);
- this.logger = logger;
- Rollbar.rateLimiter.configureGlobal(this.options);
- Rollbar.rateLimiter.setPlatformOptions(platform, this.options);
- this.api = api;
- this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);
-
- // This must happen before the Notifier is created
- var tracer = this.options.tracer || null;
- if (validateTracer(tracer)) {
- this.tracer = tracer;
- // set to a string for api response serialization
- this.options.tracer = 'opentracing-tracer-enabled';
- this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';
- } else {
- this.tracer = null;
+Instrumenter.prototype.deinstrumentDom = function () {
+ if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {
+ return;
}
-
- this.notifier = new Notifier(this.queue, this.options);
- this.telemeter = telemeter;
- setStackTraceLimit(options);
- this.lastError = null;
- this.lastErrorHash = 'none';
-}
-
-var defaultOptions = {
- maxItems: 0,
- itemsPerMinute: 60
+ this.removeListeners('dom');
};
-Rollbar.rateLimiter = new RateLimiter(defaultOptions);
-
-Rollbar.prototype.global = function (options) {
- Rollbar.rateLimiter.configureGlobal(options);
- return this;
+Instrumenter.prototype.instrumentDom = function () {
+ if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {
+ return;
+ }
+ var clickHandler = this.handleClick.bind(this);
+ var blurHandler = this.handleBlur.bind(this);
+ this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);
+ this.addListener(
+ 'dom',
+ this._window,
+ 'blur',
+ 'onfocusout',
+ blurHandler,
+ true,
+ );
};
-Rollbar.prototype.configure = function (options, payloadData) {
- var oldOptions = this.options;
- var payload = {};
- if (payloadData) {
- payload = { payload: payloadData };
+Instrumenter.prototype.handleClick = function (evt) {
+ try {
+ var e = domUtil.getElementFromEvent(evt, this._document);
+ var hasTag = e && e.tagName;
+ 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 (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {
+ this.captureDomEvent('input', e, e.value, e.checked);
+ }
+ } catch (exc) {
+ // TODO: Not sure what to do here
}
+};
- this.options = _.merge(oldOptions, options, payload);
-
- // This must happen before the Notifier is configured
- var tracer = this.options.tracer || null;
- if (validateTracer(tracer)) {
- this.tracer = tracer;
- // set to a string for api response serialization
- this.options.tracer = 'opentracing-tracer-enabled';
- this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';
- } else {
- this.tracer = null;
+Instrumenter.prototype.handleBlur = function (evt) {
+ try {
+ var e = domUtil.getElementFromEvent(evt, this._document);
+ if (e && e.tagName) {
+ if (domUtil.isDescribedElement(e, 'textarea')) {
+ this.captureDomEvent('input', e, e.value);
+ } else if (
+ domUtil.isDescribedElement(e, 'select') &&
+ e.options &&
+ e.options.length
+ ) {
+ this.handleSelectInputChanged(e);
+ } else if (
+ domUtil.isDescribedElement(e, 'input') &&
+ !domUtil.isDescribedElement(e, 'input', [
+ 'button',
+ 'submit',
+ 'hidden',
+ 'checkbox',
+ 'radio',
+ ])
+ ) {
+ this.captureDomEvent('input', e, e.value);
+ }
+ }
+ } catch (exc) {
+ // TODO: Not sure what to do here
}
+};
- this.notifier && this.notifier.configure(this.options);
- this.telemeter && this.telemeter.configure(this.options);
- setStackTraceLimit(options);
- this.global(this.options);
-
- if (validateTracer(options.tracer)) {
- this.tracer = options.tracer
+Instrumenter.prototype.handleSelectInputChanged = function (elem) {
+ if (elem.multiple) {
+ for (var i = 0; i < elem.options.length; i++) {
+ if (elem.options[i].selected) {
+ this.captureDomEvent('input', elem, elem.options[i].value);
+ }
+ }
+ } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {
+ this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);
}
-
- return this;
};
-Rollbar.prototype.log = function (item) {
- var level = this._defaultLogLevel();
- return this._log(level, item);
+Instrumenter.prototype.captureDomEvent = function (
+ subtype,
+ element,
+ value,
+ isChecked,
+) {
+ if (value !== undefined) {
+ if (
+ this.scrubTelemetryInputs ||
+ domUtil.getElementType(element) === 'password'
+ ) {
+ value = '[scrubbed]';
+ } else {
+ var description = domUtil.describeElement(element);
+ if (this.telemetryScrubber) {
+ if (this.telemetryScrubber(description)) {
+ value = '[scrubbed]';
+ }
+ } else if (this.defaultValueScrubber(description)) {
+ value = '[scrubbed]';
+ }
+ }
+ }
+ var elementString = domUtil.elementArrayToString(
+ domUtil.treeToArray(element),
+ );
+ this.telemeter.captureDom(subtype, elementString, value, isChecked);
};
-Rollbar.prototype.debug = function (item) {
- this._log('debug', item);
+Instrumenter.prototype.deinstrumentNavigation = function () {
+ var chrome = this._window.chrome;
+ var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;
+ // See https://github.com/angular/angular.js/pull/13945/files
+ var hasPushState =
+ !chromePackagedApp &&
+ this._window.history &&
+ this._window.history.pushState;
+ if (!hasPushState) {
+ return;
+ }
+ restore(this.replacements, 'navigation');
};
-Rollbar.prototype.info = function (item) {
- this._log('info', item);
-};
+Instrumenter.prototype.instrumentNavigation = function () {
+ var chrome = this._window.chrome;
+ var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;
+ // See https://github.com/angular/angular.js/pull/13945/files
+ var hasPushState =
+ !chromePackagedApp &&
+ this._window.history &&
+ this._window.history.pushState;
+ if (!hasPushState) {
+ return;
+ }
+ var self = this;
+ replace(
+ this._window,
+ 'onpopstate',
+ function (orig) {
+ return function () {
+ var current = self._location.href;
+ self.handleUrlChange(self._lastHref, current);
+ if (orig) {
+ orig.apply(this, arguments);
+ }
+ };
+ },
+ this.replacements,
+ 'navigation',
+ );
-Rollbar.prototype.warn = function (item) {
- this._log('warning', item);
+ replace(
+ this._window.history,
+ 'pushState',
+ function (orig) {
+ return function () {
+ var url = arguments.length > 2 ? arguments[2] : undefined;
+ if (url) {
+ self.handleUrlChange(self._lastHref, url + '');
+ }
+ return orig.apply(this, arguments);
+ };
+ },
+ this.replacements,
+ 'navigation',
+ );
};
-Rollbar.prototype.warning = function (item) {
- this._log('warning', item);
+Instrumenter.prototype.handleUrlChange = function (from, to) {
+ var parsedHref = urlparser.parse(this._location.href);
+ var parsedTo = urlparser.parse(to);
+ var parsedFrom = urlparser.parse(from);
+ this._lastHref = to;
+ if (
+ parsedHref.protocol === parsedTo.protocol &&
+ parsedHref.host === parsedTo.host
+ ) {
+ to = parsedTo.path + (parsedTo.hash || '');
+ }
+ if (
+ parsedHref.protocol === parsedFrom.protocol &&
+ parsedHref.host === parsedFrom.host
+ ) {
+ from = parsedFrom.path + (parsedFrom.hash || '');
+ }
+ this.telemeter.captureNavigation(from, to);
};
-Rollbar.prototype.error = function (item) {
- this._log('error', item);
+Instrumenter.prototype.deinstrumentConnectivity = function () {
+ if (!('addEventListener' in this._window || 'body' in this._document)) {
+ return;
+ }
+ if (this._window.addEventListener) {
+ this.removeListeners('connectivity');
+ } else {
+ restore(this.replacements, 'connectivity');
+ }
};
-Rollbar.prototype.critical = function (item) {
- this._log('critical', item);
+Instrumenter.prototype.instrumentConnectivity = function () {
+ if (!('addEventListener' in this._window || 'body' in this._document)) {
+ return;
+ }
+ if (this._window.addEventListener) {
+ this.addListener(
+ 'connectivity',
+ this._window,
+ 'online',
+ undefined,
+ function () {
+ this.telemeter.captureConnectivityChange('online');
+ }.bind(this),
+ true,
+ );
+ this.addListener(
+ 'connectivity',
+ this._window,
+ 'offline',
+ undefined,
+ function () {
+ this.telemeter.captureConnectivityChange('offline');
+ }.bind(this),
+ true,
+ );
+ } else {
+ var self = this;
+ replace(
+ this._document.body,
+ 'ononline',
+ function (orig) {
+ return function () {
+ self.telemeter.captureConnectivityChange('online');
+ if (orig) {
+ orig.apply(this, arguments);
+ }
+ };
+ },
+ this.replacements,
+ 'connectivity',
+ );
+ replace(
+ this._document.body,
+ 'onoffline',
+ function (orig) {
+ return function () {
+ self.telemeter.captureConnectivityChange('offline');
+ if (orig) {
+ orig.apply(this, arguments);
+ }
+ };
+ },
+ this.replacements,
+ 'connectivity',
+ );
+ }
};
-Rollbar.prototype.wait = function (callback) {
- this.queue.wait(callback);
-};
+Instrumenter.prototype.handleCspEvent = function (cspEvent) {
+ var message =
+ 'Security Policy Violation: ' +
+ 'blockedURI: ' +
+ cspEvent.blockedURI +
+ ', ' +
+ 'violatedDirective: ' +
+ cspEvent.violatedDirective +
+ ', ' +
+ 'effectiveDirective: ' +
+ cspEvent.effectiveDirective +
+ ', ';
-Rollbar.prototype.captureEvent = function (type, metadata, level) {
- return this.telemeter && this.telemeter.captureEvent(type, metadata, level);
-};
+ if (cspEvent.sourceFile) {
+ message +=
+ 'location: ' +
+ cspEvent.sourceFile +
+ ', ' +
+ 'line: ' +
+ cspEvent.lineNumber +
+ ', ' +
+ 'col: ' +
+ cspEvent.columnNumber +
+ ', ';
+ }
-Rollbar.prototype.captureDomContentLoaded = function (ts) {
- return this.telemeter && this.telemeter.captureDomContentLoaded(ts);
-};
+ message += 'originalPolicy: ' + cspEvent.originalPolicy;
-Rollbar.prototype.captureLoad = function (ts) {
- return this.telemeter && this.telemeter.captureLoad(ts);
+ this.telemeter.captureLog(message, 'error');
+ this.handleCspError(message);
};
-Rollbar.prototype.buildJsonPayload = function (item) {
- return this.api.buildJsonPayload(item);
+Instrumenter.prototype.handleCspError = function (message) {
+ if (this.autoInstrument.errorOnContentSecurityPolicy) {
+ this.rollbar.error(message);
+ }
};
-Rollbar.prototype.sendJsonPayload = function (jsonPayload) {
- this.api.postJsonPayload(jsonPayload);
-};
+Instrumenter.prototype.deinstrumentContentSecurityPolicy = function () {
+ if (!('addEventListener' in this._document)) {
+ return;
+ }
-/* Internal */
+ this.removeListeners('contentsecuritypolicy');
+};
-Rollbar.prototype._log = function (defaultLevel, item) {
- var callback;
- if (item.callback) {
- callback = item.callback;
- delete item.callback;
- }
- if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {
- if (callback) {
- var error = new Error('ignored identical item');
- error.item = item;
- callback(error);
- }
+Instrumenter.prototype.instrumentContentSecurityPolicy = function () {
+ if (!('addEventListener' in this._document)) {
return;
}
- try {
- this._addTracingInfo(item);
- item.level = item.level || defaultLevel;
- this.telemeter && this.telemeter._captureRollbarItem(item);
- item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];
- this.notifier.log(item, callback);
- } catch (e) {
- if (callback) {
- callback(e);
- }
- this.logger.error(e);
- }
-};
-Rollbar.prototype._defaultLogLevel = function () {
- return this.options.logLevel || 'debug';
+ var cspHandler = this.handleCspEvent.bind(this);
+ this.addListener(
+ 'contentsecuritypolicy',
+ this._document,
+ 'securitypolicyviolation',
+ null,
+ cspHandler,
+ false,
+ );
};
-Rollbar.prototype._sameAsLastError = function (item) {
- if (!item._isUncaught) {
- return false;
+Instrumenter.prototype.addListener = function (
+ section,
+ obj,
+ type,
+ altType,
+ handler,
+ capture,
+) {
+ if (obj.addEventListener) {
+ obj.addEventListener(type, handler, capture);
+ this.eventRemovers[section].push(function () {
+ obj.removeEventListener(type, handler, capture);
+ });
+ } else if (altType) {
+ obj.attachEvent(altType, handler);
+ this.eventRemovers[section].push(function () {
+ obj.detachEvent(altType, handler);
+ });
}
- var itemHash = generateItemHash(item);
- if (this.lastErrorHash === itemHash) {
- return true;
+};
+
+Instrumenter.prototype.removeListeners = function (section) {
+ var r;
+ while (this.eventRemovers[section].length) {
+ r = this.eventRemovers[section].shift();
+ r();
}
- this.lastError = item.err;
- this.lastErrorHash = itemHash;
- return false;
};
-Rollbar.prototype._addTracingInfo = function (item) {
- // Tracer validation occurs in the constructor
- // or in the Rollbar.prototype.configure methods
- if (this.tracer) {
- // add rollbar occurrence uuid to span
- var span = this.tracer.scope().active();
+function _isUrlObject(input) {
+ return typeof URL !== 'undefined' && input instanceof URL;
+}
- if (validateSpan(span)) {
- span.setTag('rollbar.error_uuid', item.uuid);
- span.setTag('rollbar.has_error', true);
- span.setTag('error', true);
- span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);
- span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);
+module.exports = Instrumenter;
- // add span ID & trace ID to occurrence
- var opentracingSpanId = span.context().toSpanId();
- var opentracingTraceId = span.context().toTraceId();
- if (item.custom) {
- item.custom.opentracing_span_id = opentracingSpanId;
- item.custom.opentracing_trace_id = opentracingTraceId;
- } else {
- item.custom = {
- opentracing_span_id: opentracingSpanId,
- opentracing_trace_id: opentracingTraceId
- };
- }
- }
- }
-}
+/***/ }),
-function generateItemHash(item) {
- var message = item.message || '';
- var stack = (item.err || {}).stack || String(item.err);
- return message + '::' + stack;
-}
+/***/ 860:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-// Node.js, Chrome, Safari, and some other browsers support this property
-// which globally sets the number of stack frames returned in an Error object.
-// If a browser can't use it, no harm done.
-function setStackTraceLimit(options) {
- if (options.stackTraceLimit) {
- Error.stackTraceLimit = options.stackTraceLimit;
- }
-}
+"use strict";
-/**
- * Validate the Tracer object provided to the Client
- * is valid for our Opentracing use case.
- * @param {opentracer.Tracer} tracer
- */
-function validateTracer(tracer) {
- if (!tracer) {
- return false;
- }
- if (!tracer.scope || typeof tracer.scope !== 'function') {
- return false;
+var _ = __webpack_require__(702);
+var errorParser = __webpack_require__(303);
+var logger = __webpack_require__(802);
+
+function handleDomException(item, options, callback) {
+ if (item.err && errorParser.Stack(item.err).name === 'DOMException') {
+ var originalError = new Error();
+ originalError.name = item.err.name;
+ originalError.message = item.err.message;
+ originalError.stack = item.err.stack;
+ originalError.nested = item.err;
+ item.err = originalError;
}
+ callback(null, item);
+}
- var scope = tracer.scope();
+function handleItemWithError(item, options, callback) {
+ item.data = item.data || {};
+ if (item.err) {
+ try {
+ item.stackInfo =
+ item.err._savedStackTrace ||
+ errorParser.parse(item.err, item.skipFrames);
- if (!scope || !scope.active || typeof scope.active !== 'function') {
- return false;
+ if (options.addErrorContext) {
+ addErrorContext(item);
+ }
+ } catch (e) {
+ logger.error('Error while parsing the error object.', e);
+ try {
+ item.message =
+ item.err.message ||
+ item.err.description ||
+ item.message ||
+ String(item.err);
+ } catch (e2) {
+ item.message = String(item.err) || String(e2);
+ }
+ delete item.err;
+ }
}
-
- return true;
+ callback(null, item);
}
-/**
- * Validate the Span object provided
- * @param {opentracer.Span} span
- */
-function validateSpan(span) {
- if (!span || !span.context || typeof span.context !== 'function') {
- return false;
- }
+function addErrorContext(item) {
+ var chain = [];
+ var err = item.err;
- var spanContext = span.context();
+ chain.push(err);
- if (!spanContext
- || !spanContext.toSpanId
- || !spanContext.toTraceId
- || typeof spanContext.toSpanId !== 'function'
- || typeof spanContext.toTraceId !== 'function') {
- return false
+ while (err.nested || err.cause) {
+ err = err.nested || err.cause;
+ chain.push(err);
}
- return true;
+ _.addErrorContext(item, chain);
}
-module.exports = Rollbar;
+function ensureItemHasSomethingToSay(item, options, callback) {
+ if (!item.message && !item.stackInfo && !item.custom) {
+ callback(new Error('No message, stack info, or custom data'), null);
+ }
+ callback(null, item);
+}
+function addBaseInfo(item, options, callback) {
+ var environment =
+ (options.payload && options.payload.environment) || options.environment;
+ item.data = _.merge(item.data, {
+ environment: environment,
+ level: item.level,
+ endpoint: options.endpoint,
+ platform: 'browser',
+ framework: 'browser-js',
+ language: 'javascript',
+ server: {},
+ uuid: item.uuid,
+ notifier: {
+ name: 'rollbar-browser-js',
+ version: options.version,
+ },
+ custom: item.custom,
+ });
+ callback(null, item);
+}
-/***/ }),
-/* 11 */
-/***/ (function(module, exports, __webpack_require__) {
+function addRequestInfo(window) {
+ return function (item, options, callback) {
+ var requestInfo = {};
-"use strict";
+ if (window && window.location) {
+ requestInfo.url = window.location.href;
+ requestInfo.query_string = window.location.search;
+ }
+ var remoteString = '$remote_ip';
+ if (!options.captureIp) {
+ remoteString = null;
+ } else if (options.captureIp !== true) {
+ remoteString += '_anonymize';
+ }
+ if (remoteString) requestInfo.user_ip = remoteString;
-var _ = __webpack_require__(0);
+ if (Object.keys(requestInfo).length > 0) {
+ _.set(item, 'data.request', requestInfo);
+ }
-/*
- * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar
- *
- * @param options - the same options that are accepted by configureGlobal offered as a convenience
- */
-function RateLimiter(options) {
- this.startTime = _.now();
- this.counter = 0;
- this.perMinCounter = 0;
- this.platform = null;
- this.platformOptions = {};
- this.configureGlobal(options);
+ callback(null, item);
+ };
}
-RateLimiter.globalSettings = {
- startTime: _.now(),
- maxItems: undefined,
- itemsPerMinute: undefined
-};
+function addClientInfo(window) {
+ return function (item, options, callback) {
+ if (!window) {
+ return callback(null, item);
+ }
+ var nav = window.navigator || {};
+ var scr = window.screen || {};
+ _.set(item, 'data.client', {
+ runtime_ms: item.timestamp - window._rollbarStartTime,
+ timestamp: Math.round(item.timestamp / 1000),
+ javascript: {
+ browser: nav.userAgent,
+ language: nav.language,
+ cookie_enabled: nav.cookieEnabled,
+ screen: {
+ width: scr.width,
+ height: scr.height,
+ },
+ },
+ });
+ callback(null, item);
+ };
+}
-/*
- * configureGlobal - set the global rate limiter options
- *
- * @param options - Only the following values are recognized:
- * startTime: a timestamp of the form returned by (new Date()).getTime()
- * maxItems: the maximum items
- * itemsPerMinute: the max number of items to send in a given minute
- */
-RateLimiter.prototype.configureGlobal = function(options) {
- if (options.startTime !== undefined) {
- RateLimiter.globalSettings.startTime = options.startTime;
- }
- if (options.maxItems !== undefined) {
- RateLimiter.globalSettings.maxItems = options.maxItems;
- }
- if (options.itemsPerMinute !== undefined) {
- RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;
- }
-};
+function addPluginInfo(window) {
+ return function (item, options, callback) {
+ if (!window || !window.navigator) {
+ return callback(null, item);
+ }
+ var plugins = [];
+ var navPlugins = window.navigator.plugins || [];
+ var cur;
+ for (var i = 0, l = navPlugins.length; i < l; ++i) {
+ cur = navPlugins[i];
+ plugins.push({ name: cur.name, description: cur.description });
+ }
+ _.set(item, 'data.client.javascript.plugins', plugins);
+ callback(null, item);
+ };
+}
-/*
- * shouldSend - determine if we should send a given item based on rate limit settings
- *
- * @param item - the item we are about to send
- * @returns An object with the following structure:
- * error: (Error|null)
- * shouldSend: bool
- * payload: (Object|null)
- * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and
- * exactly one of error or payload will be non-null. If error is non-null, the returned Error will
- * describe the situation, but it means that we were already over a rate limit (either globally or
- * per minute) when this item was checked. If error is null, and therefore payload is non-null, it
- * means this item put us over the global rate limit and the payload should be sent to Rollbar in
- * place of the passed in item.
- */
-RateLimiter.prototype.shouldSend = function(item, now) {
- now = now || _.now();
- var elapsedTime = now - this.startTime;
- if (elapsedTime < 0 || elapsedTime >= 60000) {
- this.startTime = now;
- this.perMinCounter = 0;
+function addBody(item, options, callback) {
+ if (item.stackInfo) {
+ if (item.stackInfo.traceChain) {
+ addBodyTraceChain(item, options, callback);
+ } else {
+ addBodyTrace(item, options, callback);
+ }
+ } else {
+ addBodyMessage(item, options, callback);
}
+}
- var globalRateLimit = RateLimiter.globalSettings.maxItems;
- var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;
+function addBodyMessage(item, options, callback) {
+ var message = item.message;
+ var custom = item.custom;
- if (checkRate(item, globalRateLimit, this.counter)) {
- return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);
- } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {
- return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);
+ if (!message) {
+ message = 'Item sent with null or missing arguments.';
}
- this.counter++;
- this.perMinCounter++;
-
- var shouldSend = !checkRate(item, globalRateLimit, this.counter);
- var perMinute = shouldSend;
- shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);
- return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);
-};
-
-RateLimiter.prototype.setPlatformOptions = function(platform, options) {
- this.platform = platform;
- this.platformOptions = options;
-};
-
-/* Helpers */
-
-function checkRate(item, limit, counter) {
- return !item.ignoreRateLimit && limit >= 1 && counter > limit;
-}
+ var result = {
+ body: message,
+ };
-function shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {
- var payload = null;
- if (error) {
- error = new Error(error);
- }
- if (!error && !shouldSend) {
- payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);
+ if (custom) {
+ result.extra = _.merge(custom);
}
- return {error: error, shouldSend: shouldSend, payload: payload};
+
+ _.set(item, 'data.body', { message: result });
+ callback(null, item);
}
-function rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {
- var environment = options.environment || (options.payload && options.payload.environment);
- var msg;
- if (perMinute) {
- msg = 'item per minute limit reached, ignoring errors until timeout';
- } else {
- msg = 'maxItems has been hit, ignoring errors until reset.';
- }
- var item = {
- body: {
- message: {
- body: msg,
- extra: {
- maxItems: globalRateLimit,
- itemsPerMinute: limitPerMin
- }
- }
- },
- language: 'javascript',
- environment: environment,
- notifier: {
- version: (options.notifier && options.notifier.version) || options.version
- }
- };
- if (platform === 'browser') {
- item.platform = 'browser';
- item.framework = 'browser-js';
- item.notifier.name = 'rollbar-browser-js';
- } else if (platform === 'server') {
- item.framework = options.framework || 'node-js';
- item.notifier.name = options.notifier.name;
- } else if (platform === 'react-native') {
- item.framework = options.framework || 'react-native';
- item.notifier.name = options.notifier.name;
+function stackFromItem(item) {
+ // Transform a TraceKit stackInfo object into a Rollbar trace
+ var stack = item.stackInfo.stack;
+ if (
+ stack &&
+ stack.length === 0 &&
+ item._unhandledStackInfo &&
+ item._unhandledStackInfo.stack
+ ) {
+ stack = item._unhandledStackInfo.stack;
}
- return item;
+ return stack;
}
-module.exports = RateLimiter;
+function addBodyTraceChain(item, options, callback) {
+ var traceChain = item.stackInfo.traceChain;
+ var traces = [];
+ var traceChainLength = traceChain.length;
+ for (var i = 0; i < traceChainLength; i++) {
+ var trace = buildTrace(item, traceChain[i], options);
+ traces.push(trace);
+ }
-/***/ }),
-/* 12 */
-/***/ (function(module, exports, __webpack_require__) {
+ _.set(item, 'data.body', { trace_chain: traces });
+ callback(null, item);
+}
-"use strict";
+function addBodyTrace(item, options, callback) {
+ var stack = stackFromItem(item);
+ if (stack) {
+ var trace = buildTrace(item, item.stackInfo, options);
+ _.set(item, 'data.body', { trace: trace });
+ callback(null, item);
+ } else {
+ var stackInfo = item.stackInfo;
+ var guess = errorParser.guessErrorClass(stackInfo.message);
+ var className = errorClass(stackInfo, guess[0], options);
+ var message = guess[1];
-'use strict';
+ item.message = className + ': ' + message;
+ addBodyMessage(item, options, callback);
+ }
+}
-var hasOwn = Object.prototype.hasOwnProperty;
-var toStr = Object.prototype.toString;
+function buildTrace(item, stackInfo, options) {
+ var description = item && item.data.description;
+ var custom = item && item.custom;
+ var stack = stackFromItem(item);
-var isPlainObject = function isPlainObject(obj) {
- if (!obj || toStr.call(obj) !== '[object Object]') {
- return false;
- }
+ var guess = errorParser.guessErrorClass(stackInfo.message);
+ var className = errorClass(stackInfo, guess[0], options);
+ var message = guess[1];
+ var trace = {
+ exception: {
+ class: className,
+ message: message,
+ },
+ };
- var hasOwnConstructor = hasOwn.call(obj, 'constructor');
- var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
- // Not own constructor property must be Object
- if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
- return false;
- }
+ if (description) {
+ trace.exception.description = description;
+ }
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
- var key;
- for (key in obj) {/**/}
+ if (stack) {
+ if (stack.length === 0) {
+ trace.exception.stack = stackInfo.rawStack;
+ trace.exception.raw = String(stackInfo.rawException);
+ }
+ var stackFrame;
+ var frame;
+ var code;
+ var pre;
+ var post;
+ var contextLength;
+ var i, mid;
- return typeof key === 'undefined' || hasOwn.call(obj, key);
-};
+ trace.frames = [];
+ for (i = 0; i < stack.length; ++i) {
+ stackFrame = stack[i];
+ frame = {
+ filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',
+ lineno: stackFrame.line || null,
+ method:
+ !stackFrame.func || stackFrame.func === '?'
+ ? '[anonymous]'
+ : stackFrame.func,
+ colno: stackFrame.column,
+ };
+ if (options.sendFrameUrl) {
+ frame.url = stackFrame.url;
+ }
+ if (
+ frame.method &&
+ frame.method.endsWith &&
+ frame.method.endsWith('_rollbar_wrapped')
+ ) {
+ continue;
+ }
-function merge() {
- var i, src, copy, clone, name,
- result = {},
- current = null,
- length = arguments.length;
+ code = pre = post = null;
+ contextLength = stackFrame.context ? stackFrame.context.length : 0;
+ if (contextLength) {
+ mid = Math.floor(contextLength / 2);
+ pre = stackFrame.context.slice(0, mid);
+ code = stackFrame.context[mid];
+ post = stackFrame.context.slice(mid);
+ }
- for (i=0; i < length; i++) {
- current = arguments[i];
- if (current == null) {
- continue;
- }
+ if (code) {
+ frame.code = code;
+ }
- for (name in current) {
- src = result[name];
- copy = current[name];
- if (result !== copy) {
- if (copy && isPlainObject(copy)) {
- clone = src && isPlainObject(src) ? src : {};
- result[name] = merge(clone, copy);
- } else if (typeof copy !== 'undefined') {
- result[name] = copy;
+ if (pre || post) {
+ frame.context = {};
+ if (pre && pre.length) {
+ frame.context.pre = pre;
+ }
+ if (post && post.length) {
+ frame.context.post = post;
}
}
- }
- }
- return result;
-}
-module.exports = merge;
+ if (stackFrame.args) {
+ frame.args = stackFrame.args;
+ }
+ trace.frames.push(frame);
+ }
-/***/ }),
-/* 13 */
-/***/ (function(module, exports, __webpack_require__) {
+ // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last
+ trace.frames.reverse();
-"use strict";
+ if (custom) {
+ trace.extra = _.merge(custom);
+ }
+ }
+ return trace;
+}
-var _ = __webpack_require__(0);
+function errorClass(stackInfo, guess, options) {
+ if (stackInfo.name) {
+ return stackInfo.name;
+ } else if (options.guessErrorClass) {
+ return guess;
+ } else {
+ return '(unknown)';
+ }
+}
-/*
- * Queue - an object which handles which handles a queue of items to be sent to Rollbar.
- * This object handles rate limiting via a passed in rate limiter, retries based on connection
- * errors, and filtering of items based on a set of configurable predicates. The communication to
- * the backend is performed via a given API object.
- *
- * @param rateLimiter - An object which conforms to the interface
- * rateLimiter.shouldSend(item) -> bool
- * @param api - An object which conforms to the interface
- * api.postItem(payload, function(err, response))
- * @param logger - An object used to log verbose messages if desired
- * @param options - see Queue.prototype.configure
- */
-function Queue(rateLimiter, api, logger, options) {
- this.rateLimiter = rateLimiter;
- this.api = api;
- this.logger = logger;
- this.options = options;
- this.predicates = [];
- this.pendingItems = [];
- this.pendingRequests = [];
- this.retryQueue = [];
- this.retryHandle = null;
- this.waitCallback = null;
- this.waitIntervalID = null;
+function addScrubber(scrubFn) {
+ return function (item, options, callback) {
+ if (scrubFn) {
+ var scrubFields = options.scrubFields || [];
+ var scrubPaths = options.scrubPaths || [];
+ item.data = scrubFn(item.data, scrubFields, scrubPaths);
+ }
+ callback(null, item);
+ };
}
-/*
- * configure - updates the options this queue uses
- *
- * @param options
- */
-Queue.prototype.configure = function(options) {
- this.api && this.api.configure(options);
- var oldOptions = this.options;
- this.options = _.merge(oldOptions, options);
- return this;
+module.exports = {
+ handleDomException: handleDomException,
+ handleItemWithError: handleItemWithError,
+ ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,
+ addBaseInfo: addBaseInfo,
+ addRequestInfo: addRequestInfo,
+ addClientInfo: addClientInfo,
+ addPluginInfo: addPluginInfo,
+ addBody: addBody,
+ addScrubber: addScrubber,
};
-/*
- * addPredicate - adds a predicate to the end of the list of predicates for this queue
- *
- * @param predicate - function(item, options) -> (bool|{err: Error})
- * Returning true means that this predicate passes and the item is okay to go on the queue
- * Returning false means do not add the item to the queue, but it is not an error
- * Returning {err: Error} means do not add the item to the queue, and the given error explains why
- * Returning {err: undefined} is equivalent to returning true but don't do that
- */
-Queue.prototype.addPredicate = function(predicate) {
- if (_.isFunction(predicate)) {
- this.predicates.push(predicate);
- }
- return this;
-};
-Queue.prototype.addPendingItem = function(item) {
- this.pendingItems.push(item);
-};
+/***/ }),
-Queue.prototype.removePendingItem = function(item) {
- var idx = this.pendingItems.indexOf(item);
- if (idx !== -1) {
- this.pendingItems.splice(idx, 1);
- }
-};
+/***/ 477:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-/*
- * addItem - Send an item to the Rollbar API if all of the predicates are satisfied
- *
- * @param item - The payload to send to the backend
- * @param callback - function(error, repsonse) which will be called with the response from the API
- * in the case of a success, otherwise response will be null and error will have a value. If both
- * error and response are null then the item was stopped by a predicate which did not consider this
- * to be an error condition, but nonetheless did not send the item to the API.
- * @param originalError - The original error before any transformations that is to be logged if any
- */
-Queue.prototype.addItem = function(item, callback, originalError, originalItem) {
- if (!callback || !_.isFunction(callback)) {
- callback = function() { return; };
- }
- var predicateResult = this._applyPredicates(item);
- if (predicateResult.stop) {
- this.removePendingItem(originalItem);
- callback(predicateResult.err);
- return;
- }
- this._maybeLog(item, originalError);
- this.removePendingItem(originalItem);
- if (!this.options.transmit) {
- callback(new Error('Transmit disabled'));
- return;
- }
- this.pendingRequests.push(item);
- try {
- this._makeApiRequest(item, function(err, resp) {
- this._dequeuePendingRequest(item);
- callback(err, resp);
- }.bind(this));
- } catch (e) {
- this._dequeuePendingRequest(item);
- callback(e);
- }
-};
+"use strict";
-/*
- * wait - Stop any further errors from being added to the queue, and get called back when all items
- * currently processing have finished sending to the backend.
- *
- * @param callback - function() called when all pending items have been sent
- */
-Queue.prototype.wait = function(callback) {
- if (!_.isFunction(callback)) {
- return;
- }
- this.waitCallback = callback;
- if (this._maybeCallWait()) {
- return;
- }
- if (this.waitIntervalID) {
- this.waitIntervalID = clearInterval(this.waitIntervalID);
- }
- this.waitIntervalID = setInterval(function() {
- this._maybeCallWait();
- }.bind(this), 500);
-};
-/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the
- * given item with the currently configured options.
- *
- * @param item - An item in the queue
- * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,
- * the error value should be passed up to a callbak if we are stopping.
- */
-Queue.prototype._applyPredicates = function(item) {
- var p = null;
- for (var i = 0, len = this.predicates.length; i < len; i++) {
- p = this.predicates[i](item, this.options);
- if (!p || p.err !== undefined) {
- return {stop: true, err: p.err};
- }
- }
- return {stop: false, err: null};
-};
+var _ = __webpack_require__(702);
+var makeFetchRequest = __webpack_require__(656);
+var makeXhrRequest = __webpack_require__(86);
/*
- * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an
- * effort to retry if we are configured to do so.
+ * accessToken may be embedded in payload but that should not
+ * be assumed
*
- * @param item - an item ready to send to the backend
- * @param callback - function(err, response)
+ * options: {
+ * hostname
+ * protocol
+ * path
+ * port
+ * method
+ * transport ('xhr' | 'fetch')
+ * }
+ *
+ * params is an object containing key/value pairs. These
+ * will be appended to the path as 'key=value&key=value'
+ *
+ * payload is an unserialized object
*/
-Queue.prototype._makeApiRequest = function(item, callback) {
- var rateLimitResponse = this.rateLimiter.shouldSend(item);
- if (rateLimitResponse.shouldSend) {
- this.api.postItem(item, function(err, resp) {
- if (err) {
- this._maybeRetry(err, item, callback);
- } else {
- callback(err, resp);
- }
- }.bind(this));
- } else if (rateLimitResponse.error) {
- callback(rateLimitResponse.error);
- } else {
- this.api.postItem(rateLimitResponse.payload, callback);
+function Transport(truncation) {
+ this.truncation = truncation;
+}
+
+Transport.prototype.get = function (
+ accessToken,
+ options,
+ params,
+ callback,
+ requestFactory,
+) {
+ if (!callback || !_.isFunction(callback)) {
+ callback = function () {};
}
+ _.addParamsAndAccessTokenToPath(accessToken, options, params);
+
+ var method = 'GET';
+ var url = _.formatUrl(options);
+ this._makeZoneRequest(
+ accessToken,
+ url,
+ method,
+ null,
+ callback,
+ requestFactory,
+ options.timeout,
+ options.transport,
+ );
};
-// These are errors basically mean there is no internet connection
-var RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];
+Transport.prototype.post = function (
+ accessToken,
+ options,
+ payload,
+ callback,
+ requestFactory,
+) {
+ if (!callback || !_.isFunction(callback)) {
+ callback = function () {};
+ }
-/*
- * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback
- * with the error.
- *
- * @param err - an error returned by the API transport
- * @param item - the item that was trying to be sent when this error occured
- * @param callback - function(err, response)
- */
-Queue.prototype._maybeRetry = function(err, item, callback) {
- var shouldRetry = false;
- if (this.options.retryInterval) {
- for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {
- if (err.code === RETRIABLE_ERRORS[i]) {
- shouldRetry = true;
- break;
- }
- }
- if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {
- item.retries = item.retries ? item.retries + 1 : 1;
- if (item.retries > this.options.maxRetries) {
- shouldRetry = false;
- }
- }
+ if (!payload) {
+ return callback(new Error('Cannot send empty request'));
}
- if (shouldRetry) {
- this._retryApiRequest(item, callback);
+
+ var stringifyResult;
+ if (this.truncation) {
+ stringifyResult = this.truncation.truncate(payload);
} else {
- callback(err);
+ stringifyResult = _.stringify(payload);
+ }
+ if (stringifyResult.error) {
+ return callback(stringifyResult.error);
}
-};
-/*
- * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process
- * that queue based on the retryInterval in the options for this queue.
- *
- * @param item - an item that failed to send due to an error we deem retriable
- * @param callback - function(err, response)
- */
-Queue.prototype._retryApiRequest = function(item, callback) {
- this.retryQueue.push({item: item, callback: callback});
+ var writeData = stringifyResult.value;
+ var method = 'POST';
+ var url = _.formatUrl(options);
+ this._makeZoneRequest(
+ accessToken,
+ url,
+ method,
+ writeData,
+ callback,
+ requestFactory,
+ options.timeout,
+ options.transport,
+ );
+};
- if (!this.retryHandle) {
- this.retryHandle = setInterval(function() {
- while (this.retryQueue.length) {
- var retryObject = this.retryQueue.shift();
- this._makeApiRequest(retryObject.item, retryObject.callback);
- }
- }.bind(this), this.options.retryInterval);
+Transport.prototype.postJsonPayload = function (
+ accessToken,
+ options,
+ jsonPayload,
+ callback,
+ requestFactory,
+) {
+ if (!callback || !_.isFunction(callback)) {
+ callback = function () {};
}
+
+ var method = 'POST';
+ var url = _.formatUrl(options);
+ this._makeZoneRequest(
+ accessToken,
+ url,
+ method,
+ jsonPayload,
+ callback,
+ requestFactory,
+ options.timeout,
+ options.transport,
+ );
};
-/*
- * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to
- * enable to functionality of providing a callback that clients can pass to `wait` to be notified
- * when the pending request queue has been emptied. This must be called when the API finishes
- * processing this item. If a `wait` callback is configured, it is called by this function.
- *
- * @param item - the item previously added to the pending request queue
- */
-Queue.prototype._dequeuePendingRequest = function(item) {
- var idx = this.pendingRequests.indexOf(item);
- if (idx !== -1) {
- this.pendingRequests.splice(idx, 1);
- this._maybeCallWait();
+// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope
+// so Angular change detection isn't triggered on each API call.
+// This is the equivalent of runOutsideAngular().
+//
+Transport.prototype._makeZoneRequest = function () {
+ var gWindow =
+ (typeof window != 'undefined' && window) ||
+ (typeof self != 'undefined' && self);
+ var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;
+ var args = Array.prototype.slice.call(arguments);
+
+ if (currentZone && currentZone._name === 'angular') {
+ var rootZone = currentZone._parent;
+ var self = this;
+ rootZone.run(function () {
+ self._makeRequest.apply(undefined, args);
+ });
+ } else {
+ this._makeRequest.apply(undefined, args);
}
};
-Queue.prototype._maybeLog = function(data, originalError) {
- if (this.logger && this.options.verbose) {
- var message = originalError;
- message = message || _.get(data, 'body.trace.exception.message');
- message = message || _.get(data, 'body.trace_chain.0.exception.message');
- if (message) {
- this.logger.error(message);
- return;
- }
- message = _.get(data, 'body.message.body');
- if (message) {
- this.logger.log(message);
- }
+Transport.prototype._makeRequest = function (
+ accessToken,
+ url,
+ method,
+ data,
+ callback,
+ requestFactory,
+ timeout,
+ transport,
+) {
+ if (typeof RollbarProxy !== 'undefined') {
+ return _proxyRequest(data, callback);
}
-};
-Queue.prototype._maybeCallWait = function() {
- if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {
- if (this.waitIntervalID) {
- this.waitIntervalID = clearInterval(this.waitIntervalID);
- }
- this.waitCallback();
- return true;
+ if (transport === 'fetch') {
+ makeFetchRequest(accessToken, url, method, data, callback, timeout);
+ } else {
+ makeXhrRequest(
+ accessToken,
+ url,
+ method,
+ data,
+ callback,
+ requestFactory,
+ timeout,
+ );
}
- return false;
};
-module.exports = Queue;
+/* global RollbarProxy */
+function _proxyRequest(json, callback) {
+ var rollbarProxy = new RollbarProxy();
+ rollbarProxy.sendJsonPayload(
+ json,
+ function (_msg) {
+ /* do nothing */
+ }, // eslint-disable-line no-unused-vars
+ function (err) {
+ callback(new Error(err));
+ },
+ );
+}
+
+module.exports = Transport;
/***/ }),
-/* 14 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 656:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var _ = __webpack_require__(0);
+var logger = __webpack_require__(802);
+var _ = __webpack_require__(702);
-/*
- * Notifier - the internal object responsible for delegating between the client exposed API, the
- * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the
- * queue which handles the communcation with the Rollbar API servers.
- *
- * @param queue - an object that conforms to the interface: addItem(item, callback)
- * @param options - an object representing the options to be set for this notifier, this should have
- * any defaults already set by the caller
- */
-function Notifier(queue, options) {
- this.queue = queue;
- this.options = options;
- this.transforms = [];
- this.diagnostic = {};
+function makeFetchRequest(accessToken, url, method, data, callback, timeout) {
+ var controller;
+ var timeoutId;
+
+ if (_.isFiniteNumber(timeout)) {
+ controller = new AbortController();
+ timeoutId = setTimeout(function () {
+ controller.abort();
+ }, timeout);
+ }
+
+ fetch(url, {
+ method: method,
+ headers: {
+ 'Content-Type': 'application/json',
+ 'X-Rollbar-Access-Token': accessToken,
+ signal: controller && controller.signal,
+ },
+ body: data,
+ })
+ .then(function (response) {
+ if (timeoutId) clearTimeout(timeoutId);
+ return response.json();
+ })
+ .then(function (data) {
+ callback(null, data);
+ })
+ .catch(function (error) {
+ logger.error(error.message);
+ callback(error);
+ });
}
-/*
- * configure - updates the options for this notifier with the passed in object
- *
- * @param options - an object which gets merged with the current options set on this notifier
- * @returns this
- */
-Notifier.prototype.configure = function(options) {
- this.queue && this.queue.configure(options);
- var oldOptions = this.options;
- this.options = _.merge(oldOptions, options);
- return this;
-};
+module.exports = makeFetchRequest;
-/*
- * addTransform - adds a transform onto the end of the queue of transforms for this notifier
- *
- * @param transform - a function which takes three arguments:
- * * item: An Object representing the data to eventually be sent to Rollbar
- * * options: The current value of the options for this notifier
- * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this
- * callback with a null value for error if it wants the processing chain to continue, otherwise
- * with an error to terminate the processing. The item should be the updated item after this
- * transform is finished modifying it.
- */
-Notifier.prototype.addTransform = function(transform) {
- if (_.isFunction(transform)) {
- this.transforms.push(transform);
- }
- return this;
-};
-/*
- * log - the internal log function which applies the configured transforms and then pushes onto the
- * queue to be sent to the backend.
- *
- * @param item - An object with the following structure:
- * message [String] - An optional string to be sent to rollbar
- * error [Error] - An optional error
- *
- * @param callback - A function of type function(err, resp) which will be called with exactly one
- * null argument and one non-null argument. The callback will be called once, either during the
- * transform stage if an error occurs inside a transform, or in response to the communication with
- * the backend. The second argument will be the response from the backend in case of success.
- */
-Notifier.prototype.log = function(item, callback) {
- if (!callback || !_.isFunction(callback)) {
- callback = function() {};
- }
+/***/ }),
- if (!this.options.enabled) {
- return callback(new Error('Rollbar is not enabled'));
+/***/ 86:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+/*global XDomainRequest*/
+
+var _ = __webpack_require__(702);
+var logger = __webpack_require__(802);
+
+function makeXhrRequest(
+ accessToken,
+ url,
+ method,
+ data,
+ callback,
+ requestFactory,
+ timeout,
+) {
+ var request;
+ if (requestFactory) {
+ request = requestFactory();
+ } else {
+ request = _createXMLHTTPObject();
+ }
+ if (!request) {
+ // Give up, no way to send requests
+ return callback(new Error('No way to send a request'));
}
+ try {
+ try {
+ var onreadystatechange = function () {
+ try {
+ if (onreadystatechange && request.readyState === 4) {
+ onreadystatechange = undefined;
+
+ var parseResponse = _.jsonParse(request.responseText);
+ if (_isSuccess(request)) {
+ callback(parseResponse.error, parseResponse.value);
+ return;
+ } else if (_isNormalFailure(request)) {
+ if (request.status === 403) {
+ // likely caused by using a server access token
+ var message =
+ parseResponse.value && parseResponse.value.message;
+ logger.error(message);
+ }
+ // return valid http status codes
+ callback(new Error(String(request.status)));
+ } else {
+ // IE will return a status 12000+ on some sort of connection failure,
+ // so we return a blank error
+ // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx
+ var msg =
+ 'XHR response had no status code (likely connection failure)';
+ callback(_newRetriableError(msg));
+ }
+ }
+ } catch (ex) {
+ //jquery source mentions firefox may error out while accessing the
+ //request members if there is a network error
+ //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111
+ var exc;
+ if (ex && ex.stack) {
+ exc = ex;
+ } else {
+ exc = new Error(ex);
+ }
+ callback(exc);
+ }
+ };
- this.queue.addPendingItem(item);
- var originalError = item.err;
- this._applyTransforms(item, function(err, i) {
- if (err) {
- this.queue.removePendingItem(item);
- return callback(err, null);
- }
- this.queue.addItem(i, callback, originalError, item);
- }.bind(this));
-};
+ request.open(method, url, true);
+ if (request.setRequestHeader) {
+ request.setRequestHeader('Content-Type', 'application/json');
+ request.setRequestHeader('X-Rollbar-Access-Token', accessToken);
+ }
-/* Internal */
+ if (_.isFiniteNumber(timeout)) {
+ request.timeout = timeout;
+ }
-/*
- * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See
- * `addTransform` for more information.
- *
- * @param item - An item to be transformed
- * @param callback - A function of type function(err, item) which will be called with a non-null
- * error and a null item in the case of a transform failure, or a null error and non-null item after
- * all transforms have been applied.
- */
-Notifier.prototype._applyTransforms = function(item, callback) {
- var transformIndex = -1;
- var transformsLength = this.transforms.length;
- var transforms = this.transforms;
- var options = this.options;
+ request.onreadystatechange = onreadystatechange;
+ request.send(data);
+ } catch (e1) {
+ // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest
+ if (typeof XDomainRequest !== 'undefined') {
+ // Assume we are in a really old browser which has a bunch of limitations:
+ // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx
- var cb = function(err, i) {
- if (err) {
- callback(err, null);
- return;
- }
+ // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case
+ if (!window || !window.location) {
+ return callback(
+ new Error(
+ 'No window available during request, unknown environment',
+ ),
+ );
+ }
- transformIndex++;
+ // If the current page is http, try and send over http
+ if (
+ window.location.href.substring(0, 5) === 'http:' &&
+ url.substring(0, 5) === 'https'
+ ) {
+ url = 'http' + url.substring(5);
+ }
- if (transformIndex === transformsLength) {
- callback(null, i);
- return;
+ var xdomainrequest = new XDomainRequest();
+ xdomainrequest.onprogress = function () {};
+ xdomainrequest.ontimeout = function () {
+ var msg = 'Request timed out';
+ var code = 'ETIMEDOUT';
+ callback(_newRetriableError(msg, code));
+ };
+ xdomainrequest.onerror = function () {
+ callback(new Error('Error during request'));
+ };
+ xdomainrequest.onload = function () {
+ var parseResponse = _.jsonParse(xdomainrequest.responseText);
+ callback(parseResponse.error, parseResponse.value);
+ };
+ xdomainrequest.open(method, url, true);
+ xdomainrequest.send(data);
+ } else {
+ callback(new Error('Cannot find a method to transport a request'));
+ }
}
+ } catch (e2) {
+ callback(e2);
+ }
+}
- transforms[transformIndex](i, options, cb);
- };
+function _createXMLHTTPObject() {
+ /* global ActiveXObject:false */
- cb(null, item);
-};
+ var factories = [
+ function () {
+ return new XMLHttpRequest();
+ },
+ function () {
+ return new ActiveXObject('Msxml2.XMLHTTP');
+ },
+ function () {
+ return new ActiveXObject('Msxml3.XMLHTTP');
+ },
+ function () {
+ return new ActiveXObject('Microsoft.XMLHTTP');
+ },
+ ];
+ var xmlhttp;
+ var i;
+ var numFactories = factories.length;
+ for (i = 0; i < numFactories; i++) {
+ /* eslint-disable no-empty */
+ try {
+ xmlhttp = factories[i]();
+ break;
+ } catch (e) {
+ // pass
+ }
+ /* eslint-enable no-empty */
+ }
+ return xmlhttp;
+}
-module.exports = Notifier;
+function _isSuccess(r) {
+ return r && r.status && r.status === 200;
+}
+function _isNormalFailure(r) {
+ return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;
+}
-/***/ }),
-/* 15 */
-/***/ (function(module, exports, __webpack_require__) {
+function _newRetriableError(message, code) {
+ var err = new Error(message);
+ err.code = code || 'ENOTFOUND';
+ return err;
+}
-"use strict";
+module.exports = makeXhrRequest;
-var _ = __webpack_require__(0);
-var helpers = __webpack_require__(16);
+/***/ }),
-var defaultOptions = {
- hostname: 'api.rollbar.com',
- path: '/api/1/item/',
- search: null,
- version: '1',
- protocol: 'https:',
- port: 443
-};
+/***/ 509:
+/***/ ((module) => {
-/**
- * Api is an object that encapsulates methods of communicating with
- * the Rollbar API. It is a standard interface with some parts implemented
- * differently for server or browser contexts. It is an object that should
- * be instantiated when used so it can contain non-global options that may
- * be different for another instance of RollbarApi.
- *
- * @param options {
- * accessToken: the accessToken to use for posting items to rollbar
- * endpoint: an alternative endpoint to send errors to
- * must be a valid, fully qualified URL.
- * The default is: https://api.rollbar.com/api/1/item
- * proxy: if you wish to proxy requests provide an object
- * with the following keys:
- * host or hostname (required): foo.example.com
- * port (optional): 123
- * protocol (optional): https
- * }
- */
-function Api(options, transport, urllib, truncation, jsonBackup) {
- this.options = options;
- this.transport = transport;
- this.url = urllib;
- this.truncation = truncation;
- this.jsonBackup = jsonBackup;
- this.accessToken = options.accessToken;
- this.transportOptions = _getTransport(options, urllib);
-}
+"use strict";
-/**
- *
- * @param data
- * @param callback
- */
-Api.prototype.postItem = function(data, callback) {
- var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');
- var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);
- this.transport.post(this.accessToken, transportOptions, payload, callback);
-};
-/**
- *
- * @param data
- * @param callback
- */
-Api.prototype.buildJsonPayload = function(data, callback) {
- var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);
+// See https://nodejs.org/docs/latest/api/url.html
+function parse(url) {
+ var result = {
+ protocol: null,
+ auth: null,
+ host: null,
+ path: null,
+ hash: null,
+ href: url,
+ hostname: null,
+ port: null,
+ pathname: null,
+ search: null,
+ query: null,
+ };
- var stringifyResult;
- if (this.truncation) {
- stringifyResult = this.truncation.truncate(payload);
+ var i, last;
+ i = url.indexOf('//');
+ if (i !== -1) {
+ result.protocol = url.substring(0, i);
+ last = i + 2;
} else {
- stringifyResult = _.stringify(payload)
+ last = 0;
}
- if (stringifyResult.error) {
- if (callback) {
- callback(stringifyResult.error);
- }
- return null;
+ i = url.indexOf('@', last);
+ if (i !== -1) {
+ result.auth = url.substring(last, i);
+ last = i + 1;
}
- return stringifyResult.value;
-};
+ i = url.indexOf('/', last);
+ if (i === -1) {
+ i = url.indexOf('?', last);
+ if (i === -1) {
+ i = url.indexOf('#', last);
+ if (i === -1) {
+ result.host = url.substring(last);
+ } else {
+ result.host = url.substring(last, i);
+ result.hash = url.substring(i);
+ }
+ result.hostname = result.host.split(':')[0];
+ result.port = result.host.split(':')[1];
+ if (result.port) {
+ result.port = parseInt(result.port, 10);
+ }
+ return result;
+ } else {
+ result.host = url.substring(last, i);
+ result.hostname = result.host.split(':')[0];
+ result.port = result.host.split(':')[1];
+ if (result.port) {
+ result.port = parseInt(result.port, 10);
+ }
+ last = i;
+ }
+ } else {
+ result.host = url.substring(last, i);
+ result.hostname = result.host.split(':')[0];
+ result.port = result.host.split(':')[1];
+ if (result.port) {
+ result.port = parseInt(result.port, 10);
+ }
+ last = i;
+ }
-/**
- *
- * @param jsonPayload
- * @param callback
- */
-Api.prototype.postJsonPayload = function(jsonPayload, callback) {
- var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');
- this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);
-};
+ i = url.indexOf('#', last);
+ if (i === -1) {
+ result.path = url.substring(last);
+ } else {
+ result.path = url.substring(last, i);
+ result.hash = url.substring(i);
+ }
-Api.prototype.configure = function(options) {
- var oldOptions = this.oldOptions;
- this.options = _.merge(oldOptions, options);
- this.transportOptions = _getTransport(this.options, this.url);
- if (this.options.accessToken !== undefined) {
- this.accessToken = this.options.accessToken;
+ if (result.path) {
+ var pathParts = result.path.split('?');
+ result.pathname = pathParts[0];
+ result.query = pathParts[1];
+ result.search = result.query ? '?' + result.query : null;
}
- return this;
-};
-
-function _getTransport(options, url) {
- return helpers.getTransportFromOptions(options, defaultOptions, url);
+ return result;
}
-module.exports = Api;
+module.exports = {
+ parse: parse,
+};
/***/ }),
-/* 16 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 965:
+/***/ ((module) => {
"use strict";
-var _ = __webpack_require__(0);
+function wrapGlobals(window, handler, shim) {
+ if (!window) {
+ return;
+ }
+ // Adapted from https://github.com/bugsnag/bugsnag-js
+ 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(
+ ',',
+ );
+ var i, global;
+ for (i = 0; i < globals.length; ++i) {
+ global = globals[i];
-function buildPayload(accessToken, data, jsonBackup) {
- if (!_.isType(data.context, 'string')) {
- var contextResult = _.stringify(data.context, jsonBackup);
- if (contextResult.error) {
- data.context = 'Error: could not serialize \'context\'';
- } else {
- data.context = contextResult.value || '';
- }
- if (data.context.length > 255) {
- data.context = data.context.substr(0, 255);
+ if (window[global] && window[global].prototype) {
+ _extendListenerPrototype(handler, window[global].prototype, shim);
}
}
- return {
- access_token: accessToken,
- data: data
- };
}
-function getTransportFromOptions(options, defaults, url) {
- var hostname = defaults.hostname;
- var protocol = defaults.protocol;
- var port = defaults.port;
- var path = defaults.path;
- var search = defaults.search;
- var timeout = options.timeout;
+function _extendListenerPrototype(handler, prototype, shim) {
+ if (
+ prototype.hasOwnProperty &&
+ prototype.hasOwnProperty('addEventListener')
+ ) {
+ var oldAddEventListener = prototype.addEventListener;
+ while (
+ oldAddEventListener._rollbarOldAdd &&
+ oldAddEventListener.belongsToShim
+ ) {
+ oldAddEventListener = oldAddEventListener._rollbarOldAdd;
+ }
+ var addFn = function (event, callback, bubble) {
+ oldAddEventListener.call(this, event, handler.wrap(callback), bubble);
+ };
+ addFn._rollbarOldAdd = oldAddEventListener;
+ addFn.belongsToShim = shim;
+ prototype.addEventListener = addFn;
- var proxy = options.proxy;
- if (options.endpoint) {
- var opts = url.parse(options.endpoint);
- hostname = opts.hostname;
- protocol = opts.protocol;
- port = opts.port;
- path = opts.pathname;
- search = opts.search;
+ var oldRemoveEventListener = prototype.removeEventListener;
+ while (
+ oldRemoveEventListener._rollbarOldRemove &&
+ oldRemoveEventListener.belongsToShim
+ ) {
+ oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;
+ }
+ var removeFn = function (event, callback, bubble) {
+ oldRemoveEventListener.call(
+ this,
+ event,
+ (callback && callback._rollbar_wrapped) || callback,
+ bubble,
+ );
+ };
+ removeFn._rollbarOldRemove = oldRemoveEventListener;
+ removeFn.belongsToShim = shim;
+ prototype.removeEventListener = removeFn;
}
- return {
- timeout: timeout,
- hostname: hostname,
- protocol: protocol,
- port: port,
- path: path,
- search: search,
- proxy: proxy
- };
}
-function transportOptions(transport, method) {
- var protocol = transport.protocol || 'https:';
- var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);
- var hostname = transport.hostname;
- var path = transport.path;
- var timeout = transport.timeout;
- if (transport.search) {
- path = path + transport.search;
- }
- if (transport.proxy) {
- path = protocol + '//' + hostname + path;
- hostname = transport.proxy.host || transport.proxy.hostname;
- port = transport.proxy.port;
- protocol = transport.proxy.protocol || protocol;
- }
- return {
- timeout: timeout,
- protocol: protocol,
- hostname: hostname,
- path: path,
- port: port,
- method: method
- };
-}
+module.exports = wrapGlobals;
-function appendPathToPath(base, path) {
- var baseTrailingSlash = /\/$/.test(base);
- var pathBeginningSlash = /^\//.test(path);
- if (baseTrailingSlash && pathBeginningSlash) {
- path = path.substring(1);
- } else if (!baseTrailingSlash && !pathBeginningSlash) {
- path = '/' + path;
- }
+/***/ }),
+
+/***/ 948:
+/***/ ((module) => {
+
+"use strict";
- return base + path;
-}
module.exports = {
- buildPayload: buildPayload,
- getTransportFromOptions: getTransportFromOptions,
- transportOptions: transportOptions,
- appendPathToPath: appendPathToPath
+ version: '2.26.4',
+ endpoint: 'api.rollbar.com/api/1/item/',
+ logLevel: 'debug',
+ reportLevel: 'debug',
+ uncaughtErrorLevel: 'error',
+ maxItems: 0,
+ itemsPerMin: 60,
};
/***/ }),
-/* 17 */
-/***/ (function(module, exports) {
-// Console-polyfill. MIT license.
-// https://github.com/paulmillr/console-polyfill
-// Make it safe to do console.log() always.
-(function(global) {
- 'use strict';
- if (!global.console) {
- global.console = {};
- }
- var con = global.console;
- var prop, method;
- var dummy = function() {};
- var properties = ['memory'];
- var methods = ('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(',');
- while (prop = properties.pop()) if (!con[prop]) con[prop] = {};
- while (method = methods.pop()) if (!con[method]) con[method] = dummy;
- // Using `this` for web workers & supports Browserify / Webpack.
-})(typeof window === 'undefined' ? this : window);
+/***/ 303:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+"use strict";
-/***/ }),
-/* 18 */
-/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+var ErrorStackParser = __webpack_require__(180);
+var UNKNOWN_FUNCTION = '?';
+var ERR_CLASS_REGEXP = new RegExp(
+ '^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ',
+);
-// This detection.js module is used to encapsulate any ugly browser/feature
-// detection we may need to do.
+function guessFunctionName() {
+ return UNKNOWN_FUNCTION;
+}
-// Figure out which version of IE we're using, if any.
-// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library
-// Will return an integer on IE (i.e. 8)
-// Will return undefined otherwise
-function getIEVersion() {
- var undef;
- if (typeof document === 'undefined') {
- return undef;
- }
+function gatherContext() {
+ return null;
+}
- var v = 3,
- div = document.createElement('div'),
- all = div.getElementsByTagName('i');
+function Frame(stackFrame) {
+ var data = {};
- while (
- div.innerHTML = '',
- all[0]
+ data._stackFrame = stackFrame;
+
+ data.url = stackFrame.fileName;
+ data.line = stackFrame.lineNumber;
+ data.func = stackFrame.functionName;
+ data.column = stackFrame.columnNumber;
+ data.args = stackFrame.args;
+
+ data.context = gatherContext();
+
+ return data;
+}
+
+function Stack(exception, skip) {
+ function getStack() {
+ var parserStack = [];
+
+ skip = skip || 0;
+
+ try {
+ parserStack = ErrorStackParser.parse(exception);
+ } catch (e) {
+ parserStack = [];
+ }
+
+ var stack = [];
+
+ for (var i = skip; i < parserStack.length; i++) {
+ stack.push(new Frame(parserStack[i]));
+ }
+
+ return stack;
+ }
+
+ return {
+ stack: getStack(),
+ message: exception.message,
+ name: _mostSpecificErrorName(exception),
+ rawStack: exception.stack,
+ rawException: exception,
+ };
+}
+
+function parse(e, skip) {
+ var err = e;
+
+ if (err.nested || err.cause) {
+ var traceChain = [];
+ while (err) {
+ traceChain.push(new Stack(err, skip));
+ err = err.nested || err.cause;
+
+ skip = 0; // Only apply skip value to primary error
+ }
+
+ // Return primary error with full trace chain attached.
+ traceChain[0].traceChain = traceChain;
+ return traceChain[0];
+ } else {
+ return new Stack(err, skip);
+ }
+}
+
+function guessErrorClass(errMsg) {
+ if (!errMsg || !errMsg.match) {
+ return ['Unknown error. There was no error message to display.', ''];
+ }
+ var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);
+ var errClass = '(unknown)';
+
+ if (errClassMatch) {
+ errClass = errClassMatch[errClassMatch.length - 1];
+ errMsg = errMsg.replace(
+ (errClassMatch[errClassMatch.length - 2] || '') + errClass + ':',
+ '',
);
+ errMsg = errMsg.replace(/(^[\s]+|[\s]+$)/g, '');
+ }
+ return [errClass, errMsg];
+}
- return v > 4 ? v : undef;
+// * Prefers any value over an empty string
+// * Prefers any value over 'Error' where possible
+// * Prefers name over constructor.name when both are more specific than 'Error'
+function _mostSpecificErrorName(error) {
+ var name = error.name && error.name.length && error.name;
+ var constructorName =
+ error.constructor.name &&
+ error.constructor.name.length &&
+ error.constructor.name;
+
+ if (!name || !constructorName) {
+ return name || constructorName;
+ }
+
+ if (name === 'Error') {
+ return constructorName;
+ }
+ return name;
}
-var Detection = {
- ieVersion: getIEVersion
+module.exports = {
+ guessFunctionName: guessFunctionName,
+ guessErrorClass: guessErrorClass,
+ gatherContext: gatherContext,
+ parse: parse,
+ Stack: Stack,
+ Frame: Frame,
};
-module.exports = Detection;
-
/***/ }),
-/* 19 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 420:
+/***/ ((module) => {
"use strict";
-function captureUncaughtExceptions(window, handler, shim) {
- if (!window) { return; }
- var oldOnError;
+'use strict';
- if (typeof handler._rollbarOldOnError === 'function') {
- oldOnError = handler._rollbarOldOnError;
- } else if (window.onerror) {
- oldOnError = window.onerror;
- while (oldOnError._rollbarOldOnError) {
- oldOnError = oldOnError._rollbarOldOnError;
- }
- handler._rollbarOldOnError = oldOnError;
+var hasOwn = Object.prototype.hasOwnProperty;
+var toStr = Object.prototype.toString;
+
+var isPlainObject = function isPlainObject(obj) {
+ if (!obj || toStr.call(obj) !== '[object Object]') {
+ return false;
}
- handler.handleAnonymousErrors();
+ var hasOwnConstructor = hasOwn.call(obj, 'constructor');
+ var hasIsPrototypeOf =
+ obj.constructor &&
+ obj.constructor.prototype &&
+ hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
+ // Not own constructor property must be Object
+ if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
+ return false;
+ }
- var fn = function() {
- var args = Array.prototype.slice.call(arguments, 0);
- _rollbarWindowOnError(window, handler, oldOnError, args);
- };
- if (shim) {
- fn._rollbarOldOnError = oldOnError;
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+ var key;
+ for (key in obj) {
+ /**/
}
- window.onerror = fn;
-}
-function _rollbarWindowOnError(window, r, old, args) {
- if (window._rollbarWrappedError) {
- if (!args[4]) {
- args[4] = window._rollbarWrappedError;
+ return typeof key === 'undefined' || hasOwn.call(obj, key);
+};
+
+function merge() {
+ var i,
+ src,
+ copy,
+ clone,
+ name,
+ result = {},
+ current = null,
+ length = arguments.length;
+
+ for (i = 0; i < length; i++) {
+ current = arguments[i];
+ if (current == null) {
+ continue;
}
- if (!args[5]) {
- args[5] = window._rollbarWrappedError._rollbarContext;
+
+ for (name in current) {
+ src = result[name];
+ copy = current[name];
+ if (result !== copy) {
+ if (copy && isPlainObject(copy)) {
+ clone = src && isPlainObject(src) ? src : {};
+ result[name] = merge(clone, copy);
+ } else if (typeof copy !== 'undefined') {
+ result[name] = copy;
+ }
+ }
}
- window._rollbarWrappedError = null;
}
+ return result;
+}
- var ret = r.handleUncaughtException.apply(r, args);
+module.exports = merge;
- if (old) {
- old.apply(window, args);
- }
- // Let other chained onerror handlers above run before setting this.
- // If an error is thrown and caught within a chained onerror handler,
- // Error.prepareStackTrace() will see that one before the one we want.
- if (ret === 'anonymous') {
- r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()
- }
+/***/ }),
+
+/***/ 314:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+var _ = __webpack_require__(702);
+
+/*
+ * Notifier - the internal object responsible for delegating between the client exposed API, the
+ * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the
+ * queue which handles the communcation with the Rollbar API servers.
+ *
+ * @param queue - an object that conforms to the interface: addItem(item, callback)
+ * @param options - an object representing the options to be set for this notifier, this should have
+ * any defaults already set by the caller
+ */
+function Notifier(queue, options) {
+ this.queue = queue;
+ this.options = options;
+ this.transforms = [];
+ this.diagnostic = {};
}
-function captureUnhandledRejections(window, handler, shim) {
- if (!window) { return; }
+/*
+ * configure - updates the options for this notifier with the passed in object
+ *
+ * @param options - an object which gets merged with the current options set on this notifier
+ * @returns this
+ */
+Notifier.prototype.configure = function (options) {
+ this.queue && this.queue.configure(options);
+ var oldOptions = this.options;
+ this.options = _.merge(oldOptions, options);
+ return this;
+};
- if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {
- window.removeEventListener('unhandledrejection', window._rollbarURH);
+/*
+ * addTransform - adds a transform onto the end of the queue of transforms for this notifier
+ *
+ * @param transform - a function which takes three arguments:
+ * * item: An Object representing the data to eventually be sent to Rollbar
+ * * options: The current value of the options for this notifier
+ * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this
+ * callback with a null value for error if it wants the processing chain to continue, otherwise
+ * with an error to terminate the processing. The item should be the updated item after this
+ * transform is finished modifying it.
+ */
+Notifier.prototype.addTransform = function (transform) {
+ if (_.isFunction(transform)) {
+ this.transforms.push(transform);
}
+ return this;
+};
- var rejectionHandler = function (evt) {
- var reason, promise, detail;
- try {
- reason = evt.reason;
- } catch (e) {
- reason = undefined;
- }
- try {
- promise = evt.promise;
- } catch (e) {
- promise = '[unhandledrejection] error getting `promise` from event';
- }
- try {
- detail = evt.detail;
- if (!reason && detail) {
- reason = detail.reason;
- promise = detail.promise;
+/*
+ * log - the internal log function which applies the configured transforms and then pushes onto the
+ * queue to be sent to the backend.
+ *
+ * @param item - An object with the following structure:
+ * message [String] - An optional string to be sent to rollbar
+ * error [Error] - An optional error
+ *
+ * @param callback - A function of type function(err, resp) which will be called with exactly one
+ * null argument and one non-null argument. The callback will be called once, either during the
+ * transform stage if an error occurs inside a transform, or in response to the communication with
+ * the backend. The second argument will be the response from the backend in case of success.
+ */
+Notifier.prototype.log = function (item, callback) {
+ if (!callback || !_.isFunction(callback)) {
+ callback = function () {};
+ }
+
+ if (!this.options.enabled) {
+ return callback(new Error('Rollbar is not enabled'));
+ }
+
+ this.queue.addPendingItem(item);
+ var originalError = item.err;
+ this._applyTransforms(
+ item,
+ function (err, i) {
+ if (err) {
+ this.queue.removePendingItem(item);
+ return callback(err, null);
}
- } catch (e) {
- // Ignore
- }
- if (!reason) {
- reason = '[unhandledrejection] error getting `reason` from event';
+ this.queue.addItem(i, callback, originalError, item);
+ }.bind(this),
+ );
+};
+
+/* Internal */
+
+/*
+ * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See
+ * `addTransform` for more information.
+ *
+ * @param item - An item to be transformed
+ * @param callback - A function of type function(err, item) which will be called with a non-null
+ * error and a null item in the case of a transform failure, or a null error and non-null item after
+ * all transforms have been applied.
+ */
+Notifier.prototype._applyTransforms = function (item, callback) {
+ var transformIndex = -1;
+ var transformsLength = this.transforms.length;
+ var transforms = this.transforms;
+ var options = this.options;
+
+ var cb = function (err, i) {
+ if (err) {
+ callback(err, null);
+ return;
}
- if (handler && handler.handleUnhandledRejection) {
- handler.handleUnhandledRejection(reason, promise);
+ transformIndex++;
+
+ if (transformIndex === transformsLength) {
+ callback(null, i);
+ return;
}
- };
- rejectionHandler.belongsToShim = shim;
- window._rollbarURH = rejectionHandler;
- window.addEventListener('unhandledrejection', rejectionHandler);
-}
+ transforms[transformIndex](i, options, cb);
+ };
-module.exports = {
- captureUncaughtExceptions: captureUncaughtExceptions,
- captureUnhandledRejections: captureUnhandledRejections
+ cb(null, item);
};
+module.exports = Notifier;
+
/***/ }),
-/* 20 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 61:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-/*global XDomainRequest*/
+var _ = __webpack_require__(702);
-var _ = __webpack_require__(0);
-var logger = __webpack_require__(1);
+function checkLevel(item, settings) {
+ var level = item.level;
+ var levelVal = _.LEVELS[level] || 0;
+ var reportLevel = settings.reportLevel;
+ var reportLevelVal = _.LEVELS[reportLevel] || 0;
-/*
- * accessToken may be embedded in payload but that should not
- * be assumed
- *
- * options: {
- * hostname
- * protocol
- * path
- * port
- * method
- * }
- *
- * params is an object containing key/value pairs. These
- * will be appended to the path as 'key=value&key=value'
- *
- * payload is an unserialized object
- */
-function Transport(truncation) {
- this.truncation = truncation;
+ if (levelVal < reportLevelVal) {
+ return false;
+ }
+ return true;
+}
+
+function userCheckIgnore(logger) {
+ return function (item, settings) {
+ var isUncaught = !!item._isUncaught;
+ delete item._isUncaught;
+ var args = item._originalArgs;
+ delete item._originalArgs;
+ try {
+ if (_.isFunction(settings.onSendCallback)) {
+ settings.onSendCallback(isUncaught, args, item);
+ }
+ } catch (e) {
+ settings.onSendCallback = null;
+ logger.error('Error while calling onSendCallback, removing', e);
+ }
+ try {
+ if (
+ _.isFunction(settings.checkIgnore) &&
+ settings.checkIgnore(isUncaught, args, item)
+ ) {
+ return false;
+ }
+ } catch (e) {
+ settings.checkIgnore = null;
+ logger.error('Error while calling custom checkIgnore(), removing', e);
+ }
+ return true;
+ };
}
-Transport.prototype.get = function(accessToken, options, params, callback, requestFactory) {
- if (!callback || !_.isFunction(callback)) {
- callback = function() {};
- }
- _.addParamsAndAccessTokenToPath(accessToken, options, params);
+function urlIsNotBlockListed(logger) {
+ return function (item, settings) {
+ return !urlIsOnAList(item, settings, 'blocklist', logger);
+ };
+}
- var method = 'GET';
- var url = _.formatUrl(options);
- _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);
+function urlIsSafeListed(logger) {
+ return function (item, settings) {
+ return urlIsOnAList(item, settings, 'safelist', logger);
+ };
}
-Transport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {
- if (!callback || !_.isFunction(callback)) {
- callback = function() {};
+function matchFrames(trace, list, block) {
+ if (!trace) {
+ return !block;
}
- if (!payload) {
- return callback(new Error('Cannot send empty request'));
- }
+ var frames = trace.frames;
- var stringifyResult;
- if (this.truncation) {
- stringifyResult = this.truncation.truncate(payload);
- } else {
- stringifyResult = _.stringify(payload)
- }
- if (stringifyResult.error) {
- return callback(stringifyResult.error);
+ if (!frames || frames.length === 0) {
+ return !block;
}
- var writeData = stringifyResult.value;
- var method = 'POST';
- var url = _.formatUrl(options);
- _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);
-}
+ var frame, filename, url, urlRegex;
+ var listLength = list.length;
+ var frameLength = frames.length;
+ for (var i = 0; i < frameLength; i++) {
+ frame = frames[i];
+ filename = frame.filename;
-Transport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {
- if (!callback || !_.isFunction(callback)) {
- callback = function() {};
- }
+ if (!_.isType(filename, 'string')) {
+ return !block;
+ }
- var method = 'POST';
- var url = _.formatUrl(options);
- _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);
+ for (var j = 0; j < listLength; j++) {
+ url = list[j];
+ urlRegex = new RegExp(url);
+
+ if (urlRegex.test(filename)) {
+ return true;
+ }
+ }
+ }
+ return false;
}
+function urlIsOnAList(item, settings, safeOrBlock, logger) {
+ // safelist is the default
+ var block = false;
+ if (safeOrBlock === 'blocklist') {
+ block = true;
+ }
-// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope
-// so Angular change detection isn't triggered on each API call.
-// This is the equivalent of runOutsideAngular().
-//
-function _makeZoneRequest() {
- var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);
- var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;
- var args = Array.prototype.slice.call(arguments);
+ var list, traces;
+ try {
+ list = block ? settings.hostBlockList : settings.hostSafeList;
+ traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];
- if (currentZone && currentZone._name === 'angular') {
- var rootZone = currentZone._parent;
- rootZone.run(function () {
- _makeRequest.apply(undefined, args);
- });
- } else {
- _makeRequest.apply(undefined, args);
- }
-}
+ // These two checks are important to come first as they are defaults
+ // in case the list is missing or the trace is missing or not well-formed
+ if (!list || list.length === 0) {
+ return !block;
+ }
+ if (traces.length === 0 || !traces[0]) {
+ return !block;
+ }
-/* global RollbarProxy */
-function _proxyRequest(json, callback) {
- var rollbarProxy = new RollbarProxy();
- rollbarProxy.sendJsonPayload(
- json,
- function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars
- function(err) {
- callback(new Error(err));
+ var tracesLength = traces.length;
+ for (var i = 0; i < tracesLength; i++) {
+ if (matchFrames(traces[i], list, block)) {
+ return true;
+ }
}
- );
+ } catch (
+ e
+ /* istanbul ignore next */
+ ) {
+ if (block) {
+ settings.hostBlockList = null;
+ } else {
+ settings.hostSafeList = null;
+ }
+ var listName = block ? 'hostBlockList' : 'hostSafeList';
+ logger.error(
+ "Error while reading your configuration's " +
+ listName +
+ ' option. Removing custom ' +
+ listName +
+ '.',
+ e,
+ );
+ return !block;
+ }
+ return false;
}
-function _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {
- if (typeof RollbarProxy !== 'undefined') {
- return _proxyRequest(data, callback);
- }
+function messageIsIgnored(logger) {
+ return function (item, settings) {
+ var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;
- var request;
- if (requestFactory) {
- request = requestFactory();
- } else {
- request = _createXMLHTTPObject();
- }
- if (!request) {
- // Give up, no way to send requests
- return callback(new Error('No way to send a request'));
- }
- try {
try {
- var onreadystatechange = function() {
- try {
- if (onreadystatechange && request.readyState === 4) {
- onreadystatechange = undefined;
-
- var parseResponse = _.jsonParse(request.responseText);
- if (_isSuccess(request)) {
- callback(parseResponse.error, parseResponse.value);
- return;
- } else if (_isNormalFailure(request)) {
- if (request.status === 403) {
- // likely caused by using a server access token
- var message = parseResponse.value && parseResponse.value.message;
- logger.error(message);
- }
- // return valid http status codes
- callback(new Error(String(request.status)));
- } else {
- // IE will return a status 12000+ on some sort of connection failure,
- // so we return a blank error
- // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx
- var msg = 'XHR response had no status code (likely connection failure)';
- callback(_newRetriableError(msg));
- }
- }
- } catch (ex) {
- //jquery source mentions firefox may error out while accessing the
- //request members if there is a network error
- //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111
- var exc;
- if (ex && ex.stack) {
- exc = ex;
- } else {
- exc = new Error(ex);
- }
- callback(exc);
- }
- };
+ messageIsIgnored = false;
+ ignoredMessages = settings.ignoredMessages;
- request.open(method, url, true);
- if (request.setRequestHeader) {
- request.setRequestHeader('Content-Type', 'application/json');
- request.setRequestHeader('X-Rollbar-Access-Token', accessToken);
+ if (!ignoredMessages || ignoredMessages.length === 0) {
+ return true;
}
- if(_.isFiniteNumber(timeout)) {
- request.timeout = timeout;
- }
+ messages = messagesFromItem(item);
- request.onreadystatechange = onreadystatechange;
- request.send(data);
- } catch (e1) {
- // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest
- if (typeof XDomainRequest !== 'undefined') {
+ if (messages.length === 0) {
+ return true;
+ }
- // Assume we are in a really old browser which has a bunch of limitations:
- // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx
+ len = ignoredMessages.length;
+ for (i = 0; i < len; i++) {
+ rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');
- // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case
- if (!window || !window.location) {
- return callback(new Error('No window available during request, unknown environment'));
- }
+ for (j = 0; j < messages.length; j++) {
+ messageIsIgnored = rIgnoredMessage.test(messages[j]);
- // If the current page is http, try and send over http
- if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {
- url = 'http' + url.substring(5);
+ if (messageIsIgnored) {
+ return false;
+ }
}
-
- var xdomainrequest = new XDomainRequest();
- xdomainrequest.onprogress = function() {};
- xdomainrequest.ontimeout = function() {
- var msg = 'Request timed out';
- var code = 'ETIMEDOUT';
- callback(_newRetriableError(msg, code));
- };
- xdomainrequest.onerror = function() {
- callback(new Error('Error during request'));
- };
- xdomainrequest.onload = function() {
- var parseResponse = _.jsonParse(xdomainrequest.responseText);
- callback(parseResponse.error, parseResponse.value);
- };
- xdomainrequest.open(method, url, true);
- xdomainrequest.send(data);
- } else {
- callback(new Error('Cannot find a method to transport a request'));
}
+ } catch (
+ e
+ /* istanbul ignore next */
+ ) {
+ settings.ignoredMessages = null;
+ logger.error(
+ "Error while reading your configuration's ignoredMessages option. Removing custom ignoredMessages.",
+ );
}
- } catch (e2) {
- callback(e2);
- }
+
+ return true;
+ };
}
-function _createXMLHTTPObject() {
- /* global ActiveXObject:false */
+function messagesFromItem(item) {
+ var body = item.body;
+ var messages = [];
- var factories = [
- function () {
- return new XMLHttpRequest();
- },
- function () {
- return new ActiveXObject('Msxml2.XMLHTTP');
- },
- function () {
- return new ActiveXObject('Msxml3.XMLHTTP');
- },
- function () {
- return new ActiveXObject('Microsoft.XMLHTTP');
- }
- ];
- var xmlhttp;
- var i;
- var numFactories = factories.length;
- for (i = 0; i < numFactories; i++) {
- /* eslint-disable no-empty */
- try {
- xmlhttp = factories[i]();
- break;
- } catch (e) {
- // pass
+ // The payload schema only allows one of trace_chain, message, or trace.
+ // However, existing test cases are based on having both trace and message present.
+ // So here we preserve the ability to collect strings from any combination of these keys.
+ if (body.trace_chain) {
+ var traceChain = body.trace_chain;
+ for (var i = 0; i < traceChain.length; i++) {
+ var trace = traceChain[i];
+ messages.push(_.get(trace, 'exception.message'));
}
- /* eslint-enable no-empty */
}
- return xmlhttp;
-}
-
-function _isSuccess(r) {
- return r && r.status && r.status === 200;
-}
-
-function _isNormalFailure(r) {
- return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;
-}
-
-function _newRetriableError(message, code) {
- var err = new Error(message);
- err.code = code || 'ENOTFOUND';
- return err;
+ if (body.trace) {
+ messages.push(_.get(body, 'trace.exception.message'));
+ }
+ if (body.message) {
+ messages.push(_.get(body, 'message.body'));
+ }
+ return messages;
}
-module.exports = Transport;
+module.exports = {
+ checkLevel: checkLevel,
+ userCheckIgnore: userCheckIgnore,
+ urlIsNotBlockListed: urlIsNotBlockListed,
+ urlIsSafeListed: urlIsSafeListed,
+ messageIsIgnored: messageIsIgnored,
+};
/***/ }),
-/* 21 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 358:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var _ = __webpack_require__(0);
-var errorParser = __webpack_require__(3);
-var logger = __webpack_require__(1);
+var _ = __webpack_require__(702);
-function handleDomException(item, options, callback) {
- if(item.err && errorParser.Stack(item.err).name === 'DOMException') {
- var originalError = new Error();
- originalError.name = item.err.name;
- originalError.message = item.err.message;
- originalError.stack = item.err.stack;
- originalError.nested = item.err;
- item.err = originalError;
- }
- callback(null, item);
+/*
+ * Queue - an object which handles which handles a queue of items to be sent to Rollbar.
+ * This object handles rate limiting via a passed in rate limiter, retries based on connection
+ * errors, and filtering of items based on a set of configurable predicates. The communication to
+ * the backend is performed via a given API object.
+ *
+ * @param rateLimiter - An object which conforms to the interface
+ * rateLimiter.shouldSend(item) -> bool
+ * @param api - An object which conforms to the interface
+ * api.postItem(payload, function(err, response))
+ * @param logger - An object used to log verbose messages if desired
+ * @param options - see Queue.prototype.configure
+ */
+function Queue(rateLimiter, api, logger, options) {
+ this.rateLimiter = rateLimiter;
+ this.api = api;
+ this.logger = logger;
+ this.options = options;
+ this.predicates = [];
+ this.pendingItems = [];
+ this.pendingRequests = [];
+ this.retryQueue = [];
+ this.retryHandle = null;
+ this.waitCallback = null;
+ this.waitIntervalID = null;
}
-function handleItemWithError(item, options, callback) {
- item.data = item.data || {};
- if (item.err) {
- try {
- item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);
+/*
+ * configure - updates the options this queue uses
+ *
+ * @param options
+ */
+Queue.prototype.configure = function (options) {
+ this.api && this.api.configure(options);
+ var oldOptions = this.options;
+ this.options = _.merge(oldOptions, options);
+ return this;
+};
- if (options.addErrorContext) {
- addErrorContext(item);
- }
- } catch (e) {
- logger.error('Error while parsing the error object.', e);
- try {
- item.message = item.err.message || item.err.description || item.message || String(item.err);
- } catch (e2) {
- item.message = String(item.err) || String(e2);
- }
- delete item.err;
- }
+/*
+ * addPredicate - adds a predicate to the end of the list of predicates for this queue
+ *
+ * @param predicate - function(item, options) -> (bool|{err: Error})
+ * Returning true means that this predicate passes and the item is okay to go on the queue
+ * Returning false means do not add the item to the queue, but it is not an error
+ * Returning {err: Error} means do not add the item to the queue, and the given error explains why
+ * Returning {err: undefined} is equivalent to returning true but don't do that
+ */
+Queue.prototype.addPredicate = function (predicate) {
+ if (_.isFunction(predicate)) {
+ this.predicates.push(predicate);
}
- callback(null, item);
-}
-
-function addErrorContext(item) {
- var chain = [];
- var err = item.err;
+ return this;
+};
- chain.push(err);
+Queue.prototype.addPendingItem = function (item) {
+ this.pendingItems.push(item);
+};
- while (err.nested) {
- err = err.nested;
- chain.push(err);
+Queue.prototype.removePendingItem = function (item) {
+ var idx = this.pendingItems.indexOf(item);
+ if (idx !== -1) {
+ this.pendingItems.splice(idx, 1);
}
+};
- _.addErrorContext(item, chain);
-}
-
-function ensureItemHasSomethingToSay(item, options, callback) {
- if (!item.message && !item.stackInfo && !item.custom) {
- callback(new Error('No message, stack info, or custom data'), null);
+/*
+ * addItem - Send an item to the Rollbar API if all of the predicates are satisfied
+ *
+ * @param item - The payload to send to the backend
+ * @param callback - function(error, repsonse) which will be called with the response from the API
+ * in the case of a success, otherwise response will be null and error will have a value. If both
+ * error and response are null then the item was stopped by a predicate which did not consider this
+ * to be an error condition, but nonetheless did not send the item to the API.
+ * @param originalError - The original error before any transformations that is to be logged if any
+ */
+Queue.prototype.addItem = function (
+ item,
+ callback,
+ originalError,
+ originalItem,
+) {
+ if (!callback || !_.isFunction(callback)) {
+ callback = function () {
+ return;
+ };
}
- callback(null, item);
-}
-
-function addBaseInfo(item, options, callback) {
- var environment = (options.payload && options.payload.environment) || options.environment;
- item.data = _.merge(item.data, {
- environment: environment,
- level: item.level,
- endpoint: options.endpoint,
- platform: 'browser',
- framework: 'browser-js',
- language: 'javascript',
- server: {},
- uuid: item.uuid,
- notifier: {
- name: 'rollbar-browser-js',
- version: options.version
- },
- custom: item.custom
- });
- callback(null, item);
-}
-
-function addRequestInfo(window) {
- return function(item, options, callback) {
- if (!window || !window.location) {
- return callback(null, item);
- }
- var remoteString = '$remote_ip';
- if (!options.captureIp) {
- remoteString = null;
- } else if (options.captureIp !== true) {
- remoteString += '_anonymize';
- }
- _.set(item, 'data.request', {
- url: window.location.href,
- query_string: window.location.search,
- user_ip: remoteString
- });
- callback(null, item);
- };
-}
-
-function addClientInfo(window) {
- return function(item, options, callback) {
- if (!window) {
- return callback(null, item);
- }
- var nav = window.navigator || {};
- var scr = window.screen || {};
- _.set(item, 'data.client', {
- runtime_ms: item.timestamp - window._rollbarStartTime,
- timestamp: Math.round(item.timestamp / 1000),
- javascript: {
- browser: nav.userAgent,
- language: nav.language,
- cookie_enabled: nav.cookieEnabled,
- screen: {
- width: scr.width,
- height: scr.height
- }
- }
- });
- callback(null, item);
- };
-}
+ var predicateResult = this._applyPredicates(item);
+ if (predicateResult.stop) {
+ this.removePendingItem(originalItem);
+ callback(predicateResult.err);
+ return;
+ }
+ this._maybeLog(item, originalError);
+ this.removePendingItem(originalItem);
+ if (!this.options.transmit) {
+ callback(new Error('Transmit disabled'));
+ return;
+ }
+ this.pendingRequests.push(item);
+ try {
+ this._makeApiRequest(
+ item,
+ function (err, resp) {
+ this._dequeuePendingRequest(item);
+ callback(err, resp);
+ }.bind(this),
+ );
+ } catch (e) {
+ this._dequeuePendingRequest(item);
+ callback(e);
+ }
+};
-function addPluginInfo(window) {
- return function(item, options, callback) {
- if (!window || !window.navigator) {
- return callback(null, item);
- }
- var plugins = [];
- var navPlugins = window.navigator.plugins || [];
- var cur;
- for (var i=0, l=navPlugins.length; i < l; ++i) {
- cur = navPlugins[i];
- plugins.push({name: cur.name, description: cur.description});
- }
- _.set(item, 'data.client.javascript.plugins', plugins);
- callback(null, item);
- };
-}
+/*
+ * wait - Stop any further errors from being added to the queue, and get called back when all items
+ * currently processing have finished sending to the backend.
+ *
+ * @param callback - function() called when all pending items have been sent
+ */
+Queue.prototype.wait = function (callback) {
+ if (!_.isFunction(callback)) {
+ return;
+ }
+ this.waitCallback = callback;
+ if (this._maybeCallWait()) {
+ return;
+ }
+ if (this.waitIntervalID) {
+ this.waitIntervalID = clearInterval(this.waitIntervalID);
+ }
+ this.waitIntervalID = setInterval(
+ function () {
+ this._maybeCallWait();
+ }.bind(this),
+ 500,
+ );
+};
-function addBody(item, options, callback) {
- if (item.stackInfo) {
- if (item.stackInfo.traceChain) {
- addBodyTraceChain(item, options, callback);
- } else {
- addBodyTrace(item, options, callback);
+/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the
+ * given item with the currently configured options.
+ *
+ * @param item - An item in the queue
+ * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,
+ * the error value should be passed up to a callbak if we are stopping.
+ */
+Queue.prototype._applyPredicates = function (item) {
+ var p = null;
+ for (var i = 0, len = this.predicates.length; i < len; i++) {
+ p = this.predicates[i](item, this.options);
+ if (!p || p.err !== undefined) {
+ return { stop: true, err: p.err };
}
+ }
+ return { stop: false, err: null };
+};
+
+/*
+ * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an
+ * effort to retry if we are configured to do so.
+ *
+ * @param item - an item ready to send to the backend
+ * @param callback - function(err, response)
+ */
+Queue.prototype._makeApiRequest = function (item, callback) {
+ var rateLimitResponse = this.rateLimiter.shouldSend(item);
+ if (rateLimitResponse.shouldSend) {
+ this.api.postItem(
+ item,
+ function (err, resp) {
+ if (err) {
+ this._maybeRetry(err, item, callback);
+ } else {
+ callback(err, resp);
+ }
+ }.bind(this),
+ );
+ } else if (rateLimitResponse.error) {
+ callback(rateLimitResponse.error);
} else {
- addBodyMessage(item, options, callback);
+ this.api.postItem(rateLimitResponse.payload, callback);
}
-}
+};
-function addBodyMessage(item, options, callback) {
- var message = item.message;
- var custom = item.custom;
+// These are errors basically mean there is no internet connection
+var RETRIABLE_ERRORS = [
+ 'ECONNRESET',
+ 'ENOTFOUND',
+ 'ESOCKETTIMEDOUT',
+ 'ETIMEDOUT',
+ 'ECONNREFUSED',
+ 'EHOSTUNREACH',
+ 'EPIPE',
+ 'EAI_AGAIN',
+];
- if (!message) {
- message = 'Item sent with null or missing arguments.';
+/*
+ * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback
+ * with the error.
+ *
+ * @param err - an error returned by the API transport
+ * @param item - the item that was trying to be sent when this error occured
+ * @param callback - function(err, response)
+ */
+Queue.prototype._maybeRetry = function (err, item, callback) {
+ var shouldRetry = false;
+ if (this.options.retryInterval) {
+ for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {
+ if (err.code === RETRIABLE_ERRORS[i]) {
+ shouldRetry = true;
+ break;
+ }
+ }
+ if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {
+ item.retries = item.retries ? item.retries + 1 : 1;
+ if (item.retries > this.options.maxRetries) {
+ shouldRetry = false;
+ }
+ }
}
- var result = {
- body: message
- };
-
- if (custom) {
- result.extra = _.merge(custom);
+ if (shouldRetry) {
+ this._retryApiRequest(item, callback);
+ } else {
+ callback(err);
}
+};
- _.set(item, 'data.body', {message: result});
- callback(null, item);
-}
+/*
+ * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process
+ * that queue based on the retryInterval in the options for this queue.
+ *
+ * @param item - an item that failed to send due to an error we deem retriable
+ * @param callback - function(err, response)
+ */
+Queue.prototype._retryApiRequest = function (item, callback) {
+ this.retryQueue.push({ item: item, callback: callback });
-function stackFromItem(item) {
- // Transform a TraceKit stackInfo object into a Rollbar trace
- var stack = item.stackInfo.stack;
- if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {
- stack = item._unhandledStackInfo.stack;
+ if (!this.retryHandle) {
+ this.retryHandle = setInterval(
+ function () {
+ while (this.retryQueue.length) {
+ var retryObject = this.retryQueue.shift();
+ this._makeApiRequest(retryObject.item, retryObject.callback);
+ }
+ }.bind(this),
+ this.options.retryInterval,
+ );
}
- return stack;
-}
+};
-function addBodyTraceChain(item, options, callback) {
- var traceChain = item.stackInfo.traceChain;
- var traces = [];
+/*
+ * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to
+ * enable to functionality of providing a callback that clients can pass to `wait` to be notified
+ * when the pending request queue has been emptied. This must be called when the API finishes
+ * processing this item. If a `wait` callback is configured, it is called by this function.
+ *
+ * @param item - the item previously added to the pending request queue
+ */
+Queue.prototype._dequeuePendingRequest = function (item) {
+ var idx = this.pendingRequests.indexOf(item);
+ if (idx !== -1) {
+ this.pendingRequests.splice(idx, 1);
+ this._maybeCallWait();
+ }
+};
- var traceChainLength = traceChain.length;
- for (var i = 0; i < traceChainLength; i++) {
- var trace = buildTrace(item, traceChain[i], options);
- traces.push(trace);
+Queue.prototype._maybeLog = function (data, originalError) {
+ if (this.logger && this.options.verbose) {
+ var message = originalError;
+ message = message || _.get(data, 'body.trace.exception.message');
+ message = message || _.get(data, 'body.trace_chain.0.exception.message');
+ if (message) {
+ this.logger.error(message);
+ return;
+ }
+ message = _.get(data, 'body.message.body');
+ if (message) {
+ this.logger.log(message);
+ }
}
+};
- _.set(item, 'data.body', {trace_chain: traces});
- callback(null, item);
-}
+Queue.prototype._maybeCallWait = function () {
+ if (
+ _.isFunction(this.waitCallback) &&
+ this.pendingItems.length === 0 &&
+ this.pendingRequests.length === 0
+ ) {
+ if (this.waitIntervalID) {
+ this.waitIntervalID = clearInterval(this.waitIntervalID);
+ }
+ this.waitCallback();
+ return true;
+ }
+ return false;
+};
-function addBodyTrace(item, options, callback) {
- var stack = stackFromItem(item);
+module.exports = Queue;
- if (stack) {
- var trace = buildTrace(item, item.stackInfo, options);
- _.set(item, 'data.body', {trace: trace});
- callback(null, item);
- } else {
- var stackInfo = item.stackInfo;
- var guess = errorParser.guessErrorClass(stackInfo.message);
- var className = errorClass(stackInfo, guess[0], options);
- var message = guess[1];
- item.message = className + ': ' + message;
- addBodyMessage(item, options, callback);
- }
-}
+/***/ }),
-function buildTrace(item, stackInfo, options) {
- var description = item && item.data.description;
- var custom = item && item.custom;
- var stack = stackFromItem(item);
+/***/ 790:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- var guess = errorParser.guessErrorClass(stackInfo.message);
- var className = errorClass(stackInfo, guess[0], options);
- var message = guess[1];
- var trace = {
- exception: {
- 'class': className,
- message: message
- }
- };
+"use strict";
- if (description) {
- trace.exception.description = description;
- }
- if (stack) {
- if (stack.length === 0) {
- trace.exception.stack = stackInfo.rawStack;
- trace.exception.raw = String(stackInfo.rawException);
- }
- var stackFrame;
- var frame;
- var code;
- var pre;
- var post;
- var contextLength;
- var i, mid;
+var _ = __webpack_require__(702);
- trace.frames = [];
- for (i = 0; i < stack.length; ++i) {
- stackFrame = stack[i];
- frame = {
- filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',
- lineno: stackFrame.line || null,
- method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,
- colno: stackFrame.column
- };
- if (options.sendFrameUrl) {
- frame.url = stackFrame.url;
- }
- if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {
- continue;
- }
+/*
+ * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar
+ *
+ * @param options - the same options that are accepted by configureGlobal offered as a convenience
+ */
+function RateLimiter(options) {
+ this.startTime = _.now();
+ this.counter = 0;
+ this.perMinCounter = 0;
+ this.platform = null;
+ this.platformOptions = {};
+ this.configureGlobal(options);
+}
- code = pre = post = null;
- contextLength = stackFrame.context ? stackFrame.context.length : 0;
- if (contextLength) {
- mid = Math.floor(contextLength / 2);
- pre = stackFrame.context.slice(0, mid);
- code = stackFrame.context[mid];
- post = stackFrame.context.slice(mid);
- }
+RateLimiter.globalSettings = {
+ startTime: _.now(),
+ maxItems: undefined,
+ itemsPerMinute: undefined,
+};
- if (code) {
- frame.code = code;
- }
+/*
+ * configureGlobal - set the global rate limiter options
+ *
+ * @param options - Only the following values are recognized:
+ * startTime: a timestamp of the form returned by (new Date()).getTime()
+ * maxItems: the maximum items
+ * itemsPerMinute: the max number of items to send in a given minute
+ */
+RateLimiter.prototype.configureGlobal = function (options) {
+ if (options.startTime !== undefined) {
+ RateLimiter.globalSettings.startTime = options.startTime;
+ }
+ if (options.maxItems !== undefined) {
+ RateLimiter.globalSettings.maxItems = options.maxItems;
+ }
+ if (options.itemsPerMinute !== undefined) {
+ RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;
+ }
+};
- if (pre || post) {
- frame.context = {};
- if (pre && pre.length) {
- frame.context.pre = pre;
- }
- if (post && post.length) {
- frame.context.post = post;
- }
- }
+/*
+ * shouldSend - determine if we should send a given item based on rate limit settings
+ *
+ * @param item - the item we are about to send
+ * @returns An object with the following structure:
+ * error: (Error|null)
+ * shouldSend: bool
+ * payload: (Object|null)
+ * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and
+ * exactly one of error or payload will be non-null. If error is non-null, the returned Error will
+ * describe the situation, but it means that we were already over a rate limit (either globally or
+ * per minute) when this item was checked. If error is null, and therefore payload is non-null, it
+ * means this item put us over the global rate limit and the payload should be sent to Rollbar in
+ * place of the passed in item.
+ */
+RateLimiter.prototype.shouldSend = function (item, now) {
+ now = now || _.now();
+ var elapsedTime = now - this.startTime;
+ if (elapsedTime < 0 || elapsedTime >= 60000) {
+ this.startTime = now;
+ this.perMinCounter = 0;
+ }
- if (stackFrame.args) {
- frame.args = stackFrame.args;
- }
+ var globalRateLimit = RateLimiter.globalSettings.maxItems;
+ var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;
- trace.frames.push(frame);
- }
+ if (checkRate(item, globalRateLimit, this.counter)) {
+ return shouldSendValue(
+ this.platform,
+ this.platformOptions,
+ globalRateLimit + ' max items reached',
+ false,
+ );
+ } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {
+ return shouldSendValue(
+ this.platform,
+ this.platformOptions,
+ globalRateLimitPerMin + ' items per minute reached',
+ false,
+ );
+ }
+ this.counter++;
+ this.perMinCounter++;
- // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last
- trace.frames.reverse();
+ var shouldSend = !checkRate(item, globalRateLimit, this.counter);
+ var perMinute = shouldSend;
+ shouldSend =
+ shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);
+ return shouldSendValue(
+ this.platform,
+ this.platformOptions,
+ null,
+ shouldSend,
+ globalRateLimit,
+ globalRateLimitPerMin,
+ perMinute,
+ );
+};
- if (custom) {
- trace.extra = _.merge(custom);
- }
- }
+RateLimiter.prototype.setPlatformOptions = function (platform, options) {
+ this.platform = platform;
+ this.platformOptions = options;
+};
- return trace;
+/* Helpers */
+
+function checkRate(item, limit, counter) {
+ return !item.ignoreRateLimit && limit >= 1 && counter > limit;
}
-function errorClass(stackInfo, guess, options) {
- if (stackInfo.name) {
- return stackInfo.name;
- } else if (options.guessErrorClass) {
- return guess;
- } else {
- return '(unknown)';
+function shouldSendValue(
+ platform,
+ options,
+ error,
+ shouldSend,
+ globalRateLimit,
+ limitPerMin,
+ perMinute,
+) {
+ var payload = null;
+ if (error) {
+ error = new Error(error);
}
+ if (!error && !shouldSend) {
+ payload = rateLimitPayload(
+ platform,
+ options,
+ globalRateLimit,
+ limitPerMin,
+ perMinute,
+ );
+ }
+ return { error: error, shouldSend: shouldSend, payload: payload };
}
-function addScrubber(scrubFn) {
- return function (item, options, callback) {
- if (scrubFn) {
- var scrubFields = options.scrubFields || [];
- var scrubPaths = options.scrubPaths || [];
- item.data = scrubFn(item.data, scrubFields, scrubPaths);
- }
- callback(null, item);
+function rateLimitPayload(
+ platform,
+ options,
+ globalRateLimit,
+ limitPerMin,
+ perMinute,
+) {
+ var environment =
+ options.environment || (options.payload && options.payload.environment);
+ var msg;
+ if (perMinute) {
+ msg = 'item per minute limit reached, ignoring errors until timeout';
+ } else {
+ msg = 'maxItems has been hit, ignoring errors until reset.';
+ }
+ var item = {
+ body: {
+ message: {
+ body: msg,
+ extra: {
+ maxItems: globalRateLimit,
+ itemsPerMinute: limitPerMin,
+ },
+ },
+ },
+ language: 'javascript',
+ environment: environment,
+ notifier: {
+ version:
+ (options.notifier && options.notifier.version) || options.version,
+ },
+ };
+ if (platform === 'browser') {
+ item.platform = 'browser';
+ item.framework = 'browser-js';
+ item.notifier.name = 'rollbar-browser-js';
+ } else if (platform === 'server') {
+ item.framework = options.framework || 'node-js';
+ item.notifier.name = options.notifier.name;
+ } else if (platform === 'react-native') {
+ item.framework = options.framework || 'react-native';
+ item.notifier.name = options.notifier.name;
}
+ return item;
}
-module.exports = {
- handleDomException: handleDomException,
- handleItemWithError: handleItemWithError,
- ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,
- addBaseInfo: addBaseInfo,
- addRequestInfo: addRequestInfo,
- addClientInfo: addClientInfo,
- addPluginInfo: addPluginInfo,
- addBody: addBody,
- addScrubber: addScrubber
-};
+module.exports = RateLimiter;
/***/ }),
-/* 22 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {
- 'use strict';
- // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
-
- /* istanbul ignore next */
- if (true) {
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(23)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- } else {}
-}(this, function ErrorStackParser(StackFrame) {
- 'use strict';
-
- var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\S+:\d+/;
- var CHROME_IE_STACK_REGEXP = /^\s*at .*(\S+:\d+|\(native\))/m;
- var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\[native code])?$/;
-
- return {
- /**
- * Given an Error object, extract the most information from it.
- *
- * @param {Error} error object
- * @return {Array} of StackFrames
- */
- parse: function ErrorStackParser$$parse(error) {
- if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {
- return this.parseOpera(error);
- } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {
- return this.parseV8OrIE(error);
- } else if (error.stack) {
- return this.parseFFOrSafari(error);
- } else {
- throw new Error('Cannot parse given Error object');
- }
- },
-
- // Separate line and column numbers from a string of the form: (URI:Line:Column)
- extractLocation: function ErrorStackParser$$extractLocation(urlLike) {
- // Fail-fast but return locations like "(native)"
- if (urlLike.indexOf(':') === -1) {
- return [urlLike];
- }
-
- var regExp = /(.+?)(?::(\d+))?(?::(\d+))?$/;
- var parts = regExp.exec(urlLike.replace(/[()]/g, ''));
- return [parts[1], parts[2] || undefined, parts[3] || undefined];
- },
-
- parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {
- var filtered = error.stack.split('\n').filter(function(line) {
- return !!line.match(CHROME_IE_STACK_REGEXP);
- }, this);
-
- return filtered.map(function(line) {
- if (line.indexOf('(eval ') > -1) {
- // Throw away eval information until we implement stacktrace.js/stackframe#8
- line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(\),.*$)/g, '');
- }
- var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '(');
-
- // capture and preseve the parenthesized location "(/foo/my bar.js:12:87)" in
- // case it has spaces in it, as the string is split on \s+ later on
- var location = sanitizedLine.match(/ (\((.+):(\d+):(\d+)\)$)/);
-
- // remove the parenthesized location from the line, if it was matched
- sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;
-
- var tokens = sanitizedLine.split(/\s+/).slice(1);
- // if a location was matched, pass it to extractLocation() otherwise pop the last token
- var locationParts = this.extractLocation(location ? location[1] : tokens.pop());
- var functionName = tokens.join(' ') || undefined;
- var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];
-
- return new StackFrame({
- functionName: functionName,
- fileName: fileName,
- lineNumber: locationParts[1],
- columnNumber: locationParts[2],
- source: line
- });
- }, this);
- },
-
- parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {
- var filtered = error.stack.split('\n').filter(function(line) {
- return !line.match(SAFARI_NATIVE_CODE_REGEXP);
- }, this);
- return filtered.map(function(line) {
- // Throw away eval information until we implement stacktrace.js/stackframe#8
- if (line.indexOf(' > eval') > -1) {
- line = line.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ':$1');
- }
+/***/ 562:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {
- // Safari eval frames only have function names and nothing else
- return new StackFrame({
- functionName: line
- });
- } else {
- var functionNameRegex = /((.*".+"[^@]*)?[^@]*)(?:@)/;
- var matches = line.match(functionNameRegex);
- var functionName = matches && matches[1] ? matches[1] : undefined;
- var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));
+"use strict";
- return new StackFrame({
- functionName: functionName,
- fileName: locationParts[0],
- lineNumber: locationParts[1],
- columnNumber: locationParts[2],
- source: line
- });
- }
- }, this);
- },
- parseOpera: function ErrorStackParser$$parseOpera(e) {
- if (!e.stacktrace || (e.message.indexOf('\n') > -1 &&
- e.message.split('\n').length > e.stacktrace.split('\n').length)) {
- return this.parseOpera9(e);
- } else if (!e.stack) {
- return this.parseOpera10(e);
- } else {
- return this.parseOpera11(e);
- }
- },
+var RateLimiter = __webpack_require__(790);
+var Queue = __webpack_require__(358);
+var Notifier = __webpack_require__(314);
+var _ = __webpack_require__(702);
- parseOpera9: function ErrorStackParser$$parseOpera9(e) {
- var lineRE = /Line (\d+).*script (?:in )?(\S+)/i;
- var lines = e.message.split('\n');
- var result = [];
+/*
+ * Rollbar - the interface to Rollbar
+ *
+ * @param options
+ * @param api
+ * @param logger
+ */
+function Rollbar(options, api, logger, telemeter, platform) {
+ this.options = _.merge(options);
+ this.logger = logger;
+ Rollbar.rateLimiter.configureGlobal(this.options);
+ Rollbar.rateLimiter.setPlatformOptions(platform, this.options);
+ this.api = api;
+ this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);
- for (var i = 2, len = lines.length; i < len; i += 2) {
- var match = lineRE.exec(lines[i]);
- if (match) {
- result.push(new StackFrame({
- fileName: match[2],
- lineNumber: match[1],
- source: lines[i]
- }));
- }
- }
+ // This must happen before the Notifier is created
+ var tracer = this.options.tracer || null;
+ if (validateTracer(tracer)) {
+ this.tracer = tracer;
+ // set to a string for api response serialization
+ this.options.tracer = 'opentracing-tracer-enabled';
+ this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';
+ } else {
+ this.tracer = null;
+ }
- return result;
- },
+ this.notifier = new Notifier(this.queue, this.options);
+ this.telemeter = telemeter;
+ setStackTraceLimit(options);
+ this.lastError = null;
+ this.lastErrorHash = 'none';
+}
- parseOpera10: function ErrorStackParser$$parseOpera10(e) {
- var lineRE = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i;
- var lines = e.stacktrace.split('\n');
- var result = [];
+var defaultOptions = {
+ maxItems: 0,
+ itemsPerMinute: 60,
+};
- for (var i = 0, len = lines.length; i < len; i += 2) {
- var match = lineRE.exec(lines[i]);
- if (match) {
- result.push(
- new StackFrame({
- functionName: match[3] || undefined,
- fileName: match[2],
- lineNumber: match[1],
- source: lines[i]
- })
- );
- }
- }
+Rollbar.rateLimiter = new RateLimiter(defaultOptions);
- return result;
- },
+Rollbar.prototype.global = function (options) {
+ Rollbar.rateLimiter.configureGlobal(options);
+ return this;
+};
- // Opera 10.65+ Error.stack very similar to FF/Safari
- parseOpera11: function ErrorStackParser$$parseOpera11(error) {
- var filtered = error.stack.split('\n').filter(function(line) {
- return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);
- }, this);
+Rollbar.prototype.configure = function (options, payloadData) {
+ var oldOptions = this.options;
+ var payload = {};
+ if (payloadData) {
+ payload = { payload: payloadData };
+ }
- return filtered.map(function(line) {
- var tokens = line.split('@');
- var locationParts = this.extractLocation(tokens.pop());
- var functionCall = (tokens.shift() || '');
- var functionName = functionCall
- .replace(//, '$2')
- .replace(/\([^)]*\)/g, '') || undefined;
- var argsRaw;
- if (functionCall.match(/\(([^)]*)\)/)) {
- argsRaw = functionCall.replace(/^[^(]+\(([^)]*)\)$/, '$1');
- }
- var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?
- undefined : argsRaw.split(',');
+ this.options = _.merge(oldOptions, options, payload);
- return new StackFrame({
- functionName: functionName,
- args: args,
- fileName: locationParts[0],
- lineNumber: locationParts[1],
- columnNumber: locationParts[2],
- source: line
- });
- }, this);
- }
- };
-}));
+ // This must happen before the Notifier is configured
+ var tracer = this.options.tracer || null;
+ if (validateTracer(tracer)) {
+ this.tracer = tracer;
+ // set to a string for api response serialization
+ this.options.tracer = 'opentracing-tracer-enabled';
+ this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';
+ } else {
+ this.tracer = null;
+ }
+ this.notifier && this.notifier.configure(this.options);
+ this.telemeter && this.telemeter.configure(this.options);
+ setStackTraceLimit(options);
+ this.global(this.options);
-/***/ }),
-/* 23 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (validateTracer(options.tracer)) {
+ this.tracer = options.tracer;
+ }
-var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {
- 'use strict';
- // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
+ return this;
+};
- /* istanbul ignore next */
- if (true) {
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- } else {}
-}(this, function() {
- 'use strict';
- function _isNumber(n) {
- return !isNaN(parseFloat(n)) && isFinite(n);
- }
+Rollbar.prototype.log = function (item) {
+ var level = this._defaultLogLevel();
+ return this._log(level, item);
+};
- function _capitalize(str) {
- return str.charAt(0).toUpperCase() + str.substring(1);
- }
+Rollbar.prototype.debug = function (item) {
+ this._log('debug', item);
+};
- function _getter(p) {
- return function() {
- return this[p];
- };
- }
+Rollbar.prototype.info = function (item) {
+ this._log('info', item);
+};
- var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];
- var numericProps = ['columnNumber', 'lineNumber'];
- var stringProps = ['fileName', 'functionName', 'source'];
- var arrayProps = ['args'];
- var objectProps = ['evalOrigin'];
+Rollbar.prototype.warn = function (item) {
+ this._log('warning', item);
+};
- var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);
+Rollbar.prototype.warning = function (item) {
+ this._log('warning', item);
+};
- function StackFrame(obj) {
- if (!obj) return;
- for (var i = 0; i < props.length; i++) {
- if (obj[props[i]] !== undefined) {
- this['set' + _capitalize(props[i])](obj[props[i]]);
- }
- }
- }
+Rollbar.prototype.error = function (item) {
+ this._log('error', item);
+};
- StackFrame.prototype = {
- getArgs: function() {
- return this.args;
- },
- setArgs: function(v) {
- if (Object.prototype.toString.call(v) !== '[object Array]') {
- throw new TypeError('Args must be an Array');
- }
- this.args = v;
- },
+Rollbar.prototype.critical = function (item) {
+ this._log('critical', item);
+};
- getEvalOrigin: function() {
- return this.evalOrigin;
- },
- setEvalOrigin: function(v) {
- if (v instanceof StackFrame) {
- this.evalOrigin = v;
- } else if (v instanceof Object) {
- this.evalOrigin = new StackFrame(v);
- } else {
- throw new TypeError('Eval Origin must be an Object or StackFrame');
- }
- },
+Rollbar.prototype.wait = function (callback) {
+ this.queue.wait(callback);
+};
- toString: function() {
- var fileName = this.getFileName() || '';
- var lineNumber = this.getLineNumber() || '';
- var columnNumber = this.getColumnNumber() || '';
- var functionName = this.getFunctionName() || '';
- if (this.getIsEval()) {
- if (fileName) {
- return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';
- }
- return '[eval]:' + lineNumber + ':' + columnNumber;
- }
- if (functionName) {
- return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';
- }
- return fileName + ':' + lineNumber + ':' + columnNumber;
- }
- };
+Rollbar.prototype.captureEvent = function (type, metadata, level) {
+ return this.telemeter && this.telemeter.captureEvent(type, metadata, level);
+};
- StackFrame.fromString = function StackFrame$$fromString(str) {
- var argsStartIndex = str.indexOf('(');
- var argsEndIndex = str.lastIndexOf(')');
+Rollbar.prototype.captureDomContentLoaded = function (ts) {
+ return this.telemeter && this.telemeter.captureDomContentLoaded(ts);
+};
- var functionName = str.substring(0, argsStartIndex);
- var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');
- var locationString = str.substring(argsEndIndex + 1);
+Rollbar.prototype.captureLoad = function (ts) {
+ return this.telemeter && this.telemeter.captureLoad(ts);
+};
- if (locationString.indexOf('@') === 0) {
- var parts = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(locationString, '');
- var fileName = parts[1];
- var lineNumber = parts[2];
- var columnNumber = parts[3];
- }
+Rollbar.prototype.buildJsonPayload = function (item) {
+ return this.api.buildJsonPayload(item);
+};
- return new StackFrame({
- functionName: functionName,
- args: args || undefined,
- fileName: fileName,
- lineNumber: lineNumber || undefined,
- columnNumber: columnNumber || undefined
- });
- };
+Rollbar.prototype.sendJsonPayload = function (jsonPayload) {
+ this.api.postJsonPayload(jsonPayload);
+};
- for (var i = 0; i < booleanProps.length; i++) {
- StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);
- StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {
- return function(v) {
- this[p] = Boolean(v);
- };
- })(booleanProps[i]);
- }
+/* Internal */
- for (var j = 0; j < numericProps.length; j++) {
- StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);
- StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {
- return function(v) {
- if (!_isNumber(v)) {
- throw new TypeError(p + ' must be a Number');
- }
- this[p] = Number(v);
- };
- })(numericProps[j]);
+Rollbar.prototype._log = function (defaultLevel, item) {
+ var callback;
+ if (item.callback) {
+ callback = item.callback;
+ delete item.callback;
+ }
+ if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {
+ if (callback) {
+ var error = new Error('ignored identical item');
+ error.item = item;
+ callback(error);
}
-
- for (var k = 0; k < stringProps.length; k++) {
- StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);
- StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {
- return function(v) {
- this[p] = String(v);
- };
- })(stringProps[k]);
+ return;
+ }
+ try {
+ this._addTracingInfo(item);
+ item.level = item.level || defaultLevel;
+ this.telemeter && this.telemeter._captureRollbarItem(item);
+ item.telemetryEvents =
+ (this.telemeter && this.telemeter.copyEvents()) || [];
+ this.notifier.log(item, callback);
+ } catch (e) {
+ if (callback) {
+ callback(e);
}
+ this.logger.error(e);
+ }
+};
- return StackFrame;
-}));
-
+Rollbar.prototype._defaultLogLevel = function () {
+ return this.options.logLevel || 'debug';
+};
-/***/ }),
-/* 24 */
-/***/ (function(module, exports, __webpack_require__) {
+Rollbar.prototype._sameAsLastError = function (item) {
+ if (!item._isUncaught) {
+ return false;
+ }
+ var itemHash = generateItemHash(item);
+ if (this.lastErrorHash === itemHash) {
+ return true;
+ }
+ this.lastError = item.err;
+ this.lastErrorHash = itemHash;
+ return false;
+};
-"use strict";
+Rollbar.prototype._addTracingInfo = function (item) {
+ // Tracer validation occurs in the constructor
+ // or in the Rollbar.prototype.configure methods
+ if (this.tracer) {
+ // add rollbar occurrence uuid to span
+ var span = this.tracer.scope().active();
+ if (validateSpan(span)) {
+ span.setTag('rollbar.error_uuid', item.uuid);
+ span.setTag('rollbar.has_error', true);
+ span.setTag('error', true);
+ span.setTag(
+ 'rollbar.item_url',
+ `https://rollbar.com/item/uuid/?uuid=${item.uuid}`,
+ );
+ span.setTag(
+ 'rollbar.occurrence_url',
+ `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`,
+ );
-var _ = __webpack_require__(0);
+ // add span ID & trace ID to occurrence
+ var opentracingSpanId = span.context().toSpanId();
+ var opentracingTraceId = span.context().toTraceId();
-function itemToPayload(item, options, callback) {
- var payloadOptions = options.payload || {};
- if (payloadOptions.body) {
- delete payloadOptions.body;
+ if (item.custom) {
+ item.custom.opentracing_span_id = opentracingSpanId;
+ item.custom.opentracing_trace_id = opentracingTraceId;
+ } else {
+ item.custom = {
+ opentracing_span_id: opentracingSpanId,
+ opentracing_trace_id: opentracingTraceId,
+ };
+ }
+ }
}
+};
- var data = _.merge(item.data, payloadOptions);
- if (item._isUncaught) {
- data._isUncaught = true;
- }
- if (item._originalArgs) {
- data._originalArgs = item._originalArgs;
- }
- callback(null, data);
+function generateItemHash(item) {
+ var message = item.message || '';
+ var stack = (item.err || {}).stack || String(item.err);
+ return message + '::' + stack;
}
-function addTelemetryData(item, options, callback) {
- if (item.telemetryEvents) {
- _.set(item, 'data.body.telemetry', item.telemetryEvents);
+// Node.js, Chrome, Safari, and some other browsers support this property
+// which globally sets the number of stack frames returned in an Error object.
+// If a browser can't use it, no harm done.
+function setStackTraceLimit(options) {
+ if (options.stackTraceLimit) {
+ Error.stackTraceLimit = options.stackTraceLimit;
}
- callback(null, item);
}
-function addMessageWithError(item, options, callback) {
- if (!item.message) {
- callback(null, item);
- return;
- }
- var tracePath = 'data.body.trace_chain.0';
- var trace = _.get(item, tracePath);
- if (!trace) {
- tracePath = 'data.body.trace';
- trace = _.get(item, tracePath);
+/**
+ * Validate the Tracer object provided to the Client
+ * is valid for our Opentracing use case.
+ * @param {opentracer.Tracer} tracer
+ */
+function validateTracer(tracer) {
+ if (!tracer) {
+ return false;
}
- if (trace) {
- if (!(trace.exception && trace.exception.description)) {
- _.set(item, tracePath+'.exception.description', item.message);
- callback(null, item);
- return;
- }
- var extra = _.get(item, tracePath+'.extra') || {};
- var newExtra = _.merge(extra, {message: item.message});
- _.set(item, tracePath+'.extra', newExtra);
+
+ if (!tracer.scope || typeof tracer.scope !== 'function') {
+ return false;
}
- callback(null, item);
-}
-function userTransform(logger) {
- return function(item, options, callback) {
- var newItem = _.merge(item);
- var response = null;
- try {
- if (_.isFunction(options.transform)) {
- response = options.transform(newItem.data, item);
- }
- } catch (e) {
- options.transform = null;
- logger.error('Error while calling custom transform() function. Removing custom transform().', e);
- callback(null, item);
- return;
- }
- if(_.isPromise(response)) {
- response.then(function (promisedItem) {
- if(promisedItem) {
- newItem.data = promisedItem;
- }
- callback(null, newItem);
- }, function (error) {
- callback(error, item);
- });
- } else {
- callback(null, newItem);
- }
+ var scope = tracer.scope();
+
+ if (!scope || !scope.active || typeof scope.active !== 'function') {
+ return false;
}
+
+ return true;
}
-function addConfigToPayload(item, options, callback) {
- if (!options.sendConfig) {
- return callback(null, item);
+/**
+ * Validate the Span object provided
+ * @param {opentracer.Span} span
+ */
+function validateSpan(span) {
+ if (!span || !span.context || typeof span.context !== 'function') {
+ return false;
}
- var configKey = '_rollbarConfig';
- var custom = _.get(item, 'data.custom') || {};
- custom[configKey] = options;
- item.data.custom = custom;
- callback(null, item);
-}
-function addFunctionOption(options, name) {
- if(_.isFunction(options[name])) {
- options[name] = options[name].toString();
+ var spanContext = span.context();
+
+ if (
+ !spanContext ||
+ !spanContext.toSpanId ||
+ !spanContext.toTraceId ||
+ typeof spanContext.toSpanId !== 'function' ||
+ typeof spanContext.toTraceId !== 'function'
+ ) {
+ return false;
}
+
+ return true;
}
-function addConfiguredOptions(item, options, callback) {
- var configuredOptions = options._configuredOptions;
+module.exports = Rollbar;
- // These must be stringified or they'll get dropped during serialization.
- addFunctionOption(configuredOptions, 'transform');
- addFunctionOption(configuredOptions, 'checkIgnore');
- addFunctionOption(configuredOptions, 'onSendCallback');
- delete configuredOptions.accessToken;
- item.data.notifier.configured_options = configuredOptions;
- callback(null, item);
-}
+/***/ }),
-function addDiagnosticKeys(item, options, callback) {
- var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);
+/***/ 369:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- if (_.get(item, 'err._isAnonymous')) {
- diagnostic.is_anonymous = true;
- }
+"use strict";
- if (item._isUncaught) {
- diagnostic.is_uncaught = item._isUncaught;
- }
- if (item.err) {
- try {
- diagnostic.raw_error = {
- message: item.err.message,
- name: item.err.name,
- constructor_name: item.err.constructor && item.err.constructor.name,
- filename: item.err.fileName,
- line: item.err.lineNumber,
- column: item.err.columnNumber,
- stack: item.err.stack
- };
- } catch (e) {
- diagnostic.raw_error = { failed: String(e) };
+var _ = __webpack_require__(702);
+var traverse = __webpack_require__(267);
+
+function scrub(data, scrubFields, scrubPaths) {
+ scrubFields = scrubFields || [];
+
+ if (scrubPaths) {
+ for (var i = 0; i < scrubPaths.length; ++i) {
+ scrubPath(data, scrubPaths[i]);
}
}
- item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);
- callback(null, item);
-}
+ var paramRes = _getScrubFieldRegexs(scrubFields);
+ var queryRes = _getScrubQueryParamRegexs(scrubFields);
-module.exports = {
- itemToPayload: itemToPayload,
- addTelemetryData: addTelemetryData,
- addMessageWithError: addMessageWithError,
- userTransform: userTransform,
- addConfigToPayload: addConfigToPayload,
- addConfiguredOptions: addConfiguredOptions,
- addDiagnosticKeys: addDiagnosticKeys
-};
+ function redactQueryParam(dummy0, paramPart) {
+ return paramPart + _.redact();
+ }
+
+ function paramScrubber(v) {
+ var i;
+ if (_.isType(v, 'string')) {
+ for (i = 0; i < queryRes.length; ++i) {
+ v = v.replace(queryRes[i], redactQueryParam);
+ }
+ }
+ return v;
+ }
+ function valScrubber(k, v) {
+ var i;
+ for (i = 0; i < paramRes.length; ++i) {
+ if (paramRes[i].test(k)) {
+ v = _.redact();
+ break;
+ }
+ }
+ return v;
+ }
-/***/ }),
-/* 25 */
-/***/ (function(module, exports, __webpack_require__) {
+ function scrubber(k, v, seen) {
+ var tmpV = valScrubber(k, v);
+ if (tmpV === v) {
+ if (_.isType(v, 'object') || _.isType(v, 'array')) {
+ return traverse(v, scrubber, seen);
+ }
+ return paramScrubber(tmpV);
+ } else {
+ return tmpV;
+ }
+ }
-"use strict";
+ return traverse(data, scrubber);
+}
+function scrubPath(obj, path) {
+ var keys = path.split('.');
+ var last = keys.length - 1;
+ try {
+ for (var i = 0; i <= last; ++i) {
+ if (i < last) {
+ obj = obj[keys[i]];
+ } else {
+ obj[keys[i]] = _.redact();
+ }
+ }
+ } catch (e) {
+ // Missing key is OK;
+ }
+}
-var _ = __webpack_require__(0);
+function _getScrubFieldRegexs(scrubFields) {
+ var ret = [];
+ var pat;
+ for (var i = 0; i < scrubFields.length; ++i) {
+ pat = '^\\[?(%5[bB])?' + scrubFields[i] + '\\[?(%5[bB])?\\]?(%5[dD])?$';
+ ret.push(new RegExp(pat, 'i'));
+ }
+ return ret;
+}
-function checkIgnore(item, settings) {
- if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {
- return !_.get(item, 'body.message.extra.isAjax');
+function _getScrubQueryParamRegexs(scrubFields) {
+ var ret = [];
+ var pat;
+ for (var i = 0; i < scrubFields.length; ++i) {
+ pat = '\\[?(%5[bB])?' + scrubFields[i] + '\\[?(%5[bB])?\\]?(%5[dD])?';
+ ret.push(new RegExp('(' + pat + '=)([^&\\n]+)', 'igm'));
}
- return true;
+ return ret;
}
-module.exports = {
- checkIgnore: checkIgnore
-};
+module.exports = scrub;
/***/ }),
-/* 26 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 773:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var _ = __webpack_require__(0);
+var _ = __webpack_require__(702);
-function checkLevel(item, settings) {
- var level = item.level;
- var levelVal = _.LEVELS[level] || 0;
- var reportLevel = settings.reportLevel;
- var reportLevelVal = _.LEVELS[reportLevel] || 0;
+var MAX_EVENTS = 100;
- if (levelVal < reportLevelVal) {
- return false;
- }
- return true;
+function Telemeter(options) {
+ this.queue = [];
+ this.options = _.merge(options);
+ var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;
+ this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));
}
-function userCheckIgnore(logger) {
- return function(item, settings) {
- var isUncaught = !!item._isUncaught;
- delete item._isUncaught;
- var args = item._originalArgs;
- delete item._originalArgs;
- try {
- if (_.isFunction(settings.onSendCallback)) {
- settings.onSendCallback(isUncaught, args, item);
- }
- } catch (e) {
- settings.onSendCallback = null;
- logger.error('Error while calling onSendCallback, removing', e);
- }
+Telemeter.prototype.configure = function (options) {
+ var oldOptions = this.options;
+ this.options = _.merge(oldOptions, options);
+ var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;
+ var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));
+ var deleteCount = 0;
+ if (this.queue.length > newMaxEvents) {
+ deleteCount = this.queue.length - newMaxEvents;
+ }
+ this.maxQueueSize = newMaxEvents;
+ this.queue.splice(0, deleteCount);
+};
+
+Telemeter.prototype.copyEvents = function () {
+ var events = Array.prototype.slice.call(this.queue, 0);
+ if (_.isFunction(this.options.filterTelemetry)) {
try {
- if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {
- return false;
+ var i = events.length;
+ while (i--) {
+ if (this.options.filterTelemetry(events[i])) {
+ events.splice(i, 1);
+ }
}
} catch (e) {
- settings.checkIgnore = null;
- logger.error('Error while calling custom checkIgnore(), removing', e);
+ this.options.filterTelemetry = null;
}
- return true;
}
-}
+ return events;
+};
-function urlIsNotBlockListed(logger) {
- return function(item, settings) {
- return !urlIsOnAList(item, settings, 'blocklist', logger);
+Telemeter.prototype.capture = function (
+ type,
+ metadata,
+ level,
+ rollbarUUID,
+ timestamp,
+) {
+ var e = {
+ level: getLevel(type, level),
+ type: type,
+ timestamp_ms: timestamp || _.now(),
+ body: metadata,
+ source: 'client',
+ };
+ if (rollbarUUID) {
+ e.uuid = rollbarUUID;
}
-}
-function urlIsSafeListed(logger) {
- return function(item, settings) {
- return urlIsOnAList(item, settings, 'safelist', logger);
+ try {
+ if (
+ _.isFunction(this.options.filterTelemetry) &&
+ this.options.filterTelemetry(e)
+ ) {
+ return false;
+ }
+ } catch (exc) {
+ this.options.filterTelemetry = null;
}
-}
-
-function matchFrames(trace, list, block) {
- if (!trace) { return !block }
- var frames = trace.frames;
+ this.push(e);
+ return e;
+};
- if (!frames || frames.length === 0) { return !block; }
+Telemeter.prototype.captureEvent = function (
+ type,
+ metadata,
+ level,
+ rollbarUUID,
+) {
+ return this.capture(type, metadata, level, rollbarUUID);
+};
- var frame, filename, url, urlRegex;
- var listLength = list.length;
- var frameLength = frames.length;
- for (var i = 0; i < frameLength; i++) {
- frame = frames[i];
- filename = frame.filename;
+Telemeter.prototype.captureError = function (
+ err,
+ level,
+ rollbarUUID,
+ timestamp,
+) {
+ var metadata = {
+ message: err.message || String(err),
+ };
+ if (err.stack) {
+ metadata.stack = err.stack;
+ }
+ return this.capture('error', metadata, level, rollbarUUID, timestamp);
+};
- if (!_.isType(filename, 'string')) { return !block; }
+Telemeter.prototype.captureLog = function (
+ message,
+ level,
+ rollbarUUID,
+ timestamp,
+) {
+ return this.capture(
+ 'log',
+ {
+ message: message,
+ },
+ level,
+ rollbarUUID,
+ timestamp,
+ );
+};
- for (var j = 0; j < listLength; j++) {
- url = list[j];
- urlRegex = new RegExp(url);
+Telemeter.prototype.captureNetwork = function (
+ metadata,
+ subtype,
+ rollbarUUID,
+ requestData,
+) {
+ subtype = subtype || 'xhr';
+ metadata.subtype = metadata.subtype || subtype;
+ if (requestData) {
+ metadata.request = requestData;
+ }
+ var level = this.levelFromStatus(metadata.status_code);
+ return this.capture('network', metadata, level, rollbarUUID);
+};
- if (urlRegex.test(filename)) {
- return true;
- }
- }
+Telemeter.prototype.levelFromStatus = function (statusCode) {
+ if (statusCode >= 200 && statusCode < 400) {
+ return 'info';
}
- return false;
-}
+ if (statusCode === 0 || statusCode >= 400) {
+ return 'error';
+ }
+ return 'info';
+};
-function urlIsOnAList(item, settings, safeOrBlock, logger) {
- // safelist is the default
- var block = false;
- if (safeOrBlock === 'blocklist') {
- block = true;
+Telemeter.prototype.captureDom = function (
+ subtype,
+ element,
+ value,
+ checked,
+ rollbarUUID,
+) {
+ var metadata = {
+ subtype: subtype,
+ element: element,
+ };
+ if (value !== undefined) {
+ metadata.value = value;
}
+ if (checked !== undefined) {
+ metadata.checked = checked;
+ }
+ return this.capture('dom', metadata, 'info', rollbarUUID);
+};
- var list, traces;
- try {
- list = block ? settings.hostBlockList : settings.hostSafeList;
- traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];
+Telemeter.prototype.captureNavigation = function (from, to, rollbarUUID) {
+ return this.capture(
+ 'navigation',
+ { from: from, to: to },
+ 'info',
+ rollbarUUID,
+ );
+};
- // These two checks are important to come first as they are defaults
- // in case the list is missing or the trace is missing or not well-formed
- if (!list || list.length === 0) {
- return !block;
- }
- if (traces.length === 0 || !traces[0]) {
- return !block;
- }
+Telemeter.prototype.captureDomContentLoaded = function (ts) {
+ return this.capture(
+ 'navigation',
+ { subtype: 'DOMContentLoaded' },
+ 'info',
+ undefined,
+ ts && ts.getTime(),
+ );
+ /**
+ * If we decide to make this a dom event instead, then use the line below:
+ return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());
+ */
+};
+Telemeter.prototype.captureLoad = function (ts) {
+ return this.capture(
+ 'navigation',
+ { subtype: 'load' },
+ 'info',
+ undefined,
+ ts && ts.getTime(),
+ );
+ /**
+ * If we decide to make this a dom event instead, then use the line below:
+ return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());
+ */
+};
- var tracesLength = traces.length;
- for (var i = 0; i < tracesLength; i++) {
- if(matchFrames(traces[i], list, block)) {
- return true;
- }
- }
- } catch (e)
- /* istanbul ignore next */
- {
- if (block) {
- settings.hostBlockList = null;
- } else {
- settings.hostSafeList = null;
- }
- var listName = block ? 'hostBlockList' : 'hostSafeList';
- logger.error('Error while reading your configuration\'s ' + listName + ' option. Removing custom ' + listName + '.', e);
- return !block;
+Telemeter.prototype.captureConnectivityChange = function (type, rollbarUUID) {
+ return this.captureNetwork({ change: type }, 'connectivity', rollbarUUID);
+};
+
+// Only intended to be used internally by the notifier
+Telemeter.prototype._captureRollbarItem = function (item) {
+ if (!this.options.includeItemsInTelemetry) {
+ return;
}
- return false;
+ if (item.err) {
+ return this.captureError(item.err, item.level, item.uuid, item.timestamp);
+ }
+ if (item.message) {
+ return this.captureLog(item.message, item.level, item.uuid, item.timestamp);
+ }
+ if (item.custom) {
+ return this.capture(
+ 'log',
+ item.custom,
+ item.level,
+ item.uuid,
+ item.timestamp,
+ );
+ }
+};
+
+Telemeter.prototype.push = function (e) {
+ this.queue.push(e);
+ if (this.queue.length > this.maxQueueSize) {
+ this.queue.shift();
+ }
+};
+
+function getLevel(type, level) {
+ if (level) {
+ return level;
+ }
+ var defaultLevel = {
+ error: 'error',
+ manual: 'info',
+ };
+ return defaultLevel[type] || 'info';
}
-function messageIsIgnored(logger) {
- return function(item, settings) {
- var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;
+module.exports = Telemeter;
+
- try {
- messageIsIgnored = false;
- ignoredMessages = settings.ignoredMessages;
+/***/ }),
- if (!ignoredMessages || ignoredMessages.length === 0) {
- return true;
- }
+/***/ 417:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- messages = messagesFromItem(item);
+"use strict";
- if (messages.length === 0){
- return true;
- }
- len = ignoredMessages.length;
- for (i = 0; i < len; i++) {
- rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');
+var _ = __webpack_require__(702);
- for (j = 0; j < messages.length; j++) {
- messageIsIgnored = rIgnoredMessage.test(messages[j]);
+function itemToPayload(item, options, callback) {
+ var data = item.data;
- if (messageIsIgnored) {
- return false;
- }
- }
- }
- } catch(e)
- /* istanbul ignore next */
- {
- settings.ignoredMessages = null;
- logger.error('Error while reading your configuration\'s ignoredMessages option. Removing custom ignoredMessages.');
- }
+ if (item._isUncaught) {
+ data._isUncaught = true;
+ }
+ if (item._originalArgs) {
+ data._originalArgs = item._originalArgs;
+ }
+ callback(null, data);
+}
- return true;
+function addPayloadOptions(item, options, callback) {
+ var payloadOptions = options.payload || {};
+ if (payloadOptions.body) {
+ delete payloadOptions.body;
}
+
+ item.data = _.merge(item.data, payloadOptions);
+ callback(null, item);
}
-function messagesFromItem(item) {
- var body = item.body;
- var messages = [];
+function addTelemetryData(item, options, callback) {
+ if (item.telemetryEvents) {
+ _.set(item, 'data.body.telemetry', item.telemetryEvents);
+ }
+ callback(null, item);
+}
- // The payload schema only allows one of trace_chain, message, or trace.
- // However, existing test cases are based on having both trace and message present.
- // So here we preserve the ability to collect strings from any combination of these keys.
- if (body.trace_chain) {
- var traceChain = body.trace_chain;
- for (var i = 0; i < traceChain.length; i++) {
- var trace = traceChain[i];
- messages.push(_.get(trace, 'exception.message'));
- }
+function addMessageWithError(item, options, callback) {
+ if (!item.message) {
+ callback(null, item);
+ return;
}
- if (body.trace) {
- messages.push(_.get(body, 'trace.exception.message'));
+ var tracePath = 'data.body.trace_chain.0';
+ var trace = _.get(item, tracePath);
+ if (!trace) {
+ tracePath = 'data.body.trace';
+ trace = _.get(item, tracePath);
}
- if (body.message) {
- messages.push(_.get(body, 'message.body'));
+ if (trace) {
+ if (!(trace.exception && trace.exception.description)) {
+ _.set(item, tracePath + '.exception.description', item.message);
+ callback(null, item);
+ return;
+ }
+ var extra = _.get(item, tracePath + '.extra') || {};
+ var newExtra = _.merge(extra, { message: item.message });
+ _.set(item, tracePath + '.extra', newExtra);
}
- return messages;
+ callback(null, item);
}
-module.exports = {
- checkLevel: checkLevel,
- userCheckIgnore: userCheckIgnore,
- urlIsNotBlockListed: urlIsNotBlockListed,
- urlIsSafeListed: urlIsSafeListed,
- messageIsIgnored: messageIsIgnored
-};
+function userTransform(logger) {
+ return function (item, options, callback) {
+ var newItem = _.merge(item);
+ var response = null;
+ try {
+ if (_.isFunction(options.transform)) {
+ response = options.transform(newItem.data, item);
+ }
+ } catch (e) {
+ options.transform = null;
+ logger.error(
+ 'Error while calling custom transform() function. Removing custom transform().',
+ e,
+ );
+ callback(null, item);
+ return;
+ }
+ if (_.isPromise(response)) {
+ response.then(
+ function (promisedItem) {
+ if (promisedItem) {
+ newItem.data = promisedItem;
+ }
+ callback(null, newItem);
+ },
+ function (error) {
+ callback(error, item);
+ },
+ );
+ } else {
+ callback(null, newItem);
+ }
+ };
+}
+function addConfigToPayload(item, options, callback) {
+ if (!options.sendConfig) {
+ return callback(null, item);
+ }
+ var configKey = '_rollbarConfig';
+ var custom = _.get(item, 'data.custom') || {};
+ custom[configKey] = options;
+ item.data.custom = custom;
+ callback(null, item);
+}
-/***/ }),
-/* 27 */
-/***/ (function(module, exports, __webpack_require__) {
+function addFunctionOption(options, name) {
+ if (_.isFunction(options[name])) {
+ options[name] = options[name].toString();
+ }
+}
-"use strict";
+function addConfiguredOptions(item, options, callback) {
+ var configuredOptions = options._configuredOptions;
+ // These must be stringified or they'll get dropped during serialization.
+ addFunctionOption(configuredOptions, 'transform');
+ addFunctionOption(configuredOptions, 'checkIgnore');
+ addFunctionOption(configuredOptions, 'onSendCallback');
-module.exports = {
- version: '2.24.0',
- endpoint: 'api.rollbar.com/api/1/item/',
- logLevel: 'debug',
- reportLevel: 'debug',
- uncaughtErrorLevel: 'error',
- maxItems: 0,
- itemsPerMin: 60
+ delete configuredOptions.accessToken;
+ item.data.notifier.configured_options = configuredOptions;
+ callback(null, item);
}
+function addDiagnosticKeys(item, options, callback) {
+ var diagnostic = _.merge(
+ item.notifier.client.notifier.diagnostic,
+ item.diagnostic,
+ );
-/***/ }),
-/* 28 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (_.get(item, 'err._isAnonymous')) {
+ diagnostic.is_anonymous = true;
+ }
-"use strict";
+ if (item._isUncaught) {
+ diagnostic.is_uncaught = item._isUncaught;
+ }
+ if (item.err) {
+ try {
+ diagnostic.raw_error = {
+ message: item.err.message,
+ name: item.err.name,
+ constructor_name: item.err.constructor && item.err.constructor.name,
+ filename: item.err.fileName,
+ line: item.err.lineNumber,
+ column: item.err.columnNumber,
+ stack: item.err.stack,
+ };
+ } catch (e) {
+ diagnostic.raw_error = { failed: String(e) };
+ }
+ }
-module.exports = {
- scrubFields: [
- 'pw',
- 'pass',
- 'passwd',
- 'password',
- 'secret',
- 'confirm_password',
- 'confirmPassword',
- 'password_confirmation',
- 'passwordConfirmation',
- 'access_token',
- 'accessToken',
- 'X-Rollbar-Access-Token',
- 'secret_key',
- 'secretKey',
- 'secretToken',
- 'cc-number',
- 'card number',
- 'cardnumber',
- 'cardnum',
- 'ccnum',
- 'ccnumber',
- 'cc num',
- 'creditcardnumber',
- 'credit card number',
- 'newcreditcardnumber',
- 'new credit card',
- 'creditcardno',
- 'credit card no',
- 'card#',
- 'card #',
- 'cc-csc',
- 'cvc',
- 'cvc2',
- 'cvv2',
- 'ccv2',
- 'security code',
- 'card verification',
- 'name on credit card',
- 'name on card',
- 'nameoncard',
- 'cardholder',
- 'card holder',
- 'name des karteninhabers',
- 'ccname',
- 'card type',
- 'cardtype',
- 'cc type',
- 'cctype',
- 'payment type',
- 'expiration date',
- 'expirationdate',
- 'expdate',
- 'cc-exp',
- 'ccmonth',
- 'ccyear'
- ]
+ item.data.notifier.diagnostic = _.merge(
+ item.data.notifier.diagnostic,
+ diagnostic,
+ );
+ callback(null, item);
}
+module.exports = {
+ itemToPayload: itemToPayload,
+ addPayloadOptions: addPayloadOptions,
+ addTelemetryData: addTelemetryData,
+ addMessageWithError: addMessageWithError,
+ userTransform: userTransform,
+ addConfigToPayload: addConfigToPayload,
+ addConfiguredOptions: addConfiguredOptions,
+ addDiagnosticKeys: addDiagnosticKeys,
+};
+
/***/ }),
-/* 29 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 473:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var _ = __webpack_require__(0);
+var _ = __webpack_require__(702);
+var traverse = __webpack_require__(267);
-var MAX_EVENTS = 100;
+function raw(payload, jsonBackup) {
+ return [payload, _.stringify(payload, jsonBackup)];
+}
-function Telemeter(options) {
- this.queue = [];
- this.options = _.merge(options);
- var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;
- this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));
+function selectFrames(frames, range) {
+ var len = frames.length;
+ if (len > range * 2) {
+ return frames.slice(0, range).concat(frames.slice(len - range));
+ }
+ return frames;
+}
+
+function truncateFrames(payload, jsonBackup, range) {
+ range = typeof range === 'undefined' ? 30 : range;
+ var body = payload.data.body;
+ var frames;
+ if (body.trace_chain) {
+ var chain = body.trace_chain;
+ for (var i = 0; i < chain.length; i++) {
+ frames = chain[i].frames;
+ frames = selectFrames(frames, range);
+ chain[i].frames = frames;
+ }
+ } else if (body.trace) {
+ frames = body.trace.frames;
+ frames = selectFrames(frames, range);
+ body.trace.frames = frames;
+ }
+ return [payload, _.stringify(payload, jsonBackup)];
}
-Telemeter.prototype.configure = function(options) {
- var oldOptions = this.options;
- this.options = _.merge(oldOptions, options);
- var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;
- var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));
- var deleteCount = 0;
- if (this.maxQueueSize > newMaxEvents) {
- deleteCount = this.maxQueueSize - newMaxEvents;
+function maybeTruncateValue(len, val) {
+ if (!val) {
+ return val;
}
- this.maxQueueSize = newMaxEvents;
- this.queue.splice(0, deleteCount);
-};
+ if (val.length > len) {
+ return val.slice(0, len - 3).concat('...');
+ }
+ return val;
+}
-Telemeter.prototype.copyEvents = function() {
- var events = Array.prototype.slice.call(this.queue, 0);
- if (_.isFunction(this.options.filterTelemetry)) {
- try {
- var i = events.length;
- while (i--) {
- if (this.options.filterTelemetry(events[i])) {
- events.splice(i, 1);
- }
- }
- } catch (e) {
- this.options.filterTelemetry = null;
+function truncateStrings(len, payload, jsonBackup) {
+ function truncator(k, v, seen) {
+ switch (_.typeName(v)) {
+ case 'string':
+ return maybeTruncateValue(len, v);
+ case 'object':
+ case 'array':
+ return traverse(v, truncator, seen);
+ default:
+ return v;
}
}
- return events;
-};
+ payload = traverse(payload, truncator);
+ return [payload, _.stringify(payload, jsonBackup)];
+}
-Telemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {
- var e = {
- level: getLevel(type, level),
- type: type,
- timestamp_ms: timestamp || _.now(),
- body: metadata,
- source: 'client'
- };
- if (rollbarUUID) {
- e.uuid = rollbarUUID;
+function truncateTraceData(traceData) {
+ if (traceData.exception) {
+ delete traceData.exception.description;
+ traceData.exception.message = maybeTruncateValue(
+ 255,
+ traceData.exception.message,
+ );
}
+ traceData.frames = selectFrames(traceData.frames, 1);
+ return traceData;
+}
- try {
- if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {
- return false;
+function minBody(payload, jsonBackup) {
+ var body = payload.data.body;
+ if (body.trace_chain) {
+ var chain = body.trace_chain;
+ for (var i = 0; i < chain.length; i++) {
+ chain[i] = truncateTraceData(chain[i]);
}
- } catch (exc) {
- this.options.filterTelemetry = null;
+ } else if (body.trace) {
+ body.trace = truncateTraceData(body.trace);
}
+ return [payload, _.stringify(payload, jsonBackup)];
+}
- this.push(e);
- return e;
-};
+function needsTruncation(payload, maxSize) {
+ return _.maxByteSize(payload) > maxSize;
+}
-Telemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {
- return this.capture(type, metadata, level, rollbarUUID);
-};
+function truncate(payload, jsonBackup, maxSize) {
+ maxSize = typeof maxSize === 'undefined' ? 512 * 1024 : maxSize;
+ var strategies = [
+ raw,
+ truncateFrames,
+ truncateStrings.bind(null, 1024),
+ truncateStrings.bind(null, 512),
+ truncateStrings.bind(null, 256),
+ minBody,
+ ];
+ var strategy, results, result;
-Telemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {
- var metadata = {
- message: err.message || String(err)
- };
- if (err.stack) {
- metadata.stack = err.stack;
+ while ((strategy = strategies.shift())) {
+ results = strategy(payload, jsonBackup);
+ payload = results[0];
+ result = results[1];
+ if (result.error || !needsTruncation(result.value, maxSize)) {
+ return result;
+ }
}
- return this.capture('error', metadata, level, rollbarUUID, timestamp);
-};
+ return result;
+}
-Telemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {
- return this.capture('log', {
- message: message
- }, level, rollbarUUID, timestamp);
-};
+module.exports = {
+ truncate: truncate,
-Telemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {
- subtype = subtype || 'xhr';
- metadata.subtype = metadata.subtype || subtype;
- if (requestData) {
- metadata.request = requestData;
- }
- var level = this.levelFromStatus(metadata.status_code);
- return this.capture('network', metadata, level, rollbarUUID);
+ /* for testing */
+ raw: raw,
+ truncateFrames: truncateFrames,
+ truncateStrings: truncateStrings,
+ maybeTruncateValue: maybeTruncateValue,
};
-Telemeter.prototype.levelFromStatus = function(statusCode) {
- if (statusCode >= 200 && statusCode < 400) {
- return 'info';
- }
- if (statusCode === 0 || statusCode >= 400) {
- return 'error';
- }
- return 'info';
-};
-Telemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {
- var metadata = {
- subtype: subtype,
- element: element
- };
- if (value !== undefined) {
- metadata.value = value;
- }
- if (checked !== undefined) {
- metadata.checked = checked;
- }
- return this.capture('dom', metadata, 'info', rollbarUUID);
-};
+/***/ }),
-Telemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {
- return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);
-};
+/***/ 702:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-Telemeter.prototype.captureDomContentLoaded = function(ts) {
- return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());
- /**
- * If we decide to make this a dom event instead, then use the line below:
- return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());
- */
-};
-Telemeter.prototype.captureLoad = function(ts) {
- return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());
- /**
- * If we decide to make this a dom event instead, then use the line below:
- return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());
- */
-};
+"use strict";
-Telemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {
- return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);
-};
-// Only intended to be used internally by the notifier
-Telemeter.prototype._captureRollbarItem = function(item) {
- if (!this.options.includeItemsInTelemetry) {
+var merge = __webpack_require__(420);
+
+var RollbarJSON = {};
+function setupJSON(polyfillJSON) {
+ if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {
return;
}
- if (item.err) {
- return this.captureError(item.err, item.level, item.uuid, item.timestamp);
+
+ if (isDefined(JSON)) {
+ // If polyfill is provided, prefer it over existing non-native shims.
+ if (polyfillJSON) {
+ if (isNativeFunction(JSON.stringify)) {
+ RollbarJSON.stringify = JSON.stringify;
+ }
+ if (isNativeFunction(JSON.parse)) {
+ RollbarJSON.parse = JSON.parse;
+ }
+ } else {
+ // else accept any interface that is present.
+ if (isFunction(JSON.stringify)) {
+ RollbarJSON.stringify = JSON.stringify;
+ }
+ if (isFunction(JSON.parse)) {
+ RollbarJSON.parse = JSON.parse;
+ }
+ }
}
- if (item.message) {
- return this.captureLog(item.message, item.level, item.uuid, item.timestamp);
+ if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {
+ polyfillJSON && polyfillJSON(RollbarJSON);
}
- if (item.custom) {
- return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);
+}
+
+/*
+ * isType - Given a Javascript value and a string, returns true if the type of the value matches the
+ * given string.
+ *
+ * @param x - any value
+ * @param t - a lowercase string containing one of the following type names:
+ * - undefined
+ * - null
+ * - error
+ * - number
+ * - boolean
+ * - string
+ * - symbol
+ * - function
+ * - object
+ * - array
+ * @returns true if x is of type t, otherwise false
+ */
+function isType(x, t) {
+ return t === typeName(x);
+}
+
+/*
+ * typeName - Given a Javascript value, returns the type of the object as a string
+ */
+function typeName(x) {
+ var name = typeof x;
+ if (name !== 'object') {
+ return name;
}
-};
+ if (!x) {
+ return 'null';
+ }
+ if (x instanceof Error) {
+ return 'error';
+ }
+ return {}.toString
+ .call(x)
+ .match(/\s([a-zA-Z]+)/)[1]
+ .toLowerCase();
+}
+
+/* isFunction - a convenience function for checking if a value is a function
+ *
+ * @param f - any value
+ * @returns true if f is a function, otherwise false
+ */
+function isFunction(f) {
+ 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');
+}
-Telemeter.prototype.push = function(e) {
- this.queue.push(e);
- if (this.queue.length > this.maxQueueSize) {
- this.queue.shift();
- }
-};
+/* isString - Checks if the argument is a string
+ *
+ * @param value - any value
+ * @returns true if value is a string
+ */
+function isString(value) {
+ return typeof value === 'string' || value instanceof String;
+}
-function getLevel(type, level) {
- if (level) {
- return level;
- }
- var defaultLevel = {
- error: 'error',
- manual: 'info'
- };
- return defaultLevel[type] || 'info';
+/**
+ * isFiniteNumber - determines whether the passed value is a finite number
+ *
+ * @param {*} n - any value
+ * @returns true if value is a finite number
+ */
+function isFiniteNumber(n) {
+ return Number.isFinite(n);
}
-module.exports = Telemeter;
+/*
+ * isDefined - a convenience function for checking if a value is not equal to undefined
+ *
+ * @param u - any value
+ * @returns true if u is anything other than undefined
+ */
+function isDefined(u) {
+ return !isType(u, 'undefined');
+}
+/*
+ * isIterable - convenience function for checking if a value can be iterated, essentially
+ * whether it is an object or an array.
+ *
+ * @param i - any value
+ * @returns true if i is an object or an array as determined by `typeName`
+ */
+function isIterable(i) {
+ var type = typeName(i);
+ return type === 'object' || type === 'array';
+}
-/***/ }),
-/* 30 */
-/***/ (function(module, exports, __webpack_require__) {
+/*
+ * isError - convenience function for checking if a value is of an error type
+ *
+ * @param e - any value
+ * @returns true if e is an error
+ */
+function isError(e) {
+ // Detect both Error and Firefox Exception type
+ return isType(e, 'error') || isType(e, 'exception');
+}
-"use strict";
+/* isPromise - a convenience function for checking if a value is a promise
+ *
+ * @param p - any value
+ * @returns true if f is a function, otherwise false
+ */
+function isPromise(p) {
+ return isObject(p) && isType(p.then, 'function');
+}
+function redact() {
+ return '********';
+}
-var _ = __webpack_require__(0);
-var scrub = __webpack_require__(4);
-var urlparser = __webpack_require__(2);
-var domUtil = __webpack_require__(31);
+// from http://stackoverflow.com/a/8809472/1138191
+function uuid4() {
+ var d = now();
+ var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(
+ /[xy]/g,
+ function (c) {
+ var r = (d + Math.random() * 16) % 16 | 0;
+ d = Math.floor(d / 16);
+ return (c === 'x' ? r : (r & 0x7) | 0x8).toString(16);
+ },
+ );
+ return uuid;
+}
-var defaults = {
- network: true,
- networkResponseHeaders: false,
- networkResponseBody: false,
- networkRequestHeaders: false,
- networkRequestBody: false,
- networkErrorOnHttp5xx: false,
- networkErrorOnHttp4xx: false,
- networkErrorOnHttp0: false,
- log: true,
- dom: true,
- navigation: true,
- connectivity: true,
- contentSecurityPolicy: true,
- errorOnContentSecurityPolicy: false
+var LEVELS = {
+ debug: 0,
+ info: 1,
+ warning: 2,
+ error: 3,
+ critical: 4,
};
-function replace(obj, name, replacement, replacements, type) {
- var orig = obj[name];
- obj[name] = replacement(orig);
- if (replacements) {
- replacements[type].push([obj, name, orig]);
+function sanitizeUrl(url) {
+ var baseUrlParts = parseUri(url);
+ if (!baseUrlParts) {
+ return '(unknown)';
}
-}
-function restore(replacements, type) {
- var b;
- while (replacements[type].length) {
- b = replacements[type].shift();
- b[0][b[1]] = b[2];
+ // remove a trailing # if there is no anchor
+ if (baseUrlParts.anchor === '') {
+ baseUrlParts.source = baseUrlParts.source.replace('#', '');
}
+
+ url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');
+ return url;
}
-function nameFromDescription(description) {
- if (!description || !description.attributes) { return null; }
- var attrs = description.attributes;
- for (var a = 0; a < attrs.length; ++a) {
- if (attrs[a].key === 'name') {
- return attrs[a].value;
- }
+var parseUriOptions = {
+ strictMode: false,
+ key: [
+ 'source',
+ 'protocol',
+ 'authority',
+ 'userInfo',
+ 'user',
+ 'password',
+ 'host',
+ 'port',
+ 'relative',
+ 'path',
+ 'directory',
+ 'file',
+ 'query',
+ 'anchor',
+ ],
+ q: {
+ name: 'queryKey',
+ parser: /(?:^|&)([^&=]*)=?([^&]*)/g,
+ },
+ parser: {
+ strict:
+ /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
+ loose:
+ /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,
+ },
+};
+
+function parseUri(str) {
+ if (!isType(str, 'string')) {
+ return undefined;
}
- return null;
-}
-function defaultValueScrubber(scrubFields) {
- var patterns = [];
- for (var i = 0; i < scrubFields.length; ++i) {
- patterns.push(new RegExp(scrubFields[i], 'i'));
+ var o = parseUriOptions;
+ var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);
+ var uri = {};
+
+ for (var i = 0, l = o.key.length; i < l; ++i) {
+ uri[o.key[i]] = m[i] || '';
}
- return function(description) {
- var name = nameFromDescription(description);
- if (!name) { return false; }
- for (var i = 0; i < patterns.length; ++i) {
- if (patterns[i].test(name)) {
- return true;
- }
+
+ uri[o.q.name] = {};
+ uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
+ if ($1) {
+ uri[o.q.name][$1] = $2;
}
- return false;
- };
+ });
+
+ return uri;
}
-function Instrumenter(options, telemeter, rollbar, _window, _document) {
- this.options = options;
- var autoInstrument = options.autoInstrument;
- if (options.enabled === false || autoInstrument === false) {
- this.autoInstrument = {};
- } else {
- if (!_.isType(autoInstrument, 'object')) {
- autoInstrument = defaults;
+function addParamsAndAccessTokenToPath(accessToken, options, params) {
+ params = params || {};
+ params.access_token = accessToken;
+ var paramsArray = [];
+ var k;
+ for (k in params) {
+ if (Object.prototype.hasOwnProperty.call(params, k)) {
+ paramsArray.push([k, params[k]].join('='));
}
- this.autoInstrument = _.merge(defaults, autoInstrument);
}
- this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;
- this.telemetryScrubber = options.telemetryScrubber;
- this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);
- this.telemeter = telemeter;
- this.rollbar = rollbar;
- this.diagnostic = rollbar.client.notifier.diagnostic;
- this._window = _window || {};
- this._document = _document || {};
- this.replacements = {
- network: [],
- log: [],
- navigation: [],
- connectivity: []
- };
- this.eventRemovers = {
- dom: [],
- connectivity: [],
- contentsecuritypolicy: []
- };
+ var query = '?' + paramsArray.sort().join('&');
- this._location = this._window.location;
- this._lastHref = this._location && this._location.href;
+ options = options || {};
+ options.path = options.path || '';
+ var qs = options.path.indexOf('?');
+ var h = options.path.indexOf('#');
+ var p;
+ if (qs !== -1 && (h === -1 || h > qs)) {
+ p = options.path;
+ options.path = p.substring(0, qs) + query + '&' + p.substring(qs + 1);
+ } else {
+ if (h !== -1) {
+ p = options.path;
+ options.path = p.substring(0, h) + query + p.substring(h);
+ } else {
+ options.path = options.path + query;
+ }
+ }
}
-Instrumenter.prototype.configure = function(options) {
- this.options = _.merge(this.options, options);
- var autoInstrument = options.autoInstrument;
- var oldSettings = _.merge(this.autoInstrument);
- if (options.enabled === false || autoInstrument === false) {
- this.autoInstrument = {};
- } else {
- if (!_.isType(autoInstrument, 'object')) {
- autoInstrument = defaults;
+function formatUrl(u, protocol) {
+ protocol = protocol || u.protocol;
+ if (!protocol && u.port) {
+ if (u.port === 80) {
+ protocol = 'http:';
+ } else if (u.port === 443) {
+ protocol = 'https:';
}
- this.autoInstrument = _.merge(defaults, autoInstrument);
}
- this.instrument(oldSettings);
- if (options.scrubTelemetryInputs !== undefined) {
- this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;
+ protocol = protocol || 'https:';
+
+ if (!u.hostname) {
+ return null;
}
- if (options.telemetryScrubber !== undefined) {
- this.telemetryScrubber = options.telemetryScrubber;
+ var result = protocol + '//' + u.hostname;
+ if (u.port) {
+ result = result + ':' + u.port;
}
-};
-
-// eslint-disable-next-line complexity
-Instrumenter.prototype.instrument = function(oldSettings) {
- if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {
- this.instrumentNetwork();
- } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {
- this.deinstrumentNetwork();
+ if (u.path) {
+ result = result + u.path;
}
+ return result;
+}
- if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {
- this.instrumentConsole();
- } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {
- this.deinstrumentConsole();
+function stringify(obj, backup) {
+ var value, error;
+ try {
+ value = RollbarJSON.stringify(obj);
+ } catch (jsonError) {
+ if (backup && isFunction(backup)) {
+ try {
+ value = backup(obj);
+ } catch (backupError) {
+ error = backupError;
+ }
+ } else {
+ error = jsonError;
+ }
}
+ return { error: error, value: value };
+}
- if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {
- this.instrumentDom();
- } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {
- this.deinstrumentDom();
- }
+function maxByteSize(string) {
+ // The transport will use utf-8, so assume utf-8 encoding.
+ //
+ // This minimal implementation will accurately count bytes for all UCS-2 and
+ // single code point UTF-16. If presented with multi code point UTF-16,
+ // which should be rare, it will safely overcount, not undercount.
+ //
+ // While robust utf-8 encoders exist, this is far smaller and far more performant.
+ // For quickly counting payload size for truncation, smaller is better.
- if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {
- this.instrumentNavigation();
- } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {
- this.deinstrumentNavigation();
- }
+ var count = 0;
+ var length = string.length;
- if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {
- this.instrumentConnectivity();
- } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {
- this.deinstrumentConnectivity();
+ for (var i = 0; i < length; i++) {
+ var code = string.charCodeAt(i);
+ if (code < 128) {
+ // up to 7 bits
+ count = count + 1;
+ } else if (code < 2048) {
+ // up to 11 bits
+ count = count + 2;
+ } else if (code < 65536) {
+ // up to 16 bits
+ count = count + 3;
+ }
}
- if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {
- this.instrumentContentSecurityPolicy();
- } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {
- this.deinstrumentContentSecurityPolicy();
- }
-};
+ return count;
+}
-Instrumenter.prototype.deinstrumentNetwork = function() {
- restore(this.replacements, 'network');
-};
+function jsonParse(s) {
+ var value, error;
+ try {
+ value = RollbarJSON.parse(s);
+ } catch (e) {
+ error = e;
+ }
+ return { error: error, value: value };
+}
-Instrumenter.prototype.instrumentNetwork = function() {
- var self = this;
+function makeUnhandledStackInfo(
+ message,
+ url,
+ lineno,
+ colno,
+ error,
+ mode,
+ backupMessage,
+ errorParser,
+) {
+ var location = {
+ url: url || '',
+ line: lineno,
+ column: colno,
+ };
+ location.func = errorParser.guessFunctionName(location.url, location.line);
+ location.context = errorParser.gatherContext(location.url, location.line);
+ var href =
+ typeof document !== 'undefined' &&
+ document &&
+ document.location &&
+ document.location.href;
+ var useragent =
+ typeof window !== 'undefined' &&
+ window &&
+ window.navigator &&
+ window.navigator.userAgent;
+ return {
+ mode: mode,
+ message: error ? String(error) : message || backupMessage,
+ url: href,
+ stack: [location],
+ useragent: useragent,
+ };
+}
- function wrapProp(prop, xhr) {
- if (prop in xhr && _.isFunction(xhr[prop])) {
- replace(xhr, prop, function(orig) {
- return self.rollbar.wrap(orig);
- });
+function wrapCallback(logger, f) {
+ return function (err, resp) {
+ try {
+ f(err, resp);
+ } catch (e) {
+ logger.error(e);
}
- }
+ };
+}
- if ('XMLHttpRequest' in this._window) {
- var xhrp = this._window.XMLHttpRequest.prototype;
- replace(xhrp, 'open', function(orig) {
- return function(method, url) {
- if (_.isType(url, 'string')) {
- if (this.__rollbar_xhr) {
- this.__rollbar_xhr.method = method;
- this.__rollbar_xhr.url = url;
- this.__rollbar_xhr.status_code = null;
- this.__rollbar_xhr.start_time_ms = _.now();
- this.__rollbar_xhr.end_time_ms = null;
+function nonCircularClone(obj) {
+ var seen = [obj];
+
+ function clone(obj, seen) {
+ var value,
+ name,
+ newSeen,
+ result = {};
+
+ try {
+ for (name in obj) {
+ value = obj[name];
+
+ if (value && (isType(value, 'object') || isType(value, 'array'))) {
+ if (seen.includes(value)) {
+ result[name] = 'Removed circular reference: ' + typeName(value);
} else {
- this.__rollbar_xhr = {
- method: method,
- url: url,
- status_code: null,
- start_time_ms: _.now(),
- end_time_ms: null
- };
+ newSeen = seen.slice();
+ newSeen.push(value);
+ result[name] = clone(value, newSeen);
}
+ continue;
}
- return orig.apply(this, arguments);
- };
- }, this.replacements, 'network');
- replace(xhrp, 'setRequestHeader', function(orig) {
- return function(header, value) {
- // If xhr.open is async, __rollbar_xhr may not be initialized yet.
- if (!this.__rollbar_xhr) {
- this.__rollbar_xhr = {};
+ result[name] = value;
+ }
+ } catch (e) {
+ result = 'Failed cloning custom data: ' + e.message;
+ }
+ return result;
+ }
+ return clone(obj, seen);
+}
+
+function createItem(args, logger, notifier, requestKeys, lambdaContext) {
+ var message, err, custom, callback, request;
+ var arg;
+ var extraArgs = [];
+ var diagnostic = {};
+ var argTypes = [];
+
+ for (var i = 0, l = args.length; i < l; ++i) {
+ arg = args[i];
+
+ var typ = typeName(arg);
+ argTypes.push(typ);
+ switch (typ) {
+ case 'undefined':
+ break;
+ case 'string':
+ message ? extraArgs.push(arg) : (message = arg);
+ break;
+ case 'function':
+ callback = wrapCallback(logger, arg);
+ break;
+ case 'date':
+ extraArgs.push(arg);
+ break;
+ case 'error':
+ case 'domexception':
+ case 'exception': // Firefox Exception type
+ err ? extraArgs.push(arg) : (err = arg);
+ break;
+ case 'object':
+ case 'array':
+ if (
+ arg instanceof Error ||
+ (typeof DOMException !== 'undefined' && arg instanceof DOMException)
+ ) {
+ err ? extraArgs.push(arg) : (err = arg);
+ break;
}
- if (_.isType(header, 'string') && _.isType(value, 'string')) {
- if (self.autoInstrument.networkRequestHeaders) {
- if (!this.__rollbar_xhr.request_headers) {
- this.__rollbar_xhr.request_headers = {};
+ if (requestKeys && typ === 'object' && !request) {
+ for (var j = 0, len = requestKeys.length; j < len; ++j) {
+ if (arg[requestKeys[j]] !== undefined) {
+ request = arg;
+ break;
}
- this.__rollbar_xhr.request_headers[header] = value;
}
- // We want the content type even if request header telemetry is off.
- if (header.toLowerCase() === 'content-type') {
- this.__rollbar_xhr.request_content_type = value;
+ if (request) {
+ break;
}
}
- return orig.apply(this, arguments);
- };
- }, this.replacements, 'network');
-
- replace(xhrp, 'send', function(orig) {
- /* eslint-disable no-unused-vars */
- return function(data) {
- /* eslint-enable no-unused-vars */
- var xhr = this;
-
- function onreadystatechangeHandler() {
- if (xhr.__rollbar_xhr) {
- if (xhr.__rollbar_xhr.status_code === null) {
- xhr.__rollbar_xhr.status_code = 0;
- if (self.autoInstrument.networkRequestBody) {
- xhr.__rollbar_xhr.request = data;
- }
- xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);
- }
- if (xhr.readyState < 2) {
- xhr.__rollbar_xhr.start_time_ms = _.now();
- }
- if (xhr.readyState > 3) {
- xhr.__rollbar_xhr.end_time_ms = _.now();
-
- var headers = null;
- xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');
- if (self.autoInstrument.networkResponseHeaders) {
- var headersConfig = self.autoInstrument.networkResponseHeaders;
- headers = {};
- try {
- var header, i;
- if (headersConfig === true) {
- var allHeaders = xhr.getAllResponseHeaders();
- if (allHeaders) {
- var arr = allHeaders.trim().split(/[\r\n]+/);
- var parts, value;
- for (i=0; i < arr.length; i++) {
- parts = arr[i].split(': ');
- header = parts.shift();
- value = parts.join(': ');
- headers[header] = value;
- }
- }
- } else {
- for (i=0; i < headersConfig.length; i++) {
- header = headersConfig[i];
- headers[header] = xhr.getResponseHeader(header);
- }
- }
- } catch (e) {
- /* we ignore the errors here that could come from different
- * browser issues with the xhr methods */
- }
- }
- var body = null;
- if (self.autoInstrument.networkResponseBody) {
- try {
- body = xhr.responseText;
- } catch (e) {
- /* ignore errors from reading responseText */
- }
- }
- var response = null;
- if (body || headers) {
- response = {};
- if (body) {
- if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {
- response.body = self.scrubJson(body);
- } else {
- response.body = body;
- }
- }
- if (headers) {
- response.headers = headers;
- }
- }
- if (response) {
- xhr.__rollbar_xhr.response = response;
- }
- try {
- var code = xhr.status;
- code = code === 1223 ? 204 : code;
- xhr.__rollbar_xhr.status_code = code;
- xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);
- self.errorOnHttpStatus(xhr.__rollbar_xhr);
- } catch (e) {
- /* ignore possible exception from xhr.status */
- }
- }
- }
+ custom ? extraArgs.push(arg) : (custom = arg);
+ break;
+ default:
+ if (
+ arg instanceof Error ||
+ (typeof DOMException !== 'undefined' && arg instanceof DOMException)
+ ) {
+ err ? extraArgs.push(arg) : (err = arg);
+ break;
}
+ extraArgs.push(arg);
+ }
+ }
- wrapProp('onload', xhr);
- wrapProp('onerror', xhr);
- wrapProp('onprogress', xhr);
+ // if custom is an array this turns it into an object with integer keys
+ if (custom) custom = nonCircularClone(custom);
- if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {
- replace(xhr, 'onreadystatechange', function(orig) {
- return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);
- });
- } else {
- xhr.onreadystatechange = onreadystatechangeHandler;
- }
- if (xhr.__rollbar_xhr && self.trackHttpErrors()) {
- xhr.__rollbar_xhr.stack = (new Error()).stack;
- }
- return orig.apply(this, arguments);
- }
- }, this.replacements, 'network');
+ if (extraArgs.length > 0) {
+ if (!custom) custom = nonCircularClone({});
+ custom.extraArgs = nonCircularClone(extraArgs);
}
- if ('fetch' in this._window) {
- replace(this._window, 'fetch', function(orig) {
- /* eslint-disable no-unused-vars */
- return function(fn, t) {
- /* eslint-enable no-unused-vars */
- var args = new Array(arguments.length);
- for (var i=0, len=args.length; i < len; i++) {
- args[i] = arguments[i];
- }
- var input = args[0];
- var method = 'GET';
- var url;
- if (_.isType(input, 'string')) {
- url = input;
- } else if (input) {
- url = input.url;
- if (input.method) {
- method = input.method;
- }
- }
- if (args[1] && args[1].method) {
- method = args[1].method;
- }
- var metadata = {
- method: method,
- url: url,
- status_code: null,
- start_time_ms: _.now(),
- end_time_ms: null
- };
- if (args[1] && args[1].headers) {
- // Argument may be a Headers object, or plain object. Ensure here that
- // we are working with a Headers object with case-insensitive keys.
- var reqHeaders = new Headers(args[1].headers);
-
- metadata.request_content_type = reqHeaders.get('Content-Type');
+ var item = {
+ message: message,
+ err: err,
+ custom: custom,
+ timestamp: now(),
+ callback: callback,
+ notifier: notifier,
+ diagnostic: diagnostic,
+ uuid: uuid4(),
+ };
- if (self.autoInstrument.networkRequestHeaders) {
- metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)
- }
- }
+ setCustomItemKeys(item, custom);
- if (self.autoInstrument.networkRequestBody) {
- if (args[1] && args[1].body) {
- metadata.request = args[1].body;
- } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {
- metadata.request = args[0].body;
- }
- }
- self.captureNetwork(metadata, 'fetch', undefined);
- if (self.trackHttpErrors()) {
- metadata.stack = (new Error()).stack;
- }
- return orig.apply(this, args).then(function (resp) {
- metadata.end_time_ms = _.now();
- metadata.status_code = resp.status;
- metadata.response_content_type = resp.headers.get('Content-Type');
- var headers = null;
- if (self.autoInstrument.networkResponseHeaders) {
- headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);
- }
- var body = null;
- if (self.autoInstrument.networkResponseBody) {
- if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms
- // The response must be cloned to prevent reading (and locking) the original stream.
- body = resp.clone().text(); //returns a Promise
- }
- }
- if (headers || body) {
- metadata.response = {};
- if (body) {
- // Test to ensure body is a Promise, which it should always be.
- if (typeof body.then === 'function') {
- body.then(function (text) {
- if (self.isJsonContentType(metadata.response_content_type)) {
- metadata.response.body = self.scrubJson(text);
- }
- });
- } else {
- metadata.response.body = body;
- }
- }
- if (headers) {
- metadata.response.headers = headers;
- }
- }
- self.errorOnHttpStatus(metadata);
- return resp;
- });
- };
- }, this.replacements, 'network');
+ if (requestKeys && request) {
+ item.request = request;
}
-};
-
-Instrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {
- if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {
- metadata.request = this.scrubJson(metadata.request);
+ if (lambdaContext) {
+ item.lambdaContext = lambdaContext;
}
- return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);
-};
+ item._originalArgs = args;
+ item.diagnostic.original_arg_types = argTypes;
+ return item;
+}
-Instrumenter.prototype.isJsonContentType = function(contentType) {
- return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;
+function setCustomItemKeys(item, custom) {
+ if (custom && custom.level !== undefined) {
+ item.level = custom.level;
+ delete custom.level;
+ }
+ if (custom && custom.skipFrames !== undefined) {
+ item.skipFrames = custom.skipFrames;
+ delete custom.skipFrames;
+ }
}
-Instrumenter.prototype.scrubJson = function(json) {
- return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));
-}
+function addErrorContext(item, errors) {
+ var custom = item.data.custom || {};
+ var contextAdded = false;
-Instrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {
- var outHeaders = {};
try {
- var i;
- if (headersConfig === true) {
- if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE
- var allHeaders = inHeaders.entries();
- var currentHeader = allHeaders.next();
- while (!currentHeader.done) {
- outHeaders[currentHeader.value[0]] = currentHeader.value[1];
- currentHeader = allHeaders.next();
- }
- }
- } else {
- for (i=0; i < headersConfig.length; i++) {
- var header = headersConfig[i];
- outHeaders[header] = inHeaders.get(header);
+ for (var i = 0; i < errors.length; ++i) {
+ if (errors[i].hasOwnProperty('rollbarContext')) {
+ custom = merge(custom, nonCircularClone(errors[i].rollbarContext));
+ contextAdded = true;
}
}
+
+ // Avoid adding an empty object to the data.
+ if (contextAdded) {
+ item.data.custom = custom;
+ }
} catch (e) {
- /* ignore probable IE errors */
+ item.diagnostic.error_context = 'Failed: ' + e.message;
}
- return outHeaders;
-}
-
-Instrumenter.prototype.trackHttpErrors = function() {
- return this.autoInstrument.networkErrorOnHttp5xx ||
- this.autoInstrument.networkErrorOnHttp4xx ||
- this.autoInstrument.networkErrorOnHttp0;
}
-Instrumenter.prototype.errorOnHttpStatus = function(metadata) {
- var status = metadata.status_code;
+var TELEMETRY_TYPES = [
+ 'log',
+ 'network',
+ 'dom',
+ 'navigation',
+ 'error',
+ 'manual',
+];
+var TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];
- if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||
- (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||
- (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {
- var error = new Error('HTTP request failed with Status ' + status);
- error.stack = metadata.stack;
- this.rollbar.error(error, { skipFrames: 1 });
+function arrayIncludes(arr, val) {
+ for (var k = 0; k < arr.length; ++k) {
+ if (arr[k] === val) {
+ return true;
+ }
}
+
+ return false;
}
-Instrumenter.prototype.deinstrumentConsole = function() {
- if (!('console' in this._window && this._window.console.log)) {
- return;
- }
- var b;
- while (this.replacements['log'].length) {
- b = this.replacements['log'].shift();
- this._window.console[b[0]] = b[1];
- }
-};
+function createTelemetryEvent(args) {
+ var type, metadata, level;
+ var arg;
-Instrumenter.prototype.instrumentConsole = function() {
- if (!('console' in this._window && this._window.console.log)) {
- return;
- }
+ for (var i = 0, l = args.length; i < l; ++i) {
+ arg = args[i];
- var self = this;
- var c = this._window.console;
+ var typ = typeName(arg);
+ switch (typ) {
+ case 'string':
+ if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {
+ type = arg;
+ } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {
+ level = arg;
+ }
+ break;
+ case 'object':
+ metadata = arg;
+ break;
+ default:
+ break;
+ }
+ }
+ var event = {
+ type: type || 'manual',
+ metadata: metadata || {},
+ level: level,
+ };
- function wrapConsole(method) {
- 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778
+ return event;
+}
- var orig = c[method];
- var origConsole = c;
- var level = method === 'warn' ? 'warning' : method;
- c[method] = function() {
- var args = Array.prototype.slice.call(arguments);
- var message = _.formatArgsAsString(args);
- self.telemeter.captureLog(message, level);
- if (orig) {
- Function.prototype.apply.call(orig, origConsole, args);
- }
- };
- self.replacements['log'].push([method, orig]);
+/*
+ * get - given an obj/array and a keypath, return the value at that keypath or
+ * undefined if not possible.
+ *
+ * @param obj - an object or array
+ * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'
+ * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`
+ */
+function get(obj, path) {
+ if (!obj) {
+ return undefined;
}
- var methods = ['debug','info','warn','error','log'];
+ var keys = path.split('.');
+ var result = obj;
try {
- for (var i=0, len=methods.length; i < len; i++) {
- wrapConsole(methods[i]);
+ for (var i = 0, len = keys.length; i < len; ++i) {
+ result = result[keys[i]];
}
} catch (e) {
- this.diagnostic.instrumentConsole = { error: e.message };
+ result = undefined;
}
-};
+ return result;
+}
-Instrumenter.prototype.deinstrumentDom = function() {
- if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {
+function set(obj, path, value) {
+ if (!obj) {
return;
}
- this.removeListeners('dom');
-};
-
-Instrumenter.prototype.instrumentDom = function() {
- if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {
+ var keys = path.split('.');
+ var len = keys.length;
+ if (len < 1) {
return;
}
- var clickHandler = this.handleClick.bind(this);
- var blurHandler = this.handleBlur.bind(this);
- this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);
- this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);
-};
-
-Instrumenter.prototype.handleClick = function(evt) {
- try {
- var e = domUtil.getElementFromEvent(evt, this._document);
- var hasTag = e && e.tagName;
- 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 (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {
- this.captureDomEvent('input', e, e.value, e.checked);
- }
- } catch (exc) {
- // TODO: Not sure what to do here
+ if (len === 1) {
+ obj[keys[0]] = value;
+ return;
}
-};
-
-Instrumenter.prototype.handleBlur = function(evt) {
try {
- var e = domUtil.getElementFromEvent(evt, this._document);
- if (e && e.tagName) {
- if (domUtil.isDescribedElement(e, 'textarea')) {
- this.captureDomEvent('input', e, e.value);
- } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {
- this.handleSelectInputChanged(e);
- } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {
- this.captureDomEvent('input', e, e.value);
- }
- }
- } catch (exc) {
- // TODO: Not sure what to do here
- }
-};
-
-Instrumenter.prototype.handleSelectInputChanged = function(elem) {
- if (elem.multiple) {
- for (var i = 0; i < elem.options.length; i++) {
- if (elem.options[i].selected) {
- this.captureDomEvent('input', elem, elem.options[i].value);
- }
+ var temp = obj[keys[0]] || {};
+ var replacement = temp;
+ for (var i = 1; i < len - 1; ++i) {
+ temp[keys[i]] = temp[keys[i]] || {};
+ temp = temp[keys[i]];
}
- } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {
- this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);
+ temp[keys[len - 1]] = value;
+ obj[keys[0]] = replacement;
+ } catch (e) {
+ return;
}
-};
+}
-Instrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {
- if (value !== undefined) {
- if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {
- value = '[scrubbed]';
- } else {
- var description = domUtil.describeElement(element);
- if (this.telemetryScrubber) {
- if (this.telemetryScrubber(description)) {
- value = '[scrubbed]';
+function formatArgsAsString(args) {
+ var i, len, arg;
+ var result = [];
+ for (i = 0, len = args.length; i < len; ++i) {
+ arg = args[i];
+ switch (typeName(arg)) {
+ case 'object':
+ arg = stringify(arg);
+ arg = arg.error || arg.value;
+ if (arg.length > 500) {
+ arg = arg.substr(0, 497) + '...';
}
- } else if (this.defaultValueScrubber(description)) {
- value = '[scrubbed]';
- }
+ break;
+ case 'null':
+ arg = 'null';
+ break;
+ case 'undefined':
+ arg = 'undefined';
+ break;
+ case 'symbol':
+ arg = arg.toString();
+ break;
}
+ result.push(arg);
}
- var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));
- this.telemeter.captureDom(subtype, elementString, value, isChecked);
-};
-
-Instrumenter.prototype.deinstrumentNavigation = function() {
- var chrome = this._window.chrome;
- var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;
- // See https://github.com/angular/angular.js/pull/13945/files
- var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;
- if (!hasPushState) {
- return;
- }
- restore(this.replacements, 'navigation');
-};
-
-Instrumenter.prototype.instrumentNavigation = function() {
- var chrome = this._window.chrome;
- var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;
- // See https://github.com/angular/angular.js/pull/13945/files
- var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;
- if (!hasPushState) {
- return;
- }
- var self = this;
- replace(this._window, 'onpopstate', function(orig) {
- return function() {
- var current = self._location.href;
- self.handleUrlChange(self._lastHref, current);
- if (orig) {
- orig.apply(this, arguments);
- }
- };
- }, this.replacements, 'navigation');
-
- replace(this._window.history, 'pushState', function(orig) {
- return function() {
- var url = arguments.length > 2 ? arguments[2] : undefined;
- if (url) {
- self.handleUrlChange(self._lastHref, url + '');
- }
- return orig.apply(this, arguments);
- };
- }, this.replacements, 'navigation');
-};
-
-Instrumenter.prototype.handleUrlChange = function(from, to) {
- var parsedHref = urlparser.parse(this._location.href);
- var parsedTo = urlparser.parse(to);
- var parsedFrom = urlparser.parse(from);
- this._lastHref = to;
- if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {
- to = parsedTo.path + (parsedTo.hash || '');
- }
- if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {
- from = parsedFrom.path + (parsedFrom.hash || '');
- }
- this.telemeter.captureNavigation(from, to);
-};
-
-Instrumenter.prototype.deinstrumentConnectivity = function() {
- if (!('addEventListener' in this._window || 'body' in this._document)) {
- return;
- }
- if (this._window.addEventListener) {
- this.removeListeners('connectivity');
- } else {
- restore(this.replacements, 'connectivity');
- }
-};
+ return result.join(' ');
+}
-Instrumenter.prototype.instrumentConnectivity = function() {
- if (!('addEventListener' in this._window || 'body' in this._document)) {
+function now() {
+ if (Date.now) {
+ return +Date.now();
+ }
+ return +new Date();
+}
+
+function filterIp(requestData, captureIp) {
+ if (!requestData || !requestData['user_ip'] || captureIp === true) {
return;
}
- if (this._window.addEventListener) {
- this.addListener('connectivity', this._window, 'online', undefined, function() {
- this.telemeter.captureConnectivityChange('online');
- }.bind(this), true);
- this.addListener('connectivity', this._window, 'offline', undefined, function() {
- this.telemeter.captureConnectivityChange('offline');
- }.bind(this), true);
+ var newIp = requestData['user_ip'];
+ if (!captureIp) {
+ newIp = null;
} else {
- var self = this;
- replace(this._document.body, 'ononline', function(orig) {
- return function() {
- self.telemeter.captureConnectivityChange('online');
- if (orig) {
- orig.apply(this, arguments);
- }
- }
- }, this.replacements, 'connectivity');
- replace(this._document.body, 'onoffline', function(orig) {
- return function() {
- self.telemeter.captureConnectivityChange('offline');
- if (orig) {
- orig.apply(this, arguments);
+ try {
+ var parts;
+ if (newIp.indexOf('.') !== -1) {
+ parts = newIp.split('.');
+ parts.pop();
+ parts.push('0');
+ newIp = parts.join('.');
+ } else if (newIp.indexOf(':') !== -1) {
+ parts = newIp.split(':');
+ if (parts.length > 2) {
+ var beginning = parts.slice(0, 3);
+ var slashIdx = beginning[2].indexOf('/');
+ if (slashIdx !== -1) {
+ beginning[2] = beginning[2].substring(0, slashIdx);
+ }
+ var terminal = '0000:0000:0000:0000:0000';
+ newIp = beginning.concat(terminal).join(':');
}
+ } else {
+ newIp = null;
}
- }, this.replacements, 'connectivity');
- }
-};
-
-Instrumenter.prototype.handleCspEvent = function(cspEvent) {
- var message = 'Security Policy Violation: ' +
- 'blockedURI: ' + cspEvent.blockedURI + ', ' +
- 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +
- 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';
-
- if (cspEvent.sourceFile) {
- message += 'location: ' + cspEvent.sourceFile + ', ' +
- 'line: ' + cspEvent.lineNumber + ', ' +
- 'col: ' + cspEvent.columnNumber + ', ';
+ } catch (e) {
+ newIp = null;
+ }
}
-
- message += 'originalPolicy: ' + cspEvent.originalPolicy;
-
- this.telemeter.captureLog(message, 'error');
- this.handleCspError(message);
+ requestData['user_ip'] = newIp;
}
-Instrumenter.prototype.handleCspError = function(message) {
- if (this.autoInstrument.errorOnContentSecurityPolicy) {
- this.rollbar.error(message);
+function handleOptions(current, input, payload, logger) {
+ var result = merge(current, input, payload);
+ result = updateDeprecatedOptions(result, logger);
+ if (!input || input.overwriteScrubFields) {
+ return result;
+ }
+ if (input.scrubFields) {
+ result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);
}
+ return result;
}
-Instrumenter.prototype.deinstrumentContentSecurityPolicy = function() {
- if (!('addEventListener' in this._window)) { return; }
-
- this.removeListeners('contentsecuritypolicy');
-};
-
-Instrumenter.prototype.instrumentContentSecurityPolicy = function() {
- if (!('addEventListener' in this._window)) { return; }
-
- var cspHandler = this.handleCspEvent.bind(this);
- this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);
-};
-
-Instrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {
- if (obj.addEventListener) {
- obj.addEventListener(type, handler, capture);
- this.eventRemovers[section].push(function() {
- obj.removeEventListener(type, handler, capture);
- });
- } else if (altType) {
- obj.attachEvent(altType, handler);
- this.eventRemovers[section].push(function() {
- obj.detachEvent(altType, handler);
- });
+function updateDeprecatedOptions(options, logger) {
+ if (options.hostWhiteList && !options.hostSafeList) {
+ options.hostSafeList = options.hostWhiteList;
+ options.hostWhiteList = undefined;
+ logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');
}
-};
-
-Instrumenter.prototype.removeListeners = function(section) {
- var r;
- while (this.eventRemovers[section].length) {
- r = this.eventRemovers[section].shift();
- r();
+ if (options.hostBlackList && !options.hostBlockList) {
+ options.hostBlockList = options.hostBlackList;
+ options.hostBlackList = undefined;
+ logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');
}
-};
+ return options;
+}
-module.exports = Instrumenter;
+module.exports = {
+ addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,
+ createItem: createItem,
+ addErrorContext: addErrorContext,
+ createTelemetryEvent: createTelemetryEvent,
+ filterIp: filterIp,
+ formatArgsAsString: formatArgsAsString,
+ formatUrl: formatUrl,
+ get: get,
+ handleOptions: handleOptions,
+ isError: isError,
+ isFiniteNumber: isFiniteNumber,
+ isFunction: isFunction,
+ isIterable: isIterable,
+ isNativeFunction: isNativeFunction,
+ isObject: isObject,
+ isString: isString,
+ isType: isType,
+ isPromise: isPromise,
+ jsonParse: jsonParse,
+ LEVELS: LEVELS,
+ makeUnhandledStackInfo: makeUnhandledStackInfo,
+ merge: merge,
+ now: now,
+ redact: redact,
+ RollbarJSON: RollbarJSON,
+ sanitizeUrl: sanitizeUrl,
+ set: set,
+ setupJSON: setupJSON,
+ stringify: stringify,
+ maxByteSize: maxByteSize,
+ typeName: typeName,
+ uuid4: uuid4,
+};
/***/ }),
-/* 31 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 650:
+/***/ ((module) => {
"use strict";
-function getElementType(e) {
- return (e.getAttribute('type') || '').toLowerCase();
+/*
+ * headers - Detect when fetch Headers are undefined and use a partial polyfill.
+ *
+ * A full polyfill is not used in order to keep package size as small as possible.
+ * Since this is only used internally and is not added to the window object,
+ * the full interface doesn't need to be supported.
+ *
+ * This implementation is modified from whatwg-fetch:
+ * https://github.com/github/fetch
+ */
+function headers(headers) {
+ if (typeof Headers === 'undefined') {
+ return new FetchHeaders(headers);
+ }
+
+ return new Headers(headers);
}
-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;
- }
+function normalizeName(name) {
+ if (typeof name !== 'string') {
+ name = String(name);
}
- return false;
+ return name.toLowerCase();
}
-function getElementFromEvent(evt, doc) {
- if (evt.target) {
- return evt.target;
- }
- if (doc && doc.elementFromPoint) {
- return doc.elementFromPoint(evt.clientX, evt.clientY);
+function normalizeValue(value) {
+ if (typeof value !== 'string') {
+ value = String(value);
}
- return undefined;
+ return value;
}
-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 iteratorFor(items) {
+ var iterator = {
+ next: function () {
+ var value = items.shift();
+ return { done: value === undefined, value: value };
+ },
+ };
+
+ return iterator;
}
-function elementArrayToString(a) {
- var MAX_LENGTH = 80;
- var separator = ' > ', separatorLength = separator.length;
- var out = [], len = 0, nextStr, totalLength;
+function FetchHeaders(headers) {
+ this.map = {};
- 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;
+ if (headers instanceof FetchHeaders) {
+ headers.forEach(function (value, name) {
+ this.append(name, value);
+ }, this);
+ } else if (Array.isArray(headers)) {
+ headers.forEach(function (header) {
+ this.append(header[0], header[1]);
+ }, this);
+ } else if (headers) {
+ Object.getOwnPropertyNames(headers).forEach(function (name) {
+ this.append(name, headers[name]);
+ }, this);
}
- 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 + '"]');
- }
+FetchHeaders.prototype.append = function (name, value) {
+ name = normalizeName(name);
+ value = normalizeValue(value);
+ var oldValue = this.map[name];
+ this.map[name] = oldValue ? oldValue + ', ' + value : value;
+};
- return out.join('');
-}
+FetchHeaders.prototype.get = function (name) {
+ name = normalizeName(name);
+ return this.has(name) ? this.map[name] : null;
+};
-/**
- * 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});
+FetchHeaders.prototype.has = function (name) {
+ return this.map.hasOwnProperty(normalizeName(name));
+};
+
+FetchHeaders.prototype.forEach = function (callback, thisArg) {
+ for (var name in this.map) {
+ if (this.map.hasOwnProperty(name)) {
+ callback.call(thisArg, this.map[name], name, this);
}
}
- return out;
+};
+
+FetchHeaders.prototype.entries = function () {
+ var items = [];
+ this.forEach(function (value, name) {
+ items.push([name, value]);
+ });
+ return iteratorFor(items);
+};
+
+module.exports = headers;
+
+
+/***/ }),
+
+/***/ 876:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+var polyfillJSON = __webpack_require__(708);
+
+module.exports = polyfillJSON;
+
+
+/***/ }),
+
+/***/ 297:
+/***/ ((module) => {
+
+"use strict";
+
+
+function replace(obj, name, replacement, replacements, type) {
+ var orig = obj[name];
+ obj[name] = replacement(orig);
+ if (replacements) {
+ replacements[type].push([obj, name, orig]);
+ }
}
-module.exports = {
- describeElement: describeElement,
- descriptionToString: descriptionToString,
- elementArrayToString: elementArrayToString,
- treeToArray: treeToArray,
- getElementFromEvent: getElementFromEvent,
- isDescribedElement: isDescribedElement,
- getElementType: getElementType
-};
+module.exports = replace;
/***/ }),
-/* 32 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 267:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var polyfillJSON = __webpack_require__(33);
+var _ = __webpack_require__(702);
-module.exports = polyfillJSON;
+function traverse(obj, func, seen) {
+ var k, v, i;
+ var isObj = _.isType(obj, 'object');
+ var isArray = _.isType(obj, 'array');
+ var keys = [];
+ var seenIndex;
+
+ // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.
+ seen = seen || { obj: [], mapped: [] };
+
+ if (isObj) {
+ seenIndex = seen.obj.indexOf(obj);
+
+ if (isObj && seenIndex !== -1) {
+ // Prefer the mapped object if there is one.
+ return seen.mapped[seenIndex] || seen.obj[seenIndex];
+ }
+
+ seen.obj.push(obj);
+ seenIndex = seen.obj.length - 1;
+ }
+
+ if (isObj) {
+ for (k in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, k)) {
+ keys.push(k);
+ }
+ }
+ } else if (isArray) {
+ for (i = 0; i < obj.length; ++i) {
+ keys.push(i);
+ }
+ }
+
+ var result = isObj ? {} : [];
+ var same = true;
+ for (i = 0; i < keys.length; ++i) {
+ k = keys[i];
+ v = obj[k];
+ result[k] = func(k, v, seen);
+ same = same && result[k] === obj[k];
+ }
+
+ if (isObj && !same) {
+ seen.mapped[seenIndex] = result;
+ }
+
+ return !same ? result : obj;
+}
+
+module.exports = traverse;
/***/ }),
-/* 33 */
-/***/ (function(module, exports) {
+
+/***/ 708:
+/***/ ((module) => {
// json3.js
// 2017-02-21
@@ -6512,183 +7546,43 @@ var setupCustomJSON = function(JSON) {
module.exports = setupCustomJSON;
-/***/ }),
-/* 34 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-function wrapGlobals(window, handler, shim) {
- if (!window) { return; }
- // Adapted from https://github.com/bugsnag/bugsnag-js
- 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(',');
- var i, global;
- for (i = 0; i < globals.length; ++i) {
- global = globals[i];
-
- if (window[global] && window[global].prototype) {
- _extendListenerPrototype(handler, window[global].prototype, shim);
- }
- }
-}
-
-function _extendListenerPrototype(handler, prototype, shim) {
- if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {
- var oldAddEventListener = prototype.addEventListener;
- while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {
- oldAddEventListener = oldAddEventListener._rollbarOldAdd;
- }
- var addFn = function(event, callback, bubble) {
- oldAddEventListener.call(this, event, handler.wrap(callback), bubble);
- };
- addFn._rollbarOldAdd = oldAddEventListener;
- addFn.belongsToShim = shim;
- prototype.addEventListener = addFn;
-
- var oldRemoveEventListener = prototype.removeEventListener;
- while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {
- oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;
- }
- var removeFn = function(event, callback, bubble) {
- oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);
- };
- removeFn._rollbarOldRemove = oldRemoveEventListener;
- removeFn.belongsToShim = shim;
- prototype.removeEventListener = removeFn;
- }
-}
-
-module.exports = wrapGlobals;
-
-
-/***/ }),
-/* 35 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var _ = __webpack_require__(0);
-var traverse = __webpack_require__(5);
-
-function raw(payload, jsonBackup) {
- return [payload, _.stringify(payload, jsonBackup)];
-}
-
-function selectFrames(frames, range) {
- var len = frames.length;
- if (len > range * 2) {
- return frames.slice(0, range).concat(frames.slice(len - range));
- }
- return frames;
-}
-
-function truncateFrames(payload, jsonBackup, range) {
- range = (typeof range === 'undefined') ? 30 : range;
- var body = payload.data.body;
- var frames;
- if (body.trace_chain) {
- var chain = body.trace_chain;
- for (var i = 0; i < chain.length; i++) {
- frames = chain[i].frames;
- frames = selectFrames(frames, range);
- chain[i].frames = frames;
- }
- } else if (body.trace) {
- frames = body.trace.frames;
- frames = selectFrames(frames, range);
- body.trace.frames = frames;
- }
- return [payload, _.stringify(payload, jsonBackup)];
-}
-
-function maybeTruncateValue(len, val) {
- if (!val) {
- return val;
- }
- if (val.length > len) {
- return val.slice(0, len - 3).concat('...');
- }
- return val;
-}
-
-function truncateStrings(len, payload, jsonBackup) {
- function truncator(k, v, seen) {
- switch (_.typeName(v)) {
- case 'string':
- return maybeTruncateValue(len, v);
- case 'object':
- case 'array':
- return traverse(v, truncator, seen);
- default:
- return v;
- }
- }
- payload = traverse(payload, truncator);
- return [payload, _.stringify(payload, jsonBackup)];
-}
-
-function truncateTraceData(traceData) {
- if (traceData.exception) {
- delete traceData.exception.description;
- traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);
- }
- traceData.frames = selectFrames(traceData.frames, 1);
- return traceData;
-}
-
-function minBody(payload, jsonBackup) {
- var body = payload.data.body;
- if (body.trace_chain) {
- var chain = body.trace_chain;
- for (var i = 0; i < chain.length; i++) {
- chain[i] = truncateTraceData(chain[i]);
- }
- } else if (body.trace) {
- body.trace = truncateTraceData(body.trace);
- }
- return [payload, _.stringify(payload, jsonBackup)];
-}
-
-function needsTruncation(payload, maxSize) {
- return _.maxByteSize(payload) > maxSize;
-}
-
-function truncate(payload, jsonBackup, maxSize) {
- maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;
- var strategies = [
- raw,
- truncateFrames,
- truncateStrings.bind(null, 1024),
- truncateStrings.bind(null, 512),
- truncateStrings.bind(null, 256),
- minBody
- ];
- var strategy, results, result;
-
- while ((strategy = strategies.shift())) {
- results = strategy(payload, jsonBackup);
- payload = results[0];
- result = results[1];
- if (result.error || !needsTruncation(result.value, maxSize)) {
- return result;
- }
- }
- return result;
-}
-
-module.exports = {
- truncate: truncate,
-
- /* for testing */
- raw: raw,
- truncateFrames: truncateFrames,
- truncateStrings: truncateStrings,
- maybeTruncateValue: maybeTruncateValue
-};
-
-
/***/ })
-/******/ ])});;
+
+/******/ });
+/************************************************************************/
+/******/ // The module cache
+/******/ var __webpack_module_cache__ = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/ // Check if module is in cache
+/******/ var cachedModule = __webpack_module_cache__[moduleId];
+/******/ if (cachedModule !== undefined) {
+/******/ return cachedModule.exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = __webpack_module_cache__[moduleId] = {
+/******/ // no module.id needed
+/******/ // no module.loaded needed
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/************************************************************************/
+/******/
+/******/ // startup
+/******/ // Load entry module and return exports
+/******/ // This entry module is referenced by other modules so it can't be inlined
+/******/ var __webpack_exports__ = __webpack_require__(409);
+/******/
+/******/ return __webpack_exports__;
+/******/ })()
+;
+});;
//# sourceMappingURL=rollbar.named-amd.js.map
\ No newline at end of file
diff --git a/dist/rollbar.named-amd.js.map b/dist/rollbar.named-amd.js.map
index 3f7d4b21d..14eb356e2 100644
--- a/dist/rollbar.named-amd.js.map
+++ b/dist/rollbar.named-amd.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3uBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Fa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;;AAEA;AAC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;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;ACvGa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAY;AAC5B,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvQa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9UA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrJa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC/vBa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.named-amd.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n if (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = merge(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 notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, errors[i].rollbarContext);\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"rollbar.named-amd.js","mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,wBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,kGAAC;AAC7D,MAAM,KAAK,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,kGAAC;AACzC,MAAM,KAAK,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,oBAAoB,wBAAwB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,GAAW;AAC3B,cAAc,mBAAO,CAAC,GAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;;AAEA;;;;;;;;;ACvHa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7Ga;;AAEb,cAAc,mBAAO,CAAC,GAAY;;AAElC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;;;;;;;;;ACvBa;;AAEb,aAAa,mBAAO,CAAC,GAAY;AACjC,QAAQ,mBAAO,CAAC,GAAY;AAC5B,UAAU,mBAAO,CAAC,GAAQ;AAC1B,aAAa,mBAAO,CAAC,GAAU;AAC/B,cAAc,mBAAO,CAAC,GAAe;;AAErC,gBAAgB,mBAAO,CAAC,GAAa;AACrC,aAAa,mBAAO,CAAC,GAAO;;AAE5B,iBAAiB,mBAAO,CAAC,GAAc;AACvC,uBAAuB,mBAAO,CAAC,GAAe;AAC9C,iBAAiB,mBAAO,CAAC,GAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,kBAAkB,mBAAO,CAAC,GAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;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;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,GAAa;AACpC,kBAAkB,mBAAO,CAAC,GAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AC9lBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5Da;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;AC9Ba;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,6BAA6B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAA6B,QAAQ;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7Ia;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;ACxGa;;AAEb;AACA,mBAAO,CAAC,GAAkB;AAC1B,gBAAgB,mBAAO,CAAC,GAAa;AACrC,QAAQ,mBAAO,CAAC,GAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;AC3Ca;;AAEb,QAAQ,mBAAO,CAAC,GAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;ACba;;AAEb,cAAc,mBAAO,CAAC,GAAQ;AAC9B,gBAAgB,mBAAO,CAAC,GAAc;AACtC,mBAAmB,mBAAO,CAAC,GAAa;AACxC,mBAAmB,mBAAO,CAAC,GAAyB;AACpD,kBAAkB,mBAAO,CAAC,GAAe;AACzC,YAAY,mBAAO,CAAC,GAAU;AAC9B,iBAAiB,mBAAO,CAAC,GAAe;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;ACnBa;;AAEb,QAAQ,mBAAO,CAAC,GAAY;AAC5B,cAAc,mBAAO,CAAC,GAAoB;AAC1C,cAAc,mBAAO,CAAC,GAAoB;AAC1C,YAAY,mBAAO,CAAC,GAAU;AAC9B,gBAAgB,mBAAO,CAAC,GAAO;AAC/B,cAAc,mBAAO,CAAC,GAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,gBAAgB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,kCAAkC,0BAA0B;AAC5D;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;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,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,mBAAmB;AACnB,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kBAAkB,0BAA0B;AAC5C;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,eAAe;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,SAAS;AACnD;AACA;AACA,IAAI;AACJ,0CAA0C;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;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,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;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,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;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,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;ACj+Ba;;AAEb,QAAQ,mBAAO,CAAC,GAAY;AAC5B,kBAAkB,mBAAO,CAAC,GAAgB;AAC1C,aAAa,mBAAO,CAAC,GAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA,qBAAqB,8CAA8C;AACnE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAA6B,iBAAiB;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;;AAEA,6BAA6B,qBAAqB;AAClD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,kBAAkB;AAClC;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;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtWa;;AAEb,QAAQ,mBAAO,CAAC,GAAY;AAC5B,uBAAuB,mBAAO,CAAC,GAAmB;AAClD,qBAAqB,mBAAO,CAAC,EAAiB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;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;;AAEA;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;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;;ACxLa;;AAEb,aAAa,mBAAO,CAAC,GAAW;AAChC,QAAQ,mBAAO,CAAC,GAAe;;AAE/B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;;AAEA;;;;;;;;;ACtCa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,GAAe;AAC/B,aAAa,mBAAO,CAAC,GAAW;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AChLa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;ACxFa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,oBAAoB;AAClC;;AAEA;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;;AAEA;;;;;;;;;AC7Da;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACVa;;AAEb,uBAAuB,mBAAO,CAAC,GAAoB;;AAEnD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA,uBAAuB,wBAAwB;AAC/C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChIa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;;AAEA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AChEa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;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;;;;;;;;;AC3Ha;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;AACA;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAkB,SAAS;AAC3B;;AAEA,oBAAoB,qBAAqB;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtNa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,YAAY;AAC3B,eAAe,gBAAgB;AAC/B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA,eAAe;AACf;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,gCAAgC;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AC7Sa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;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;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACzLa;;AAEb,kBAAkB,mBAAO,CAAC,GAAe;AACzC,YAAY,mBAAO,CAAC,GAAS;AAC7B,eAAe,mBAAO,CAAC,GAAY;AACnC,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,UAAU;AACzD;AACA;AACA;AACA,qDAAqD,UAAU;AAC/D;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;AC5Ra;;AAEb,QAAQ,mBAAO,CAAC,GAAW;AAC3B,eAAe,mBAAO,CAAC,GAAoB;;AAE3C;AACA;;AAEA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AC7Fa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;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,KAAK;AACL;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,oBAAoB;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,6BAA6B;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA;AACA;AACA,MAAM,iBAAiB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,+BAA+B,cAAc;AAC7C;;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AClPa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,uBAAuB;AAC3D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,+BAA+B;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxKa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;AAC3B,eAAe,mBAAO,CAAC,GAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1Ha;;AAEb,YAAY,mBAAO,CAAC,GAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;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,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oCAAoC,OAAO;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,SAAS;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,SAAS;AAChD;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAiC,SAAS;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjzBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;AC/Fa;;AAEb,mBAAmB,mBAAO,CAAC,GAA4B;;AAEvD;;;;;;;;;ACJa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACVa;;AAEb,QAAQ,mBAAO,CAAC,GAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,gBAAgB,gBAAgB;AAChC;AACA;AACA;;AAEA,0BAA0B;AAC1B;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,oBAAoB;AACpB,oBAAoB;AACpB,oBAAoB;AACpB;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,sBAAsB,YAAY;AAClC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,sBAAsB,YAAY;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oBAAoB,WAAW;AAC/B;AACA;;AAEA;;AAEA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,cAAc;;AAEd;AACA;;AAEA;AACA;AACA,cAAc;;AAEd;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,UAAU;AACV;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,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;UC1vBA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transport/fetch.js","webpack://rollbar/./src/browser/transport/xhr.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/truncation.js","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./src/utility/replace.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/webpack/bootstrap","webpack://rollbar/webpack/before-startup","webpack://rollbar/webpack/startup","webpack://rollbar/webpack/after-startup"],"sourcesContent":["// 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","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443,\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function (data, callback) {\n var transportOptions = helpers.transportOptions(\n this.transportOptions,\n 'POST',\n );\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function () {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function (data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload);\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function (jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(\n this.transportOptions,\n 'POST',\n );\n this.transport.postJsonPayload(\n this.accessToken,\n transportOptions,\n jsonPayload,\n callback,\n );\n};\n\nApi.prototype.configure = function (options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = \"Error: could not serialize 'context'\";\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data,\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options);\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport,\n };\n}\n\nfunction detectTransport(options) {\n var gWindow =\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port =\n transport.port ||\n (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI,\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath,\n};\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client =\n client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = typeof document != 'undefined' && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(\n this.options,\n this.client.telemeter,\n this,\n gWindow,\n gDocument,\n );\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n\n // Used with rollbar-react for rollbar-react-native compatibility.\n this.rollbar = this;\n}\n\nvar _instance = null;\nRollbar.init = function (options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function (components) {\n Rollbar.prototype.components = components;\n};\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function (options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function (options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(\n oldOptions._configuredOptions,\n options,\n payload,\n );\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function (options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function () {\n return this.client.lastError;\n};\nRollbar.lastError = function () {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return { uuid: uuid };\n};\nRollbar.log = function () {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return { uuid: uuid };\n};\nRollbar.debug = function () {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return { uuid: uuid };\n};\nRollbar.info = function () {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return { uuid: uuid };\n};\nRollbar.warn = function () {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return { uuid: uuid };\n};\nRollbar.warning = function () {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return { uuid: uuid };\n};\nRollbar.error = function () {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return { uuid: uuid };\n};\nRollbar.critical = function () {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function () {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function () {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function () {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (\n this.options.captureUnhandledRejections ||\n this.options.handleUnhandledRejections\n ) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function (\n message,\n url,\n lineno,\n colno,\n error,\n context,\n) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (\n this.options.inspectAnonymousErrors &&\n this.isChrome &&\n error === null &&\n url === ''\n ) {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser,\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function () {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) {\n // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n};\n\nRollbar.prototype.handleUnhandledRejection = function (reason, promise) {\n if (\n !this.options.captureUnhandledRejections &&\n !this.options.handleUnhandledRejections\n ) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context =\n (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 () {\n return context || {};\n };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch (exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function (f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function () {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function () {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function (e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.addPayloadOptions)\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function () {\n logger.info(\n 'Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.',\n );\n};\n\nRollbar.prototype._createItem = function (args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return (\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self)\n );\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false,\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear',\n ],\n};\n","'use strict';\n\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 var undef;\n if (typeof document === 'undefined') {\n return undef;\n }\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n ((div.innerHTML = ''), all[0])\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion,\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction 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 = ' > ',\n separatorLength = separator.length;\n var out = [],\n len = 0,\n nextStr,\n 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(\n '[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]',\n );\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 = {},\n className,\n key,\n attr,\n i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && typeof className === 'string') {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({ key: key, value: attr });\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType,\n};\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) {\n return;\n }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function () {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) {\n return;\n }\n\n if (\n typeof window._rollbarURH === 'function' &&\n window._rollbarURH.belongsToShim\n ) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections,\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log,\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore,\n};\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation,\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar replace = require('../utility/replace');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false,\n};\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) {\n return null;\n }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function (description) {\n var name = nameFromDescription(description);\n if (!name) {\n return false;\n }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: [],\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: [],\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function (options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function (oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (\n !this.autoInstrument.network &&\n oldSettings &&\n oldSettings.network\n ) {\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 (\n this.autoInstrument.navigation &&\n !(oldSettings && oldSettings.navigation)\n ) {\n this.instrumentNavigation();\n } else if (\n !this.autoInstrument.navigation &&\n oldSettings &&\n oldSettings.navigation\n ) {\n this.deinstrumentNavigation();\n }\n\n if (\n this.autoInstrument.connectivity &&\n !(oldSettings && oldSettings.connectivity)\n ) {\n this.instrumentConnectivity();\n } else if (\n !this.autoInstrument.connectivity &&\n oldSettings &&\n oldSettings.connectivity\n ) {\n this.deinstrumentConnectivity();\n }\n\n if (\n this.autoInstrument.contentSecurityPolicy &&\n !(oldSettings && oldSettings.contentSecurityPolicy)\n ) {\n this.instrumentContentSecurityPolicy();\n } else if (\n !this.autoInstrument.contentSecurityPolicy &&\n oldSettings &&\n oldSettings.contentSecurityPolicy\n ) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function () {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function () {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function (orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(\n xhrp,\n 'open',\n function (orig) {\n return function (method, url) {\n var isUrlObject = _isUrlObject(url);\n if (_.isType(url, 'string') || isUrlObject) {\n url = isUrlObject ? url.toString() : url;\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null,\n };\n }\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n\n replace(\n xhrp,\n 'setRequestHeader',\n function (orig) {\n return function (header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n\n replace(\n xhrp,\n 'send',\n function (orig) {\n /* eslint-disable no-unused-vars */\n return function (data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(\n xhr.__rollbar_xhr,\n 'xhr',\n undefined,\n );\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type =\n xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig =\n self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i = 0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i = 0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (\n self.isJsonContentType(\n xhr.__rollbar_xhr.response_content_type,\n )\n ) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level =\n self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if (\n 'onreadystatechange' in xhr &&\n _.isFunction(xhr.onreadystatechange)\n ) {\n replace(xhr, 'onreadystatechange', function (orig) {\n return self.rollbar.wrap(\n orig,\n undefined,\n onreadystatechangeHandler,\n );\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = new Error().stack;\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n }\n\n if ('fetch' in this._window) {\n replace(\n this._window,\n 'fetch',\n 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 var isUrlObject = _isUrlObject(input);\n if (_.isType(input, 'string') || isUrlObject) {\n url = isUrlObject ? input.toString() : input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null,\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(\n reqHeaders,\n self.autoInstrument.networkRequestHeaders,\n );\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (\n args[0] &&\n !_.isType(args[0], 'string') &&\n args[0].body\n ) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = new Error().stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(\n resp.headers,\n self.autoInstrument.networkResponseHeaders,\n );\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') {\n // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (\n text &&\n self.isJsonContentType(metadata.response_content_type)\n ) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n },\n this.replacements,\n 'network',\n );\n }\n};\n\nInstrumenter.prototype.captureNetwork = function (\n metadata,\n subtype,\n rollbarUUID,\n) {\n if (\n metadata.request &&\n this.isJsonContentType(metadata.request_content_type)\n ) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function (contentType) {\n return contentType &&\n _.isType(contentType, 'string') &&\n contentType.toLowerCase().includes('json')\n ? true\n : false;\n};\n\nInstrumenter.prototype.scrubJson = function (json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n};\n\nInstrumenter.prototype.fetchHeaders = function (inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') {\n // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i = 0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n};\n\nInstrumenter.prototype.trackHttpErrors = function () {\n return (\n this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0\n );\n};\n\nInstrumenter.prototype.errorOnHttpStatus = function (metadata) {\n var status = metadata.status_code;\n\n if (\n (status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)\n ) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n};\n\nInstrumenter.prototype.deinstrumentConsole = function () {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function () {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function () {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug', 'info', 'warn', 'error', 'log'];\n try {\n for (var i = 0, len = methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function () {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function () {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener(\n 'dom',\n this._window,\n 'blur',\n 'onfocusout',\n blurHandler,\n true,\n );\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 =\n domUtil.isDescribedElement(e, 'a') ||\n domUtil.isDescribedElement(e, 'button');\n if (\n hasTag &&\n (anchorOrButton ||\n domUtil.isDescribedElement(e, 'input', ['button', 'submit']))\n ) {\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 (\n domUtil.isDescribedElement(e, 'select') &&\n e.options &&\n e.options.length\n ) {\n this.handleSelectInputChanged(e);\n } else if (\n domUtil.isDescribedElement(e, 'input') &&\n !domUtil.isDescribedElement(e, 'input', [\n 'button',\n 'submit',\n 'hidden',\n 'checkbox',\n 'radio',\n ])\n ) {\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 (\n subtype,\n element,\n value,\n isChecked,\n) {\n if (value !== undefined) {\n if (\n this.scrubTelemetryInputs ||\n domUtil.getElementType(element) === 'password'\n ) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(\n domUtil.treeToArray(element),\n );\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 =\n !chromePackagedApp &&\n this._window.history &&\n 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 =\n !chromePackagedApp &&\n this._window.history &&\n this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(\n this._window,\n 'onpopstate',\n 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 },\n this.replacements,\n 'navigation',\n );\n\n replace(\n this._window.history,\n 'pushState',\n 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 },\n this.replacements,\n 'navigation',\n );\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 (\n parsedHref.protocol === parsedTo.protocol &&\n parsedHref.host === parsedTo.host\n ) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (\n parsedHref.protocol === parsedFrom.protocol &&\n parsedHref.host === parsedFrom.host\n ) {\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(\n 'connectivity',\n this._window,\n 'online',\n undefined,\n function () {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this),\n true,\n );\n this.addListener(\n 'connectivity',\n this._window,\n 'offline',\n undefined,\n function () {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this),\n true,\n );\n } else {\n var self = this;\n replace(\n this._document.body,\n 'ononline',\n function (orig) {\n return function () {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n },\n this.replacements,\n 'connectivity',\n );\n replace(\n this._document.body,\n 'onoffline',\n function (orig) {\n return function () {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n },\n this.replacements,\n 'connectivity',\n );\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function (cspEvent) {\n var message =\n 'Security Policy Violation: ' +\n 'blockedURI: ' +\n cspEvent.blockedURI +\n ', ' +\n 'violatedDirective: ' +\n cspEvent.violatedDirective +\n ', ' +\n 'effectiveDirective: ' +\n cspEvent.effectiveDirective +\n ', ';\n\n if (cspEvent.sourceFile) {\n message +=\n 'location: ' +\n cspEvent.sourceFile +\n ', ' +\n 'line: ' +\n cspEvent.lineNumber +\n ', ' +\n 'col: ' +\n cspEvent.columnNumber +\n ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n};\n\nInstrumenter.prototype.handleCspError = function (message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n};\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function () {\n if (!('addEventListener' in this._document)) {\n return;\n }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function () {\n if (!('addEventListener' in this._document)) {\n return;\n }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener(\n 'contentsecuritypolicy',\n this._document,\n 'securitypolicyviolation',\n null,\n cspHandler,\n false,\n );\n};\n\nInstrumenter.prototype.addListener = function (\n section,\n obj,\n type,\n altType,\n handler,\n capture,\n) {\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\nfunction _isUrlObject(input) {\n return typeof URL !== 'undefined' && input instanceof URL;\n}\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if (item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo =\n item.err._savedStackTrace ||\n errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message =\n item.err.message ||\n item.err.description ||\n item.message ||\n String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment =\n (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version,\n },\n custom: item.custom,\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function (item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function (item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height,\n },\n },\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function (item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i = 0, l = navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({ name: cur.name, description: cur.description });\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message,\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', { message: result });\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (\n stack &&\n stack.length === 0 &&\n item._unhandledStackInfo &&\n item._unhandledStackInfo.stack\n ) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', { trace_chain: traces });\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', { trace: trace });\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n class: className,\n message: message,\n },\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method:\n !stackFrame.func || stackFrame.func === '?'\n ? '[anonymous]'\n : stackFrame.func,\n colno: stackFrame.column,\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (\n frame.method &&\n frame.method.endsWith &&\n frame.method.endsWith('_rollbar_wrapped')\n ) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n };\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber,\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function (\n accessToken,\n options,\n params,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n null,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\nTransport.prototype.post = function (\n accessToken,\n options,\n payload,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload);\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n writeData,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\nTransport.prototype.postJsonPayload = function (\n accessToken,\n options,\n jsonPayload,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n jsonPayload,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow =\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n var self = this;\n rootZone.run(function () {\n self._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n};\n\nTransport.prototype._makeRequest = function (\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n transport,\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout);\n } else {\n makeXhrRequest(\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n );\n }\n};\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function (_msg) {\n /* do nothing */\n }, // eslint-disable-line no-unused-vars\n function (err) {\n callback(new Error(err));\n },\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if (_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(function () {\n controller.abort();\n }, timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal,\n },\n body: data,\n })\n .then(function (response) {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then(function (data) {\n callback(null, data);\n })\n .catch(function (error) {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function () {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message =\n 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 =\n 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if (_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n // 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(\n new Error(\n 'No window available during request, unknown environment',\n ),\n );\n }\n\n // If the current page is http, try and send over http\n if (\n window.location.href.substring(0, 5) === 'http:' &&\n url.substring(0, 5) === 'https'\n ) {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function () {};\n xdomainrequest.ontimeout = function () {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function () {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function () {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n },\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null,\n auth: null,\n host: null,\n path: null,\n hash: null,\n href: url,\n hostname: null,\n port: null,\n pathname: null,\n search: null,\n query: null,\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0, i);\n last = i + 2;\n } else {\n last = 0;\n }\n\n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i + 1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse,\n};\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) {\n return;\n }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals =\n '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 ',',\n );\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 (\n prototype.hasOwnProperty &&\n prototype.hasOwnProperty('addEventListener')\n ) {\n var oldAddEventListener = prototype.addEventListener;\n while (\n oldAddEventListener._rollbarOldAdd &&\n oldAddEventListener.belongsToShim\n ) {\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 (\n oldRemoveEventListener._rollbarOldRemove &&\n oldRemoveEventListener.belongsToShim\n ) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function (event, callback, bubble) {\n oldRemoveEventListener.call(\n this,\n event,\n (callback && callback._rollbar_wrapped) || callback,\n bubble,\n );\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nmodule.exports = {\n version: '2.26.4',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60,\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp(\n '^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ',\n);\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\nfunction gatherContext() {\n return null;\n}\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch (e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception,\n };\n}\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace(\n (errClassMatch[errClassMatch.length - 2] || '') + errClass + ':',\n '',\n );\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName =\n error.constructor.name &&\n error.constructor.name.length &&\n error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame,\n};\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n if (!obj || toStr.call(obj) !== '[object Object]') {\n return false;\n }\n\n var hasOwnConstructor = hasOwn.call(obj, 'constructor');\n var hasIsPrototypeOf =\n obj.constructor &&\n obj.constructor.prototype &&\n hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n // Not own constructor property must be Object\n if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n return false;\n }\n\n // Own properties are enumerated firstly, so to speed up,\n // if last one is own, then all properties are own.\n var key;\n for (key in obj) {\n /**/\n }\n\n return typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i,\n src,\n copy,\n clone,\n name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i = 0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function (options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function (transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function (item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(\n item,\n 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\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function (item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function (err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function (item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (\n _.isFunction(settings.checkIgnore) &&\n settings.checkIgnore(isUncaught, args, item)\n ) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n };\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function (item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n };\n}\n\nfunction urlIsSafeListed(logger) {\n return function (item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n };\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) {\n return !block;\n }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) {\n return !block;\n }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) {\n return !block;\n }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if (matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (\n e\n /* istanbul ignore next */\n ) {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error(\n \"Error while reading your configuration's \" +\n listName +\n ' option. Removing custom ' +\n listName +\n '.',\n e,\n );\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function (item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0) {\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch (\n e\n /* istanbul ignore next */\n ) {\n settings.ignoredMessages = null;\n logger.error(\n \"Error while reading your configuration's ignoredMessages option. Removing custom ignoredMessages.\",\n );\n }\n\n return true;\n };\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored,\n};\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function (options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function (predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function (item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function (item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function (\n item,\n callback,\n originalError,\n originalItem,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {\n return;\n };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(\n item,\n function (err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this),\n );\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(\n function () {\n this._maybeCallWait();\n }.bind(this),\n 500,\n );\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(\n item,\n function (err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this),\n );\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 = [\n 'ECONNRESET',\n 'ENOTFOUND',\n 'ESOCKETTIMEDOUT',\n 'ETIMEDOUT',\n 'ECONNREFUSED',\n 'EHOSTUNREACH',\n 'EPIPE',\n 'EAI_AGAIN',\n];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function (err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function (item, callback) {\n this.retryQueue.push({ item: item, callback: callback });\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(\n function () {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this),\n this.options.retryInterval,\n );\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 (\n _.isFunction(this.waitCallback) &&\n this.pendingItems.length === 0 &&\n this.pendingRequests.length === 0\n ) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined,\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function (options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function (item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n globalRateLimit + ' max items reached',\n false,\n );\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n globalRateLimitPerMin + ' items per minute reached',\n false,\n );\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend =\n shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n null,\n shouldSend,\n globalRateLimit,\n globalRateLimitPerMin,\n perMinute,\n );\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(\n platform,\n options,\n error,\n shouldSend,\n globalRateLimit,\n limitPerMin,\n perMinute,\n) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(\n platform,\n options,\n globalRateLimit,\n limitPerMin,\n perMinute,\n );\n }\n return { error: error, shouldSend: shouldSend, payload: payload };\n}\n\nfunction rateLimitPayload(\n platform,\n options,\n globalRateLimit,\n limitPerMin,\n perMinute,\n) {\n var environment =\n options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin,\n },\n },\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version:\n (options.notifier && options.notifier.version) || options.version,\n },\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60,\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer;\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents =\n (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag(\n 'rollbar.item_url',\n `https://rollbar.com/item/uuid/?uuid=${item.uuid}`,\n );\n span.setTag(\n 'rollbar.occurrence_url',\n `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`,\n );\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId,\n };\n }\n }\n }\n};\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (\n !spanContext ||\n !spanContext.toSpanId ||\n !spanContext.toTraceId ||\n typeof spanContext.toSpanId !== 'function' ||\n typeof spanContext.toTraceId !== 'function'\n ) {\n return false;\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function (options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.queue.length > newMaxEvents) {\n deleteCount = this.queue.length - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function () {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function (\n type,\n metadata,\n level,\n rollbarUUID,\n timestamp,\n) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client',\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (\n _.isFunction(this.options.filterTelemetry) &&\n this.options.filterTelemetry(e)\n ) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function (\n type,\n metadata,\n level,\n rollbarUUID,\n) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function (\n err,\n level,\n rollbarUUID,\n timestamp,\n) {\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 (\n message,\n level,\n rollbarUUID,\n timestamp,\n) {\n return this.capture(\n 'log',\n {\n message: message,\n },\n level,\n rollbarUUID,\n timestamp,\n );\n};\n\nTelemeter.prototype.captureNetwork = function (\n metadata,\n subtype,\n rollbarUUID,\n requestData,\n) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function (statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function (\n subtype,\n element,\n value,\n checked,\n rollbarUUID,\n) {\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(\n 'navigation',\n { from: from, to: to },\n 'info',\n rollbarUUID,\n );\n};\n\nTelemeter.prototype.captureDomContentLoaded = function (ts) {\n return this.capture(\n 'navigation',\n { subtype: 'DOMContentLoaded' },\n 'info',\n undefined,\n ts && ts.getTime(),\n );\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(\n 'navigation',\n { subtype: 'load' },\n 'info',\n undefined,\n ts && ts.getTime(),\n );\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function (type, rollbarUUID) {\n return this.captureNetwork({ change: type }, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function (item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture(\n 'log',\n item.custom,\n item.level,\n item.uuid,\n item.timestamp,\n );\n }\n};\n\nTelemeter.prototype.push = function (e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info',\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var data = item.data;\n\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 addPayloadOptions(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n item.data = _.merge(item.data, payloadOptions);\n callback(null, item);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath + '.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath + '.extra') || {};\n var newExtra = _.merge(extra, { message: item.message });\n _.set(item, tracePath + '.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function (item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error(\n 'Error while calling custom transform() function. Removing custom transform().',\n e,\n );\n callback(null, item);\n return;\n }\n if (_.isPromise(response)) {\n response.then(\n function (promisedItem) {\n if (promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n },\n function (error) {\n callback(error, item);\n },\n );\n } else {\n callback(null, newItem);\n }\n };\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if (_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(\n item.notifier.client.notifier.diagnostic,\n item.diagnostic,\n );\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack,\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(\n item.data.notifier.diagnostic,\n diagnostic,\n );\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addPayloadOptions: addPayloadOptions,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys,\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = typeof range === 'undefined' ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(\n 255,\n traceData.exception.message,\n );\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = typeof maxSize === 'undefined' ? 512 * 1024 : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody,\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue,\n};\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if (polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else {\n // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return {}.toString\n .call(x)\n .match(/\\s([a-zA-Z]+)/)[1]\n .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\n .call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n */\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String;\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\nfunction isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return type === 'object' || type === 'array';\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(\n /[xy]/g,\n 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 );\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4,\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor',\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g,\n },\n parser: {\n strict:\n /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose:\n /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n },\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0, qs) + query + '&' + p.substring(qs + 1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0, h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return { error: error, value: value };\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) {\n // up to 7 bits\n count = count + 1;\n } else if (code < 2048) {\n // up to 11 bits\n count = count + 2;\n } else if (code < 65536) {\n // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return { error: error, value: value };\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser,\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno,\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href =\n typeof document !== 'undefined' &&\n document &&\n document.location &&\n document.location.href;\n var useragent =\n typeof window !== 'undefined' &&\n window &&\n window.navigator &&\n window.navigator.userAgent;\n return {\n mode: mode,\n message: error ? String(error) : message || backupMessage,\n url: href,\n stack: [location],\n useragent: useragent,\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function (err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value,\n name,\n newSeen,\n result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : (message = arg);\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : (err = arg);\n break;\n case 'object':\n case 'array':\n if (\n arg instanceof Error ||\n (typeof DOMException !== 'undefined' && arg instanceof DOMException)\n ) {\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 (\n arg instanceof Error ||\n (typeof DOMException !== 'undefined' && arg instanceof DOMException)\n ) {\n err ? extraArgs.push(arg) : (err = arg);\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4(),\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = [\n 'log',\n 'network',\n 'dom',\n 'navigation',\n 'error',\n 'manual',\n];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level,\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len - 1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if (options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if (options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4,\n};\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n return name.toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value;\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function () {\n var value = items.shift();\n return { done: value === undefined, value: value };\n },\n };\n\n return iterator;\n}\n\nfunction FetchHeaders(headers) {\n this.map = {};\n\n if (headers instanceof FetchHeaders) {\n headers.forEach(function (value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function (header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function (name) {\n this.append(name, headers[name]);\n }, this);\n }\n}\n\nFetchHeaders.prototype.append = function (name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n};\n\nFetchHeaders.prototype.get = function (name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null;\n};\n\nFetchHeaders.prototype.has = function (name) {\n return this.map.hasOwnProperty(normalizeName(name));\n};\n\nFetchHeaders.prototype.forEach = function (callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n};\n\nFetchHeaders.prototype.entries = function () {\n var items = [];\n this.forEach(function (value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items);\n};\n\nmodule.exports = headers;\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","'use strict';\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\nmodule.exports = replace;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: [] };\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","// 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","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(409);\n",""],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/dist/rollbar.named-amd.min.js b/dist/rollbar.named-amd.min.js
index b437c0a8c..0cb3bf8e1 100644
--- a/dist/rollbar.named-amd.min.js
+++ b/dist/rollbar.named-amd.min.js
@@ -1,2 +1,2 @@
-define("rollbar",[],(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=v();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}var d=["log","network","dom","navigation","error","manual"],m=["critical","error","warning","info","debug"];function g(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,o,i){for(var a,u,c,p,f,d,m=[],g=[],y=0,b=t.length;y0&&((c=n(c)).extraArgs=m);var k={message:a,err:u,custom:c,timestamp:v(),callback:p,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,c),o&&f&&(k.request=f),i&&(k.lambdaContext=i),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,r,n,e)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=t.proxy;if(t.endpoint){var l=r.parse(t.endpoint);n=l.hostname,o=l.protocol,i=l.port,s=l.pathname,a=l.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]> 4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t){this.truncation=t}function s(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){a.apply(void 0,r)}))}else a.apply(void 0,r)}function a(t,e,r,i,s,a,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(i,s);var l;if(!(l=a?a():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}s(new Error(String(l.status)))}else{s(u("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),s(r)}var i};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(i)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return s(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){s(u("Request timed out","ETIMEDOUT"))},f.onerror=function(){s(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);s(t.error,t.value)},f.open(r,e,!0),f.send(i)}else s(new Error("Cannot find a method to transport a request"))}}catch(t){s(t)}}function u(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}i.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);s(t,n.formatUrl(e),"GET",null,o,i,e.timeout)},i.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var a;if((a=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(a.error);var u=a.value;s(t,n.formatUrl(e),"POST",u,o,i,e.timeout)},i.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});s(t,n.formatUrl(e),"POST",r,o,i,e.timeout)},t.exports=i},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(" ")||void 0,a=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(4),i=r(2),s=r(31),a={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function u(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function c(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function l(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=a),this.autoInstrument=n.merge(a,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},l.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},l.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},l.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===s.getElementType(e))r="[scrubbed]";else{var o=s.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=s.elementArrayToString(s.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},l.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&c(this.replacements,"navigation")},l.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;u(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),u(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},l.prototype.handleUrlChange=function(t,e){var r=i.parse(this._location.href),n=i.parse(e),o=i.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},l.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):c(this.replacements,"connectivity"))},l.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;u(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),u(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},l.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},l.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},l.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._window&&this.removeListeners("contentsecuritypolicy")},l.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._window){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._window,"securitypolicyviolation",null,t,!1)}},l.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},l.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=l},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r ".length,i=[],s=0,a=t.length-1;a>=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])}));
+define("rollbar",[],(()=>{return t={276:function(){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},180:function(t,e,r){var n,o,i;!function(s,a){"use strict";o=[r(124)],void 0===(i="function"==typeof(n=function(t){var e=/(^|@)\S+:\d+/,r=/^\s*at .*(\S+:\d+|\(native\))/m,n=/^(eval@)?(\[native code])?$/;return{parse:function(t){if(void 0!==t.stacktrace||void 0!==t["opera#sourceloc"])return this.parseOpera(t);if(t.stack&&t.stack.match(r))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")},extractLocation:function(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));return[e[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(t){return!!t.match(r)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(" ")||void 0,a=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},124:function(t,e){var r,n,o;!function(i,s){"use strict";n=[],void 0===(o="function"==typeof(r=function(){function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t){return t.charAt(0).toUpperCase()+t.substring(1)}function r(t){return function(){return this[t]}}var n=["isConstructor","isEval","isNative","isToplevel"],o=["columnNumber","lineNumber"],i=["fileName","functionName","source"],s=["args"],a=["evalOrigin"],u=n.concat(o,i,s,a);function c(t){if(t)for(var r=0;r{"use strict";var n=r(702),o=r(817),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup),i=this;setTimeout((function(){i.transport.post(i.accessToken,r,n,e)}),0)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},817:(t,e,r)=>{"use strict";var n=r(702);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=function(t){var e="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,r=t.defaultTransport||"xhr";return void 0===e.fetch&&(r="xhr"),void 0===e.XMLHttpRequest&&(r="fetch"),r}(t),l=t.proxy;if(t.endpoint){var p=r.parse(t.endpoint);n=p.hostname,o=p.protocol,i=p.port,s=p.pathname,a=p.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:l,transport:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout,a=t.transport;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e,transport:a}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},409:(t,e,r)=>{"use strict";var n=r(343),o="undefined"!=typeof window&&window._rollbarConfig,i=o&&o.globalAlias||"Rollbar",s="undefined"!=typeof window&&window[i]&&"function"==typeof window[i].shimId&&void 0!==window[i].shimId();if("undefined"==typeof window||window._rollbarStartTime||(window._rollbarStartTime=(new Date).getTime()),!s&&o){var a=new n(o);window[i]=a}else"undefined"!=typeof window?(window.rollbar=n,window._rollbarDidLoad=!0):"undefined"!=typeof self&&(self.rollbar=n,self._rollbarDidLoad=!0);t.exports=n},403:(t,e,r)=>{"use strict";var n=r(562),o=r(702),i=r(815),s=r(802),a=r(349),u=r(477),c=r(509),l=r(860),p=r(417),h=r(172),f=r(61),d=r(303);function m(t,e){this.options=o.handleOptions(x,t,null,s),this.options._configuredOptions=t;var r=this.components.telemeter,a=this.components.instrumenter,d=this.components.polyfillJSON;this.wrapGlobals=this.components.wrapGlobals,this.scrub=this.components.scrub;var m=this.components.truncation,g=new u(m),v=new i(this.options,g,c,m);r&&(this.telemeter=new r(this.options)),this.client=e||new n(this.options,v,s,this.telemeter,"browser");var y=b(),w="undefined"!=typeof document&&document;this.isChrome=y.chrome&&y.chrome.runtime,this.anonymousErrorsPending=0,function(t,e,r){t.addTransform(l.handleDomException).addTransform(l.handleItemWithError).addTransform(l.ensureItemHasSomethingToSay).addTransform(l.addBaseInfo).addTransform(l.addRequestInfo(r)).addTransform(l.addClientInfo(r)).addTransform(l.addPluginInfo(r)).addTransform(l.addBody).addTransform(p.addMessageWithError).addTransform(p.addTelemetryData).addTransform(p.addConfigToPayload).addTransform(l.addScrubber(e.scrub)).addTransform(p.addPayloadOptions).addTransform(p.userTransform(s)).addTransform(p.addConfiguredOptions).addTransform(p.addDiagnosticKeys).addTransform(p.itemToPayload)}(this.client.notifier,this,y),this.client.queue.addPredicate(f.checkLevel).addPredicate(h.checkIgnore).addPredicate(f.userCheckIgnore(s)).addPredicate(f.urlIsNotBlockListed(s)).addPredicate(f.urlIsSafeListed(s)).addPredicate(f.messageIsIgnored(s)),this.setupUnhandledCapture(),a&&(this.instrumenter=new a(this.options,this.client.telemeter,this,y,w),this.instrumenter.instrument()),o.setupJSON(d),this.rollbar=this}var g=null;function v(t){var e="Rollbar is not initialized";s.error(e),t&&t(new Error(e))}function y(t){for(var e=0,r=t.length;e{"use strict";t.exports={scrubFields:["pw","pass","passwd","password","secret","confirm_password","confirmPassword","password_confirmation","passwordConfirmation","access_token","accessToken","X-Rollbar-Access-Token","secret_key","secretKey","secretToken","cc-number","card number","cardnumber","cardnum","ccnum","ccnumber","cc num","creditcardnumber","credit card number","newcreditcardnumber","new credit card","creditcardno","credit card no","card#","card #","cc-csc","cvc","cvc2","cvv2","ccv2","security code","card verification","name on credit card","name on card","nameoncard","cardholder","card holder","name des karteninhabers","ccname","card type","cardtype","cc type","cctype","payment type","expiration date","expirationdate","expdate","cc-exp","ccmonth","ccyear"]}},616:t=>{"use strict";var e={ieVersion:function(){var t;if("undefined"==typeof document)return t;for(var e=3,r=document.createElement("div"),n=r.getElementsByTagName("i");r.innerHTML="\x3c!--[if gt IE "+ ++e+"]> 4?e:t}};t.exports=e},300:t=>{"use strict";function e(t){return(t.getAttribute("type")||"").toLowerCase()}function r(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;s--){if(e=r(t[s]),n=i+3*o.length+e.length,s=83){o.unshift("...");break}o.unshift(e),i+=e.length}return o.join(" > ")},treeToArray:function(t){for(var e,r=[],o=0;t&&o<5&&"html"!==(e=n(t)).tagName;o++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,r,n){if(t.tagName.toLowerCase()!==r.toLowerCase())return!1;if(!n)return!0;t=e(t);for(var o=0;o{"use strict";t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var n;if("function"==typeof e._rollbarOldOnError)n=e._rollbarOldOnError;else if(t.onerror){for(n=t.onerror;n._rollbarOldOnError;)n=n._rollbarOldOnError;e._rollbarOldOnError=n}e.handleAnonymousErrors();var o=function(){var r=Array.prototype.slice.call(arguments,0);!function(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}(t,e,n,r)};r&&(o._rollbarOldOnError=n),t.onerror=o}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},802:(t,e,r)=>{"use strict";r(276);var n=r(616),o=r(702);t.exports={error:function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),n.ieVersion()<=8?console.error(o.formatArgsAsString(t)):console.error.apply(console,t)},info:function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),n.ieVersion()<=8?console.info(o.formatArgsAsString(t)):console.info.apply(console,t)},log:function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),n.ieVersion()<=8?console.log(o.formatArgsAsString(t)):console.log.apply(console,t)}}},172:(t,e,r)=>{"use strict";var n=r(702);t.exports={checkIgnore:function(t,e){return!n.get(e,"plugins.jquery.ignoreAjaxErrors")||!n.get(t,"body.message.extra.isAjax")}}},343:(t,e,r)=>{"use strict";var n=r(403),o=r(773),i=r(568),s=r(876),a=r(965),u=r(369),c=r(473);n.setComponents({telemeter:o,instrumenter:i,polyfillJSON:s,wrapGlobals:a,scrub:u,truncation:c}),t.exports=n},568:(t,e,r)=>{"use strict";var n=r(702),o=r(650),i=r(297),s=r(369),a=r(509),u=r(300),c={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function l(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function p(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=c),this.autoInstrument=n.merge(c,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){s.__rollbar_xhr.end_time_ms=n.now();var e=null;if(s.__rollbar_xhr.response_content_type=s.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var i,a;if(!0===r){var u=s.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},p.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},p.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},p.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===u.getElementType(e))r="[scrubbed]";else{var o=u.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=u.elementArrayToString(u.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},p.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&l(this.replacements,"navigation")},p.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;i(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),i(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},p.prototype.handleUrlChange=function(t,e){var r=a.parse(this._location.href),n=a.parse(e),o=a.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},p.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):l(this.replacements,"connectivity"))},p.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;i(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),i(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},p.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},p.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},p.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._document&&this.removeListeners("contentsecuritypolicy")},p.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._document){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._document,"securitypolicyviolation",null,t,!1)}},p.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},p.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=p},860:(t,e,r)=>{"use strict";var n=r(702),o=r(303),i=r(802);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var h,f,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y0&&n.set(e,"data.request",i),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u{"use strict";var n=r(702),o=r(656),i=r(86);function s(t){this.truncation=t}s.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);var s=n.formatUrl(e);this._makeZoneRequest(t,s,"GET",null,o,i,e.timeout,e.transport)},s.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var s;if((s=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(s.error);var a=s.value,u=n.formatUrl(e);this._makeZoneRequest(t,u,"POST",a,o,i,e.timeout,e.transport)},s.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});var s=n.formatUrl(e);this._makeZoneRequest(t,s,"POST",r,o,i,e.timeout,e.transport)},s.prototype._makeZoneRequest=function(){var t="undefined"!=typeof window&&window||void 0!==o&&o,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent,o=this;n.run((function(){o._makeRequest.apply(void 0,r)}))}else this._makeRequest.apply(void 0,r)},s.prototype._makeRequest=function(t,e,r,n,s,a,u,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(n,s);"fetch"===c?o(t,e,r,n,s,u):i(t,e,r,n,s,a,u)},t.exports=s},656:(t,e,r)=>{"use strict";var n=r(802),o=r(702);t.exports=function(t,e,r,i,s,a){var u,c;o.isFiniteNumber(a)&&(u=new AbortController,c=setTimeout((function(){u.abort()}),a)),fetch(e,{method:r,headers:{"Content-Type":"application/json","X-Rollbar-Access-Token":t,signal:u&&u.signal},body:i}).then((function(t){return c&&clearTimeout(c),t.json()})).then((function(t){s(null,t)})).catch((function(t){n.error(t.message),s(t)}))}},86:(t,e,r)=>{"use strict";var n=r(702),o=r(802);function i(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}t.exports=function(t,e,r,s,a,u,c){var l;if(!(l=u?u():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}a(new Error(String(l.status)))}else a(i("XHR response had no status code (likely connection failure)"))}}catch(t){var r;r=t&&t.stack?t:new Error(t),a(r)}var s};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(s)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return a(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var h=new XDomainRequest;h.onprogress=function(){},h.ontimeout=function(){a(i("Request timed out","ETIMEDOUT"))},h.onerror=function(){a(new Error("Error during request"))},h.onload=function(){var t=n.jsonParse(h.responseText);a(t.error,t.value)},h.open(r,e,!0),h.send(s)}else a(new Error("Cannot find a method to transport a request"))}}catch(t){a(t)}}},509:t=>{"use strict";t.exports={parse:function(t){var e,r,n={protocol:null,auth:null,host:null,path:null,hash:null,href:t,hostname:null,port:null,pathname:null,search:null,query:null};if(-1!==(e=t.indexOf("//"))?(n.protocol=t.substring(0,e),r=e+2):r=0,-1!==(e=t.indexOf("@",r))&&(n.auth=t.substring(r,e),r=e+1),-1===(e=t.indexOf("/",r))){if(-1===(e=t.indexOf("?",r)))return-1===(e=t.indexOf("#",r))?n.host=t.substring(r):(n.host=t.substring(r,e),n.hash=t.substring(e)),n.hostname=n.host.split(":")[0],n.port=n.host.split(":")[1],n.port&&(n.port=parseInt(n.port,10)),n;n.host=t.substring(r,e),n.hostname=n.host.split(":")[0],n.port=n.host.split(":")[1],n.port&&(n.port=parseInt(n.port,10)),r=e}else n.host=t.substring(r,e),n.hostname=n.host.split(":")[0],n.port=n.host.split(":")[1],n.port&&(n.port=parseInt(n.port,10)),r=e;if(-1===(e=t.indexOf("#",r))?n.path=t.substring(r):(n.path=t.substring(r,e),n.hash=t.substring(e)),n.path){var o=n.path.split("?");n.pathname=o[0],n.query=o[1],n.search=n.query?"?"+n.query:null}return n}}},965:t=>{"use strict";function e(t,e,r){if(e.hasOwnProperty&&e.hasOwnProperty("addEventListener")){for(var n=e.addEventListener;n._rollbarOldAdd&&n.belongsToShim;)n=n._rollbarOldAdd;var o=function(e,r,o){n.call(this,e,t.wrap(r),o)};o._rollbarOldAdd=n,o.belongsToShim=r,e.addEventListener=o;for(var i=e.removeEventListener;i._rollbarOldRemove&&i.belongsToShim;)i=i._rollbarOldRemove;var s=function(t,e,r){i.call(this,t,e&&e._rollbar_wrapped||e,r)};s._rollbarOldRemove=i,s.belongsToShim=r,e.removeEventListener=s}}t.exports=function(t,r,n){if(t){var o,i,s="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(o=0;o{"use strict";t.exports={version:"2.26.4",endpoint:"api.rollbar.com/api/1/item/",logLevel:"debug",reportLevel:"debug",uncaughtErrorLevel:"error",maxItems:0,itemsPerMin:60}},303:(t,e,r)=>{"use strict";var n=r(180),o=new RegExp("^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ");function i(){return null}function s(t){var e={};return e._stackFrame=t,e.url=t.fileName,e.line=t.lineNumber,e.func=t.functionName,e.column=t.columnNumber,e.args=t.args,e.context=null,e}function a(t,e){return{stack:function(){var r=[];e=e||0;try{r=n.parse(t)}catch(t){r=[]}for(var o=[],i=e;i{"use strict";var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var n,o=e.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&e.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!o&&!i)return!1;for(n in t);return void 0===n||e.call(t,n)};t.exports=function t(){var e,r,o,i,s,a={},u=null,c=arguments.length;for(e=0;e{"use strict";var n=r(702);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},61:(t,e,r)=>{"use strict";var n=r(702);function o(t,e,r){if(!t)return!r;var o,i,s=t.frames;if(!s||0===s.length)return!r;for(var a=e.length,u=s.length,c=0;c{"use strict";var n=r(702);function o(t,e,r,n){this.rateLimiter=t,this.api=e,this.logger=r,this.options=n,this.predicates=[],this.pendingItems=[],this.pendingRequests=[],this.retryQueue=[],this.retryHandle=null,this.waitCallback=null,this.waitIntervalID=null}o.prototype.configure=function(t){this.api&&this.api.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addPredicate=function(t){return n.isFunction(t)&&this.predicates.push(t),this},o.prototype.addPendingItem=function(t){this.pendingItems.push(t)},o.prototype.removePendingItem=function(t){var e=this.pendingItems.indexOf(t);-1!==e&&this.pendingItems.splice(e,1)},o.prototype.addItem=function(t,e,r,o){e&&n.isFunction(e)||(e=function(){});var i=this._applyPredicates(t);if(i.stop)return this.removePendingItem(o),void e(i.err);if(this._maybeLog(t,r),this.removePendingItem(o),this.options.transmit){this.pendingRequests.push(t);try{this._makeApiRequest(t,function(r,n){this._dequeuePendingRequest(t),e(r,n)}.bind(this))}catch(r){this._dequeuePendingRequest(t),e(r)}}else e(new Error("Transmit disabled"))},o.prototype.wait=function(t){n.isFunction(t)&&(this.waitCallback=t,this._maybeCallWait()||(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitIntervalID=setInterval(function(){this._maybeCallWait()}.bind(this),500)))},o.prototype._applyPredicates=function(t){for(var e=null,r=0,n=this.predicates.length;rthis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length||(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),0))},t.exports=o},790:(t,e,r)=>{"use strict";var n=r(702);function o(t){this.startTime=n.now(),this.counter=0,this.perMinCounter=0,this.platform=null,this.platformOptions={},this.configureGlobal(t)}function i(t,e,r){return!t.ignoreRateLimit&&e>=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i=e.environment||e.payload&&e.payload.environment,s={body:{message:{body:o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.",extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:i,notifier:{version:e.notifier&&e.notifier.version||e.version}};return"browser"===t?(s.platform="browser",s.framework="browser-js",s.notifier.name="rollbar-browser-js"):"server"===t?(s.framework=e.framework||"node-js",s.notifier.name=e.notifier.name):"react-native"===t&&(s.framework=e.framework||"react-native",s.notifier.name=e.notifier.name),s}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},562:(t,e,r)=>{"use strict";var n=r(790),o=r(358),i=r(314),s=r(702);function a(t,e,r,n,l){this.options=s.merge(t),this.logger=r,a.rateLimiter.configureGlobal(this.options),a.rateLimiter.setPlatformOptions(l,this.options),this.api=e,this.queue=new o(a.rateLimiter,e,r,this.options);var p=this.options.tracer||null;c(p)?(this.tracer=p,this.options.tracer="opentracing-tracer-enabled",this.options._configuredOptions.tracer="opentracing-tracer-enabled"):this.tracer=null,this.notifier=new i(this.queue,this.options),this.telemeter=n,u(t),this.lastError=null,this.lastErrorHash="none"}function u(t){t.stackTraceLimit&&(Error.stackTraceLimit=t.stackTraceLimit)}function c(t){if(!t)return!1;if(!t.scope||"function"!=typeof t.scope)return!1;var e=t.scope();return!(!e||!e.active||"function"!=typeof e.active)}a.rateLimiter=new n({maxItems:0,itemsPerMinute:60}),a.prototype.global=function(t){return a.rateLimiter.configureGlobal(t),this},a.prototype.configure=function(t,e){var r=this.options,n={};e&&(n={payload:e}),this.options=s.merge(r,t,n);var o=this.options.tracer||null;return c(o)?(this.tracer=o,this.options.tracer="opentracing-tracer-enabled",this.options._configuredOptions.tracer="opentracing-tracer-enabled"):this.tracer=null,this.notifier&&this.notifier.configure(this.options),this.telemeter&&this.telemeter.configure(this.options),u(t),this.global(this.options),c(t.tracer)&&(this.tracer=t.tracer),this},a.prototype.log=function(t){var e=this._defaultLogLevel();return this._log(e,t)},a.prototype.debug=function(t){this._log("debug",t)},a.prototype.info=function(t){this._log("info",t)},a.prototype.warn=function(t){this._log("warning",t)},a.prototype.warning=function(t){this._log("warning",t)},a.prototype.error=function(t){this._log("error",t)},a.prototype.critical=function(t){this._log("critical",t)},a.prototype.wait=function(t){this.queue.wait(t)},a.prototype.captureEvent=function(t,e,r){return this.telemeter&&this.telemeter.captureEvent(t,e,r)},a.prototype.captureDomContentLoaded=function(t){return this.telemeter&&this.telemeter.captureDomContentLoaded(t)},a.prototype.captureLoad=function(t){return this.telemeter&&this.telemeter.captureLoad(t)},a.prototype.buildJsonPayload=function(t){return this.api.buildJsonPayload(t)},a.prototype.sendJsonPayload=function(t){this.api.postJsonPayload(t)},a.prototype._log=function(t,e){var r;if(e.callback&&(r=e.callback,delete e.callback),this.options.ignoreDuplicateErrors&&this._sameAsLastError(e)){if(r){var n=new Error("ignored identical item");n.item=e,r(n)}}else try{this._addTracingInfo(e),e.level=e.level||t,this.telemeter&&this.telemeter._captureRollbarItem(e),e.telemetryEvents=this.telemeter&&this.telemeter.copyEvents()||[],this.notifier.log(e,r)}catch(t){r&&r(t),this.logger.error(t)}},a.prototype._defaultLogLevel=function(){return this.options.logLevel||"debug"},a.prototype._sameAsLastError=function(t){if(!t._isUncaught)return!1;var e=function(t){var e=t.message||"",r=(t.err||{}).stack||String(t.err);return e+"::"+r}(t);return this.lastErrorHash===e||(this.lastError=t.err,this.lastErrorHash=e,!1)},a.prototype._addTracingInfo=function(t){if(this.tracer){var e=this.tracer.scope().active();if(function(t){if(!t||!t.context||"function"!=typeof t.context)return!1;var e=t.context();return!!(e&&e.toSpanId&&e.toTraceId&&"function"==typeof e.toSpanId&&"function"==typeof e.toTraceId)}(e)){e.setTag("rollbar.error_uuid",t.uuid),e.setTag("rollbar.has_error",!0),e.setTag("error",!0),e.setTag("rollbar.item_url",`https://rollbar.com/item/uuid/?uuid=${t.uuid}`),e.setTag("rollbar.occurrence_url",`https://rollbar.com/occurrence/uuid/?uuid=${t.uuid}`);var r=e.context().toSpanId(),n=e.context().toTraceId();t.custom?(t.custom.opentracing_span_id=r,t.custom.opentracing_trace_id=n):t.custom={opentracing_span_id:r,opentracing_trace_id:n}}}},t.exports=a},369:(t,e,r)=>{"use strict";var n=r(702),o=r(267);function i(t,e){var r=e.split("."),o=r.length-1;try{for(var i=0;i<=o;++i)i{"use strict";var n=r(702),o=100;function i(t){this.queue=[],this.options=n.merge(t);var e=this.options.maxTelemetryEvents||o;this.maxQueueSize=Math.max(0,Math.min(e,o))}function s(t,e){return e||({error:"error",manual:"info"}[t]||"info")}i.prototype.configure=function(t){var e=this.options;this.options=n.merge(e,t);var r=this.options.maxTelemetryEvents||o,i=Math.max(0,Math.min(r,o)),s=0;this.queue.length>i&&(s=this.queue.length-i),this.maxQueueSize=i,this.queue.splice(0,s)},i.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},i.prototype.capture=function(t,e,r,o,i){var a={level:s(t,r),type:t,timestamp_ms:i||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},i.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},i.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},i.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},i.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},i.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},i.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},i.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},i.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},i.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},i.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},i.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},i.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=i},417:(t,e,r)=>{"use strict";var n=r(702);function o(t,e){n.isFunction(t[e])&&(t[e]=t[e].toString())}t.exports={itemToPayload:function(t,e,r){var n=t.data;t._isUncaught&&(n._isUncaught=!0),t._originalArgs&&(n._originalArgs=t._originalArgs),r(null,n)},addPayloadOptions:function(t,e,r){var o=e.payload||{};o.body&&delete o.body,t.data=n.merge(t.data,o),r(null,t)},addTelemetryData:function(t,e,r){t.telemetryEvents&&n.set(t,"data.body.telemetry",t.telemetryEvents),r(null,t)},addMessageWithError:function(t,e,r){if(t.message){var o="data.body.trace_chain.0",i=n.get(t,o);if(i||(o="data.body.trace",i=n.get(t,o)),i){if(!i.exception||!i.exception.description)return n.set(t,o+".exception.description",t.message),void r(null,t);var s=n.get(t,o+".extra")||{},a=n.merge(s,{message:t.message});n.set(t,o+".extra",a)}r(null,t)}else r(null,t)},userTransform:function(t){return function(e,r,o){var i=n.merge(e),s=null;try{n.isFunction(r.transform)&&(s=r.transform(i.data,e))}catch(n){return r.transform=null,t.error("Error while calling custom transform() function. Removing custom transform().",n),void o(null,e)}n.isPromise(s)?s.then((function(t){t&&(i.data=t),o(null,i)}),(function(t){o(t,e)})):o(null,i)}},addConfigToPayload:function(t,e,r){if(!e.sendConfig)return r(null,t);var o=n.get(t,"data.custom")||{};o._rollbarConfig=e,t.data.custom=o,r(null,t)},addConfiguredOptions:function(t,e,r){var n=e._configuredOptions;o(n,"transform"),o(n,"checkIgnore"),o(n,"onSendCallback"),delete n.accessToken,t.data.notifier.configured_options=n,r(null,t)},addDiagnosticKeys:function(t,e,r){var o=n.merge(t.notifier.client.notifier.diagnostic,t.diagnostic);if(n.get(t,"err._isAnonymous")&&(o.is_anonymous=!0),t._isUncaught&&(o.is_uncaught=t._isUncaught),t.err)try{o.raw_error={message:t.err.message,name:t.err.name,constructor_name:t.err.constructor&&t.err.constructor.name,filename:t.err.fileName,line:t.err.lineNumber,column:t.err.columnNumber,stack:t.err.stack}}catch(t){o.raw_error={failed:String(t)}}t.data.notifier.diagnostic=n.merge(t.data.notifier.diagnostic,o),r(null,t)}}},473:(t,e,r)=>{"use strict";var n=r(702),o=r(267);function i(t,e){return[t,n.stringify(t,e)]}function s(t,e){var r=t.length;return r>2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),[e,n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!h(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}},702:(t,e,r)=>{"use strict";var n=r(420),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function h(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function f(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,h,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level),e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i)),r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o{"use strict";function e(t){return"string"!=typeof t&&(t=String(t)),t.toLowerCase()}function r(t){this.map={},t instanceof r?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}r.prototype.append=function(t,r){t=e(t),r=function(t){return"string"!=typeof t&&(t=String(t)),t}(r);var n=this.map[t];this.map[t]=n?n+", "+r:r},r.prototype.get=function(t){return t=e(t),this.has(t)?this.map[t]:null},r.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},r.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},r.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),function(t){return{next:function(){var e=t.shift();return{done:void 0===e,value:e}}}}(t)},t.exports=function(t){return"undefined"==typeof Headers?new r(t):new Headers(t)}},876:(t,e,r)=>{"use strict";var n=r(708);t.exports=n},297:t=>{"use strict";t.exports=function(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}},267:(t,e,r)=>{"use strict";var n=r(702);t.exports=function(t,e,r){var o,i,s,a,u=n.isType(t,"object"),c=n.isType(t,"array"),l=[];if(r=r||{obj:[],mapped:[]},u){if(a=r.obj.indexOf(t),u&&-1!==a)return r.mapped[a]||r.obj[a];r.obj.push(t),a=r.obj.length-1}if(u)for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&l.push(o);else if(c)for(s=0;s{t.exports=function(t){var e,r,n,o,i,s,a,u,c,l,p,h,f,d=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function m(t){return t<10?"0"+t:t}function g(){return this.valueOf()}function v(t){return d.lastIndex=0,d.test(t)?'"'+t.replace(d,(function(t){var e=n[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}function y(t,n){var i,s,a,u,c,l=e,p=n[t];switch(p&&"object"==typeof p&&"function"==typeof p.toJSON&&(p=p.toJSON(t)),"function"==typeof o&&(p=o.call(n,t,p)),typeof p){case"string":return v(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(e+=r,c=[],"[object Array]"===Object.prototype.toString.apply(p)){for(u=p.length,i=0;i qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n if (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = merge(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 notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, errors[i].rollbarContext);\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"rollbar.named-amd.min.js","mappings":"oDAGA,SAAUA,GACR,aACKA,EAAOC,UACVD,EAAOC,QAAU,CAAC,GASpB,IAPA,IACIC,EAAMC,EADNC,EAAM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H,EAAyBE,GAC5C,QAAqB38B,IAAjB48B,EACH,OAAOA,EAAat1B,QAGrB,IAAID,EAASo1B,EAAyBE,GAAY,CAGjDr1B,QAAS,CAAC,GAOX,OAHAu1B,EAAoBF,GAAUh5B,KAAK0D,EAAOC,QAASD,EAAQA,EAAOC,QAASo1B,GAGpEr1B,EAAOC,OACf,CCnB0Bo1B,CAAoB,K,MDF1CD,C","sources":["webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transport/fetch.js","webpack://rollbar/./src/browser/transport/xhr.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/truncation.js","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./src/utility/replace.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/webpack/bootstrap","webpack://rollbar/webpack/startup"],"sourcesContent":["// 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","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443,\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function (data, callback) {\n var transportOptions = helpers.transportOptions(\n this.transportOptions,\n 'POST',\n );\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function () {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function (data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload);\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function (jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(\n this.transportOptions,\n 'POST',\n );\n this.transport.postJsonPayload(\n this.accessToken,\n transportOptions,\n jsonPayload,\n callback,\n );\n};\n\nApi.prototype.configure = function (options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = \"Error: could not serialize 'context'\";\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data,\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options);\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport,\n };\n}\n\nfunction detectTransport(options) {\n var gWindow =\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port =\n transport.port ||\n (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI,\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath,\n};\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client =\n client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = typeof document != 'undefined' && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(\n this.options,\n this.client.telemeter,\n this,\n gWindow,\n gDocument,\n );\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n\n // Used with rollbar-react for rollbar-react-native compatibility.\n this.rollbar = this;\n}\n\nvar _instance = null;\nRollbar.init = function (options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function (components) {\n Rollbar.prototype.components = components;\n};\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function (options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function (options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(\n oldOptions._configuredOptions,\n options,\n payload,\n );\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function (options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function () {\n return this.client.lastError;\n};\nRollbar.lastError = function () {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return { uuid: uuid };\n};\nRollbar.log = function () {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return { uuid: uuid };\n};\nRollbar.debug = function () {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return { uuid: uuid };\n};\nRollbar.info = function () {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return { uuid: uuid };\n};\nRollbar.warn = function () {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return { uuid: uuid };\n};\nRollbar.warning = function () {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return { uuid: uuid };\n};\nRollbar.error = function () {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return { uuid: uuid };\n};\nRollbar.critical = function () {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function () {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function () {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function () {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (\n this.options.captureUnhandledRejections ||\n this.options.handleUnhandledRejections\n ) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function (\n message,\n url,\n lineno,\n colno,\n error,\n context,\n) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (\n this.options.inspectAnonymousErrors &&\n this.isChrome &&\n error === null &&\n url === ''\n ) {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser,\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function () {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) {\n // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n};\n\nRollbar.prototype.handleUnhandledRejection = function (reason, promise) {\n if (\n !this.options.captureUnhandledRejections &&\n !this.options.handleUnhandledRejections\n ) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context =\n (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 () {\n return context || {};\n };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch (exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function (f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function () {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function () {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function (e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.addPayloadOptions)\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function () {\n logger.info(\n 'Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.',\n );\n};\n\nRollbar.prototype._createItem = function (args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return (\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self)\n );\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false,\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear',\n ],\n};\n","'use strict';\n\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 var undef;\n if (typeof document === 'undefined') {\n return undef;\n }\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n ((div.innerHTML = ''), all[0])\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion,\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction 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 = ' > ',\n separatorLength = separator.length;\n var out = [],\n len = 0,\n nextStr,\n 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(\n '[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]',\n );\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 = {},\n className,\n key,\n attr,\n i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && typeof className === 'string') {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({ key: key, value: attr });\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType,\n};\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) {\n return;\n }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function () {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) {\n return;\n }\n\n if (\n typeof window._rollbarURH === 'function' &&\n window._rollbarURH.belongsToShim\n ) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections,\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log,\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore,\n};\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation,\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar replace = require('../utility/replace');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false,\n};\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) {\n return null;\n }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function (description) {\n var name = nameFromDescription(description);\n if (!name) {\n return false;\n }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: [],\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: [],\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function (options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function (oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (\n !this.autoInstrument.network &&\n oldSettings &&\n oldSettings.network\n ) {\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 (\n this.autoInstrument.navigation &&\n !(oldSettings && oldSettings.navigation)\n ) {\n this.instrumentNavigation();\n } else if (\n !this.autoInstrument.navigation &&\n oldSettings &&\n oldSettings.navigation\n ) {\n this.deinstrumentNavigation();\n }\n\n if (\n this.autoInstrument.connectivity &&\n !(oldSettings && oldSettings.connectivity)\n ) {\n this.instrumentConnectivity();\n } else if (\n !this.autoInstrument.connectivity &&\n oldSettings &&\n oldSettings.connectivity\n ) {\n this.deinstrumentConnectivity();\n }\n\n if (\n this.autoInstrument.contentSecurityPolicy &&\n !(oldSettings && oldSettings.contentSecurityPolicy)\n ) {\n this.instrumentContentSecurityPolicy();\n } else if (\n !this.autoInstrument.contentSecurityPolicy &&\n oldSettings &&\n oldSettings.contentSecurityPolicy\n ) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function () {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function () {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function (orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(\n xhrp,\n 'open',\n function (orig) {\n return function (method, url) {\n var isUrlObject = _isUrlObject(url);\n if (_.isType(url, 'string') || isUrlObject) {\n url = isUrlObject ? url.toString() : url;\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null,\n };\n }\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n\n replace(\n xhrp,\n 'setRequestHeader',\n function (orig) {\n return function (header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n\n replace(\n xhrp,\n 'send',\n function (orig) {\n /* eslint-disable no-unused-vars */\n return function (data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(\n xhr.__rollbar_xhr,\n 'xhr',\n undefined,\n );\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type =\n xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig =\n self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i = 0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i = 0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (\n self.isJsonContentType(\n xhr.__rollbar_xhr.response_content_type,\n )\n ) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level =\n self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if (\n 'onreadystatechange' in xhr &&\n _.isFunction(xhr.onreadystatechange)\n ) {\n replace(xhr, 'onreadystatechange', function (orig) {\n return self.rollbar.wrap(\n orig,\n undefined,\n onreadystatechangeHandler,\n );\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = new Error().stack;\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n }\n\n if ('fetch' in this._window) {\n replace(\n this._window,\n 'fetch',\n 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 var isUrlObject = _isUrlObject(input);\n if (_.isType(input, 'string') || isUrlObject) {\n url = isUrlObject ? input.toString() : input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null,\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(\n reqHeaders,\n self.autoInstrument.networkRequestHeaders,\n );\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (\n args[0] &&\n !_.isType(args[0], 'string') &&\n args[0].body\n ) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = new Error().stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(\n resp.headers,\n self.autoInstrument.networkResponseHeaders,\n );\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') {\n // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (\n text &&\n self.isJsonContentType(metadata.response_content_type)\n ) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n },\n this.replacements,\n 'network',\n );\n }\n};\n\nInstrumenter.prototype.captureNetwork = function (\n metadata,\n subtype,\n rollbarUUID,\n) {\n if (\n metadata.request &&\n this.isJsonContentType(metadata.request_content_type)\n ) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function (contentType) {\n return contentType &&\n _.isType(contentType, 'string') &&\n contentType.toLowerCase().includes('json')\n ? true\n : false;\n};\n\nInstrumenter.prototype.scrubJson = function (json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n};\n\nInstrumenter.prototype.fetchHeaders = function (inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') {\n // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i = 0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n};\n\nInstrumenter.prototype.trackHttpErrors = function () {\n return (\n this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0\n );\n};\n\nInstrumenter.prototype.errorOnHttpStatus = function (metadata) {\n var status = metadata.status_code;\n\n if (\n (status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)\n ) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n};\n\nInstrumenter.prototype.deinstrumentConsole = function () {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function () {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function () {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug', 'info', 'warn', 'error', 'log'];\n try {\n for (var i = 0, len = methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function () {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function () {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener(\n 'dom',\n this._window,\n 'blur',\n 'onfocusout',\n blurHandler,\n true,\n );\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 =\n domUtil.isDescribedElement(e, 'a') ||\n domUtil.isDescribedElement(e, 'button');\n if (\n hasTag &&\n (anchorOrButton ||\n domUtil.isDescribedElement(e, 'input', ['button', 'submit']))\n ) {\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 (\n domUtil.isDescribedElement(e, 'select') &&\n e.options &&\n e.options.length\n ) {\n this.handleSelectInputChanged(e);\n } else if (\n domUtil.isDescribedElement(e, 'input') &&\n !domUtil.isDescribedElement(e, 'input', [\n 'button',\n 'submit',\n 'hidden',\n 'checkbox',\n 'radio',\n ])\n ) {\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 (\n subtype,\n element,\n value,\n isChecked,\n) {\n if (value !== undefined) {\n if (\n this.scrubTelemetryInputs ||\n domUtil.getElementType(element) === 'password'\n ) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(\n domUtil.treeToArray(element),\n );\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 =\n !chromePackagedApp &&\n this._window.history &&\n 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 =\n !chromePackagedApp &&\n this._window.history &&\n this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(\n this._window,\n 'onpopstate',\n 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 },\n this.replacements,\n 'navigation',\n );\n\n replace(\n this._window.history,\n 'pushState',\n 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 },\n this.replacements,\n 'navigation',\n );\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 (\n parsedHref.protocol === parsedTo.protocol &&\n parsedHref.host === parsedTo.host\n ) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (\n parsedHref.protocol === parsedFrom.protocol &&\n parsedHref.host === parsedFrom.host\n ) {\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(\n 'connectivity',\n this._window,\n 'online',\n undefined,\n function () {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this),\n true,\n );\n this.addListener(\n 'connectivity',\n this._window,\n 'offline',\n undefined,\n function () {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this),\n true,\n );\n } else {\n var self = this;\n replace(\n this._document.body,\n 'ononline',\n function (orig) {\n return function () {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n },\n this.replacements,\n 'connectivity',\n );\n replace(\n this._document.body,\n 'onoffline',\n function (orig) {\n return function () {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n },\n this.replacements,\n 'connectivity',\n );\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function (cspEvent) {\n var message =\n 'Security Policy Violation: ' +\n 'blockedURI: ' +\n cspEvent.blockedURI +\n ', ' +\n 'violatedDirective: ' +\n cspEvent.violatedDirective +\n ', ' +\n 'effectiveDirective: ' +\n cspEvent.effectiveDirective +\n ', ';\n\n if (cspEvent.sourceFile) {\n message +=\n 'location: ' +\n cspEvent.sourceFile +\n ', ' +\n 'line: ' +\n cspEvent.lineNumber +\n ', ' +\n 'col: ' +\n cspEvent.columnNumber +\n ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n};\n\nInstrumenter.prototype.handleCspError = function (message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n};\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function () {\n if (!('addEventListener' in this._document)) {\n return;\n }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function () {\n if (!('addEventListener' in this._document)) {\n return;\n }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener(\n 'contentsecuritypolicy',\n this._document,\n 'securitypolicyviolation',\n null,\n cspHandler,\n false,\n );\n};\n\nInstrumenter.prototype.addListener = function (\n section,\n obj,\n type,\n altType,\n handler,\n capture,\n) {\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\nfunction _isUrlObject(input) {\n return typeof URL !== 'undefined' && input instanceof URL;\n}\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if (item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo =\n item.err._savedStackTrace ||\n errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message =\n item.err.message ||\n item.err.description ||\n item.message ||\n String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment =\n (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version,\n },\n custom: item.custom,\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function (item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function (item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height,\n },\n },\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function (item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i = 0, l = navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({ name: cur.name, description: cur.description });\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message,\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', { message: result });\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (\n stack &&\n stack.length === 0 &&\n item._unhandledStackInfo &&\n item._unhandledStackInfo.stack\n ) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', { trace_chain: traces });\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', { trace: trace });\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n class: className,\n message: message,\n },\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method:\n !stackFrame.func || stackFrame.func === '?'\n ? '[anonymous]'\n : stackFrame.func,\n colno: stackFrame.column,\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (\n frame.method &&\n frame.method.endsWith &&\n frame.method.endsWith('_rollbar_wrapped')\n ) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n };\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber,\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function (\n accessToken,\n options,\n params,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n null,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\nTransport.prototype.post = function (\n accessToken,\n options,\n payload,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload);\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n writeData,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\nTransport.prototype.postJsonPayload = function (\n accessToken,\n options,\n jsonPayload,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n jsonPayload,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow =\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n var self = this;\n rootZone.run(function () {\n self._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n};\n\nTransport.prototype._makeRequest = function (\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n transport,\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout);\n } else {\n makeXhrRequest(\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n );\n }\n};\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function (_msg) {\n /* do nothing */\n }, // eslint-disable-line no-unused-vars\n function (err) {\n callback(new Error(err));\n },\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if (_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(function () {\n controller.abort();\n }, timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal,\n },\n body: data,\n })\n .then(function (response) {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then(function (data) {\n callback(null, data);\n })\n .catch(function (error) {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function () {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message =\n 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 =\n 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if (_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n // 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(\n new Error(\n 'No window available during request, unknown environment',\n ),\n );\n }\n\n // If the current page is http, try and send over http\n if (\n window.location.href.substring(0, 5) === 'http:' &&\n url.substring(0, 5) === 'https'\n ) {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function () {};\n xdomainrequest.ontimeout = function () {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function () {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function () {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n },\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null,\n auth: null,\n host: null,\n path: null,\n hash: null,\n href: url,\n hostname: null,\n port: null,\n pathname: null,\n search: null,\n query: null,\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0, i);\n last = i + 2;\n } else {\n last = 0;\n }\n\n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i + 1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse,\n};\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) {\n return;\n }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals =\n '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 ',',\n );\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 (\n prototype.hasOwnProperty &&\n prototype.hasOwnProperty('addEventListener')\n ) {\n var oldAddEventListener = prototype.addEventListener;\n while (\n oldAddEventListener._rollbarOldAdd &&\n oldAddEventListener.belongsToShim\n ) {\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 (\n oldRemoveEventListener._rollbarOldRemove &&\n oldRemoveEventListener.belongsToShim\n ) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function (event, callback, bubble) {\n oldRemoveEventListener.call(\n this,\n event,\n (callback && callback._rollbar_wrapped) || callback,\n bubble,\n );\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nmodule.exports = {\n version: '2.26.4',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60,\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp(\n '^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ',\n);\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\nfunction gatherContext() {\n return null;\n}\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch (e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception,\n };\n}\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace(\n (errClassMatch[errClassMatch.length - 2] || '') + errClass + ':',\n '',\n );\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName =\n error.constructor.name &&\n error.constructor.name.length &&\n error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame,\n};\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n if (!obj || toStr.call(obj) !== '[object Object]') {\n return false;\n }\n\n var hasOwnConstructor = hasOwn.call(obj, 'constructor');\n var hasIsPrototypeOf =\n obj.constructor &&\n obj.constructor.prototype &&\n hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n // Not own constructor property must be Object\n if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n return false;\n }\n\n // Own properties are enumerated firstly, so to speed up,\n // if last one is own, then all properties are own.\n var key;\n for (key in obj) {\n /**/\n }\n\n return typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i,\n src,\n copy,\n clone,\n name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i = 0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function (options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function (transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function (item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(\n item,\n 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\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function (item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function (err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function (item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (\n _.isFunction(settings.checkIgnore) &&\n settings.checkIgnore(isUncaught, args, item)\n ) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n };\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function (item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n };\n}\n\nfunction urlIsSafeListed(logger) {\n return function (item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n };\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) {\n return !block;\n }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) {\n return !block;\n }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) {\n return !block;\n }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if (matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (\n e\n /* istanbul ignore next */\n ) {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error(\n \"Error while reading your configuration's \" +\n listName +\n ' option. Removing custom ' +\n listName +\n '.',\n e,\n );\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function (item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0) {\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch (\n e\n /* istanbul ignore next */\n ) {\n settings.ignoredMessages = null;\n logger.error(\n \"Error while reading your configuration's ignoredMessages option. Removing custom ignoredMessages.\",\n );\n }\n\n return true;\n };\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored,\n};\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function (options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function (predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function (item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function (item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function (\n item,\n callback,\n originalError,\n originalItem,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {\n return;\n };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(\n item,\n function (err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this),\n );\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(\n function () {\n this._maybeCallWait();\n }.bind(this),\n 500,\n );\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(\n item,\n function (err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this),\n );\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 = [\n 'ECONNRESET',\n 'ENOTFOUND',\n 'ESOCKETTIMEDOUT',\n 'ETIMEDOUT',\n 'ECONNREFUSED',\n 'EHOSTUNREACH',\n 'EPIPE',\n 'EAI_AGAIN',\n];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function (err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function (item, callback) {\n this.retryQueue.push({ item: item, callback: callback });\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(\n function () {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this),\n this.options.retryInterval,\n );\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 (\n _.isFunction(this.waitCallback) &&\n this.pendingItems.length === 0 &&\n this.pendingRequests.length === 0\n ) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined,\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function (options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function (item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n globalRateLimit + ' max items reached',\n false,\n );\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n globalRateLimitPerMin + ' items per minute reached',\n false,\n );\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend =\n shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n null,\n shouldSend,\n globalRateLimit,\n globalRateLimitPerMin,\n perMinute,\n );\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(\n platform,\n options,\n error,\n shouldSend,\n globalRateLimit,\n limitPerMin,\n perMinute,\n) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(\n platform,\n options,\n globalRateLimit,\n limitPerMin,\n perMinute,\n );\n }\n return { error: error, shouldSend: shouldSend, payload: payload };\n}\n\nfunction rateLimitPayload(\n platform,\n options,\n globalRateLimit,\n limitPerMin,\n perMinute,\n) {\n var environment =\n options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin,\n },\n },\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version:\n (options.notifier && options.notifier.version) || options.version,\n },\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60,\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer;\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents =\n (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag(\n 'rollbar.item_url',\n `https://rollbar.com/item/uuid/?uuid=${item.uuid}`,\n );\n span.setTag(\n 'rollbar.occurrence_url',\n `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`,\n );\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId,\n };\n }\n }\n }\n};\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (\n !spanContext ||\n !spanContext.toSpanId ||\n !spanContext.toTraceId ||\n typeof spanContext.toSpanId !== 'function' ||\n typeof spanContext.toTraceId !== 'function'\n ) {\n return false;\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function (options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.queue.length > newMaxEvents) {\n deleteCount = this.queue.length - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function () {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function (\n type,\n metadata,\n level,\n rollbarUUID,\n timestamp,\n) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client',\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (\n _.isFunction(this.options.filterTelemetry) &&\n this.options.filterTelemetry(e)\n ) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function (\n type,\n metadata,\n level,\n rollbarUUID,\n) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function (\n err,\n level,\n rollbarUUID,\n timestamp,\n) {\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 (\n message,\n level,\n rollbarUUID,\n timestamp,\n) {\n return this.capture(\n 'log',\n {\n message: message,\n },\n level,\n rollbarUUID,\n timestamp,\n );\n};\n\nTelemeter.prototype.captureNetwork = function (\n metadata,\n subtype,\n rollbarUUID,\n requestData,\n) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function (statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function (\n subtype,\n element,\n value,\n checked,\n rollbarUUID,\n) {\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(\n 'navigation',\n { from: from, to: to },\n 'info',\n rollbarUUID,\n );\n};\n\nTelemeter.prototype.captureDomContentLoaded = function (ts) {\n return this.capture(\n 'navigation',\n { subtype: 'DOMContentLoaded' },\n 'info',\n undefined,\n ts && ts.getTime(),\n );\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(\n 'navigation',\n { subtype: 'load' },\n 'info',\n undefined,\n ts && ts.getTime(),\n );\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function (type, rollbarUUID) {\n return this.captureNetwork({ change: type }, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function (item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture(\n 'log',\n item.custom,\n item.level,\n item.uuid,\n item.timestamp,\n );\n }\n};\n\nTelemeter.prototype.push = function (e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info',\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var data = item.data;\n\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 addPayloadOptions(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n item.data = _.merge(item.data, payloadOptions);\n callback(null, item);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath + '.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath + '.extra') || {};\n var newExtra = _.merge(extra, { message: item.message });\n _.set(item, tracePath + '.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function (item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error(\n 'Error while calling custom transform() function. Removing custom transform().',\n e,\n );\n callback(null, item);\n return;\n }\n if (_.isPromise(response)) {\n response.then(\n function (promisedItem) {\n if (promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n },\n function (error) {\n callback(error, item);\n },\n );\n } else {\n callback(null, newItem);\n }\n };\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if (_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(\n item.notifier.client.notifier.diagnostic,\n item.diagnostic,\n );\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack,\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(\n item.data.notifier.diagnostic,\n diagnostic,\n );\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addPayloadOptions: addPayloadOptions,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys,\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = typeof range === 'undefined' ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(\n 255,\n traceData.exception.message,\n );\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = typeof maxSize === 'undefined' ? 512 * 1024 : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody,\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue,\n};\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if (polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else {\n // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return {}.toString\n .call(x)\n .match(/\\s([a-zA-Z]+)/)[1]\n .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\n .call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n */\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String;\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\nfunction isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return type === 'object' || type === 'array';\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(\n /[xy]/g,\n 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 );\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4,\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor',\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g,\n },\n parser: {\n strict:\n /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose:\n /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n },\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0, qs) + query + '&' + p.substring(qs + 1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0, h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return { error: error, value: value };\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) {\n // up to 7 bits\n count = count + 1;\n } else if (code < 2048) {\n // up to 11 bits\n count = count + 2;\n } else if (code < 65536) {\n // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return { error: error, value: value };\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser,\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno,\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href =\n typeof document !== 'undefined' &&\n document &&\n document.location &&\n document.location.href;\n var useragent =\n typeof window !== 'undefined' &&\n window &&\n window.navigator &&\n window.navigator.userAgent;\n return {\n mode: mode,\n message: error ? String(error) : message || backupMessage,\n url: href,\n stack: [location],\n useragent: useragent,\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function (err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value,\n name,\n newSeen,\n result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : (message = arg);\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : (err = arg);\n break;\n case 'object':\n case 'array':\n if (\n arg instanceof Error ||\n (typeof DOMException !== 'undefined' && arg instanceof DOMException)\n ) {\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 (\n arg instanceof Error ||\n (typeof DOMException !== 'undefined' && arg instanceof DOMException)\n ) {\n err ? extraArgs.push(arg) : (err = arg);\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4(),\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = [\n 'log',\n 'network',\n 'dom',\n 'navigation',\n 'error',\n 'manual',\n];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level,\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len - 1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if (options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if (options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4,\n};\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n return name.toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value;\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function () {\n var value = items.shift();\n return { done: value === undefined, value: value };\n },\n };\n\n return iterator;\n}\n\nfunction FetchHeaders(headers) {\n this.map = {};\n\n if (headers instanceof FetchHeaders) {\n headers.forEach(function (value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function (header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function (name) {\n this.append(name, headers[name]);\n }, this);\n }\n}\n\nFetchHeaders.prototype.append = function (name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n};\n\nFetchHeaders.prototype.get = function (name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null;\n};\n\nFetchHeaders.prototype.has = function (name) {\n return this.map.hasOwnProperty(normalizeName(name));\n};\n\nFetchHeaders.prototype.forEach = function (callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n};\n\nFetchHeaders.prototype.entries = function () {\n var items = [];\n this.forEach(function (value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items);\n};\n\nmodule.exports = headers;\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","'use strict';\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\nmodule.exports = replace;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: [] };\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","// 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","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(409);\n"],"names":["global","console","prop","method","con","dummy","properties","methods","split","pop","window","this","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","parse","error","stacktrace","parseOpera","stack","match","parseV8OrIE","parseFFOrSafari","Error","extractLocation","urlLike","indexOf","parts","exec","replace","undefined","filter","line","map","sanitizedLine","location","tokens","slice","locationParts","functionName","join","fileName","lineNumber","columnNumber","source","functionNameRegex","matches","e","message","length","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","result","i","len","push","argsRaw","functionCall","shift","args","_isNumber","n","isNaN","parseFloat","isFinite","_capitalize","str","charAt","toUpperCase","substring","_getter","p","booleanProps","numericProps","stringProps","arrayProps","objectProps","props","concat","obj","prototype","getArgs","setArgs","v","Object","toString","call","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","lastIndexOf","locationString","Boolean","j","Number","k","String","_","helpers","defaultOptions","hostname","path","search","version","protocol","port","Api","options","transport","urllib","truncation","jsonBackup","url","accessToken","transportOptions","_getTransport","getTransportFromOptions","postItem","data","callback","payload","buildPayload","self","setTimeout","post","buildJsonPayload","stringifyResult","truncate","stringify","value","postJsonPayload","jsonPayload","configure","oldOptions","merge","module","exports","isType","context","contextResult","substr","access_token","defaults","timeout","gWindow","defaultTransport","fetch","XMLHttpRequest","detectTransport","proxy","endpoint","opts","pathname","transportAPI","host","appendPathToPath","base","baseTrailingSlash","test","pathBeginningSlash","rollbar","_rollbarConfig","alias","globalAlias","shimRunning","shimId","_rollbarStartTime","Date","getTime","Rollbar","_rollbarDidLoad","Client","API","logger","globals","Transport","transforms","sharedTransforms","predicates","sharedPredicates","errorParser","client","handleOptions","_configuredOptions","Telemeter","components","telemeter","Instrumenter","instrumenter","polyfillJSON","wrapGlobals","scrub","api","_gWindow","gDocument","document","isChrome","chrome","runtime","anonymousErrorsPending","notifier","addTransform","handleDomException","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","addConfigToPayload","addScrubber","addPayloadOptions","userTransform","addConfiguredOptions","addDiagnosticKeys","itemToPayload","addTransformsToNotifier","queue","addPredicate","checkLevel","checkIgnore","userCheckIgnore","urlIsNotBlockListed","urlIsSafeListed","messageIsIgnored","setupUnhandledCapture","instrument","setupJSON","_instance","handleUninitialized","maybeCallback","_getFirstFunction","isFunction","init","setComponents","payloadData","lastError","log","item","_createItem","arguments","uuid","apply","debug","info","warn","warning","critical","sendJsonPayload","unhandledExceptionsInitialized","captureUncaught","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobalEventHandlers","unhandledRejectionsInitialized","captureUnhandledRejections","handleUnhandledRejections","handleUncaughtException","lineno","colno","inspectAnonymousErrors","stackInfo","makeUnhandledStackInfo","isError","_unhandledStackInfo","level","uncaughtErrorLevel","_isUncaught","handleAnonymousErrors","r","prepareStackTrace","_stack","_isAnonymous","handleUnhandledRejection","reason","promise","reasonResult","_rollbarContext","_originalArgs","wrap","f","_before","ctxFn","_isWrap","_rollbar_wrapped","exc","_rollbarWrappedError","_wrappedSource","hasOwnProperty","captureEvent","event","createTelemetryEvent","type","metadata","captureDomContentLoaded","ts","captureLoad","loadFull","createItem","scrubFields","logLevel","reportLevel","verbose","enabled","transmit","sendConfig","includeItemsInTelemetry","captureIp","ignoreDuplicateErrors","Detection","ieVersion","undef","div","createElement","all","getElementsByTagName","innerHTML","getElementType","getAttribute","toLowerCase","descriptionToString","desc","tagName","out","id","classes","attributes","key","describeElement","elem","className","attr","elementArrayToString","a","nextStr","totalLength","separator","MAX_LENGTH","unshift","treeToArray","nextDescription","height","parentNode","getElementFromEvent","evt","doc","target","elementFromPoint","clientX","clientY","isDescribedElement","element","subtypes","handler","shim","oldOnError","_rollbarOldOnError","onerror","fn","Array","old","ret","_rollbarWindowOnError","_rollbarURH","belongsToShim","removeEventListener","rejectionHandler","detail","addEventListener","detection","formatArgsAsString","settings","get","headers","urlparser","domUtil","network","networkResponseHeaders","networkResponseBody","networkRequestHeaders","networkRequestBody","networkErrorOnHttp5xx","networkErrorOnHttp4xx","networkErrorOnHttp0","dom","navigation","connectivity","contentSecurityPolicy","errorOnContentSecurityPolicy","restore","replacements","b","_window","_document","autoInstrument","scrubTelemetryInputs","telemetryScrubber","defaultValueScrubber","patterns","RegExp","description","name","attrs","nameFromDescription","diagnostic","eventRemovers","contentsecuritypolicy","_location","_lastHref","href","_isUrlObject","input","URL","oldSettings","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","deinstrumentContentSecurityPolicy","instrumentContentSecurityPolicy","wrapProp","xhr","orig","xhrp","isUrlObject","__rollbar_xhr","status_code","start_time_ms","now","end_time_ms","header","request_headers","request_content_type","onreadystatechangeHandler","request","__rollbar_event","captureNetwork","readyState","response_content_type","getResponseHeader","headersConfig","allHeaders","getAllResponseHeaders","arr","trim","body","responseText","response","isJsonContentType","scrubJson","code","status","levelFromStatus","errorOnHttpStatus","onreadystatechange","trackHttpErrors","t","reqHeaders","fetchHeaders","then","resp","text","clone","subtype","rollbarUUID","contentType","includes","json","JSON","inHeaders","outHeaders","entries","currentHeader","next","done","skipFrames","c","wrapConsole","origConsole","captureLog","Function","removeListeners","clickHandler","handleClick","bind","blurHandler","handleBlur","addListener","hasTag","anchorOrButton","captureDomEvent","checked","handleSelectInputChanged","multiple","selected","selectedIndex","isChecked","elementString","captureDom","app","history","pushState","current","handleUrlChange","from","to","parsedHref","parsedTo","parsedFrom","hash","captureNavigation","captureConnectivityChange","handleCspEvent","cspEvent","blockedURI","violatedDirective","effectiveDirective","sourceFile","originalPolicy","handleCspError","cspHandler","section","altType","capture","attachEvent","detachEvent","addBodyMessage","custom","extra","set","stackFromItem","buildTrace","guess","guessErrorClass","trace","exception","class","errorClass","stackFrame","frame","pre","contextLength","mid","rawStack","raw","rawException","frames","filename","sanitizeUrl","func","column","sendFrameUrl","endsWith","Math","floor","reverse","err","Stack","originalError","nested","_savedStackTrace","addErrorContext","chain","cause","e2","environment","platform","framework","language","server","requestInfo","query_string","remoteString","user_ip","keys","nav","navigator","scr","screen","runtime_ms","timestamp","round","javascript","browser","userAgent","cookie_enabled","cookieEnabled","width","cur","plugins","navPlugins","l","traceChain","traces","traceChainLength","trace_chain","addBodyTraceChain","addBodyTrace","scrubFn","scrubPaths","makeFetchRequest","makeXhrRequest","params","requestFactory","addParamsAndAccessTokenToPath","formatUrl","_makeZoneRequest","writeData","currentZone","Zone","_name","rootZone","_parent","run","_makeRequest","RollbarProxy","_msg","_proxyRequest","controller","timeoutId","isFiniteNumber","AbortController","abort","signal","clearTimeout","catch","_newRetriableError","xmlhttp","factories","ActiveXObject","numFactories","_createXMLHTTPObject","parseResponse","jsonParse","_isNormalFailure","ex","open","setRequestHeader","send","e1","XDomainRequest","xdomainrequest","onprogress","ontimeout","onload","last","auth","query","parseInt","pathParts","_extendListenerPrototype","oldAddEventListener","_rollbarOldAdd","addFn","bubble","oldRemoveEventListener","_rollbarOldRemove","removeFn","maxItems","itemsPerMin","ErrorStackParser","ERR_CLASS_REGEXP","gatherContext","Frame","_stackFrame","skip","parserStack","getStack","constructorName","constructor","guessFunctionName","errMsg","errClassMatch","errClass","hasOwn","toStr","isPlainObject","hasOwnConstructor","hasIsPrototypeOf","src","copy","Notifier","transform","addPendingItem","_applyTransforms","removePendingItem","addItem","transformIndex","transformsLength","cb","matchFrames","list","block","listLength","frameLength","urlIsOnAList","safeOrBlock","hostBlockList","hostSafeList","tracesLength","listName","levelVal","LEVELS","isUncaught","onSendCallback","ignoredMessages","rIgnoredMessage","messages","messagesFromItem","Queue","rateLimiter","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","predicate","idx","splice","originalItem","predicateResult","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","wait","_maybeCallWait","clearInterval","setInterval","rateLimitResponse","shouldSend","_maybeRetry","RETRIABLE_ERRORS","shouldRetry","retryInterval","maxRetries","retries","_retryApiRequest","retryObject","RateLimiter","startTime","counter","perMinCounter","platformOptions","configureGlobal","checkRate","limit","ignoreRateLimit","shouldSendValue","globalRateLimit","limitPerMin","perMinute","itemsPerMinute","rateLimitPayload","globalSettings","elapsedTime","globalRateLimitPerMin","setPlatformOptions","tracer","validateTracer","setStackTraceLimit","lastErrorHash","stackTraceLimit","scope","active","_defaultLogLevel","_log","defaultLevel","_sameAsLastError","_addTracingInfo","_captureRollbarItem","telemetryEvents","copyEvents","itemHash","generateItemHash","span","spanContext","toSpanId","toTraceId","validateSpan","setTag","opentracingSpanId","opentracingTraceId","opentracing_span_id","opentracing_trace_id","traverse","scrubPath","redact","paramRes","pat","_getScrubFieldRegexs","queryRes","_getScrubQueryParamRegexs","redactQueryParam","dummy0","paramPart","scrubber","seen","tmpV","valScrubber","paramScrubber","MAX_EVENTS","maxTelemetryEvents","maxQueueSize","max","min","getLevel","manual","newMaxEvents","deleteCount","events","filterTelemetry","timestamp_ms","captureError","requestData","statusCode","change","addFunctionOption","payloadOptions","tracePath","newExtra","newItem","isPromise","promisedItem","configuredOptions","configured_options","is_anonymous","is_uncaught","raw_error","constructor_name","failed","selectFrames","range","truncateFrames","maybeTruncateValue","val","truncateStrings","truncator","typeName","truncateTraceData","traceData","minBody","needsTruncation","maxSize","maxByteSize","strategy","results","strategies","RollbarJSON","x","isNativeFunction","funcMatchString","reIsNative","isObject","uuid4","d","random","parseUriOptions","strictMode","q","parser","strict","loose","backup","jsonError","backupError","wrapCallback","nonCircularClone","newSeen","TELEMETRY_TYPES","TELEMETRY_LEVELS","arrayIncludes","paramsArray","sort","qs","h","requestKeys","lambdaContext","arg","extraArgs","argTypes","typ","DOMException","setCustomItemKeys","original_arg_types","errors","contextAdded","rollbarContext","error_context","filterIp","newIp","beginning","slashIdx","u","hostWhiteList","hostBlackList","updateDeprecatedOptions","overwriteScrubFields","isIterable","isString","s","mode","backupMessage","useragent","baseUrlParts","o","m","uri","$0","$1","$2","parseUri","anchor","temp","replacement","string","count","charCodeAt","normalizeName","FetchHeaders","forEach","append","isArray","getOwnPropertyNames","normalizeValue","oldValue","has","thisArg","items","iteratorFor","Headers","seenIndex","isObj","mapped","same","gap","indent","meta","rep","state","container","escapes","number","action","rx_escapable","this_value","valueOf","quote","lastIndex","holder","partial","mind","toJSON","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","replacer","space","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","reviver","tx","ignore","fromCharCode","walk","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__"],"sourceRoot":""}
\ No newline at end of file
diff --git a/dist/rollbar.noconflict.umd.js b/dist/rollbar.noconflict.umd.js
index 3b723739a..2dc449abf 100644
--- a/dist/rollbar.noconflict.umd.js
+++ b/dist/rollbar.noconflict.umd.js
@@ -7,5740 +7,6774 @@
exports["rollbar"] = factory();
else
root["rollbar"] = factory();
-})(this, function() {
-return /******/ (function(modules) { // webpackBootstrap
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {}
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
-/******/ }
-/******/ };
-/******/
-/******/ // define __esModule on exports
-/******/ __webpack_require__.r = function(exports) {
-/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
-/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
-/******/ }
-/******/ Object.defineProperty(exports, '__esModule', { value: true });
-/******/ };
-/******/
-/******/ // create a fake namespace object
-/******/ // mode & 1: value is a module id, require it
-/******/ // mode & 2: merge all properties of value into the ns
-/******/ // mode & 4: return value when already ns object
-/******/ // mode & 8|1: behave like require
-/******/ __webpack_require__.t = function(value, mode) {
-/******/ if(mode & 1) value = __webpack_require__(value);
-/******/ if(mode & 8) return value;
-/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
-/******/ var ns = Object.create(null);
-/******/ __webpack_require__.r(ns);
-/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
-/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
-/******/ return ns;
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/
-/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 6);
-/******/ })
-/************************************************************************/
-/******/ ([
-/* 0 */
+})(this, () => {
+return /******/ (() => { // webpackBootstrap
+/******/ var __webpack_modules__ = ({
+
+/***/ 276:
+/***/ (function() {
+
+// Console-polyfill. MIT license.
+// https://github.com/paulmillr/console-polyfill
+// Make it safe to do console.log() always.
+(function(global) {
+ 'use strict';
+ if (!global.console) {
+ global.console = {};
+ }
+ var con = global.console;
+ var prop, method;
+ var dummy = function() {};
+ var properties = ['memory'];
+ var methods = ('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(',');
+ while (prop = properties.pop()) if (!con[prop]) con[prop] = {};
+ while (method = methods.pop()) if (!con[method]) con[method] = dummy;
+ // Using `this` for web workers & supports Browserify / Webpack.
+})(typeof window === 'undefined' ? this : window);
+
+
+/***/ }),
+
+/***/ 180:
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {
+ 'use strict';
+ // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
+ /* istanbul ignore next */
+ if (true) {
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(124)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
+ (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else {}
+}(this, function ErrorStackParser(StackFrame) {
+ 'use strict';
-var merge = __webpack_require__(12);
+ var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\S+:\d+/;
+ var CHROME_IE_STACK_REGEXP = /^\s*at .*(\S+:\d+|\(native\))/m;
+ var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\[native code])?$/;
-var RollbarJSON = {};
-function setupJSON(polyfillJSON) {
- if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {
- return;
- }
+ return {
+ /**
+ * Given an Error object, extract the most information from it.
+ *
+ * @param {Error} error object
+ * @return {Array} of StackFrames
+ */
+ parse: function ErrorStackParser$$parse(error) {
+ if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {
+ return this.parseOpera(error);
+ } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {
+ return this.parseV8OrIE(error);
+ } else if (error.stack) {
+ return this.parseFFOrSafari(error);
+ } else {
+ throw new Error('Cannot parse given Error object');
+ }
+ },
- if (isDefined(JSON)) {
- // If polyfill is provided, prefer it over existing non-native shims.
- if(polyfillJSON) {
- if (isNativeFunction(JSON.stringify)) {
- RollbarJSON.stringify = JSON.stringify;
- }
- if (isNativeFunction(JSON.parse)) {
- RollbarJSON.parse = JSON.parse;
- }
- } else { // else accept any interface that is present.
- if (isFunction(JSON.stringify)) {
- RollbarJSON.stringify = JSON.stringify;
- }
- if (isFunction(JSON.parse)) {
- RollbarJSON.parse = JSON.parse;
- }
+ // Separate line and column numbers from a string of the form: (URI:Line:Column)
+ extractLocation: function ErrorStackParser$$extractLocation(urlLike) {
+ // Fail-fast but return locations like "(native)"
+ if (urlLike.indexOf(':') === -1) {
+ return [urlLike];
+ }
+
+ var regExp = /(.+?)(?::(\d+))?(?::(\d+))?$/;
+ var parts = regExp.exec(urlLike.replace(/[()]/g, ''));
+ return [parts[1], parts[2] || undefined, parts[3] || undefined];
+ },
+
+ parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {
+ var filtered = error.stack.split('\n').filter(function(line) {
+ return !!line.match(CHROME_IE_STACK_REGEXP);
+ }, this);
+
+ return filtered.map(function(line) {
+ if (line.indexOf('(eval ') > -1) {
+ // Throw away eval information until we implement stacktrace.js/stackframe#8
+ line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(\),.*$)/g, '');
+ }
+ var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '(');
+
+ // capture and preseve the parenthesized location "(/foo/my bar.js:12:87)" in
+ // case it has spaces in it, as the string is split on \s+ later on
+ var location = sanitizedLine.match(/ (\((.+):(\d+):(\d+)\)$)/);
+
+ // remove the parenthesized location from the line, if it was matched
+ sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;
+
+ var tokens = sanitizedLine.split(/\s+/).slice(1);
+ // if a location was matched, pass it to extractLocation() otherwise pop the last token
+ var locationParts = this.extractLocation(location ? location[1] : tokens.pop());
+ var functionName = tokens.join(' ') || undefined;
+ var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];
+
+ return new StackFrame({
+ functionName: functionName,
+ fileName: fileName,
+ lineNumber: locationParts[1],
+ columnNumber: locationParts[2],
+ source: line
+ });
+ }, this);
+ },
+
+ parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {
+ var filtered = error.stack.split('\n').filter(function(line) {
+ return !line.match(SAFARI_NATIVE_CODE_REGEXP);
+ }, this);
+
+ return filtered.map(function(line) {
+ // Throw away eval information until we implement stacktrace.js/stackframe#8
+ if (line.indexOf(' > eval') > -1) {
+ line = line.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ':$1');
+ }
+
+ if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {
+ // Safari eval frames only have function names and nothing else
+ return new StackFrame({
+ functionName: line
+ });
+ } else {
+ var functionNameRegex = /((.*".+"[^@]*)?[^@]*)(?:@)/;
+ var matches = line.match(functionNameRegex);
+ var functionName = matches && matches[1] ? matches[1] : undefined;
+ var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));
+
+ return new StackFrame({
+ functionName: functionName,
+ fileName: locationParts[0],
+ lineNumber: locationParts[1],
+ columnNumber: locationParts[2],
+ source: line
+ });
+ }
+ }, this);
+ },
+
+ parseOpera: function ErrorStackParser$$parseOpera(e) {
+ if (!e.stacktrace || (e.message.indexOf('\n') > -1 &&
+ e.message.split('\n').length > e.stacktrace.split('\n').length)) {
+ return this.parseOpera9(e);
+ } else if (!e.stack) {
+ return this.parseOpera10(e);
+ } else {
+ return this.parseOpera11(e);
+ }
+ },
+
+ parseOpera9: function ErrorStackParser$$parseOpera9(e) {
+ var lineRE = /Line (\d+).*script (?:in )?(\S+)/i;
+ var lines = e.message.split('\n');
+ var result = [];
+
+ for (var i = 2, len = lines.length; i < len; i += 2) {
+ var match = lineRE.exec(lines[i]);
+ if (match) {
+ result.push(new StackFrame({
+ fileName: match[2],
+ lineNumber: match[1],
+ source: lines[i]
+ }));
+ }
+ }
+
+ return result;
+ },
+
+ parseOpera10: function ErrorStackParser$$parseOpera10(e) {
+ var lineRE = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i;
+ var lines = e.stacktrace.split('\n');
+ var result = [];
+
+ for (var i = 0, len = lines.length; i < len; i += 2) {
+ var match = lineRE.exec(lines[i]);
+ if (match) {
+ result.push(
+ new StackFrame({
+ functionName: match[3] || undefined,
+ fileName: match[2],
+ lineNumber: match[1],
+ source: lines[i]
+ })
+ );
+ }
+ }
+
+ return result;
+ },
+
+ // Opera 10.65+ Error.stack very similar to FF/Safari
+ parseOpera11: function ErrorStackParser$$parseOpera11(error) {
+ var filtered = error.stack.split('\n').filter(function(line) {
+ return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);
+ }, this);
+
+ return filtered.map(function(line) {
+ var tokens = line.split('@');
+ var locationParts = this.extractLocation(tokens.pop());
+ var functionCall = (tokens.shift() || '');
+ var functionName = functionCall
+ .replace(//, '$2')
+ .replace(/\([^)]*\)/g, '') || undefined;
+ var argsRaw;
+ if (functionCall.match(/\(([^)]*)\)/)) {
+ argsRaw = functionCall.replace(/^[^(]+\(([^)]*)\)$/, '$1');
+ }
+ var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?
+ undefined : argsRaw.split(',');
+
+ return new StackFrame({
+ functionName: functionName,
+ args: args,
+ fileName: locationParts[0],
+ lineNumber: locationParts[1],
+ columnNumber: locationParts[2],
+ source: line
+ });
+ }, this);
+ }
+ };
+}));
+
+
+/***/ }),
+
+/***/ 124:
+/***/ (function(module, exports) {
+
+var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {
+ 'use strict';
+ // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
+
+ /* istanbul ignore next */
+ if (true) {
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
+ (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else {}
+}(this, function() {
+ 'use strict';
+ function _isNumber(n) {
+ return !isNaN(parseFloat(n)) && isFinite(n);
+ }
+
+ function _capitalize(str) {
+ return str.charAt(0).toUpperCase() + str.substring(1);
+ }
+
+ function _getter(p) {
+ return function() {
+ return this[p];
+ };
+ }
+
+ var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];
+ var numericProps = ['columnNumber', 'lineNumber'];
+ var stringProps = ['fileName', 'functionName', 'source'];
+ var arrayProps = ['args'];
+ var objectProps = ['evalOrigin'];
+
+ var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);
+
+ function StackFrame(obj) {
+ if (!obj) return;
+ for (var i = 0; i < props.length; i++) {
+ if (obj[props[i]] !== undefined) {
+ this['set' + _capitalize(props[i])](obj[props[i]]);
+ }
+ }
+ }
+
+ StackFrame.prototype = {
+ getArgs: function() {
+ return this.args;
+ },
+ setArgs: function(v) {
+ if (Object.prototype.toString.call(v) !== '[object Array]') {
+ throw new TypeError('Args must be an Array');
+ }
+ this.args = v;
+ },
+
+ getEvalOrigin: function() {
+ return this.evalOrigin;
+ },
+ setEvalOrigin: function(v) {
+ if (v instanceof StackFrame) {
+ this.evalOrigin = v;
+ } else if (v instanceof Object) {
+ this.evalOrigin = new StackFrame(v);
+ } else {
+ throw new TypeError('Eval Origin must be an Object or StackFrame');
+ }
+ },
+
+ toString: function() {
+ var fileName = this.getFileName() || '';
+ var lineNumber = this.getLineNumber() || '';
+ var columnNumber = this.getColumnNumber() || '';
+ var functionName = this.getFunctionName() || '';
+ if (this.getIsEval()) {
+ if (fileName) {
+ return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';
+ }
+ return '[eval]:' + lineNumber + ':' + columnNumber;
+ }
+ if (functionName) {
+ return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';
+ }
+ return fileName + ':' + lineNumber + ':' + columnNumber;
+ }
+ };
+
+ StackFrame.fromString = function StackFrame$$fromString(str) {
+ var argsStartIndex = str.indexOf('(');
+ var argsEndIndex = str.lastIndexOf(')');
+
+ var functionName = str.substring(0, argsStartIndex);
+ var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');
+ var locationString = str.substring(argsEndIndex + 1);
+
+ if (locationString.indexOf('@') === 0) {
+ var parts = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(locationString, '');
+ var fileName = parts[1];
+ var lineNumber = parts[2];
+ var columnNumber = parts[3];
+ }
+
+ return new StackFrame({
+ functionName: functionName,
+ args: args || undefined,
+ fileName: fileName,
+ lineNumber: lineNumber || undefined,
+ columnNumber: columnNumber || undefined
+ });
+ };
+
+ for (var i = 0; i < booleanProps.length; i++) {
+ StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);
+ StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {
+ return function(v) {
+ this[p] = Boolean(v);
+ };
+ })(booleanProps[i]);
+ }
+
+ for (var j = 0; j < numericProps.length; j++) {
+ StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);
+ StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {
+ return function(v) {
+ if (!_isNumber(v)) {
+ throw new TypeError(p + ' must be a Number');
+ }
+ this[p] = Number(v);
+ };
+ })(numericProps[j]);
}
- }
- if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {
- polyfillJSON && polyfillJSON(RollbarJSON);
- }
-}
-/*
- * isType - Given a Javascript value and a string, returns true if the type of the value matches the
- * given string.
- *
- * @param x - any value
- * @param t - a lowercase string containing one of the following type names:
- * - undefined
- * - null
- * - error
- * - number
- * - boolean
- * - string
- * - symbol
- * - function
- * - object
- * - array
- * @returns true if x is of type t, otherwise false
- */
-function isType(x, t) {
- return t === typeName(x);
-}
+ for (var k = 0; k < stringProps.length; k++) {
+ StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);
+ StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {
+ return function(v) {
+ this[p] = String(v);
+ };
+ })(stringProps[k]);
+ }
-/*
- * typeName - Given a Javascript value, returns the type of the object as a string
- */
-function typeName(x) {
- var name = typeof x;
- if (name !== 'object') {
- return name;
- }
- if (!x) {
- return 'null';
- }
- if (x instanceof Error) {
- return 'error';
- }
- return ({}).toString.call(x).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
-}
+ return StackFrame;
+}));
-/* isFunction - a convenience function for checking if a value is a function
- *
- * @param f - any value
- * @returns true if f is a function, otherwise false
- */
-function isFunction(f) {
- 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');
-}
+/***/ 815:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-/* isString - Checks if the argument is a string
- *
- * @param value - any value
- * @returns true if value is a string
-*/
-function isString(value) {
- return typeof value === 'string' || value instanceof String
-}
+"use strict";
-/**
- * isFiniteNumber - determines whether the passed value is a finite number
- *
- * @param {*} n - any value
- * @returns true if value is a finite number
- */
- function isFiniteNumber(n) {
- return Number.isFinite(n);
-}
-/*
- * isDefined - a convenience function for checking if a value is not equal to undefined
- *
- * @param u - any value
- * @returns true if u is anything other than undefined
- */
-function isDefined(u) {
- return !isType(u, 'undefined');
-}
+var _ = __webpack_require__(702);
+var helpers = __webpack_require__(817);
-/*
- * isIterable - convenience function for checking if a value can be iterated, essentially
- * whether it is an object or an array.
+var defaultOptions = {
+ hostname: 'api.rollbar.com',
+ path: '/api/1/item/',
+ search: null,
+ version: '1',
+ protocol: 'https:',
+ port: 443,
+};
+
+/**
+ * Api is an object that encapsulates methods of communicating with
+ * the Rollbar API. It is a standard interface with some parts implemented
+ * differently for server or browser contexts. It is an object that should
+ * be instantiated when used so it can contain non-global options that may
+ * be different for another instance of RollbarApi.
*
- * @param i - any value
- * @returns true if i is an object or an array as determined by `typeName`
+ * @param options {
+ * accessToken: the accessToken to use for posting items to rollbar
+ * endpoint: an alternative endpoint to send errors to
+ * must be a valid, fully qualified URL.
+ * The default is: https://api.rollbar.com/api/1/item
+ * proxy: if you wish to proxy requests provide an object
+ * with the following keys:
+ * host or hostname (required): foo.example.com
+ * port (optional): 123
+ * protocol (optional): https
+ * }
*/
-function isIterable(i) {
- var type = typeName(i);
- return (type === 'object' || type === 'array');
+function Api(options, transport, urllib, truncation, jsonBackup) {
+ this.options = options;
+ this.transport = transport;
+ this.url = urllib;
+ this.truncation = truncation;
+ this.jsonBackup = jsonBackup;
+ this.accessToken = options.accessToken;
+ this.transportOptions = _getTransport(options, urllib);
}
-/*
- * isError - convenience function for checking if a value is of an error type
+/**
*
- * @param e - any value
- * @returns true if e is an error
+ * @param data
+ * @param callback
*/
-function isError(e) {
- // Detect both Error and Firefox Exception type
- return isType(e, 'error') || isType(e, 'exception');
-}
+Api.prototype.postItem = function (data, callback) {
+ var transportOptions = helpers.transportOptions(
+ this.transportOptions,
+ 'POST',
+ );
+ var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);
+ var self = this;
-/* isPromise - a convenience function for checking if a value is a promise
+ // ensure the network request is scheduled after the current tick.
+ setTimeout(function () {
+ self.transport.post(self.accessToken, transportOptions, payload, callback);
+ }, 0);
+};
+
+/**
*
- * @param p - any value
- * @returns true if f is a function, otherwise false
+ * @param data
+ * @param callback
*/
-function isPromise(p) {
- return isObject(p) && isType(p.then, 'function');
-}
+Api.prototype.buildJsonPayload = function (data, callback) {
+ var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);
-function redact() {
- return '********';
-}
+ var stringifyResult;
+ if (this.truncation) {
+ stringifyResult = this.truncation.truncate(payload);
+ } else {
+ stringifyResult = _.stringify(payload);
+ }
-// from http://stackoverflow.com/a/8809472/1138191
-function uuid4() {
- var d = now();
- var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
- var r = (d + Math.random() * 16) % 16 | 0;
- d = Math.floor(d / 16);
- return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);
- });
- return uuid;
-}
+ if (stringifyResult.error) {
+ if (callback) {
+ callback(stringifyResult.error);
+ }
+ return null;
+ }
-var LEVELS = {
- debug: 0,
- info: 1,
- warning: 2,
- error: 3,
- critical: 4
+ return stringifyResult.value;
};
-function sanitizeUrl(url) {
- var baseUrlParts = parseUri(url);
- if (!baseUrlParts) {
- return '(unknown)';
- }
+/**
+ *
+ * @param jsonPayload
+ * @param callback
+ */
+Api.prototype.postJsonPayload = function (jsonPayload, callback) {
+ var transportOptions = helpers.transportOptions(
+ this.transportOptions,
+ 'POST',
+ );
+ this.transport.postJsonPayload(
+ this.accessToken,
+ transportOptions,
+ jsonPayload,
+ callback,
+ );
+};
- // remove a trailing # if there is no anchor
- if (baseUrlParts.anchor === '') {
- baseUrlParts.source = baseUrlParts.source.replace('#', '');
+Api.prototype.configure = function (options) {
+ var oldOptions = this.oldOptions;
+ this.options = _.merge(oldOptions, options);
+ this.transportOptions = _getTransport(this.options, this.url);
+ if (this.options.accessToken !== undefined) {
+ this.accessToken = this.options.accessToken;
}
+ return this;
+};
- url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');
- return url;
+function _getTransport(options, url) {
+ return helpers.getTransportFromOptions(options, defaultOptions, url);
}
-var parseUriOptions = {
- strictMode: false,
- key: [
- 'source',
- 'protocol',
- 'authority',
- 'userInfo',
- 'user',
- 'password',
- 'host',
- 'port',
- 'relative',
- 'path',
- 'directory',
- 'file',
- 'query',
- 'anchor'
- ],
- q: {
- name: 'queryKey',
- parser: /(?:^|&)([^&=]*)=?([^&]*)/g
- },
- parser: {
- strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
- loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
- }
-};
-
-function parseUri(str) {
- if (!isType(str, 'string')) {
- return undefined;
- }
+module.exports = Api;
- var o = parseUriOptions;
- var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);
- var uri = {};
- for (var i = 0, l = o.key.length; i < l; ++i) {
- uri[o.key[i]] = m[i] || '';
- }
+/***/ }),
- uri[o.q.name] = {};
- uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
- if ($1) {
- uri[o.q.name][$1] = $2;
- }
- });
+/***/ 817:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- return uri;
-}
+"use strict";
-function addParamsAndAccessTokenToPath(accessToken, options, params) {
- params = params || {};
- params.access_token = accessToken;
- var paramsArray = [];
- var k;
- for (k in params) {
- if (Object.prototype.hasOwnProperty.call(params, k)) {
- paramsArray.push([k, params[k]].join('='));
- }
- }
- var query = '?' + paramsArray.sort().join('&');
- options = options || {};
- options.path = options.path || '';
- var qs = options.path.indexOf('?');
- var h = options.path.indexOf('#');
- var p;
- if (qs !== -1 && (h === -1 || h > qs)) {
- p = options.path;
- options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);
- } else {
- if (h !== -1) {
- p = options.path;
- options.path = p.substring(0,h) + query + p.substring(h);
+var _ = __webpack_require__(702);
+
+function buildPayload(accessToken, data, jsonBackup) {
+ if (!_.isType(data.context, 'string')) {
+ var contextResult = _.stringify(data.context, jsonBackup);
+ if (contextResult.error) {
+ data.context = "Error: could not serialize 'context'";
} else {
- options.path = options.path + query;
+ data.context = contextResult.value || '';
+ }
+ if (data.context.length > 255) {
+ data.context = data.context.substr(0, 255);
}
}
+ return {
+ access_token: accessToken,
+ data: data,
+ };
}
-function formatUrl(u, protocol) {
- protocol = protocol || u.protocol;
- if (!protocol && u.port) {
- if (u.port === 80) {
- protocol = 'http:';
- } else if (u.port === 443) {
- protocol = 'https:';
- }
- }
- protocol = protocol || 'https:';
+function getTransportFromOptions(options, defaults, url) {
+ var hostname = defaults.hostname;
+ var protocol = defaults.protocol;
+ var port = defaults.port;
+ var path = defaults.path;
+ var search = defaults.search;
+ var timeout = options.timeout;
+ var transport = detectTransport(options);
- if (!u.hostname) {
- return null;
+ var proxy = options.proxy;
+ if (options.endpoint) {
+ var opts = url.parse(options.endpoint);
+ hostname = opts.hostname;
+ protocol = opts.protocol;
+ port = opts.port;
+ path = opts.pathname;
+ search = opts.search;
}
- var result = protocol + '//' + u.hostname;
- if (u.port) {
- result = result + ':' + u.port;
+ return {
+ timeout: timeout,
+ hostname: hostname,
+ protocol: protocol,
+ port: port,
+ path: path,
+ search: search,
+ proxy: proxy,
+ transport: transport,
+ };
+}
+
+function detectTransport(options) {
+ var gWindow =
+ (typeof window != 'undefined' && window) ||
+ (typeof self != 'undefined' && self);
+ var transport = options.defaultTransport || 'xhr';
+ if (typeof gWindow.fetch === 'undefined') transport = 'xhr';
+ if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';
+ return transport;
+}
+
+function transportOptions(transport, method) {
+ var protocol = transport.protocol || 'https:';
+ var port =
+ transport.port ||
+ (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);
+ var hostname = transport.hostname;
+ var path = transport.path;
+ var timeout = transport.timeout;
+ var transportAPI = transport.transport;
+ if (transport.search) {
+ path = path + transport.search;
}
- if (u.path) {
- result = result + u.path;
+ if (transport.proxy) {
+ path = protocol + '//' + hostname + path;
+ hostname = transport.proxy.host || transport.proxy.hostname;
+ port = transport.proxy.port;
+ protocol = transport.proxy.protocol || protocol;
}
- return result;
+ return {
+ timeout: timeout,
+ protocol: protocol,
+ hostname: hostname,
+ path: path,
+ port: port,
+ method: method,
+ transport: transportAPI,
+ };
}
-function stringify(obj, backup) {
- var value, error;
- try {
- value = RollbarJSON.stringify(obj);
- } catch (jsonError) {
- if (backup && isFunction(backup)) {
- try {
- value = backup(obj);
- } catch (backupError) {
- error = backupError;
- }
- } else {
- error = jsonError;
- }
+function appendPathToPath(base, path) {
+ var baseTrailingSlash = /\/$/.test(base);
+ var pathBeginningSlash = /^\//.test(path);
+
+ if (baseTrailingSlash && pathBeginningSlash) {
+ path = path.substring(1);
+ } else if (!baseTrailingSlash && !pathBeginningSlash) {
+ path = '/' + path;
}
- return {error: error, value: value};
+
+ return base + path;
}
-function maxByteSize(string) {
- // The transport will use utf-8, so assume utf-8 encoding.
- //
- // This minimal implementation will accurately count bytes for all UCS-2 and
- // single code point UTF-16. If presented with multi code point UTF-16,
- // which should be rare, it will safely overcount, not undercount.
- //
- // While robust utf-8 encoders exist, this is far smaller and far more performant.
- // For quickly counting payload size for truncation, smaller is better.
+module.exports = {
+ buildPayload: buildPayload,
+ getTransportFromOptions: getTransportFromOptions,
+ transportOptions: transportOptions,
+ appendPathToPath: appendPathToPath,
+};
- var count = 0;
- var length = string.length;
- for (var i = 0; i < length; i++) {
- var code = string.charCodeAt(i);
- if (code < 128) { // up to 7 bits
- count = count + 1;
- } else if (code < 2048) { // up to 11 bits
- count = count + 2;
- } else if (code < 65536) { // up to 16 bits
- count = count + 3;
- }
- }
+/***/ }),
- return count;
-}
+/***/ 739:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-function jsonParse(s) {
- var value, error;
- try {
- value = RollbarJSON.parse(s);
- } catch (e) {
- error = e;
- }
- return {error: error, value: value};
-}
+"use strict";
-function makeUnhandledStackInfo(
- message,
- url,
- lineno,
- colno,
- error,
- mode,
- backupMessage,
- errorParser
-) {
- var location = {
- url: url || '',
- line: lineno,
- column: colno
- };
- location.func = errorParser.guessFunctionName(location.url, location.line);
- location.context = errorParser.gatherContext(location.url, location.line);
- var href = typeof document !== 'undefined' && document && document.location && document.location.href;
- var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;
- return {
- 'mode': mode,
- 'message': error ? String(error) : (message || backupMessage),
- 'url': href,
- 'stack': [location],
- 'useragent': useragent
- };
-}
-function wrapCallback(logger, f) {
- return function(err, resp) {
- try {
- f(err, resp);
- } catch (e) {
- logger.error(e);
- }
- };
+var rollbar = __webpack_require__(343);
+
+if ((typeof window !== 'undefined') && !window._rollbarStartTime) {
+ window._rollbarStartTime = (new Date()).getTime();
}
-function createItem(args, logger, notifier, requestKeys, lambdaContext) {
- var message, err, custom, callback, request;
- var arg;
- var extraArgs = [];
- var diagnostic = {};
- var argTypes = [];
+module.exports = rollbar;
- for (var i = 0, l = args.length; i < l; ++i) {
- arg = args[i];
- var typ = typeName(arg);
- argTypes.push(typ);
- switch (typ) {
- case 'undefined':
- break;
- case 'string':
- message ? extraArgs.push(arg) : message = arg;
- break;
- case 'function':
- callback = wrapCallback(logger, arg);
- break;
- case 'date':
- extraArgs.push(arg);
- break;
- case 'error':
- case 'domexception':
- case 'exception': // Firefox Exception type
- err ? extraArgs.push(arg) : err = arg;
- break;
- case 'object':
- case 'array':
- if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {
- err ? extraArgs.push(arg) : err = arg;
- break;
- }
- if (requestKeys && typ === 'object' && !request) {
- for (var j = 0, len = requestKeys.length; j < len; ++j) {
- if (arg[requestKeys[j]] !== undefined) {
- request = arg;
- break;
- }
- }
- if (request) {
- break;
- }
- }
- custom ? extraArgs.push(arg) : custom = arg;
- break;
- default:
- if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {
- err ? extraArgs.push(arg) : err = arg;
- break;
- }
- extraArgs.push(arg);
- }
- }
+/***/ }),
+
+/***/ 403:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+var Client = __webpack_require__(562);
+var _ = __webpack_require__(702);
+var API = __webpack_require__(815);
+var logger = __webpack_require__(802);
+var globals = __webpack_require__(349);
- if (extraArgs.length > 0) {
- // if custom is an array this turns it into an object with integer keys
- custom = merge(custom);
- custom.extraArgs = extraArgs;
- }
+var Transport = __webpack_require__(477);
+var urllib = __webpack_require__(509);
- var item = {
- message: message,
- err: err,
- custom: custom,
- timestamp: now(),
- callback: callback,
- notifier: notifier,
- diagnostic: diagnostic,
- uuid: uuid4()
- };
+var transforms = __webpack_require__(860);
+var sharedTransforms = __webpack_require__(417);
+var predicates = __webpack_require__(172);
+var sharedPredicates = __webpack_require__(61);
+var errorParser = __webpack_require__(303);
- setCustomItemKeys(item, custom);
+function Rollbar(options, client) {
+ this.options = _.handleOptions(defaultOptions, options, null, logger);
+ this.options._configuredOptions = options;
+ var Telemeter = this.components.telemeter;
+ var Instrumenter = this.components.instrumenter;
+ var polyfillJSON = this.components.polyfillJSON;
+ this.wrapGlobals = this.components.wrapGlobals;
+ this.scrub = this.components.scrub;
+ var truncation = this.components.truncation;
- if (requestKeys && request) {
- item.request = request;
+ var transport = new Transport(truncation);
+ var api = new API(this.options, transport, urllib, truncation);
+ if (Telemeter) {
+ this.telemeter = new Telemeter(this.options);
}
- if (lambdaContext) {
- item.lambdaContext = lambdaContext;
+ this.client =
+ client || new Client(this.options, api, logger, this.telemeter, 'browser');
+ var gWindow = _gWindow();
+ var gDocument = typeof document != 'undefined' && document;
+ this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers
+ this.anonymousErrorsPending = 0;
+ addTransformsToNotifier(this.client.notifier, this, gWindow);
+ addPredicatesToQueue(this.client.queue);
+ this.setupUnhandledCapture();
+ if (Instrumenter) {
+ this.instrumenter = new Instrumenter(
+ this.options,
+ this.client.telemeter,
+ this,
+ gWindow,
+ gDocument,
+ );
+ this.instrumenter.instrument();
}
- item._originalArgs = args;
- item.diagnostic.original_arg_types = argTypes;
- return item;
+ _.setupJSON(polyfillJSON);
+
+ // Used with rollbar-react for rollbar-react-native compatibility.
+ this.rollbar = this;
}
-function setCustomItemKeys(item, custom) {
- if (custom && custom.level !== undefined) {
- item.level = custom.level;
- delete custom.level;
- }
- if (custom && custom.skipFrames !== undefined) {
- item.skipFrames = custom.skipFrames;
- delete custom.skipFrames;
+var _instance = null;
+Rollbar.init = function (options, client) {
+ if (_instance) {
+ return _instance.global(options).configure(options);
}
-}
+ _instance = new Rollbar(options, client);
+ return _instance;
+};
-function addErrorContext(item, errors) {
- var custom = item.data.custom || {};
- var contextAdded = false;
+Rollbar.prototype.components = {};
- try {
- for (var i = 0; i < errors.length; ++i) {
- if (errors[i].hasOwnProperty('rollbarContext')) {
- custom = merge(custom, errors[i].rollbarContext);
- contextAdded = true;
- }
- }
+Rollbar.setComponents = function (components) {
+ Rollbar.prototype.components = components;
+};
- // Avoid adding an empty object to the data.
- if (contextAdded) {
- item.data.custom = custom;
- }
- } catch (e) {
- item.diagnostic.error_context = 'Failed: ' + e.message;
+function handleUninitialized(maybeCallback) {
+ var message = 'Rollbar is not initialized';
+ logger.error(message);
+ if (maybeCallback) {
+ maybeCallback(new Error(message));
}
}
-var TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];
-var TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];
-
-function arrayIncludes(arr, val) {
- for (var k = 0; k < arr.length; ++k) {
- if (arr[k] === val) {
- return true;
- }
+Rollbar.prototype.global = function (options) {
+ this.client.global(options);
+ return this;
+};
+Rollbar.global = function (options) {
+ if (_instance) {
+ return _instance.global(options);
+ } else {
+ handleUninitialized();
}
+};
- return false;
-}
-
-function createTelemetryEvent(args) {
- var type, metadata, level;
- var arg;
-
- for (var i = 0, l = args.length; i < l; ++i) {
- arg = args[i];
-
- var typ = typeName(arg);
- switch (typ) {
- case 'string':
- if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {
- type = arg;
- } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {
- level = arg;
- }
- break;
- case 'object':
- metadata = arg;
- break;
- default:
- break;
- }
+Rollbar.prototype.configure = function (options, payloadData) {
+ var oldOptions = this.options;
+ var payload = {};
+ if (payloadData) {
+ payload = { payload: payloadData };
}
- var event = {
- type: type || 'manual',
- metadata: metadata || {},
- level: level
- };
+ this.options = _.handleOptions(oldOptions, options, payload, logger);
+ this.options._configuredOptions = _.handleOptions(
+ oldOptions._configuredOptions,
+ options,
+ payload,
+ );
+ this.client.configure(this.options, payloadData);
+ this.instrumenter && this.instrumenter.configure(this.options);
+ this.setupUnhandledCapture();
+ return this;
+};
+Rollbar.configure = function (options, payloadData) {
+ if (_instance) {
+ return _instance.configure(options, payloadData);
+ } else {
+ handleUninitialized();
+ }
+};
- return event;
-}
+Rollbar.prototype.lastError = function () {
+ return this.client.lastError;
+};
+Rollbar.lastError = function () {
+ if (_instance) {
+ return _instance.lastError();
+ } else {
+ handleUninitialized();
+ }
+};
-/*
- * get - given an obj/array and a keypath, return the value at that keypath or
- * undefined if not possible.
- *
- * @param obj - an object or array
- * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'
- * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`
- */
-function get(obj, path) {
- if (!obj) {
- return undefined;
+Rollbar.prototype.log = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.log(item);
+ return { uuid: uuid };
+};
+Rollbar.log = function () {
+ if (_instance) {
+ return _instance.log.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
}
- var keys = path.split('.');
- var result = obj;
- try {
- for (var i = 0, len = keys.length; i < len; ++i) {
- result = result[keys[i]];
- }
- } catch (e) {
- result = undefined;
+};
+
+Rollbar.prototype.debug = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.debug(item);
+ return { uuid: uuid };
+};
+Rollbar.debug = function () {
+ if (_instance) {
+ return _instance.debug.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
}
- return result;
-}
+};
-function set(obj, path, value) {
- if (!obj) {
- return;
+Rollbar.prototype.info = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.info(item);
+ return { uuid: uuid };
+};
+Rollbar.info = function () {
+ if (_instance) {
+ return _instance.info.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
}
- var keys = path.split('.');
- var len = keys.length;
- if (len < 1) {
- return;
+};
+
+Rollbar.prototype.warn = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.warn(item);
+ return { uuid: uuid };
+};
+Rollbar.warn = function () {
+ if (_instance) {
+ return _instance.warn.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
}
- if (len === 1) {
- obj[keys[0]] = value;
- return;
+};
+
+Rollbar.prototype.warning = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.warning(item);
+ return { uuid: uuid };
+};
+Rollbar.warning = function () {
+ if (_instance) {
+ return _instance.warning.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
}
- try {
- var temp = obj[keys[0]] || {};
- var replacement = temp;
- for (var i = 1; i < len - 1; ++i) {
- temp[keys[i]] = temp[keys[i]] || {};
- temp = temp[keys[i]];
- }
- temp[keys[len-1]] = value;
- obj[keys[0]] = replacement;
- } catch (e) {
- return;
+};
+
+Rollbar.prototype.error = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.error(item);
+ return { uuid: uuid };
+};
+Rollbar.error = function () {
+ if (_instance) {
+ return _instance.error.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
}
-}
+};
-function formatArgsAsString(args) {
- var i, len, arg;
- var result = [];
- for (i = 0, len = args.length; i < len; ++i) {
- arg = args[i];
- switch (typeName(arg)) {
- case 'object':
- arg = stringify(arg);
- arg = arg.error || arg.value;
- if (arg.length > 500) {
- arg = arg.substr(0, 497) + '...';
- }
- break;
- case 'null':
- arg = 'null';
- break;
- case 'undefined':
- arg = 'undefined';
- break;
- case 'symbol':
- arg = arg.toString();
- break;
- }
- result.push(arg);
+Rollbar.prototype.critical = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.critical(item);
+ return { uuid: uuid };
+};
+Rollbar.critical = function () {
+ if (_instance) {
+ return _instance.critical.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
}
- return result.join(' ');
-}
+};
-function now() {
- if (Date.now) {
- return +Date.now();
+Rollbar.prototype.buildJsonPayload = function (item) {
+ return this.client.buildJsonPayload(item);
+};
+Rollbar.buildJsonPayload = function () {
+ if (_instance) {
+ return _instance.buildJsonPayload.apply(_instance, arguments);
+ } else {
+ handleUninitialized();
}
- return +new Date();
-}
+};
-function filterIp(requestData, captureIp) {
- if (!requestData || !requestData['user_ip'] || captureIp === true) {
- return;
- }
- var newIp = requestData['user_ip'];
- if (!captureIp) {
- newIp = null;
+Rollbar.prototype.sendJsonPayload = function (jsonPayload) {
+ return this.client.sendJsonPayload(jsonPayload);
+};
+Rollbar.sendJsonPayload = function () {
+ if (_instance) {
+ return _instance.sendJsonPayload.apply(_instance, arguments);
} else {
- try {
- var parts;
- if (newIp.indexOf('.') !== -1) {
- parts = newIp.split('.');
- parts.pop();
- parts.push('0');
- newIp = parts.join('.');
- } else if (newIp.indexOf(':') !== -1) {
- parts = newIp.split(':');
- if (parts.length > 2) {
- var beginning = parts.slice(0, 3);
- var slashIdx = beginning[2].indexOf('/');
- if (slashIdx !== -1) {
- beginning[2] = beginning[2].substring(0, slashIdx);
- }
- var terminal = '0000:0000:0000:0000:0000';
- newIp = beginning.concat(terminal).join(':');
- }
- } else {
- newIp = null;
+ handleUninitialized();
+ }
+};
+
+Rollbar.prototype.setupUnhandledCapture = function () {
+ var gWindow = _gWindow();
+
+ if (!this.unhandledExceptionsInitialized) {
+ if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {
+ globals.captureUncaughtExceptions(gWindow, this);
+ if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {
+ this.wrapGlobals(gWindow, this);
}
- } catch (e) {
- newIp = null;
+ this.unhandledExceptionsInitialized = true;
}
}
- requestData['user_ip'] = newIp;
-}
+ if (!this.unhandledRejectionsInitialized) {
+ if (
+ this.options.captureUnhandledRejections ||
+ this.options.handleUnhandledRejections
+ ) {
+ globals.captureUnhandledRejections(gWindow, this);
+ this.unhandledRejectionsInitialized = true;
+ }
+ }
+};
-function handleOptions(current, input, payload, logger) {
- var result = merge(current, input, payload);
- result = updateDeprecatedOptions(result, logger);
- if (!input || input.overwriteScrubFields) {
- return result;
+Rollbar.prototype.handleUncaughtException = function (
+ message,
+ url,
+ lineno,
+ colno,
+ error,
+ context,
+) {
+ if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {
+ return;
}
- if (input.scrubFields) {
- result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);
+
+ // Chrome will always send 5+ arguments and error will be valid or null, not undefined.
+ // If error is undefined, we have a different caller.
+ // Chrome also sends errors from web workers with null error, but does not invoke
+ // prepareStackTrace() for these. Test for empty url to skip them.
+ if (
+ this.options.inspectAnonymousErrors &&
+ this.isChrome &&
+ error === null &&
+ url === ''
+ ) {
+ return 'anonymous';
}
- return result;
-}
-function updateDeprecatedOptions(options, logger) {
- if(options.hostWhiteList && !options.hostSafeList) {
- options.hostSafeList = options.hostWhiteList;
- options.hostWhiteList = undefined;
- logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');
+ var item;
+ var stackInfo = _.makeUnhandledStackInfo(
+ message,
+ url,
+ lineno,
+ colno,
+ error,
+ 'onerror',
+ 'uncaught exception',
+ errorParser,
+ );
+ if (_.isError(error)) {
+ item = this._createItem([message, error, context]);
+ item._unhandledStackInfo = stackInfo;
+ } else if (_.isError(url)) {
+ item = this._createItem([message, url, context]);
+ item._unhandledStackInfo = stackInfo;
+ } else {
+ item = this._createItem([message, context]);
+ item.stackInfo = stackInfo;
}
- if(options.hostBlackList && !options.hostBlockList) {
- options.hostBlockList = options.hostBlackList;
- options.hostBlackList = undefined;
- logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');
+ item.level = this.options.uncaughtErrorLevel;
+ item._isUncaught = true;
+ this.client.log(item);
+};
+
+/**
+ * Chrome only. Other browsers will ignore.
+ *
+ * Use Error.prepareStackTrace to extract information about errors that
+ * do not have a valid error object in onerror().
+ *
+ * In tested version of Chrome, onerror is called first but has no way
+ * to communicate with prepareStackTrace. Use a counter to let this
+ * handler know which errors to send to Rollbar.
+ *
+ * In config options, set inspectAnonymousErrors to enable.
+ */
+Rollbar.prototype.handleAnonymousErrors = function () {
+ if (!this.options.inspectAnonymousErrors || !this.isChrome) {
+ return;
}
- return options;
-}
-module.exports = {
- addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,
- createItem: createItem,
- addErrorContext: addErrorContext,
- createTelemetryEvent: createTelemetryEvent,
- filterIp: filterIp,
- formatArgsAsString: formatArgsAsString,
- formatUrl: formatUrl,
- get: get,
- handleOptions: handleOptions,
- isError: isError,
- isFiniteNumber: isFiniteNumber,
- isFunction: isFunction,
- isIterable: isIterable,
- isNativeFunction: isNativeFunction,
- isObject: isObject,
- isString: isString,
- isType: isType,
- isPromise: isPromise,
- jsonParse: jsonParse,
- LEVELS: LEVELS,
- makeUnhandledStackInfo: makeUnhandledStackInfo,
- merge: merge,
- now: now,
- redact: redact,
- RollbarJSON: RollbarJSON,
- sanitizeUrl: sanitizeUrl,
- set: set,
- setupJSON: setupJSON,
- stringify: stringify,
- maxByteSize: maxByteSize,
- typeName: typeName,
- uuid4: uuid4
-};
+ var r = this;
+ function prepareStackTrace(error, _stack) {
+ // eslint-disable-line no-unused-vars
+ if (r.options.inspectAnonymousErrors) {
+ if (r.anonymousErrorsPending) {
+ // This is the only known way to detect that onerror saw an anonymous error.
+ // It depends on onerror reliably being called before Error.prepareStackTrace,
+ // which so far holds true on tested versions of Chrome. If versions of Chrome
+ // are tested that behave differently, this logic will need to be updated
+ // accordingly.
+ r.anonymousErrorsPending -= 1;
+ if (!error) {
+ // Not likely to get here, but calling handleUncaughtException from here
+ // without an error object would throw off the anonymousErrorsPending counter,
+ // so return now.
+ return;
+ }
-/***/ }),
-/* 1 */
-/***/ (function(module, exports, __webpack_require__) {
+ // Allow this to be tracked later.
+ error._isAnonymous = true;
-"use strict";
+ // url, lineno, colno shouldn't be needed for these errors.
+ // If that changes, update this accordingly, using the unused
+ // _stack param as needed (rather than parse error.toString()).
+ r.handleUncaughtException(error.message, null, null, null, error);
+ }
+ }
+ // Workaround to ensure stack is preserved for normal errors.
+ return error.stack;
+ }
-/* eslint-disable no-console */
-__webpack_require__(17);
-var detection = __webpack_require__(18);
-var _ = __webpack_require__(0);
+ // https://v8.dev/docs/stack-trace-api
+ try {
+ Error.prepareStackTrace = prepareStackTrace;
+ } catch (e) {
+ this.options.inspectAnonymousErrors = false;
+ this.error('anonymous error handler failed', e);
+ }
+};
-function error() {
- var args = Array.prototype.slice.call(arguments, 0);
- args.unshift('Rollbar:');
- if (detection.ieVersion() <= 8) {
- console.error(_.formatArgsAsString(args));
- } else {
- console.error.apply(console, args);
+Rollbar.prototype.handleUnhandledRejection = function (reason, promise) {
+ if (
+ !this.options.captureUnhandledRejections &&
+ !this.options.handleUnhandledRejections
+ ) {
+ return;
}
-}
-function info() {
- var args = Array.prototype.slice.call(arguments, 0);
- args.unshift('Rollbar:');
- if (detection.ieVersion() <= 8) {
- console.info(_.formatArgsAsString(args));
- } else {
- console.info.apply(console, args);
+ var message = 'unhandled rejection was null or undefined!';
+ if (reason) {
+ if (reason.message) {
+ message = reason.message;
+ } else {
+ var reasonResult = _.stringify(reason);
+ if (reasonResult.value) {
+ message = reasonResult.value;
+ }
+ }
}
-}
+ var context =
+ (reason && reason._rollbarContext) || (promise && promise._rollbarContext);
-function log() {
- var args = Array.prototype.slice.call(arguments, 0);
- args.unshift('Rollbar:');
- if (detection.ieVersion() <= 8) {
- console.log(_.formatArgsAsString(args));
+ var item;
+ if (_.isError(reason)) {
+ item = this._createItem([message, reason, context]);
} else {
- console.log.apply(console, args);
+ item = this._createItem([message, reason, context]);
+ item.stackInfo = _.makeUnhandledStackInfo(
+ message,
+ '',
+ 0,
+ 0,
+ null,
+ 'unhandledrejection',
+ '',
+ errorParser,
+ );
}
-}
-
-/* eslint-enable no-console */
-
-module.exports = {
- error: error,
- info: info,
- log: log
+ item.level = this.options.uncaughtErrorLevel;
+ item._isUncaught = true;
+ item._originalArgs = item._originalArgs || [];
+ item._originalArgs.push(promise);
+ this.client.log(item);
};
+Rollbar.prototype.wrap = function (f, context, _before) {
+ try {
+ var ctxFn;
+ if (_.isFunction(context)) {
+ ctxFn = context;
+ } else {
+ ctxFn = function () {
+ return context || {};
+ };
+ }
-/***/ }),
-/* 2 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (!_.isFunction(f)) {
+ return f;
+ }
-"use strict";
+ if (f._isWrap) {
+ return f;
+ }
+ if (!f._rollbar_wrapped) {
+ f._rollbar_wrapped = function () {
+ if (_before && _.isFunction(_before)) {
+ _before.apply(this, arguments);
+ }
+ try {
+ return f.apply(this, arguments);
+ } catch (exc) {
+ var e = exc;
+ if (e && window._rollbarWrappedError !== e) {
+ if (_.isType(e, 'string')) {
+ e = new String(e);
+ }
+ e._rollbarContext = ctxFn() || {};
+ e._rollbarContext._wrappedSource = f.toString();
-// See https://nodejs.org/docs/latest/api/url.html
-function parse(url) {
- var result = {
- protocol: null, auth: null, host: null, path: null,
- hash: null, href: url, hostname: null, port: null,
- pathname: null, search: null, query: null
- };
+ window._rollbarWrappedError = e;
+ }
+ throw e;
+ }
+ };
- var i, last;
- i = url.indexOf('//');
- if (i !== -1) {
- result.protocol = url.substring(0,i);
- last = i+2;
- } else {
- last = 0;
- }
-
- i = url.indexOf('@', last);
- if (i !== -1) {
- result.auth = url.substring(last, i);
- last = i+1;
- }
+ f._rollbar_wrapped._isWrap = true;
- i = url.indexOf('/', last);
- if (i === -1) {
- i = url.indexOf('?', last);
- if (i === -1) {
- i = url.indexOf('#', last);
- if (i === -1) {
- result.host = url.substring(last);
- } else {
- result.host = url.substring(last, i);
- result.hash = url.substring(i);
- }
- result.hostname = result.host.split(':')[0];
- result.port = result.host.split(':')[1];
- if (result.port) {
- result.port = parseInt(result.port, 10);
- }
- return result;
- } else {
- result.host = url.substring(last, i);
- result.hostname = result.host.split(':')[0];
- result.port = result.host.split(':')[1];
- if (result.port) {
- result.port = parseInt(result.port, 10);
+ if (f.hasOwnProperty) {
+ for (var prop in f) {
+ if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {
+ f._rollbar_wrapped[prop] = f[prop];
+ }
+ }
}
- last = i;
}
+
+ return f._rollbar_wrapped;
+ } catch (e) {
+ // Return the original function if the wrap fails.
+ return f;
+ }
+};
+Rollbar.wrap = function (f, context) {
+ if (_instance) {
+ return _instance.wrap(f, context);
} else {
- result.host = url.substring(last, i);
- result.hostname = result.host.split(':')[0];
- result.port = result.host.split(':')[1];
- if (result.port) {
- result.port = parseInt(result.port, 10);
- }
- last = i;
+ handleUninitialized();
}
+};
- i = url.indexOf('#', last);
- if (i === -1) {
- result.path = url.substring(last);
+Rollbar.prototype.captureEvent = function () {
+ var event = _.createTelemetryEvent(arguments);
+ return this.client.captureEvent(event.type, event.metadata, event.level);
+};
+Rollbar.captureEvent = function () {
+ if (_instance) {
+ return _instance.captureEvent.apply(_instance, arguments);
} else {
- result.path = url.substring(last, i);
- result.hash = url.substring(i);
+ handleUninitialized();
}
+};
- if (result.path) {
- var pathParts = result.path.split('?');
- result.pathname = pathParts[0];
- result.query = pathParts[1];
- result.search = result.query ? '?' + result.query : null;
+// The following two methods are used internally and are not meant for public use
+Rollbar.prototype.captureDomContentLoaded = function (e, ts) {
+ if (!ts) {
+ ts = new Date();
}
- return result;
-}
-
-module.exports = {
- parse: parse
+ return this.client.captureDomContentLoaded(ts);
};
+Rollbar.prototype.captureLoad = function (e, ts) {
+ if (!ts) {
+ ts = new Date();
+ }
+ return this.client.captureLoad(ts);
+};
-/***/ }),
-/* 3 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var ErrorStackParser = __webpack_require__(22);
-
-var UNKNOWN_FUNCTION = '?';
-var ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');
+/* Internal */
-function guessFunctionName() {
- return UNKNOWN_FUNCTION;
+function addTransformsToNotifier(notifier, rollbar, gWindow) {
+ notifier
+ .addTransform(transforms.handleDomException)
+ .addTransform(transforms.handleItemWithError)
+ .addTransform(transforms.ensureItemHasSomethingToSay)
+ .addTransform(transforms.addBaseInfo)
+ .addTransform(transforms.addRequestInfo(gWindow))
+ .addTransform(transforms.addClientInfo(gWindow))
+ .addTransform(transforms.addPluginInfo(gWindow))
+ .addTransform(transforms.addBody)
+ .addTransform(sharedTransforms.addMessageWithError)
+ .addTransform(sharedTransforms.addTelemetryData)
+ .addTransform(sharedTransforms.addConfigToPayload)
+ .addTransform(transforms.addScrubber(rollbar.scrub))
+ .addTransform(sharedTransforms.addPayloadOptions)
+ .addTransform(sharedTransforms.userTransform(logger))
+ .addTransform(sharedTransforms.addConfiguredOptions)
+ .addTransform(sharedTransforms.addDiagnosticKeys)
+ .addTransform(sharedTransforms.itemToPayload);
}
-
-function gatherContext() {
- return null;
+function addPredicatesToQueue(queue) {
+ queue
+ .addPredicate(sharedPredicates.checkLevel)
+ .addPredicate(predicates.checkIgnore)
+ .addPredicate(sharedPredicates.userCheckIgnore(logger))
+ .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))
+ .addPredicate(sharedPredicates.urlIsSafeListed(logger))
+ .addPredicate(sharedPredicates.messageIsIgnored(logger));
}
+Rollbar.prototype.loadFull = function () {
+ logger.info(
+ 'Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.',
+ );
+};
-function Frame(stackFrame) {
- var data = {};
-
- data._stackFrame = stackFrame;
-
- data.url = stackFrame.fileName;
- data.line = stackFrame.lineNumber;
- data.func = stackFrame.functionName;
- data.column = stackFrame.columnNumber;
- data.args = stackFrame.args;
+Rollbar.prototype._createItem = function (args) {
+ return _.createItem(args, logger, this);
+};
- data.context = gatherContext();
+function _getFirstFunction(args) {
+ for (var i = 0, len = args.length; i < len; ++i) {
+ if (_.isFunction(args[i])) {
+ return args[i];
+ }
+ }
+ return undefined;
+}
- return data;
+function _gWindow() {
+ return (
+ (typeof window != 'undefined' && window) ||
+ (typeof self != 'undefined' && self)
+ );
}
+var defaults = __webpack_require__(948);
+var scrubFields = __webpack_require__(677);
-function Stack(exception, skip) {
- function getStack() {
- var parserStack = [];
+var defaultOptions = {
+ version: defaults.version,
+ scrubFields: scrubFields.scrubFields,
+ logLevel: defaults.logLevel,
+ reportLevel: defaults.reportLevel,
+ uncaughtErrorLevel: defaults.uncaughtErrorLevel,
+ endpoint: defaults.endpoint,
+ verbose: false,
+ enabled: true,
+ transmit: true,
+ sendConfig: false,
+ includeItemsInTelemetry: true,
+ captureIp: true,
+ inspectAnonymousErrors: true,
+ ignoreDuplicateErrors: true,
+ wrapGlobalEventHandlers: false,
+};
- skip = skip || 0;
+module.exports = Rollbar;
- try {
- parserStack = ErrorStackParser.parse(exception);
- } catch(e) {
- parserStack = [];
- }
- var stack = [];
+/***/ }),
- for (var i = skip; i < parserStack.length; i++) {
- stack.push(new Frame(parserStack[i]));
- }
+/***/ 677:
+/***/ ((module) => {
- return stack;
- }
+"use strict";
- return {
- stack: getStack(),
- message: exception.message,
- name: _mostSpecificErrorName(exception),
- rawStack: exception.stack,
- rawException: exception
- };
-}
+module.exports = {
+ scrubFields: [
+ 'pw',
+ 'pass',
+ 'passwd',
+ 'password',
+ 'secret',
+ 'confirm_password',
+ 'confirmPassword',
+ 'password_confirmation',
+ 'passwordConfirmation',
+ 'access_token',
+ 'accessToken',
+ 'X-Rollbar-Access-Token',
+ 'secret_key',
+ 'secretKey',
+ 'secretToken',
+ 'cc-number',
+ 'card number',
+ 'cardnumber',
+ 'cardnum',
+ 'ccnum',
+ 'ccnumber',
+ 'cc num',
+ 'creditcardnumber',
+ 'credit card number',
+ 'newcreditcardnumber',
+ 'new credit card',
+ 'creditcardno',
+ 'credit card no',
+ 'card#',
+ 'card #',
+ 'cc-csc',
+ 'cvc',
+ 'cvc2',
+ 'cvv2',
+ 'ccv2',
+ 'security code',
+ 'card verification',
+ 'name on credit card',
+ 'name on card',
+ 'nameoncard',
+ 'cardholder',
+ 'card holder',
+ 'name des karteninhabers',
+ 'ccname',
+ 'card type',
+ 'cardtype',
+ 'cc type',
+ 'cctype',
+ 'payment type',
+ 'expiration date',
+ 'expirationdate',
+ 'expdate',
+ 'cc-exp',
+ 'ccmonth',
+ 'ccyear',
+ ],
+};
-function parse(e, skip) {
- var err = e;
- if (err.nested) {
- var traceChain = [];
- while (err) {
- traceChain.push(new Stack(err, skip));
- err = err.nested;
+/***/ }),
- skip = 0; // Only apply skip value to primary error
- }
+/***/ 616:
+/***/ ((module) => {
- // Return primary error with full trace chain attached.
- traceChain[0].traceChain = traceChain;
- return traceChain[0];
- } else {
- return new Stack(err, skip);
- }
-}
+"use strict";
-function guessErrorClass(errMsg) {
- if (!errMsg || !errMsg.match) {
- return ['Unknown error. There was no error message to display.', ''];
- }
- var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);
- var errClass = '(unknown)';
+// This detection.js module is used to encapsulate any ugly browser/feature
+// detection we may need to do.
- if (errClassMatch) {
- errClass = errClassMatch[errClassMatch.length - 1];
- errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');
- errMsg = errMsg.replace(/(^[\s]+|[\s]+$)/g, '');
+// Figure out which version of IE we're using, if any.
+// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library
+// Will return an integer on IE (i.e. 8)
+// Will return undefined otherwise
+function getIEVersion() {
+ var undef;
+ if (typeof document === 'undefined') {
+ return undef;
}
- return [errClass, errMsg];
-}
-// * Prefers any value over an empty string
-// * Prefers any value over 'Error' where possible
-// * Prefers name over constructor.name when both are more specific than 'Error'
-function _mostSpecificErrorName(error) {
- var name = error.name && error.name.length && error.name;
- var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;
+ var v = 3,
+ div = document.createElement('div'),
+ all = div.getElementsByTagName('i');
- if (!name || !constructorName) {
- return name || constructorName;
- }
+ while (
+ ((div.innerHTML = ''), all[0])
+ );
- if (name === 'Error') {
- return constructorName;
- }
- return name;
+ return v > 4 ? v : undef;
}
-module.exports = {
- guessFunctionName: guessFunctionName,
- guessErrorClass: guessErrorClass,
- gatherContext: gatherContext,
- parse: parse,
- Stack: Stack,
- Frame: Frame
+var Detection = {
+ ieVersion: getIEVersion,
};
+module.exports = Detection;
+
/***/ }),
-/* 4 */
-/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+/***/ 300:
+/***/ ((module) => {
+"use strict";
-var _ = __webpack_require__(0);
-var traverse = __webpack_require__(5);
-function scrub(data, scrubFields, scrubPaths) {
- scrubFields = scrubFields || [];
+function getElementType(e) {
+ return (e.getAttribute('type') || '').toLowerCase();
+}
- if (scrubPaths) {
- for (var i = 0; i < scrubPaths.length; ++i) {
- scrubPath(data, scrubPaths[i]);
+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;
+}
- var paramRes = _getScrubFieldRegexs(scrubFields);
- var queryRes = _getScrubQueryParamRegexs(scrubFields);
-
- function redactQueryParam(dummy0, paramPart) {
- return paramPart + _.redact();
+function getElementFromEvent(evt, doc) {
+ if (evt.target) {
+ return evt.target;
}
-
- function paramScrubber(v) {
- var i;
- if (_.isType(v, 'string')) {
- for (i = 0; i < queryRes.length; ++i) {
- v = v.replace(queryRes[i], redactQueryParam);
- }
- }
- return v;
+ if (doc && doc.elementFromPoint) {
+ return doc.elementFromPoint(evt.clientX, evt.clientY);
}
+ return undefined;
+}
- function valScrubber(k, v) {
- var i;
- for (i = 0; i < paramRes.length; ++i) {
- if (paramRes[i].test(k)) {
- v = _.redact();
- break;
- }
+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;
}
- return v;
+ out.unshift(nextDescription);
+ elem = elem.parentNode;
}
+ return out;
+}
- function scrubber(k, v, seen) {
- var tmpV = valScrubber(k, v);
- if (tmpV === v) {
- if (_.isType(v, 'object') || _.isType(v, 'array')) {
- return traverse(v, scrubber, seen);
- }
- return paramScrubber(tmpV);
- } else {
- return tmpV;
+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 traverse(data, scrubber);
+ return out.join(separator);
}
-function scrubPath(obj, path) {
- var keys = path.split('.');
- var last = keys.length - 1;
- try {
- for (var i = 0; i <= last; ++i) {
- if (i < last) {
- obj = obj[keys[i]];
- } else {
- obj[keys[i]] = _.redact();
- }
- }
- } catch (e) {
- // Missing key is OK;
+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('.'));
}
-}
-
-function _getScrubFieldRegexs(scrubFields) {
- var ret = [];
- var pat;
- for (var i = 0; i < scrubFields.length; ++i) {
- pat = '^\\[?(%5[bB])?' + scrubFields[i] + '\\[?(%5[bB])?\\]?(%5[dD])?$';
- ret.push(new RegExp(pat, 'i'));
+ for (var i = 0; i < desc.attributes.length; i++) {
+ out.push(
+ '[' + desc.attributes[i].key + '="' + desc.attributes[i].value + '"]',
+ );
}
- return ret;
-}
+ return out.join('');
+}
-function _getScrubQueryParamRegexs(scrubFields) {
- var ret = [];
- var pat;
- for (var i = 0; i < scrubFields.length; ++i) {
- pat = '\\[?(%5[bB])?' + scrubFields[i] + '\\[?(%5[bB])?\\]?(%5[dD])?';
- ret.push(new RegExp('(' + pat + '=)([^&\\n]+)', 'igm'));
+/**
+ * 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;
}
- return ret;
+ 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 = scrub;
+module.exports = {
+ describeElement: describeElement,
+ descriptionToString: descriptionToString,
+ elementArrayToString: elementArrayToString,
+ treeToArray: treeToArray,
+ getElementFromEvent: getElementFromEvent,
+ isDescribedElement: isDescribedElement,
+ getElementType: getElementType,
+};
/***/ }),
-/* 5 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-var _ = __webpack_require__(0);
+/***/ 349:
+/***/ ((module) => {
-function traverse(obj, func, seen) {
- var k, v, i;
- var isObj = _.isType(obj, 'object');
- var isArray = _.isType(obj, 'array');
- var keys = [];
- var seenIndex;
+"use strict";
- // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.
- seen = seen || { obj: [], mapped: []};
- if (isObj) {
- seenIndex = seen.obj.indexOf(obj);
+function captureUncaughtExceptions(window, handler, shim) {
+ if (!window) {
+ return;
+ }
+ var oldOnError;
- if (isObj && seenIndex !== -1) {
- // Prefer the mapped object if there is one.
- return seen.mapped[seenIndex] || seen.obj[seenIndex];
+ if (typeof handler._rollbarOldOnError === 'function') {
+ oldOnError = handler._rollbarOldOnError;
+ } else if (window.onerror) {
+ oldOnError = window.onerror;
+ while (oldOnError._rollbarOldOnError) {
+ oldOnError = oldOnError._rollbarOldOnError;
}
+ handler._rollbarOldOnError = oldOnError;
+ }
- seen.obj.push(obj);
- seenIndex = seen.obj.length - 1;
+ handler.handleAnonymousErrors();
+
+ var fn = function () {
+ var args = Array.prototype.slice.call(arguments, 0);
+ _rollbarWindowOnError(window, handler, oldOnError, args);
+ };
+ if (shim) {
+ fn._rollbarOldOnError = oldOnError;
}
+ window.onerror = fn;
+}
- if (isObj) {
- for (k in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, k)) {
- keys.push(k);
- }
+function _rollbarWindowOnError(window, r, old, args) {
+ if (window._rollbarWrappedError) {
+ if (!args[4]) {
+ args[4] = window._rollbarWrappedError;
}
- } else if (isArray) {
- for (i = 0; i < obj.length; ++i) {
- keys.push(i);
+ if (!args[5]) {
+ args[5] = window._rollbarWrappedError._rollbarContext;
}
+ window._rollbarWrappedError = null;
}
- var result = isObj ? {} : [];
- var same = true;
- for (i = 0; i < keys.length; ++i) {
- k = keys[i];
- v = obj[k];
- result[k] = func(k, v, seen);
- same = same && result[k] === obj[k];
- }
+ var ret = r.handleUncaughtException.apply(r, args);
- if (isObj && !same) {
- seen.mapped[seenIndex] = result;
+ if (old) {
+ old.apply(window, args);
}
- return !same ? result : obj;
+ // Let other chained onerror handlers above run before setting this.
+ // If an error is thrown and caught within a chained onerror handler,
+ // Error.prepareStackTrace() will see that one before the one we want.
+ if (ret === 'anonymous') {
+ r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()
+ }
}
-module.exports = traverse;
-
-
-/***/ }),
-/* 6 */
-/***/ (function(module, exports, __webpack_require__) {
-
-module.exports = __webpack_require__(7);
-
-
-/***/ }),
-/* 7 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
+function captureUnhandledRejections(window, handler, shim) {
+ if (!window) {
+ return;
+ }
+ if (
+ typeof window._rollbarURH === 'function' &&
+ window._rollbarURH.belongsToShim
+ ) {
+ window.removeEventListener('unhandledrejection', window._rollbarURH);
+ }
-var rollbar = __webpack_require__(8);
+ var rejectionHandler = function (evt) {
+ var reason, promise, detail;
+ try {
+ reason = evt.reason;
+ } catch (e) {
+ reason = undefined;
+ }
+ try {
+ promise = evt.promise;
+ } catch (e) {
+ promise = '[unhandledrejection] error getting `promise` from event';
+ }
+ try {
+ detail = evt.detail;
+ if (!reason && detail) {
+ reason = detail.reason;
+ promise = detail.promise;
+ }
+ } catch (e) {
+ // Ignore
+ }
+ if (!reason) {
+ reason = '[unhandledrejection] error getting `reason` from event';
+ }
-if ((typeof window !== 'undefined') && !window._rollbarStartTime) {
- window._rollbarStartTime = (new Date()).getTime();
+ if (handler && handler.handleUnhandledRejection) {
+ handler.handleUnhandledRejection(reason, promise);
+ }
+ };
+ rejectionHandler.belongsToShim = shim;
+ window._rollbarURH = rejectionHandler;
+ window.addEventListener('unhandledrejection', rejectionHandler);
}
-module.exports = rollbar;
+module.exports = {
+ captureUncaughtExceptions: captureUncaughtExceptions,
+ captureUnhandledRejections: captureUnhandledRejections,
+};
/***/ }),
-/* 8 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var Rollbar = __webpack_require__(9);
-var telemeter = __webpack_require__(29);
-var instrumenter = __webpack_require__(30);
-var polyfillJSON = __webpack_require__(32);
-var wrapGlobals = __webpack_require__(34);
-var scrub = __webpack_require__(4);
-var truncation = __webpack_require__(35);
-
-Rollbar.setComponents({
- telemeter: telemeter,
- instrumenter: instrumenter,
- polyfillJSON: polyfillJSON,
- wrapGlobals: wrapGlobals,
- scrub: scrub,
- truncation: truncation
-});
-
-module.exports = Rollbar;
-
-/***/ }),
-/* 9 */
-/***/ (function(module, exports, __webpack_require__) {
+/***/ 802:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var Client = __webpack_require__(10);
-var _ = __webpack_require__(0);
-var API = __webpack_require__(15);
-var logger = __webpack_require__(1);
-var globals = __webpack_require__(19);
-
-var Transport = __webpack_require__(20);
-var urllib = __webpack_require__(2);
-
-var transforms = __webpack_require__(21);
-var sharedTransforms = __webpack_require__(24);
-var predicates = __webpack_require__(25);
-var sharedPredicates = __webpack_require__(26);
-var errorParser = __webpack_require__(3);
+/* eslint-disable no-console */
+__webpack_require__(276);
+var detection = __webpack_require__(616);
+var _ = __webpack_require__(702);
-function Rollbar(options, client) {
- this.options = _.handleOptions(defaultOptions, options, null, logger);
- this.options._configuredOptions = options;
- var Telemeter = this.components.telemeter;
- var Instrumenter = this.components.instrumenter;
- var polyfillJSON = this.components.polyfillJSON;
- this.wrapGlobals = this.components.wrapGlobals;
- this.scrub = this.components.scrub;
- var truncation = this.components.truncation;
+function error() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ args.unshift('Rollbar:');
+ if (detection.ieVersion() <= 8) {
+ console.error(_.formatArgsAsString(args));
+ } else {
+ console.error.apply(console, args);
+ }
+}
- var transport = new Transport(truncation);
- var api = new API(this.options, transport, urllib, truncation);
- if (Telemeter) {
- this.telemeter = new Telemeter(this.options);
+function info() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ args.unshift('Rollbar:');
+ if (detection.ieVersion() <= 8) {
+ console.info(_.formatArgsAsString(args));
+ } else {
+ console.info.apply(console, args);
}
- this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');
- var gWindow = _gWindow();
- var gDocument = (typeof document != 'undefined') && document;
- this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers
- this.anonymousErrorsPending = 0;
- addTransformsToNotifier(this.client.notifier, this, gWindow);
- addPredicatesToQueue(this.client.queue);
- this.setupUnhandledCapture();
- if (Instrumenter) {
- this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);
- this.instrumenter.instrument();
+}
+
+function log() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ args.unshift('Rollbar:');
+ if (detection.ieVersion() <= 8) {
+ console.log(_.formatArgsAsString(args));
+ } else {
+ console.log.apply(console, args);
}
- _.setupJSON(polyfillJSON);
}
-var _instance = null;
-Rollbar.init = function(options, client) {
- if (_instance) {
- return _instance.global(options).configure(options);
- }
- _instance = new Rollbar(options, client);
- return _instance;
+/* eslint-enable no-console */
+
+module.exports = {
+ error: error,
+ info: info,
+ log: log,
};
-Rollbar.prototype.components = {};
-Rollbar.setComponents = function(components) {
- Rollbar.prototype.components = components;
-}
+/***/ }),
-function handleUninitialized(maybeCallback) {
- var message = 'Rollbar is not initialized';
- logger.error(message);
- if (maybeCallback) {
- maybeCallback(new Error(message));
+/***/ 172:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+var _ = __webpack_require__(702);
+
+function checkIgnore(item, settings) {
+ if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {
+ return !_.get(item, 'body.message.extra.isAjax');
}
+ return true;
}
-Rollbar.prototype.global = function(options) {
- this.client.global(options);
- return this;
-};
-Rollbar.global = function(options) {
- if (_instance) {
- return _instance.global(options);
- } else {
- handleUninitialized();
- }
+module.exports = {
+ checkIgnore: checkIgnore,
};
-Rollbar.prototype.configure = function(options, payloadData) {
- var oldOptions = this.options;
- var payload = {};
- if (payloadData) {
- payload = {payload: payloadData};
- }
- this.options = _.handleOptions(oldOptions, options, payload, logger);
- this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);
- this.client.configure(this.options, payloadData);
- this.instrumenter && this.instrumenter.configure(this.options);
- this.setupUnhandledCapture();
- return this;
-};
-Rollbar.configure = function(options, payloadData) {
- if (_instance) {
- return _instance.configure(options, payloadData);
- } else {
- handleUninitialized();
- }
-};
-Rollbar.prototype.lastError = function() {
- return this.client.lastError;
-};
-Rollbar.lastError = function() {
- if (_instance) {
- return _instance.lastError();
- } else {
- handleUninitialized();
- }
-};
+/***/ }),
-Rollbar.prototype.log = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.log(item);
- return {uuid: uuid};
-};
-Rollbar.log = function() {
- if (_instance) {
- return _instance.log.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
- }
-};
+/***/ 343:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-Rollbar.prototype.debug = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.debug(item);
- return {uuid: uuid};
-};
-Rollbar.debug = function() {
- if (_instance) {
- return _instance.debug.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
- }
-};
+"use strict";
-Rollbar.prototype.info = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.info(item);
- return {uuid: uuid};
-};
-Rollbar.info = function() {
- if (_instance) {
- return _instance.info.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
- }
-};
-Rollbar.prototype.warn = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.warn(item);
- return {uuid: uuid};
-};
-Rollbar.warn = function() {
- if (_instance) {
- return _instance.warn.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
- }
-};
+var Rollbar = __webpack_require__(403);
+var telemeter = __webpack_require__(773);
+var instrumenter = __webpack_require__(568);
+var polyfillJSON = __webpack_require__(876);
+var wrapGlobals = __webpack_require__(965);
+var scrub = __webpack_require__(369);
+var truncation = __webpack_require__(473);
-Rollbar.prototype.warning = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.warning(item);
- return {uuid: uuid};
-};
-Rollbar.warning = function() {
- if (_instance) {
- return _instance.warning.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
- }
-};
+Rollbar.setComponents({
+ telemeter: telemeter,
+ instrumenter: instrumenter,
+ polyfillJSON: polyfillJSON,
+ wrapGlobals: wrapGlobals,
+ scrub: scrub,
+ truncation: truncation,
+});
-Rollbar.prototype.error = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.error(item);
- return {uuid: uuid};
+module.exports = Rollbar;
+
+
+/***/ }),
+
+/***/ 568:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+var _ = __webpack_require__(702);
+var headers = __webpack_require__(650);
+var replace = __webpack_require__(297);
+var scrub = __webpack_require__(369);
+var urlparser = __webpack_require__(509);
+var domUtil = __webpack_require__(300);
+
+var defaults = {
+ network: true,
+ networkResponseHeaders: false,
+ networkResponseBody: false,
+ networkRequestHeaders: false,
+ networkRequestBody: false,
+ networkErrorOnHttp5xx: false,
+ networkErrorOnHttp4xx: false,
+ networkErrorOnHttp0: false,
+ log: true,
+ dom: true,
+ navigation: true,
+ connectivity: true,
+ contentSecurityPolicy: true,
+ errorOnContentSecurityPolicy: false,
};
-Rollbar.error = function() {
- if (_instance) {
- return _instance.error.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
+
+function restore(replacements, type) {
+ var b;
+ while (replacements[type].length) {
+ b = replacements[type].shift();
+ b[0][b[1]] = b[2];
}
-};
+}
-Rollbar.prototype.critical = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.critical(item);
- return {uuid: uuid};
-};
-Rollbar.critical = function() {
- if (_instance) {
- return _instance.critical.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
+function nameFromDescription(description) {
+ if (!description || !description.attributes) {
+ return null;
}
-};
+ var attrs = description.attributes;
+ for (var a = 0; a < attrs.length; ++a) {
+ if (attrs[a].key === 'name') {
+ return attrs[a].value;
+ }
+ }
+ return null;
+}
-Rollbar.prototype.buildJsonPayload = function(item) {
- return this.client.buildJsonPayload(item);
-};
-Rollbar.buildJsonPayload = function() {
- if (_instance) {
- return _instance.buildJsonPayload.apply(_instance, arguments);
- } else {
- handleUninitialized();
+function defaultValueScrubber(scrubFields) {
+ var patterns = [];
+ for (var i = 0; i < scrubFields.length; ++i) {
+ patterns.push(new RegExp(scrubFields[i], 'i'));
}
-};
+ return function (description) {
+ var name = nameFromDescription(description);
+ if (!name) {
+ return false;
+ }
+ for (var i = 0; i < patterns.length; ++i) {
+ if (patterns[i].test(name)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
-Rollbar.prototype.sendJsonPayload = function(jsonPayload) {
- return this.client.sendJsonPayload(jsonPayload);
-};
-Rollbar.sendJsonPayload = function() {
- if (_instance) {
- return _instance.sendJsonPayload.apply(_instance, arguments);
+function Instrumenter(options, telemeter, rollbar, _window, _document) {
+ this.options = options;
+ var autoInstrument = options.autoInstrument;
+ if (options.enabled === false || autoInstrument === false) {
+ this.autoInstrument = {};
} else {
- handleUninitialized();
+ if (!_.isType(autoInstrument, 'object')) {
+ autoInstrument = defaults;
+ }
+ this.autoInstrument = _.merge(defaults, autoInstrument);
}
-};
-
-Rollbar.prototype.setupUnhandledCapture = function() {
- var gWindow = _gWindow();
-
- if (!this.unhandledExceptionsInitialized) {
- if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {
- globals.captureUncaughtExceptions(gWindow, this);
- if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {
- this.wrapGlobals(gWindow, this);
- }
- this.unhandledExceptionsInitialized = true;
+ this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;
+ this.telemetryScrubber = options.telemetryScrubber;
+ this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);
+ this.telemeter = telemeter;
+ this.rollbar = rollbar;
+ this.diagnostic = rollbar.client.notifier.diagnostic;
+ this._window = _window || {};
+ this._document = _document || {};
+ this.replacements = {
+ network: [],
+ log: [],
+ navigation: [],
+ connectivity: [],
+ };
+ this.eventRemovers = {
+ dom: [],
+ connectivity: [],
+ contentsecuritypolicy: [],
+ };
+
+ this._location = this._window.location;
+ this._lastHref = this._location && this._location.href;
+}
+
+Instrumenter.prototype.configure = function (options) {
+ this.options = _.merge(this.options, options);
+ var autoInstrument = options.autoInstrument;
+ var oldSettings = _.merge(this.autoInstrument);
+ if (options.enabled === false || autoInstrument === false) {
+ this.autoInstrument = {};
+ } else {
+ if (!_.isType(autoInstrument, 'object')) {
+ autoInstrument = defaults;
}
+ this.autoInstrument = _.merge(defaults, autoInstrument);
}
- if (!this.unhandledRejectionsInitialized) {
- if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {
- globals.captureUnhandledRejections(gWindow, this);
- this.unhandledRejectionsInitialized = true;
- }
+ this.instrument(oldSettings);
+ if (options.scrubTelemetryInputs !== undefined) {
+ this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;
+ }
+ if (options.telemetryScrubber !== undefined) {
+ this.telemetryScrubber = options.telemetryScrubber;
}
};
-Rollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {
- if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {
- return;
+// eslint-disable-next-line complexity
+Instrumenter.prototype.instrument = function (oldSettings) {
+ if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {
+ this.instrumentNetwork();
+ } else if (
+ !this.autoInstrument.network &&
+ oldSettings &&
+ oldSettings.network
+ ) {
+ this.deinstrumentNetwork();
}
- // Chrome will always send 5+ arguments and error will be valid or null, not undefined.
- // If error is undefined, we have a different caller.
- // Chrome also sends errors from web workers with null error, but does not invoke
- // prepareStackTrace() for these. Test for empty url to skip them.
- if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {
- return 'anonymous';
+ if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {
+ this.instrumentConsole();
+ } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {
+ this.deinstrumentConsole();
}
- var item;
- var stackInfo = _.makeUnhandledStackInfo(
- message,
- url,
- lineno,
- colno,
- error,
- 'onerror',
- 'uncaught exception',
- errorParser
- );
- if (_.isError(error)) {
- item = this._createItem([message, error, context]);
- item._unhandledStackInfo = stackInfo;
- } else if (_.isError(url)) {
- item = this._createItem([message, url, context]);
- item._unhandledStackInfo = stackInfo;
- } else {
- item = this._createItem([message, context]);
- item.stackInfo = stackInfo;
+ if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {
+ this.instrumentDom();
+ } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {
+ this.deinstrumentDom();
}
- item.level = this.options.uncaughtErrorLevel;
- item._isUncaught = true;
- this.client.log(item);
-};
-/**
- * Chrome only. Other browsers will ignore.
- *
- * Use Error.prepareStackTrace to extract information about errors that
- * do not have a valid error object in onerror().
- *
- * In tested version of Chrome, onerror is called first but has no way
- * to communicate with prepareStackTrace. Use a counter to let this
- * handler know which errors to send to Rollbar.
- *
- * In config options, set inspectAnonymousErrors to enable.
- */
-Rollbar.prototype.handleAnonymousErrors = function() {
- if (!this.options.inspectAnonymousErrors || !this.isChrome) {
- return;
+ if (
+ this.autoInstrument.navigation &&
+ !(oldSettings && oldSettings.navigation)
+ ) {
+ this.instrumentNavigation();
+ } else if (
+ !this.autoInstrument.navigation &&
+ oldSettings &&
+ oldSettings.navigation
+ ) {
+ this.deinstrumentNavigation();
}
- var r = this;
- function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars
- if (r.options.inspectAnonymousErrors) {
- if (r.anonymousErrorsPending) {
- // This is the only known way to detect that onerror saw an anonymous error.
- // It depends on onerror reliably being called before Error.prepareStackTrace,
- // which so far holds true on tested versions of Chrome. If versions of Chrome
- // are tested that behave differently, this logic will need to be updated
- // accordingly.
- r.anonymousErrorsPending -= 1;
-
- if (!error) {
- // Not likely to get here, but calling handleUncaughtException from here
- // without an error object would throw off the anonymousErrorsPending counter,
- // so return now.
- return;
- }
-
- // Allow this to be tracked later.
- error._isAnonymous = true;
-
- // url, lineno, colno shouldn't be needed for these errors.
- // If that changes, update this accordingly, using the unused
- // _stack param as needed (rather than parse error.toString()).
- r.handleUncaughtException(error.message, null, null, null, error);
- }
- }
-
- // Workaround to ensure stack is preserved for normal errors.
- return error.stack;
+ if (
+ this.autoInstrument.connectivity &&
+ !(oldSettings && oldSettings.connectivity)
+ ) {
+ this.instrumentConnectivity();
+ } else if (
+ !this.autoInstrument.connectivity &&
+ oldSettings &&
+ oldSettings.connectivity
+ ) {
+ this.deinstrumentConnectivity();
}
- // https://v8.dev/docs/stack-trace-api
- try {
- Error.prepareStackTrace = prepareStackTrace;
- } catch (e) {
- this.options.inspectAnonymousErrors = false;
- this.error('anonymous error handler failed', e);
+ if (
+ this.autoInstrument.contentSecurityPolicy &&
+ !(oldSettings && oldSettings.contentSecurityPolicy)
+ ) {
+ this.instrumentContentSecurityPolicy();
+ } else if (
+ !this.autoInstrument.contentSecurityPolicy &&
+ oldSettings &&
+ oldSettings.contentSecurityPolicy
+ ) {
+ this.deinstrumentContentSecurityPolicy();
}
-}
+};
-Rollbar.prototype.handleUnhandledRejection = function(reason, promise) {
- if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {
- return;
- }
+Instrumenter.prototype.deinstrumentNetwork = function () {
+ restore(this.replacements, 'network');
+};
- var message = 'unhandled rejection was null or undefined!';
- if (reason) {
- if (reason.message) {
- message = reason.message;
- } else {
- var reasonResult = _.stringify(reason);
- if (reasonResult.value) {
- message = reasonResult.value;
- }
+Instrumenter.prototype.instrumentNetwork = function () {
+ var self = this;
+
+ function wrapProp(prop, xhr) {
+ if (prop in xhr && _.isFunction(xhr[prop])) {
+ replace(xhr, prop, function (orig) {
+ return self.rollbar.wrap(orig);
+ });
}
}
- var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);
- var item;
- if (_.isError(reason)) {
- item = this._createItem([message, reason, context]);
- } else {
- item = this._createItem([message, reason, context]);
- item.stackInfo = _.makeUnhandledStackInfo(
- message,
- '',
- 0,
- 0,
- null,
- 'unhandledrejection',
- '',
- errorParser
+ if ('XMLHttpRequest' in this._window) {
+ var xhrp = this._window.XMLHttpRequest.prototype;
+ replace(
+ xhrp,
+ 'open',
+ function (orig) {
+ return function (method, url) {
+ var isUrlObject = _isUrlObject(url);
+ if (_.isType(url, 'string') || isUrlObject) {
+ url = isUrlObject ? url.toString() : url;
+ if (this.__rollbar_xhr) {
+ this.__rollbar_xhr.method = method;
+ this.__rollbar_xhr.url = url;
+ this.__rollbar_xhr.status_code = null;
+ this.__rollbar_xhr.start_time_ms = _.now();
+ this.__rollbar_xhr.end_time_ms = null;
+ } else {
+ this.__rollbar_xhr = {
+ method: method,
+ url: url,
+ status_code: null,
+ start_time_ms: _.now(),
+ end_time_ms: null,
+ };
+ }
+ }
+ return orig.apply(this, arguments);
+ };
+ },
+ this.replacements,
+ 'network',
);
- }
- item.level = this.options.uncaughtErrorLevel;
- item._isUncaught = true;
- item._originalArgs = item._originalArgs || [];
- item._originalArgs.push(promise);
- this.client.log(item);
-};
-
-Rollbar.prototype.wrap = function(f, context, _before) {
- try {
- var ctxFn;
- if(_.isFunction(context)) {
- ctxFn = context;
- } else {
- ctxFn = function() { return context || {}; };
- }
-
- if (!_.isFunction(f)) {
- return f;
- }
- if (f._isWrap) {
- return f;
- }
+ replace(
+ xhrp,
+ 'setRequestHeader',
+ function (orig) {
+ return function (header, value) {
+ // If xhr.open is async, __rollbar_xhr may not be initialized yet.
+ if (!this.__rollbar_xhr) {
+ this.__rollbar_xhr = {};
+ }
+ if (_.isType(header, 'string') && _.isType(value, 'string')) {
+ if (self.autoInstrument.networkRequestHeaders) {
+ if (!this.__rollbar_xhr.request_headers) {
+ this.__rollbar_xhr.request_headers = {};
+ }
+ this.__rollbar_xhr.request_headers[header] = value;
+ }
+ // We want the content type even if request header telemetry is off.
+ if (header.toLowerCase() === 'content-type') {
+ this.__rollbar_xhr.request_content_type = value;
+ }
+ }
+ return orig.apply(this, arguments);
+ };
+ },
+ this.replacements,
+ 'network',
+ );
- if (!f._rollbar_wrapped) {
- f._rollbar_wrapped = function () {
- if (_before && _.isFunction(_before)) {
- _before.apply(this, arguments);
- }
- try {
- return f.apply(this, arguments);
- } catch(exc) {
- var e = exc;
- if (e && window._rollbarWrappedError !== e) {
- if (_.isType(e, 'string')) {
- e = new String(e);
+ replace(
+ xhrp,
+ 'send',
+ function (orig) {
+ /* eslint-disable no-unused-vars */
+ return function (data) {
+ /* eslint-enable no-unused-vars */
+ var xhr = this;
+
+ function onreadystatechangeHandler() {
+ if (xhr.__rollbar_xhr) {
+ if (xhr.__rollbar_xhr.status_code === null) {
+ xhr.__rollbar_xhr.status_code = 0;
+ if (self.autoInstrument.networkRequestBody) {
+ xhr.__rollbar_xhr.request = data;
+ }
+ xhr.__rollbar_event = self.captureNetwork(
+ xhr.__rollbar_xhr,
+ 'xhr',
+ undefined,
+ );
+ }
+ if (xhr.readyState < 2) {
+ xhr.__rollbar_xhr.start_time_ms = _.now();
+ }
+ if (xhr.readyState > 3) {
+ xhr.__rollbar_xhr.end_time_ms = _.now();
+
+ var headers = null;
+ xhr.__rollbar_xhr.response_content_type =
+ xhr.getResponseHeader('Content-Type');
+ if (self.autoInstrument.networkResponseHeaders) {
+ var headersConfig =
+ self.autoInstrument.networkResponseHeaders;
+ headers = {};
+ try {
+ var header, i;
+ if (headersConfig === true) {
+ var allHeaders = xhr.getAllResponseHeaders();
+ if (allHeaders) {
+ var arr = allHeaders.trim().split(/[\r\n]+/);
+ var parts, value;
+ for (i = 0; i < arr.length; i++) {
+ parts = arr[i].split(': ');
+ header = parts.shift();
+ value = parts.join(': ');
+ headers[header] = value;
+ }
+ }
+ } else {
+ for (i = 0; i < headersConfig.length; i++) {
+ header = headersConfig[i];
+ headers[header] = xhr.getResponseHeader(header);
+ }
+ }
+ } catch (e) {
+ /* we ignore the errors here that could come from different
+ * browser issues with the xhr methods */
+ }
+ }
+ var body = null;
+ if (self.autoInstrument.networkResponseBody) {
+ try {
+ body = xhr.responseText;
+ } catch (e) {
+ /* ignore errors from reading responseText */
+ }
+ }
+ var response = null;
+ if (body || headers) {
+ response = {};
+ if (body) {
+ if (
+ self.isJsonContentType(
+ xhr.__rollbar_xhr.response_content_type,
+ )
+ ) {
+ response.body = self.scrubJson(body);
+ } else {
+ response.body = body;
+ }
+ }
+ if (headers) {
+ response.headers = headers;
+ }
+ }
+ if (response) {
+ xhr.__rollbar_xhr.response = response;
+ }
+ try {
+ var code = xhr.status;
+ code = code === 1223 ? 204 : code;
+ xhr.__rollbar_xhr.status_code = code;
+ xhr.__rollbar_event.level =
+ self.telemeter.levelFromStatus(code);
+ self.errorOnHttpStatus(xhr.__rollbar_xhr);
+ } catch (e) {
+ /* ignore possible exception from xhr.status */
+ }
+ }
}
- e._rollbarContext = ctxFn() || {};
- e._rollbarContext._wrappedSource = f.toString();
+ }
- window._rollbarWrappedError = e;
+ wrapProp('onload', xhr);
+ wrapProp('onerror', xhr);
+ wrapProp('onprogress', xhr);
+
+ if (
+ 'onreadystatechange' in xhr &&
+ _.isFunction(xhr.onreadystatechange)
+ ) {
+ replace(xhr, 'onreadystatechange', function (orig) {
+ return self.rollbar.wrap(
+ orig,
+ undefined,
+ onreadystatechangeHandler,
+ );
+ });
+ } else {
+ xhr.onreadystatechange = onreadystatechangeHandler;
}
- throw e;
- }
- };
+ if (xhr.__rollbar_xhr && self.trackHttpErrors()) {
+ xhr.__rollbar_xhr.stack = new Error().stack;
+ }
+ return orig.apply(this, arguments);
+ };
+ },
+ this.replacements,
+ 'network',
+ );
+ }
- f._rollbar_wrapped._isWrap = true;
+ if ('fetch' in this._window) {
+ replace(
+ this._window,
+ 'fetch',
+ function (orig) {
+ /* eslint-disable no-unused-vars */
+ return function (fn, t) {
+ /* eslint-enable no-unused-vars */
+ var args = new Array(arguments.length);
+ for (var i = 0, len = args.length; i < len; i++) {
+ args[i] = arguments[i];
+ }
+ var input = args[0];
+ var method = 'GET';
+ var url;
+ var isUrlObject = _isUrlObject(input);
+ if (_.isType(input, 'string') || isUrlObject) {
+ url = isUrlObject ? input.toString() : input;
+ } else if (input) {
+ url = input.url;
+ if (input.method) {
+ method = input.method;
+ }
+ }
+ if (args[1] && args[1].method) {
+ method = args[1].method;
+ }
+ var metadata = {
+ method: method,
+ url: url,
+ status_code: null,
+ start_time_ms: _.now(),
+ end_time_ms: null,
+ };
+ if (args[1] && args[1].headers) {
+ // Argument may be a Headers object, or plain object. Ensure here that
+ // we are working with a Headers object with case-insensitive keys.
+ var reqHeaders = headers(args[1].headers);
+
+ metadata.request_content_type = reqHeaders.get('Content-Type');
+
+ if (self.autoInstrument.networkRequestHeaders) {
+ metadata.request_headers = self.fetchHeaders(
+ reqHeaders,
+ self.autoInstrument.networkRequestHeaders,
+ );
+ }
+ }
- if (f.hasOwnProperty) {
- for (var prop in f) {
- if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {
- f._rollbar_wrapped[prop] = f[prop];
+ if (self.autoInstrument.networkRequestBody) {
+ if (args[1] && args[1].body) {
+ metadata.request = args[1].body;
+ } else if (
+ args[0] &&
+ !_.isType(args[0], 'string') &&
+ args[0].body
+ ) {
+ metadata.request = args[0].body;
+ }
+ }
+ self.captureNetwork(metadata, 'fetch', undefined);
+ if (self.trackHttpErrors()) {
+ metadata.stack = new Error().stack;
}
- }
- }
- }
- return f._rollbar_wrapped;
- } catch (e) {
- // Return the original function if the wrap fails.
- return f;
+ // Start our handler before returning the promise. This allows resp.clone()
+ // to execute before other handlers touch the response.
+ return orig.apply(this, args).then(function (resp) {
+ metadata.end_time_ms = _.now();
+ metadata.status_code = resp.status;
+ metadata.response_content_type = resp.headers.get('Content-Type');
+ var headers = null;
+ if (self.autoInstrument.networkResponseHeaders) {
+ headers = self.fetchHeaders(
+ resp.headers,
+ self.autoInstrument.networkResponseHeaders,
+ );
+ }
+ var body = null;
+ if (self.autoInstrument.networkResponseBody) {
+ if (typeof resp.text === 'function') {
+ // Response.text() is not implemented on some platforms
+ // The response must be cloned to prevent reading (and locking) the original stream.
+ // This must be done before other handlers touch the response.
+ body = resp.clone().text(); //returns a Promise
+ }
+ }
+ if (headers || body) {
+ metadata.response = {};
+ if (body) {
+ // Test to ensure body is a Promise, which it should always be.
+ if (typeof body.then === 'function') {
+ body.then(function (text) {
+ if (
+ text &&
+ self.isJsonContentType(metadata.response_content_type)
+ ) {
+ metadata.response.body = self.scrubJson(text);
+ } else {
+ metadata.response.body = text;
+ }
+ });
+ } else {
+ metadata.response.body = body;
+ }
+ }
+ if (headers) {
+ metadata.response.headers = headers;
+ }
+ }
+ self.errorOnHttpStatus(metadata);
+ return resp;
+ });
+ };
+ },
+ this.replacements,
+ 'network',
+ );
}
};
-Rollbar.wrap = function(f, context) {
- if (_instance) {
- return _instance.wrap(f, context);
- } else {
- handleUninitialized();
+
+Instrumenter.prototype.captureNetwork = function (
+ metadata,
+ subtype,
+ rollbarUUID,
+) {
+ if (
+ metadata.request &&
+ this.isJsonContentType(metadata.request_content_type)
+ ) {
+ metadata.request = this.scrubJson(metadata.request);
}
+ return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);
};
-Rollbar.prototype.captureEvent = function() {
- var event = _.createTelemetryEvent(arguments);
- return this.client.captureEvent(event.type, event.metadata, event.level);
-};
-Rollbar.captureEvent = function() {
- if (_instance) {
- return _instance.captureEvent.apply(_instance, arguments);
- } else {
- handleUninitialized();
- }
+Instrumenter.prototype.isJsonContentType = function (contentType) {
+ return contentType &&
+ _.isType(contentType, 'string') &&
+ contentType.toLowerCase().includes('json')
+ ? true
+ : false;
};
-// The following two methods are used internally and are not meant for public use
-Rollbar.prototype.captureDomContentLoaded = function(e, ts) {
- if (!ts) {
- ts = new Date();
- }
- return this.client.captureDomContentLoaded(ts);
+Instrumenter.prototype.scrubJson = function (json) {
+ return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));
};
-Rollbar.prototype.captureLoad = function(e, ts) {
- if (!ts) {
- ts = new Date();
+Instrumenter.prototype.fetchHeaders = function (inHeaders, headersConfig) {
+ var outHeaders = {};
+ try {
+ var i;
+ if (headersConfig === true) {
+ if (typeof inHeaders.entries === 'function') {
+ // Headers.entries() is not implemented in IE
+ var allHeaders = inHeaders.entries();
+ var currentHeader = allHeaders.next();
+ while (!currentHeader.done) {
+ outHeaders[currentHeader.value[0]] = currentHeader.value[1];
+ currentHeader = allHeaders.next();
+ }
+ }
+ } else {
+ for (i = 0; i < headersConfig.length; i++) {
+ var header = headersConfig[i];
+ outHeaders[header] = inHeaders.get(header);
+ }
+ }
+ } catch (e) {
+ /* ignore probable IE errors */
}
- return this.client.captureLoad(ts);
+ return outHeaders;
};
-/* Internal */
-
-function addTransformsToNotifier(notifier, rollbar, gWindow) {
- notifier
- .addTransform(transforms.handleDomException)
- .addTransform(transforms.handleItemWithError)
- .addTransform(transforms.ensureItemHasSomethingToSay)
- .addTransform(transforms.addBaseInfo)
- .addTransform(transforms.addRequestInfo(gWindow))
- .addTransform(transforms.addClientInfo(gWindow))
- .addTransform(transforms.addPluginInfo(gWindow))
- .addTransform(transforms.addBody)
- .addTransform(sharedTransforms.addMessageWithError)
- .addTransform(sharedTransforms.addTelemetryData)
- .addTransform(sharedTransforms.addConfigToPayload)
- .addTransform(transforms.addScrubber(rollbar.scrub))
- .addTransform(sharedTransforms.userTransform(logger))
- .addTransform(sharedTransforms.addConfiguredOptions)
- .addTransform(sharedTransforms.addDiagnosticKeys)
- .addTransform(sharedTransforms.itemToPayload);
-}
+Instrumenter.prototype.trackHttpErrors = function () {
+ return (
+ this.autoInstrument.networkErrorOnHttp5xx ||
+ this.autoInstrument.networkErrorOnHttp4xx ||
+ this.autoInstrument.networkErrorOnHttp0
+ );
+};
-function addPredicatesToQueue(queue) {
- queue
- .addPredicate(sharedPredicates.checkLevel)
- .addPredicate(predicates.checkIgnore)
- .addPredicate(sharedPredicates.userCheckIgnore(logger))
- .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))
- .addPredicate(sharedPredicates.urlIsSafeListed(logger))
- .addPredicate(sharedPredicates.messageIsIgnored(logger));
-}
+Instrumenter.prototype.errorOnHttpStatus = function (metadata) {
+ var status = metadata.status_code;
-Rollbar.prototype.loadFull = function() {
- logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');
+ if (
+ (status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||
+ (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||
+ (status === 0 && this.autoInstrument.networkErrorOnHttp0)
+ ) {
+ var error = new Error('HTTP request failed with Status ' + status);
+ error.stack = metadata.stack;
+ this.rollbar.error(error, { skipFrames: 1 });
+ }
};
-Rollbar.prototype._createItem = function(args) {
- return _.createItem(args, logger, this);
+Instrumenter.prototype.deinstrumentConsole = function () {
+ if (!('console' in this._window && this._window.console.log)) {
+ return;
+ }
+ var b;
+ while (this.replacements['log'].length) {
+ b = this.replacements['log'].shift();
+ this._window.console[b[0]] = b[1];
+ }
};
-function _getFirstFunction(args) {
- for (var i = 0, len = args.length; i < len; ++i) {
- if (_.isFunction(args[i])) {
- return args[i];
- }
+Instrumenter.prototype.instrumentConsole = function () {
+ if (!('console' in this._window && this._window.console.log)) {
+ return;
}
- return undefined;
-}
-function _gWindow() {
- return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);
-}
+ var self = this;
+ var c = this._window.console;
-var defaults = __webpack_require__(27);
-var scrubFields = __webpack_require__(28);
+ function wrapConsole(method) {
+ 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778
-var defaultOptions = {
- version: defaults.version,
- scrubFields: scrubFields.scrubFields,
- logLevel: defaults.logLevel,
- reportLevel: defaults.reportLevel,
- uncaughtErrorLevel: defaults.uncaughtErrorLevel,
- endpoint: defaults.endpoint,
- verbose: false,
- enabled: true,
- transmit: true,
- sendConfig: false,
- includeItemsInTelemetry: true,
- captureIp: true,
- inspectAnonymousErrors: true,
- ignoreDuplicateErrors: true,
- wrapGlobalEventHandlers: false
+ var orig = c[method];
+ var origConsole = c;
+ var level = method === 'warn' ? 'warning' : method;
+ c[method] = function () {
+ var args = Array.prototype.slice.call(arguments);
+ var message = _.formatArgsAsString(args);
+ self.telemeter.captureLog(message, level);
+ if (orig) {
+ Function.prototype.apply.call(orig, origConsole, args);
+ }
+ };
+ self.replacements['log'].push([method, orig]);
+ }
+ var methods = ['debug', 'info', 'warn', 'error', 'log'];
+ try {
+ for (var i = 0, len = methods.length; i < len; i++) {
+ wrapConsole(methods[i]);
+ }
+ } catch (e) {
+ this.diagnostic.instrumentConsole = { error: e.message };
+ }
};
-module.exports = Rollbar;
-
-
-/***/ }),
-/* 10 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var RateLimiter = __webpack_require__(11);
-var Queue = __webpack_require__(13);
-var Notifier = __webpack_require__(14);
-var _ = __webpack_require__(0);
-
-/*
- * Rollbar - the interface to Rollbar
- *
- * @param options
- * @param api
- * @param logger
- */
-function Rollbar(options, api, logger, telemeter, platform) {
- this.options = _.merge(options);
- this.logger = logger;
- Rollbar.rateLimiter.configureGlobal(this.options);
- Rollbar.rateLimiter.setPlatformOptions(platform, this.options);
- this.api = api;
- this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);
-
- // This must happen before the Notifier is created
- var tracer = this.options.tracer || null;
- if (validateTracer(tracer)) {
- this.tracer = tracer;
- // set to a string for api response serialization
- this.options.tracer = 'opentracing-tracer-enabled';
- this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';
- } else {
- this.tracer = null;
+Instrumenter.prototype.deinstrumentDom = function () {
+ if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {
+ return;
}
-
- this.notifier = new Notifier(this.queue, this.options);
- this.telemeter = telemeter;
- setStackTraceLimit(options);
- this.lastError = null;
- this.lastErrorHash = 'none';
-}
-
-var defaultOptions = {
- maxItems: 0,
- itemsPerMinute: 60
+ this.removeListeners('dom');
};
-Rollbar.rateLimiter = new RateLimiter(defaultOptions);
-
-Rollbar.prototype.global = function (options) {
- Rollbar.rateLimiter.configureGlobal(options);
- return this;
+Instrumenter.prototype.instrumentDom = function () {
+ if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {
+ return;
+ }
+ var clickHandler = this.handleClick.bind(this);
+ var blurHandler = this.handleBlur.bind(this);
+ this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);
+ this.addListener(
+ 'dom',
+ this._window,
+ 'blur',
+ 'onfocusout',
+ blurHandler,
+ true,
+ );
};
-Rollbar.prototype.configure = function (options, payloadData) {
- var oldOptions = this.options;
- var payload = {};
- if (payloadData) {
- payload = { payload: payloadData };
+Instrumenter.prototype.handleClick = function (evt) {
+ try {
+ var e = domUtil.getElementFromEvent(evt, this._document);
+ var hasTag = e && e.tagName;
+ 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 (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {
+ this.captureDomEvent('input', e, e.value, e.checked);
+ }
+ } catch (exc) {
+ // TODO: Not sure what to do here
}
+};
- this.options = _.merge(oldOptions, options, payload);
-
- // This must happen before the Notifier is configured
- var tracer = this.options.tracer || null;
- if (validateTracer(tracer)) {
- this.tracer = tracer;
- // set to a string for api response serialization
- this.options.tracer = 'opentracing-tracer-enabled';
- this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';
- } else {
- this.tracer = null;
+Instrumenter.prototype.handleBlur = function (evt) {
+ try {
+ var e = domUtil.getElementFromEvent(evt, this._document);
+ if (e && e.tagName) {
+ if (domUtil.isDescribedElement(e, 'textarea')) {
+ this.captureDomEvent('input', e, e.value);
+ } else if (
+ domUtil.isDescribedElement(e, 'select') &&
+ e.options &&
+ e.options.length
+ ) {
+ this.handleSelectInputChanged(e);
+ } else if (
+ domUtil.isDescribedElement(e, 'input') &&
+ !domUtil.isDescribedElement(e, 'input', [
+ 'button',
+ 'submit',
+ 'hidden',
+ 'checkbox',
+ 'radio',
+ ])
+ ) {
+ this.captureDomEvent('input', e, e.value);
+ }
+ }
+ } catch (exc) {
+ // TODO: Not sure what to do here
}
+};
- this.notifier && this.notifier.configure(this.options);
- this.telemeter && this.telemeter.configure(this.options);
- setStackTraceLimit(options);
- this.global(this.options);
-
- if (validateTracer(options.tracer)) {
- this.tracer = options.tracer
+Instrumenter.prototype.handleSelectInputChanged = function (elem) {
+ if (elem.multiple) {
+ for (var i = 0; i < elem.options.length; i++) {
+ if (elem.options[i].selected) {
+ this.captureDomEvent('input', elem, elem.options[i].value);
+ }
+ }
+ } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {
+ this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);
}
-
- return this;
};
-Rollbar.prototype.log = function (item) {
- var level = this._defaultLogLevel();
- return this._log(level, item);
+Instrumenter.prototype.captureDomEvent = function (
+ subtype,
+ element,
+ value,
+ isChecked,
+) {
+ if (value !== undefined) {
+ if (
+ this.scrubTelemetryInputs ||
+ domUtil.getElementType(element) === 'password'
+ ) {
+ value = '[scrubbed]';
+ } else {
+ var description = domUtil.describeElement(element);
+ if (this.telemetryScrubber) {
+ if (this.telemetryScrubber(description)) {
+ value = '[scrubbed]';
+ }
+ } else if (this.defaultValueScrubber(description)) {
+ value = '[scrubbed]';
+ }
+ }
+ }
+ var elementString = domUtil.elementArrayToString(
+ domUtil.treeToArray(element),
+ );
+ this.telemeter.captureDom(subtype, elementString, value, isChecked);
};
-Rollbar.prototype.debug = function (item) {
- this._log('debug', item);
+Instrumenter.prototype.deinstrumentNavigation = function () {
+ var chrome = this._window.chrome;
+ var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;
+ // See https://github.com/angular/angular.js/pull/13945/files
+ var hasPushState =
+ !chromePackagedApp &&
+ this._window.history &&
+ this._window.history.pushState;
+ if (!hasPushState) {
+ return;
+ }
+ restore(this.replacements, 'navigation');
};
-Rollbar.prototype.info = function (item) {
- this._log('info', item);
-};
+Instrumenter.prototype.instrumentNavigation = function () {
+ var chrome = this._window.chrome;
+ var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;
+ // See https://github.com/angular/angular.js/pull/13945/files
+ var hasPushState =
+ !chromePackagedApp &&
+ this._window.history &&
+ this._window.history.pushState;
+ if (!hasPushState) {
+ return;
+ }
+ var self = this;
+ replace(
+ this._window,
+ 'onpopstate',
+ function (orig) {
+ return function () {
+ var current = self._location.href;
+ self.handleUrlChange(self._lastHref, current);
+ if (orig) {
+ orig.apply(this, arguments);
+ }
+ };
+ },
+ this.replacements,
+ 'navigation',
+ );
-Rollbar.prototype.warn = function (item) {
- this._log('warning', item);
+ replace(
+ this._window.history,
+ 'pushState',
+ function (orig) {
+ return function () {
+ var url = arguments.length > 2 ? arguments[2] : undefined;
+ if (url) {
+ self.handleUrlChange(self._lastHref, url + '');
+ }
+ return orig.apply(this, arguments);
+ };
+ },
+ this.replacements,
+ 'navigation',
+ );
};
-Rollbar.prototype.warning = function (item) {
- this._log('warning', item);
+Instrumenter.prototype.handleUrlChange = function (from, to) {
+ var parsedHref = urlparser.parse(this._location.href);
+ var parsedTo = urlparser.parse(to);
+ var parsedFrom = urlparser.parse(from);
+ this._lastHref = to;
+ if (
+ parsedHref.protocol === parsedTo.protocol &&
+ parsedHref.host === parsedTo.host
+ ) {
+ to = parsedTo.path + (parsedTo.hash || '');
+ }
+ if (
+ parsedHref.protocol === parsedFrom.protocol &&
+ parsedHref.host === parsedFrom.host
+ ) {
+ from = parsedFrom.path + (parsedFrom.hash || '');
+ }
+ this.telemeter.captureNavigation(from, to);
};
-Rollbar.prototype.error = function (item) {
- this._log('error', item);
+Instrumenter.prototype.deinstrumentConnectivity = function () {
+ if (!('addEventListener' in this._window || 'body' in this._document)) {
+ return;
+ }
+ if (this._window.addEventListener) {
+ this.removeListeners('connectivity');
+ } else {
+ restore(this.replacements, 'connectivity');
+ }
};
-Rollbar.prototype.critical = function (item) {
- this._log('critical', item);
+Instrumenter.prototype.instrumentConnectivity = function () {
+ if (!('addEventListener' in this._window || 'body' in this._document)) {
+ return;
+ }
+ if (this._window.addEventListener) {
+ this.addListener(
+ 'connectivity',
+ this._window,
+ 'online',
+ undefined,
+ function () {
+ this.telemeter.captureConnectivityChange('online');
+ }.bind(this),
+ true,
+ );
+ this.addListener(
+ 'connectivity',
+ this._window,
+ 'offline',
+ undefined,
+ function () {
+ this.telemeter.captureConnectivityChange('offline');
+ }.bind(this),
+ true,
+ );
+ } else {
+ var self = this;
+ replace(
+ this._document.body,
+ 'ononline',
+ function (orig) {
+ return function () {
+ self.telemeter.captureConnectivityChange('online');
+ if (orig) {
+ orig.apply(this, arguments);
+ }
+ };
+ },
+ this.replacements,
+ 'connectivity',
+ );
+ replace(
+ this._document.body,
+ 'onoffline',
+ function (orig) {
+ return function () {
+ self.telemeter.captureConnectivityChange('offline');
+ if (orig) {
+ orig.apply(this, arguments);
+ }
+ };
+ },
+ this.replacements,
+ 'connectivity',
+ );
+ }
};
-Rollbar.prototype.wait = function (callback) {
- this.queue.wait(callback);
-};
+Instrumenter.prototype.handleCspEvent = function (cspEvent) {
+ var message =
+ 'Security Policy Violation: ' +
+ 'blockedURI: ' +
+ cspEvent.blockedURI +
+ ', ' +
+ 'violatedDirective: ' +
+ cspEvent.violatedDirective +
+ ', ' +
+ 'effectiveDirective: ' +
+ cspEvent.effectiveDirective +
+ ', ';
-Rollbar.prototype.captureEvent = function (type, metadata, level) {
- return this.telemeter && this.telemeter.captureEvent(type, metadata, level);
-};
+ if (cspEvent.sourceFile) {
+ message +=
+ 'location: ' +
+ cspEvent.sourceFile +
+ ', ' +
+ 'line: ' +
+ cspEvent.lineNumber +
+ ', ' +
+ 'col: ' +
+ cspEvent.columnNumber +
+ ', ';
+ }
-Rollbar.prototype.captureDomContentLoaded = function (ts) {
- return this.telemeter && this.telemeter.captureDomContentLoaded(ts);
-};
+ message += 'originalPolicy: ' + cspEvent.originalPolicy;
-Rollbar.prototype.captureLoad = function (ts) {
- return this.telemeter && this.telemeter.captureLoad(ts);
+ this.telemeter.captureLog(message, 'error');
+ this.handleCspError(message);
};
-Rollbar.prototype.buildJsonPayload = function (item) {
- return this.api.buildJsonPayload(item);
+Instrumenter.prototype.handleCspError = function (message) {
+ if (this.autoInstrument.errorOnContentSecurityPolicy) {
+ this.rollbar.error(message);
+ }
};
-Rollbar.prototype.sendJsonPayload = function (jsonPayload) {
- this.api.postJsonPayload(jsonPayload);
-};
+Instrumenter.prototype.deinstrumentContentSecurityPolicy = function () {
+ if (!('addEventListener' in this._document)) {
+ return;
+ }
-/* Internal */
+ this.removeListeners('contentsecuritypolicy');
+};
-Rollbar.prototype._log = function (defaultLevel, item) {
- var callback;
- if (item.callback) {
- callback = item.callback;
- delete item.callback;
- }
- if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {
- if (callback) {
- var error = new Error('ignored identical item');
- error.item = item;
- callback(error);
- }
+Instrumenter.prototype.instrumentContentSecurityPolicy = function () {
+ if (!('addEventListener' in this._document)) {
return;
}
- try {
- this._addTracingInfo(item);
- item.level = item.level || defaultLevel;
- this.telemeter && this.telemeter._captureRollbarItem(item);
- item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];
- this.notifier.log(item, callback);
- } catch (e) {
- if (callback) {
- callback(e);
- }
- this.logger.error(e);
- }
-};
-Rollbar.prototype._defaultLogLevel = function () {
- return this.options.logLevel || 'debug';
+ var cspHandler = this.handleCspEvent.bind(this);
+ this.addListener(
+ 'contentsecuritypolicy',
+ this._document,
+ 'securitypolicyviolation',
+ null,
+ cspHandler,
+ false,
+ );
};
-Rollbar.prototype._sameAsLastError = function (item) {
- if (!item._isUncaught) {
- return false;
+Instrumenter.prototype.addListener = function (
+ section,
+ obj,
+ type,
+ altType,
+ handler,
+ capture,
+) {
+ if (obj.addEventListener) {
+ obj.addEventListener(type, handler, capture);
+ this.eventRemovers[section].push(function () {
+ obj.removeEventListener(type, handler, capture);
+ });
+ } else if (altType) {
+ obj.attachEvent(altType, handler);
+ this.eventRemovers[section].push(function () {
+ obj.detachEvent(altType, handler);
+ });
}
- var itemHash = generateItemHash(item);
- if (this.lastErrorHash === itemHash) {
- return true;
+};
+
+Instrumenter.prototype.removeListeners = function (section) {
+ var r;
+ while (this.eventRemovers[section].length) {
+ r = this.eventRemovers[section].shift();
+ r();
}
- this.lastError = item.err;
- this.lastErrorHash = itemHash;
- return false;
};
-Rollbar.prototype._addTracingInfo = function (item) {
- // Tracer validation occurs in the constructor
- // or in the Rollbar.prototype.configure methods
- if (this.tracer) {
- // add rollbar occurrence uuid to span
- var span = this.tracer.scope().active();
+function _isUrlObject(input) {
+ return typeof URL !== 'undefined' && input instanceof URL;
+}
- if (validateSpan(span)) {
- span.setTag('rollbar.error_uuid', item.uuid);
- span.setTag('rollbar.has_error', true);
- span.setTag('error', true);
- span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);
- span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);
+module.exports = Instrumenter;
- // add span ID & trace ID to occurrence
- var opentracingSpanId = span.context().toSpanId();
- var opentracingTraceId = span.context().toTraceId();
- if (item.custom) {
- item.custom.opentracing_span_id = opentracingSpanId;
- item.custom.opentracing_trace_id = opentracingTraceId;
- } else {
- item.custom = {
- opentracing_span_id: opentracingSpanId,
- opentracing_trace_id: opentracingTraceId
- };
- }
- }
- }
-}
+/***/ }),
-function generateItemHash(item) {
- var message = item.message || '';
- var stack = (item.err || {}).stack || String(item.err);
- return message + '::' + stack;
-}
+/***/ 860:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-// Node.js, Chrome, Safari, and some other browsers support this property
-// which globally sets the number of stack frames returned in an Error object.
-// If a browser can't use it, no harm done.
-function setStackTraceLimit(options) {
- if (options.stackTraceLimit) {
- Error.stackTraceLimit = options.stackTraceLimit;
- }
-}
+"use strict";
-/**
- * Validate the Tracer object provided to the Client
- * is valid for our Opentracing use case.
- * @param {opentracer.Tracer} tracer
- */
-function validateTracer(tracer) {
- if (!tracer) {
- return false;
- }
- if (!tracer.scope || typeof tracer.scope !== 'function') {
- return false;
+var _ = __webpack_require__(702);
+var errorParser = __webpack_require__(303);
+var logger = __webpack_require__(802);
+
+function handleDomException(item, options, callback) {
+ if (item.err && errorParser.Stack(item.err).name === 'DOMException') {
+ var originalError = new Error();
+ originalError.name = item.err.name;
+ originalError.message = item.err.message;
+ originalError.stack = item.err.stack;
+ originalError.nested = item.err;
+ item.err = originalError;
}
+ callback(null, item);
+}
- var scope = tracer.scope();
+function handleItemWithError(item, options, callback) {
+ item.data = item.data || {};
+ if (item.err) {
+ try {
+ item.stackInfo =
+ item.err._savedStackTrace ||
+ errorParser.parse(item.err, item.skipFrames);
- if (!scope || !scope.active || typeof scope.active !== 'function') {
- return false;
+ if (options.addErrorContext) {
+ addErrorContext(item);
+ }
+ } catch (e) {
+ logger.error('Error while parsing the error object.', e);
+ try {
+ item.message =
+ item.err.message ||
+ item.err.description ||
+ item.message ||
+ String(item.err);
+ } catch (e2) {
+ item.message = String(item.err) || String(e2);
+ }
+ delete item.err;
+ }
}
-
- return true;
+ callback(null, item);
}
-/**
- * Validate the Span object provided
- * @param {opentracer.Span} span
- */
-function validateSpan(span) {
- if (!span || !span.context || typeof span.context !== 'function') {
- return false;
- }
+function addErrorContext(item) {
+ var chain = [];
+ var err = item.err;
- var spanContext = span.context();
+ chain.push(err);
- if (!spanContext
- || !spanContext.toSpanId
- || !spanContext.toTraceId
- || typeof spanContext.toSpanId !== 'function'
- || typeof spanContext.toTraceId !== 'function') {
- return false
+ while (err.nested || err.cause) {
+ err = err.nested || err.cause;
+ chain.push(err);
}
- return true;
+ _.addErrorContext(item, chain);
}
-module.exports = Rollbar;
+function ensureItemHasSomethingToSay(item, options, callback) {
+ if (!item.message && !item.stackInfo && !item.custom) {
+ callback(new Error('No message, stack info, or custom data'), null);
+ }
+ callback(null, item);
+}
+function addBaseInfo(item, options, callback) {
+ var environment =
+ (options.payload && options.payload.environment) || options.environment;
+ item.data = _.merge(item.data, {
+ environment: environment,
+ level: item.level,
+ endpoint: options.endpoint,
+ platform: 'browser',
+ framework: 'browser-js',
+ language: 'javascript',
+ server: {},
+ uuid: item.uuid,
+ notifier: {
+ name: 'rollbar-browser-js',
+ version: options.version,
+ },
+ custom: item.custom,
+ });
+ callback(null, item);
+}
-/***/ }),
-/* 11 */
-/***/ (function(module, exports, __webpack_require__) {
+function addRequestInfo(window) {
+ return function (item, options, callback) {
+ var requestInfo = {};
-"use strict";
+ if (window && window.location) {
+ requestInfo.url = window.location.href;
+ requestInfo.query_string = window.location.search;
+ }
+ var remoteString = '$remote_ip';
+ if (!options.captureIp) {
+ remoteString = null;
+ } else if (options.captureIp !== true) {
+ remoteString += '_anonymize';
+ }
+ if (remoteString) requestInfo.user_ip = remoteString;
-var _ = __webpack_require__(0);
+ if (Object.keys(requestInfo).length > 0) {
+ _.set(item, 'data.request', requestInfo);
+ }
-/*
- * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar
- *
- * @param options - the same options that are accepted by configureGlobal offered as a convenience
- */
-function RateLimiter(options) {
- this.startTime = _.now();
- this.counter = 0;
- this.perMinCounter = 0;
- this.platform = null;
- this.platformOptions = {};
- this.configureGlobal(options);
+ callback(null, item);
+ };
}
-RateLimiter.globalSettings = {
- startTime: _.now(),
- maxItems: undefined,
- itemsPerMinute: undefined
-};
+function addClientInfo(window) {
+ return function (item, options, callback) {
+ if (!window) {
+ return callback(null, item);
+ }
+ var nav = window.navigator || {};
+ var scr = window.screen || {};
+ _.set(item, 'data.client', {
+ runtime_ms: item.timestamp - window._rollbarStartTime,
+ timestamp: Math.round(item.timestamp / 1000),
+ javascript: {
+ browser: nav.userAgent,
+ language: nav.language,
+ cookie_enabled: nav.cookieEnabled,
+ screen: {
+ width: scr.width,
+ height: scr.height,
+ },
+ },
+ });
+ callback(null, item);
+ };
+}
-/*
- * configureGlobal - set the global rate limiter options
- *
- * @param options - Only the following values are recognized:
- * startTime: a timestamp of the form returned by (new Date()).getTime()
- * maxItems: the maximum items
- * itemsPerMinute: the max number of items to send in a given minute
- */
-RateLimiter.prototype.configureGlobal = function(options) {
- if (options.startTime !== undefined) {
- RateLimiter.globalSettings.startTime = options.startTime;
- }
- if (options.maxItems !== undefined) {
- RateLimiter.globalSettings.maxItems = options.maxItems;
- }
- if (options.itemsPerMinute !== undefined) {
- RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;
- }
-};
+function addPluginInfo(window) {
+ return function (item, options, callback) {
+ if (!window || !window.navigator) {
+ return callback(null, item);
+ }
+ var plugins = [];
+ var navPlugins = window.navigator.plugins || [];
+ var cur;
+ for (var i = 0, l = navPlugins.length; i < l; ++i) {
+ cur = navPlugins[i];
+ plugins.push({ name: cur.name, description: cur.description });
+ }
+ _.set(item, 'data.client.javascript.plugins', plugins);
+ callback(null, item);
+ };
+}
-/*
- * shouldSend - determine if we should send a given item based on rate limit settings
- *
- * @param item - the item we are about to send
- * @returns An object with the following structure:
- * error: (Error|null)
- * shouldSend: bool
- * payload: (Object|null)
- * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and
- * exactly one of error or payload will be non-null. If error is non-null, the returned Error will
- * describe the situation, but it means that we were already over a rate limit (either globally or
- * per minute) when this item was checked. If error is null, and therefore payload is non-null, it
- * means this item put us over the global rate limit and the payload should be sent to Rollbar in
- * place of the passed in item.
- */
-RateLimiter.prototype.shouldSend = function(item, now) {
- now = now || _.now();
- var elapsedTime = now - this.startTime;
- if (elapsedTime < 0 || elapsedTime >= 60000) {
- this.startTime = now;
- this.perMinCounter = 0;
+function addBody(item, options, callback) {
+ if (item.stackInfo) {
+ if (item.stackInfo.traceChain) {
+ addBodyTraceChain(item, options, callback);
+ } else {
+ addBodyTrace(item, options, callback);
+ }
+ } else {
+ addBodyMessage(item, options, callback);
}
+}
- var globalRateLimit = RateLimiter.globalSettings.maxItems;
- var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;
+function addBodyMessage(item, options, callback) {
+ var message = item.message;
+ var custom = item.custom;
- if (checkRate(item, globalRateLimit, this.counter)) {
- return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);
- } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {
- return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);
+ if (!message) {
+ message = 'Item sent with null or missing arguments.';
}
- this.counter++;
- this.perMinCounter++;
-
- var shouldSend = !checkRate(item, globalRateLimit, this.counter);
- var perMinute = shouldSend;
- shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);
- return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);
-};
-
-RateLimiter.prototype.setPlatformOptions = function(platform, options) {
- this.platform = platform;
- this.platformOptions = options;
-};
-
-/* Helpers */
-
-function checkRate(item, limit, counter) {
- return !item.ignoreRateLimit && limit >= 1 && counter > limit;
-}
+ var result = {
+ body: message,
+ };
-function shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {
- var payload = null;
- if (error) {
- error = new Error(error);
- }
- if (!error && !shouldSend) {
- payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);
+ if (custom) {
+ result.extra = _.merge(custom);
}
- return {error: error, shouldSend: shouldSend, payload: payload};
+
+ _.set(item, 'data.body', { message: result });
+ callback(null, item);
}
-function rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {
- var environment = options.environment || (options.payload && options.payload.environment);
- var msg;
- if (perMinute) {
- msg = 'item per minute limit reached, ignoring errors until timeout';
- } else {
- msg = 'maxItems has been hit, ignoring errors until reset.';
- }
- var item = {
- body: {
- message: {
- body: msg,
- extra: {
- maxItems: globalRateLimit,
- itemsPerMinute: limitPerMin
- }
- }
- },
- language: 'javascript',
- environment: environment,
- notifier: {
- version: (options.notifier && options.notifier.version) || options.version
- }
- };
- if (platform === 'browser') {
- item.platform = 'browser';
- item.framework = 'browser-js';
- item.notifier.name = 'rollbar-browser-js';
- } else if (platform === 'server') {
- item.framework = options.framework || 'node-js';
- item.notifier.name = options.notifier.name;
- } else if (platform === 'react-native') {
- item.framework = options.framework || 'react-native';
- item.notifier.name = options.notifier.name;
+function stackFromItem(item) {
+ // Transform a TraceKit stackInfo object into a Rollbar trace
+ var stack = item.stackInfo.stack;
+ if (
+ stack &&
+ stack.length === 0 &&
+ item._unhandledStackInfo &&
+ item._unhandledStackInfo.stack
+ ) {
+ stack = item._unhandledStackInfo.stack;
}
- return item;
+ return stack;
}
-module.exports = RateLimiter;
+function addBodyTraceChain(item, options, callback) {
+ var traceChain = item.stackInfo.traceChain;
+ var traces = [];
+ var traceChainLength = traceChain.length;
+ for (var i = 0; i < traceChainLength; i++) {
+ var trace = buildTrace(item, traceChain[i], options);
+ traces.push(trace);
+ }
-/***/ }),
-/* 12 */
-/***/ (function(module, exports, __webpack_require__) {
+ _.set(item, 'data.body', { trace_chain: traces });
+ callback(null, item);
+}
-"use strict";
+function addBodyTrace(item, options, callback) {
+ var stack = stackFromItem(item);
+ if (stack) {
+ var trace = buildTrace(item, item.stackInfo, options);
+ _.set(item, 'data.body', { trace: trace });
+ callback(null, item);
+ } else {
+ var stackInfo = item.stackInfo;
+ var guess = errorParser.guessErrorClass(stackInfo.message);
+ var className = errorClass(stackInfo, guess[0], options);
+ var message = guess[1];
-'use strict';
+ item.message = className + ': ' + message;
+ addBodyMessage(item, options, callback);
+ }
+}
-var hasOwn = Object.prototype.hasOwnProperty;
-var toStr = Object.prototype.toString;
+function buildTrace(item, stackInfo, options) {
+ var description = item && item.data.description;
+ var custom = item && item.custom;
+ var stack = stackFromItem(item);
-var isPlainObject = function isPlainObject(obj) {
- if (!obj || toStr.call(obj) !== '[object Object]') {
- return false;
- }
+ var guess = errorParser.guessErrorClass(stackInfo.message);
+ var className = errorClass(stackInfo, guess[0], options);
+ var message = guess[1];
+ var trace = {
+ exception: {
+ class: className,
+ message: message,
+ },
+ };
- var hasOwnConstructor = hasOwn.call(obj, 'constructor');
- var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
- // Not own constructor property must be Object
- if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
- return false;
- }
+ if (description) {
+ trace.exception.description = description;
+ }
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
- var key;
- for (key in obj) {/**/}
+ if (stack) {
+ if (stack.length === 0) {
+ trace.exception.stack = stackInfo.rawStack;
+ trace.exception.raw = String(stackInfo.rawException);
+ }
+ var stackFrame;
+ var frame;
+ var code;
+ var pre;
+ var post;
+ var contextLength;
+ var i, mid;
- return typeof key === 'undefined' || hasOwn.call(obj, key);
-};
+ trace.frames = [];
+ for (i = 0; i < stack.length; ++i) {
+ stackFrame = stack[i];
+ frame = {
+ filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',
+ lineno: stackFrame.line || null,
+ method:
+ !stackFrame.func || stackFrame.func === '?'
+ ? '[anonymous]'
+ : stackFrame.func,
+ colno: stackFrame.column,
+ };
+ if (options.sendFrameUrl) {
+ frame.url = stackFrame.url;
+ }
+ if (
+ frame.method &&
+ frame.method.endsWith &&
+ frame.method.endsWith('_rollbar_wrapped')
+ ) {
+ continue;
+ }
-function merge() {
- var i, src, copy, clone, name,
- result = {},
- current = null,
- length = arguments.length;
+ code = pre = post = null;
+ contextLength = stackFrame.context ? stackFrame.context.length : 0;
+ if (contextLength) {
+ mid = Math.floor(contextLength / 2);
+ pre = stackFrame.context.slice(0, mid);
+ code = stackFrame.context[mid];
+ post = stackFrame.context.slice(mid);
+ }
- for (i=0; i < length; i++) {
- current = arguments[i];
- if (current == null) {
- continue;
- }
+ if (code) {
+ frame.code = code;
+ }
- for (name in current) {
- src = result[name];
- copy = current[name];
- if (result !== copy) {
- if (copy && isPlainObject(copy)) {
- clone = src && isPlainObject(src) ? src : {};
- result[name] = merge(clone, copy);
- } else if (typeof copy !== 'undefined') {
- result[name] = copy;
+ if (pre || post) {
+ frame.context = {};
+ if (pre && pre.length) {
+ frame.context.pre = pre;
+ }
+ if (post && post.length) {
+ frame.context.post = post;
}
}
- }
- }
- return result;
-}
-module.exports = merge;
+ if (stackFrame.args) {
+ frame.args = stackFrame.args;
+ }
+ trace.frames.push(frame);
+ }
-/***/ }),
-/* 13 */
-/***/ (function(module, exports, __webpack_require__) {
+ // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last
+ trace.frames.reverse();
-"use strict";
+ if (custom) {
+ trace.extra = _.merge(custom);
+ }
+ }
+ return trace;
+}
-var _ = __webpack_require__(0);
+function errorClass(stackInfo, guess, options) {
+ if (stackInfo.name) {
+ return stackInfo.name;
+ } else if (options.guessErrorClass) {
+ return guess;
+ } else {
+ return '(unknown)';
+ }
+}
-/*
- * Queue - an object which handles which handles a queue of items to be sent to Rollbar.
- * This object handles rate limiting via a passed in rate limiter, retries based on connection
- * errors, and filtering of items based on a set of configurable predicates. The communication to
- * the backend is performed via a given API object.
- *
- * @param rateLimiter - An object which conforms to the interface
- * rateLimiter.shouldSend(item) -> bool
- * @param api - An object which conforms to the interface
- * api.postItem(payload, function(err, response))
- * @param logger - An object used to log verbose messages if desired
- * @param options - see Queue.prototype.configure
- */
-function Queue(rateLimiter, api, logger, options) {
- this.rateLimiter = rateLimiter;
- this.api = api;
- this.logger = logger;
- this.options = options;
- this.predicates = [];
- this.pendingItems = [];
- this.pendingRequests = [];
- this.retryQueue = [];
- this.retryHandle = null;
- this.waitCallback = null;
- this.waitIntervalID = null;
+function addScrubber(scrubFn) {
+ return function (item, options, callback) {
+ if (scrubFn) {
+ var scrubFields = options.scrubFields || [];
+ var scrubPaths = options.scrubPaths || [];
+ item.data = scrubFn(item.data, scrubFields, scrubPaths);
+ }
+ callback(null, item);
+ };
}
-/*
- * configure - updates the options this queue uses
- *
- * @param options
- */
-Queue.prototype.configure = function(options) {
- this.api && this.api.configure(options);
- var oldOptions = this.options;
- this.options = _.merge(oldOptions, options);
- return this;
+module.exports = {
+ handleDomException: handleDomException,
+ handleItemWithError: handleItemWithError,
+ ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,
+ addBaseInfo: addBaseInfo,
+ addRequestInfo: addRequestInfo,
+ addClientInfo: addClientInfo,
+ addPluginInfo: addPluginInfo,
+ addBody: addBody,
+ addScrubber: addScrubber,
};
-/*
- * addPredicate - adds a predicate to the end of the list of predicates for this queue
- *
- * @param predicate - function(item, options) -> (bool|{err: Error})
- * Returning true means that this predicate passes and the item is okay to go on the queue
- * Returning false means do not add the item to the queue, but it is not an error
- * Returning {err: Error} means do not add the item to the queue, and the given error explains why
- * Returning {err: undefined} is equivalent to returning true but don't do that
- */
-Queue.prototype.addPredicate = function(predicate) {
- if (_.isFunction(predicate)) {
- this.predicates.push(predicate);
- }
- return this;
-};
-Queue.prototype.addPendingItem = function(item) {
- this.pendingItems.push(item);
-};
+/***/ }),
-Queue.prototype.removePendingItem = function(item) {
- var idx = this.pendingItems.indexOf(item);
- if (idx !== -1) {
- this.pendingItems.splice(idx, 1);
- }
-};
+/***/ 477:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-/*
- * addItem - Send an item to the Rollbar API if all of the predicates are satisfied
- *
- * @param item - The payload to send to the backend
- * @param callback - function(error, repsonse) which will be called with the response from the API
- * in the case of a success, otherwise response will be null and error will have a value. If both
- * error and response are null then the item was stopped by a predicate which did not consider this
- * to be an error condition, but nonetheless did not send the item to the API.
- * @param originalError - The original error before any transformations that is to be logged if any
- */
-Queue.prototype.addItem = function(item, callback, originalError, originalItem) {
- if (!callback || !_.isFunction(callback)) {
- callback = function() { return; };
- }
- var predicateResult = this._applyPredicates(item);
- if (predicateResult.stop) {
- this.removePendingItem(originalItem);
- callback(predicateResult.err);
- return;
- }
- this._maybeLog(item, originalError);
- this.removePendingItem(originalItem);
- if (!this.options.transmit) {
- callback(new Error('Transmit disabled'));
- return;
- }
- this.pendingRequests.push(item);
- try {
- this._makeApiRequest(item, function(err, resp) {
- this._dequeuePendingRequest(item);
- callback(err, resp);
- }.bind(this));
- } catch (e) {
- this._dequeuePendingRequest(item);
- callback(e);
- }
-};
+"use strict";
-/*
- * wait - Stop any further errors from being added to the queue, and get called back when all items
- * currently processing have finished sending to the backend.
- *
- * @param callback - function() called when all pending items have been sent
- */
-Queue.prototype.wait = function(callback) {
- if (!_.isFunction(callback)) {
- return;
- }
- this.waitCallback = callback;
- if (this._maybeCallWait()) {
- return;
- }
- if (this.waitIntervalID) {
- this.waitIntervalID = clearInterval(this.waitIntervalID);
- }
- this.waitIntervalID = setInterval(function() {
- this._maybeCallWait();
- }.bind(this), 500);
-};
-/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the
- * given item with the currently configured options.
- *
- * @param item - An item in the queue
- * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,
- * the error value should be passed up to a callbak if we are stopping.
- */
-Queue.prototype._applyPredicates = function(item) {
- var p = null;
- for (var i = 0, len = this.predicates.length; i < len; i++) {
- p = this.predicates[i](item, this.options);
- if (!p || p.err !== undefined) {
- return {stop: true, err: p.err};
- }
- }
- return {stop: false, err: null};
-};
+var _ = __webpack_require__(702);
+var makeFetchRequest = __webpack_require__(656);
+var makeXhrRequest = __webpack_require__(86);
/*
- * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an
- * effort to retry if we are configured to do so.
+ * accessToken may be embedded in payload but that should not
+ * be assumed
*
- * @param item - an item ready to send to the backend
- * @param callback - function(err, response)
+ * options: {
+ * hostname
+ * protocol
+ * path
+ * port
+ * method
+ * transport ('xhr' | 'fetch')
+ * }
+ *
+ * params is an object containing key/value pairs. These
+ * will be appended to the path as 'key=value&key=value'
+ *
+ * payload is an unserialized object
*/
-Queue.prototype._makeApiRequest = function(item, callback) {
- var rateLimitResponse = this.rateLimiter.shouldSend(item);
- if (rateLimitResponse.shouldSend) {
- this.api.postItem(item, function(err, resp) {
- if (err) {
- this._maybeRetry(err, item, callback);
- } else {
- callback(err, resp);
- }
- }.bind(this));
- } else if (rateLimitResponse.error) {
- callback(rateLimitResponse.error);
- } else {
- this.api.postItem(rateLimitResponse.payload, callback);
+function Transport(truncation) {
+ this.truncation = truncation;
+}
+
+Transport.prototype.get = function (
+ accessToken,
+ options,
+ params,
+ callback,
+ requestFactory,
+) {
+ if (!callback || !_.isFunction(callback)) {
+ callback = function () {};
}
+ _.addParamsAndAccessTokenToPath(accessToken, options, params);
+
+ var method = 'GET';
+ var url = _.formatUrl(options);
+ this._makeZoneRequest(
+ accessToken,
+ url,
+ method,
+ null,
+ callback,
+ requestFactory,
+ options.timeout,
+ options.transport,
+ );
};
-// These are errors basically mean there is no internet connection
-var RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];
+Transport.prototype.post = function (
+ accessToken,
+ options,
+ payload,
+ callback,
+ requestFactory,
+) {
+ if (!callback || !_.isFunction(callback)) {
+ callback = function () {};
+ }
-/*
- * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback
- * with the error.
- *
- * @param err - an error returned by the API transport
- * @param item - the item that was trying to be sent when this error occured
- * @param callback - function(err, response)
- */
-Queue.prototype._maybeRetry = function(err, item, callback) {
- var shouldRetry = false;
- if (this.options.retryInterval) {
- for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {
- if (err.code === RETRIABLE_ERRORS[i]) {
- shouldRetry = true;
- break;
- }
- }
- if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {
- item.retries = item.retries ? item.retries + 1 : 1;
- if (item.retries > this.options.maxRetries) {
- shouldRetry = false;
- }
- }
+ if (!payload) {
+ return callback(new Error('Cannot send empty request'));
}
- if (shouldRetry) {
- this._retryApiRequest(item, callback);
+
+ var stringifyResult;
+ if (this.truncation) {
+ stringifyResult = this.truncation.truncate(payload);
} else {
- callback(err);
+ stringifyResult = _.stringify(payload);
+ }
+ if (stringifyResult.error) {
+ return callback(stringifyResult.error);
}
-};
-/*
- * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process
- * that queue based on the retryInterval in the options for this queue.
- *
- * @param item - an item that failed to send due to an error we deem retriable
- * @param callback - function(err, response)
- */
-Queue.prototype._retryApiRequest = function(item, callback) {
- this.retryQueue.push({item: item, callback: callback});
+ var writeData = stringifyResult.value;
+ var method = 'POST';
+ var url = _.formatUrl(options);
+ this._makeZoneRequest(
+ accessToken,
+ url,
+ method,
+ writeData,
+ callback,
+ requestFactory,
+ options.timeout,
+ options.transport,
+ );
+};
- if (!this.retryHandle) {
- this.retryHandle = setInterval(function() {
- while (this.retryQueue.length) {
- var retryObject = this.retryQueue.shift();
- this._makeApiRequest(retryObject.item, retryObject.callback);
- }
- }.bind(this), this.options.retryInterval);
+Transport.prototype.postJsonPayload = function (
+ accessToken,
+ options,
+ jsonPayload,
+ callback,
+ requestFactory,
+) {
+ if (!callback || !_.isFunction(callback)) {
+ callback = function () {};
}
+
+ var method = 'POST';
+ var url = _.formatUrl(options);
+ this._makeZoneRequest(
+ accessToken,
+ url,
+ method,
+ jsonPayload,
+ callback,
+ requestFactory,
+ options.timeout,
+ options.transport,
+ );
};
-/*
- * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to
- * enable to functionality of providing a callback that clients can pass to `wait` to be notified
- * when the pending request queue has been emptied. This must be called when the API finishes
- * processing this item. If a `wait` callback is configured, it is called by this function.
- *
- * @param item - the item previously added to the pending request queue
- */
-Queue.prototype._dequeuePendingRequest = function(item) {
- var idx = this.pendingRequests.indexOf(item);
- if (idx !== -1) {
- this.pendingRequests.splice(idx, 1);
- this._maybeCallWait();
+// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope
+// so Angular change detection isn't triggered on each API call.
+// This is the equivalent of runOutsideAngular().
+//
+Transport.prototype._makeZoneRequest = function () {
+ var gWindow =
+ (typeof window != 'undefined' && window) ||
+ (typeof self != 'undefined' && self);
+ var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;
+ var args = Array.prototype.slice.call(arguments);
+
+ if (currentZone && currentZone._name === 'angular') {
+ var rootZone = currentZone._parent;
+ var self = this;
+ rootZone.run(function () {
+ self._makeRequest.apply(undefined, args);
+ });
+ } else {
+ this._makeRequest.apply(undefined, args);
}
};
-Queue.prototype._maybeLog = function(data, originalError) {
- if (this.logger && this.options.verbose) {
- var message = originalError;
- message = message || _.get(data, 'body.trace.exception.message');
- message = message || _.get(data, 'body.trace_chain.0.exception.message');
- if (message) {
- this.logger.error(message);
- return;
- }
- message = _.get(data, 'body.message.body');
- if (message) {
- this.logger.log(message);
- }
+Transport.prototype._makeRequest = function (
+ accessToken,
+ url,
+ method,
+ data,
+ callback,
+ requestFactory,
+ timeout,
+ transport,
+) {
+ if (typeof RollbarProxy !== 'undefined') {
+ return _proxyRequest(data, callback);
}
-};
-Queue.prototype._maybeCallWait = function() {
- if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {
- if (this.waitIntervalID) {
- this.waitIntervalID = clearInterval(this.waitIntervalID);
- }
- this.waitCallback();
- return true;
+ if (transport === 'fetch') {
+ makeFetchRequest(accessToken, url, method, data, callback, timeout);
+ } else {
+ makeXhrRequest(
+ accessToken,
+ url,
+ method,
+ data,
+ callback,
+ requestFactory,
+ timeout,
+ );
}
- return false;
};
-module.exports = Queue;
+/* global RollbarProxy */
+function _proxyRequest(json, callback) {
+ var rollbarProxy = new RollbarProxy();
+ rollbarProxy.sendJsonPayload(
+ json,
+ function (_msg) {
+ /* do nothing */
+ }, // eslint-disable-line no-unused-vars
+ function (err) {
+ callback(new Error(err));
+ },
+ );
+}
+
+module.exports = Transport;
/***/ }),
-/* 14 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 656:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var _ = __webpack_require__(0);
+var logger = __webpack_require__(802);
+var _ = __webpack_require__(702);
-/*
- * Notifier - the internal object responsible for delegating between the client exposed API, the
- * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the
- * queue which handles the communcation with the Rollbar API servers.
- *
- * @param queue - an object that conforms to the interface: addItem(item, callback)
- * @param options - an object representing the options to be set for this notifier, this should have
- * any defaults already set by the caller
- */
-function Notifier(queue, options) {
- this.queue = queue;
- this.options = options;
- this.transforms = [];
- this.diagnostic = {};
+function makeFetchRequest(accessToken, url, method, data, callback, timeout) {
+ var controller;
+ var timeoutId;
+
+ if (_.isFiniteNumber(timeout)) {
+ controller = new AbortController();
+ timeoutId = setTimeout(function () {
+ controller.abort();
+ }, timeout);
+ }
+
+ fetch(url, {
+ method: method,
+ headers: {
+ 'Content-Type': 'application/json',
+ 'X-Rollbar-Access-Token': accessToken,
+ signal: controller && controller.signal,
+ },
+ body: data,
+ })
+ .then(function (response) {
+ if (timeoutId) clearTimeout(timeoutId);
+ return response.json();
+ })
+ .then(function (data) {
+ callback(null, data);
+ })
+ .catch(function (error) {
+ logger.error(error.message);
+ callback(error);
+ });
}
-/*
- * configure - updates the options for this notifier with the passed in object
- *
- * @param options - an object which gets merged with the current options set on this notifier
- * @returns this
- */
-Notifier.prototype.configure = function(options) {
- this.queue && this.queue.configure(options);
- var oldOptions = this.options;
- this.options = _.merge(oldOptions, options);
- return this;
-};
+module.exports = makeFetchRequest;
-/*
- * addTransform - adds a transform onto the end of the queue of transforms for this notifier
- *
- * @param transform - a function which takes three arguments:
- * * item: An Object representing the data to eventually be sent to Rollbar
- * * options: The current value of the options for this notifier
- * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this
- * callback with a null value for error if it wants the processing chain to continue, otherwise
- * with an error to terminate the processing. The item should be the updated item after this
- * transform is finished modifying it.
- */
-Notifier.prototype.addTransform = function(transform) {
- if (_.isFunction(transform)) {
- this.transforms.push(transform);
- }
- return this;
-};
-/*
- * log - the internal log function which applies the configured transforms and then pushes onto the
- * queue to be sent to the backend.
- *
- * @param item - An object with the following structure:
- * message [String] - An optional string to be sent to rollbar
- * error [Error] - An optional error
- *
- * @param callback - A function of type function(err, resp) which will be called with exactly one
- * null argument and one non-null argument. The callback will be called once, either during the
- * transform stage if an error occurs inside a transform, or in response to the communication with
- * the backend. The second argument will be the response from the backend in case of success.
- */
-Notifier.prototype.log = function(item, callback) {
- if (!callback || !_.isFunction(callback)) {
- callback = function() {};
- }
+/***/ }),
- if (!this.options.enabled) {
- return callback(new Error('Rollbar is not enabled'));
+/***/ 86:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+/*global XDomainRequest*/
+
+var _ = __webpack_require__(702);
+var logger = __webpack_require__(802);
+
+function makeXhrRequest(
+ accessToken,
+ url,
+ method,
+ data,
+ callback,
+ requestFactory,
+ timeout,
+) {
+ var request;
+ if (requestFactory) {
+ request = requestFactory();
+ } else {
+ request = _createXMLHTTPObject();
+ }
+ if (!request) {
+ // Give up, no way to send requests
+ return callback(new Error('No way to send a request'));
}
+ try {
+ try {
+ var onreadystatechange = function () {
+ try {
+ if (onreadystatechange && request.readyState === 4) {
+ onreadystatechange = undefined;
+
+ var parseResponse = _.jsonParse(request.responseText);
+ if (_isSuccess(request)) {
+ callback(parseResponse.error, parseResponse.value);
+ return;
+ } else if (_isNormalFailure(request)) {
+ if (request.status === 403) {
+ // likely caused by using a server access token
+ var message =
+ parseResponse.value && parseResponse.value.message;
+ logger.error(message);
+ }
+ // return valid http status codes
+ callback(new Error(String(request.status)));
+ } else {
+ // IE will return a status 12000+ on some sort of connection failure,
+ // so we return a blank error
+ // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx
+ var msg =
+ 'XHR response had no status code (likely connection failure)';
+ callback(_newRetriableError(msg));
+ }
+ }
+ } catch (ex) {
+ //jquery source mentions firefox may error out while accessing the
+ //request members if there is a network error
+ //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111
+ var exc;
+ if (ex && ex.stack) {
+ exc = ex;
+ } else {
+ exc = new Error(ex);
+ }
+ callback(exc);
+ }
+ };
- this.queue.addPendingItem(item);
- var originalError = item.err;
- this._applyTransforms(item, function(err, i) {
- if (err) {
- this.queue.removePendingItem(item);
- return callback(err, null);
- }
- this.queue.addItem(i, callback, originalError, item);
- }.bind(this));
-};
+ request.open(method, url, true);
+ if (request.setRequestHeader) {
+ request.setRequestHeader('Content-Type', 'application/json');
+ request.setRequestHeader('X-Rollbar-Access-Token', accessToken);
+ }
-/* Internal */
+ if (_.isFiniteNumber(timeout)) {
+ request.timeout = timeout;
+ }
-/*
- * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See
- * `addTransform` for more information.
- *
- * @param item - An item to be transformed
- * @param callback - A function of type function(err, item) which will be called with a non-null
- * error and a null item in the case of a transform failure, or a null error and non-null item after
- * all transforms have been applied.
- */
-Notifier.prototype._applyTransforms = function(item, callback) {
- var transformIndex = -1;
- var transformsLength = this.transforms.length;
- var transforms = this.transforms;
- var options = this.options;
+ request.onreadystatechange = onreadystatechange;
+ request.send(data);
+ } catch (e1) {
+ // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest
+ if (typeof XDomainRequest !== 'undefined') {
+ // Assume we are in a really old browser which has a bunch of limitations:
+ // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx
- var cb = function(err, i) {
- if (err) {
- callback(err, null);
- return;
- }
+ // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case
+ if (!window || !window.location) {
+ return callback(
+ new Error(
+ 'No window available during request, unknown environment',
+ ),
+ );
+ }
- transformIndex++;
+ // If the current page is http, try and send over http
+ if (
+ window.location.href.substring(0, 5) === 'http:' &&
+ url.substring(0, 5) === 'https'
+ ) {
+ url = 'http' + url.substring(5);
+ }
- if (transformIndex === transformsLength) {
- callback(null, i);
- return;
+ var xdomainrequest = new XDomainRequest();
+ xdomainrequest.onprogress = function () {};
+ xdomainrequest.ontimeout = function () {
+ var msg = 'Request timed out';
+ var code = 'ETIMEDOUT';
+ callback(_newRetriableError(msg, code));
+ };
+ xdomainrequest.onerror = function () {
+ callback(new Error('Error during request'));
+ };
+ xdomainrequest.onload = function () {
+ var parseResponse = _.jsonParse(xdomainrequest.responseText);
+ callback(parseResponse.error, parseResponse.value);
+ };
+ xdomainrequest.open(method, url, true);
+ xdomainrequest.send(data);
+ } else {
+ callback(new Error('Cannot find a method to transport a request'));
+ }
}
+ } catch (e2) {
+ callback(e2);
+ }
+}
- transforms[transformIndex](i, options, cb);
- };
+function _createXMLHTTPObject() {
+ /* global ActiveXObject:false */
- cb(null, item);
-};
+ var factories = [
+ function () {
+ return new XMLHttpRequest();
+ },
+ function () {
+ return new ActiveXObject('Msxml2.XMLHTTP');
+ },
+ function () {
+ return new ActiveXObject('Msxml3.XMLHTTP');
+ },
+ function () {
+ return new ActiveXObject('Microsoft.XMLHTTP');
+ },
+ ];
+ var xmlhttp;
+ var i;
+ var numFactories = factories.length;
+ for (i = 0; i < numFactories; i++) {
+ /* eslint-disable no-empty */
+ try {
+ xmlhttp = factories[i]();
+ break;
+ } catch (e) {
+ // pass
+ }
+ /* eslint-enable no-empty */
+ }
+ return xmlhttp;
+}
-module.exports = Notifier;
+function _isSuccess(r) {
+ return r && r.status && r.status === 200;
+}
+function _isNormalFailure(r) {
+ return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;
+}
-/***/ }),
-/* 15 */
-/***/ (function(module, exports, __webpack_require__) {
+function _newRetriableError(message, code) {
+ var err = new Error(message);
+ err.code = code || 'ENOTFOUND';
+ return err;
+}
-"use strict";
+module.exports = makeXhrRequest;
-var _ = __webpack_require__(0);
-var helpers = __webpack_require__(16);
+/***/ }),
-var defaultOptions = {
- hostname: 'api.rollbar.com',
- path: '/api/1/item/',
- search: null,
- version: '1',
- protocol: 'https:',
- port: 443
-};
+/***/ 509:
+/***/ ((module) => {
-/**
- * Api is an object that encapsulates methods of communicating with
- * the Rollbar API. It is a standard interface with some parts implemented
- * differently for server or browser contexts. It is an object that should
- * be instantiated when used so it can contain non-global options that may
- * be different for another instance of RollbarApi.
- *
- * @param options {
- * accessToken: the accessToken to use for posting items to rollbar
- * endpoint: an alternative endpoint to send errors to
- * must be a valid, fully qualified URL.
- * The default is: https://api.rollbar.com/api/1/item
- * proxy: if you wish to proxy requests provide an object
- * with the following keys:
- * host or hostname (required): foo.example.com
- * port (optional): 123
- * protocol (optional): https
- * }
- */
-function Api(options, transport, urllib, truncation, jsonBackup) {
- this.options = options;
- this.transport = transport;
- this.url = urllib;
- this.truncation = truncation;
- this.jsonBackup = jsonBackup;
- this.accessToken = options.accessToken;
- this.transportOptions = _getTransport(options, urllib);
-}
+"use strict";
-/**
- *
- * @param data
- * @param callback
- */
-Api.prototype.postItem = function(data, callback) {
- var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');
- var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);
- this.transport.post(this.accessToken, transportOptions, payload, callback);
-};
-/**
- *
- * @param data
- * @param callback
- */
-Api.prototype.buildJsonPayload = function(data, callback) {
- var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);
+// See https://nodejs.org/docs/latest/api/url.html
+function parse(url) {
+ var result = {
+ protocol: null,
+ auth: null,
+ host: null,
+ path: null,
+ hash: null,
+ href: url,
+ hostname: null,
+ port: null,
+ pathname: null,
+ search: null,
+ query: null,
+ };
- var stringifyResult;
- if (this.truncation) {
- stringifyResult = this.truncation.truncate(payload);
+ var i, last;
+ i = url.indexOf('//');
+ if (i !== -1) {
+ result.protocol = url.substring(0, i);
+ last = i + 2;
} else {
- stringifyResult = _.stringify(payload)
+ last = 0;
}
- if (stringifyResult.error) {
- if (callback) {
- callback(stringifyResult.error);
- }
- return null;
+ i = url.indexOf('@', last);
+ if (i !== -1) {
+ result.auth = url.substring(last, i);
+ last = i + 1;
}
- return stringifyResult.value;
-};
+ i = url.indexOf('/', last);
+ if (i === -1) {
+ i = url.indexOf('?', last);
+ if (i === -1) {
+ i = url.indexOf('#', last);
+ if (i === -1) {
+ result.host = url.substring(last);
+ } else {
+ result.host = url.substring(last, i);
+ result.hash = url.substring(i);
+ }
+ result.hostname = result.host.split(':')[0];
+ result.port = result.host.split(':')[1];
+ if (result.port) {
+ result.port = parseInt(result.port, 10);
+ }
+ return result;
+ } else {
+ result.host = url.substring(last, i);
+ result.hostname = result.host.split(':')[0];
+ result.port = result.host.split(':')[1];
+ if (result.port) {
+ result.port = parseInt(result.port, 10);
+ }
+ last = i;
+ }
+ } else {
+ result.host = url.substring(last, i);
+ result.hostname = result.host.split(':')[0];
+ result.port = result.host.split(':')[1];
+ if (result.port) {
+ result.port = parseInt(result.port, 10);
+ }
+ last = i;
+ }
-/**
- *
- * @param jsonPayload
- * @param callback
- */
-Api.prototype.postJsonPayload = function(jsonPayload, callback) {
- var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');
- this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);
-};
+ i = url.indexOf('#', last);
+ if (i === -1) {
+ result.path = url.substring(last);
+ } else {
+ result.path = url.substring(last, i);
+ result.hash = url.substring(i);
+ }
-Api.prototype.configure = function(options) {
- var oldOptions = this.oldOptions;
- this.options = _.merge(oldOptions, options);
- this.transportOptions = _getTransport(this.options, this.url);
- if (this.options.accessToken !== undefined) {
- this.accessToken = this.options.accessToken;
+ if (result.path) {
+ var pathParts = result.path.split('?');
+ result.pathname = pathParts[0];
+ result.query = pathParts[1];
+ result.search = result.query ? '?' + result.query : null;
}
- return this;
-};
-
-function _getTransport(options, url) {
- return helpers.getTransportFromOptions(options, defaultOptions, url);
+ return result;
}
-module.exports = Api;
+module.exports = {
+ parse: parse,
+};
/***/ }),
-/* 16 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 965:
+/***/ ((module) => {
"use strict";
-var _ = __webpack_require__(0);
+function wrapGlobals(window, handler, shim) {
+ if (!window) {
+ return;
+ }
+ // Adapted from https://github.com/bugsnag/bugsnag-js
+ 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(
+ ',',
+ );
+ var i, global;
+ for (i = 0; i < globals.length; ++i) {
+ global = globals[i];
-function buildPayload(accessToken, data, jsonBackup) {
- if (!_.isType(data.context, 'string')) {
- var contextResult = _.stringify(data.context, jsonBackup);
- if (contextResult.error) {
- data.context = 'Error: could not serialize \'context\'';
- } else {
- data.context = contextResult.value || '';
- }
- if (data.context.length > 255) {
- data.context = data.context.substr(0, 255);
+ if (window[global] && window[global].prototype) {
+ _extendListenerPrototype(handler, window[global].prototype, shim);
}
}
- return {
- access_token: accessToken,
- data: data
- };
}
-function getTransportFromOptions(options, defaults, url) {
- var hostname = defaults.hostname;
- var protocol = defaults.protocol;
- var port = defaults.port;
- var path = defaults.path;
- var search = defaults.search;
- var timeout = options.timeout;
+function _extendListenerPrototype(handler, prototype, shim) {
+ if (
+ prototype.hasOwnProperty &&
+ prototype.hasOwnProperty('addEventListener')
+ ) {
+ var oldAddEventListener = prototype.addEventListener;
+ while (
+ oldAddEventListener._rollbarOldAdd &&
+ oldAddEventListener.belongsToShim
+ ) {
+ oldAddEventListener = oldAddEventListener._rollbarOldAdd;
+ }
+ var addFn = function (event, callback, bubble) {
+ oldAddEventListener.call(this, event, handler.wrap(callback), bubble);
+ };
+ addFn._rollbarOldAdd = oldAddEventListener;
+ addFn.belongsToShim = shim;
+ prototype.addEventListener = addFn;
- var proxy = options.proxy;
- if (options.endpoint) {
- var opts = url.parse(options.endpoint);
- hostname = opts.hostname;
- protocol = opts.protocol;
- port = opts.port;
- path = opts.pathname;
- search = opts.search;
+ var oldRemoveEventListener = prototype.removeEventListener;
+ while (
+ oldRemoveEventListener._rollbarOldRemove &&
+ oldRemoveEventListener.belongsToShim
+ ) {
+ oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;
+ }
+ var removeFn = function (event, callback, bubble) {
+ oldRemoveEventListener.call(
+ this,
+ event,
+ (callback && callback._rollbar_wrapped) || callback,
+ bubble,
+ );
+ };
+ removeFn._rollbarOldRemove = oldRemoveEventListener;
+ removeFn.belongsToShim = shim;
+ prototype.removeEventListener = removeFn;
}
- return {
- timeout: timeout,
- hostname: hostname,
- protocol: protocol,
- port: port,
- path: path,
- search: search,
- proxy: proxy
- };
}
-function transportOptions(transport, method) {
- var protocol = transport.protocol || 'https:';
- var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);
- var hostname = transport.hostname;
- var path = transport.path;
- var timeout = transport.timeout;
- if (transport.search) {
- path = path + transport.search;
- }
- if (transport.proxy) {
- path = protocol + '//' + hostname + path;
- hostname = transport.proxy.host || transport.proxy.hostname;
- port = transport.proxy.port;
- protocol = transport.proxy.protocol || protocol;
- }
- return {
- timeout: timeout,
- protocol: protocol,
- hostname: hostname,
- path: path,
- port: port,
- method: method
- };
-}
+module.exports = wrapGlobals;
-function appendPathToPath(base, path) {
- var baseTrailingSlash = /\/$/.test(base);
- var pathBeginningSlash = /^\//.test(path);
- if (baseTrailingSlash && pathBeginningSlash) {
- path = path.substring(1);
- } else if (!baseTrailingSlash && !pathBeginningSlash) {
- path = '/' + path;
- }
+/***/ }),
+
+/***/ 948:
+/***/ ((module) => {
+
+"use strict";
- return base + path;
-}
module.exports = {
- buildPayload: buildPayload,
- getTransportFromOptions: getTransportFromOptions,
- transportOptions: transportOptions,
- appendPathToPath: appendPathToPath
+ version: '2.26.4',
+ endpoint: 'api.rollbar.com/api/1/item/',
+ logLevel: 'debug',
+ reportLevel: 'debug',
+ uncaughtErrorLevel: 'error',
+ maxItems: 0,
+ itemsPerMin: 60,
};
/***/ }),
-/* 17 */
-/***/ (function(module, exports) {
-// Console-polyfill. MIT license.
-// https://github.com/paulmillr/console-polyfill
-// Make it safe to do console.log() always.
-(function(global) {
- 'use strict';
- if (!global.console) {
- global.console = {};
- }
- var con = global.console;
- var prop, method;
- var dummy = function() {};
- var properties = ['memory'];
- var methods = ('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(',');
- while (prop = properties.pop()) if (!con[prop]) con[prop] = {};
- while (method = methods.pop()) if (!con[method]) con[method] = dummy;
- // Using `this` for web workers & supports Browserify / Webpack.
-})(typeof window === 'undefined' ? this : window);
+/***/ 303:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+"use strict";
-/***/ }),
-/* 18 */
-/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+var ErrorStackParser = __webpack_require__(180);
+var UNKNOWN_FUNCTION = '?';
+var ERR_CLASS_REGEXP = new RegExp(
+ '^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ',
+);
-// This detection.js module is used to encapsulate any ugly browser/feature
-// detection we may need to do.
+function guessFunctionName() {
+ return UNKNOWN_FUNCTION;
+}
-// Figure out which version of IE we're using, if any.
-// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library
-// Will return an integer on IE (i.e. 8)
-// Will return undefined otherwise
-function getIEVersion() {
- var undef;
- if (typeof document === 'undefined') {
- return undef;
- }
+function gatherContext() {
+ return null;
+}
- var v = 3,
- div = document.createElement('div'),
- all = div.getElementsByTagName('i');
+function Frame(stackFrame) {
+ var data = {};
- while (
- div.innerHTML = '',
- all[0]
+ data._stackFrame = stackFrame;
+
+ data.url = stackFrame.fileName;
+ data.line = stackFrame.lineNumber;
+ data.func = stackFrame.functionName;
+ data.column = stackFrame.columnNumber;
+ data.args = stackFrame.args;
+
+ data.context = gatherContext();
+
+ return data;
+}
+
+function Stack(exception, skip) {
+ function getStack() {
+ var parserStack = [];
+
+ skip = skip || 0;
+
+ try {
+ parserStack = ErrorStackParser.parse(exception);
+ } catch (e) {
+ parserStack = [];
+ }
+
+ var stack = [];
+
+ for (var i = skip; i < parserStack.length; i++) {
+ stack.push(new Frame(parserStack[i]));
+ }
+
+ return stack;
+ }
+
+ return {
+ stack: getStack(),
+ message: exception.message,
+ name: _mostSpecificErrorName(exception),
+ rawStack: exception.stack,
+ rawException: exception,
+ };
+}
+
+function parse(e, skip) {
+ var err = e;
+
+ if (err.nested || err.cause) {
+ var traceChain = [];
+ while (err) {
+ traceChain.push(new Stack(err, skip));
+ err = err.nested || err.cause;
+
+ skip = 0; // Only apply skip value to primary error
+ }
+
+ // Return primary error with full trace chain attached.
+ traceChain[0].traceChain = traceChain;
+ return traceChain[0];
+ } else {
+ return new Stack(err, skip);
+ }
+}
+
+function guessErrorClass(errMsg) {
+ if (!errMsg || !errMsg.match) {
+ return ['Unknown error. There was no error message to display.', ''];
+ }
+ var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);
+ var errClass = '(unknown)';
+
+ if (errClassMatch) {
+ errClass = errClassMatch[errClassMatch.length - 1];
+ errMsg = errMsg.replace(
+ (errClassMatch[errClassMatch.length - 2] || '') + errClass + ':',
+ '',
);
+ errMsg = errMsg.replace(/(^[\s]+|[\s]+$)/g, '');
+ }
+ return [errClass, errMsg];
+}
- return v > 4 ? v : undef;
+// * Prefers any value over an empty string
+// * Prefers any value over 'Error' where possible
+// * Prefers name over constructor.name when both are more specific than 'Error'
+function _mostSpecificErrorName(error) {
+ var name = error.name && error.name.length && error.name;
+ var constructorName =
+ error.constructor.name &&
+ error.constructor.name.length &&
+ error.constructor.name;
+
+ if (!name || !constructorName) {
+ return name || constructorName;
+ }
+
+ if (name === 'Error') {
+ return constructorName;
+ }
+ return name;
}
-var Detection = {
- ieVersion: getIEVersion
+module.exports = {
+ guessFunctionName: guessFunctionName,
+ guessErrorClass: guessErrorClass,
+ gatherContext: gatherContext,
+ parse: parse,
+ Stack: Stack,
+ Frame: Frame,
};
-module.exports = Detection;
-
/***/ }),
-/* 19 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 420:
+/***/ ((module) => {
"use strict";
-function captureUncaughtExceptions(window, handler, shim) {
- if (!window) { return; }
- var oldOnError;
+'use strict';
- if (typeof handler._rollbarOldOnError === 'function') {
- oldOnError = handler._rollbarOldOnError;
- } else if (window.onerror) {
- oldOnError = window.onerror;
- while (oldOnError._rollbarOldOnError) {
- oldOnError = oldOnError._rollbarOldOnError;
- }
- handler._rollbarOldOnError = oldOnError;
+var hasOwn = Object.prototype.hasOwnProperty;
+var toStr = Object.prototype.toString;
+
+var isPlainObject = function isPlainObject(obj) {
+ if (!obj || toStr.call(obj) !== '[object Object]') {
+ return false;
}
- handler.handleAnonymousErrors();
+ var hasOwnConstructor = hasOwn.call(obj, 'constructor');
+ var hasIsPrototypeOf =
+ obj.constructor &&
+ obj.constructor.prototype &&
+ hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
+ // Not own constructor property must be Object
+ if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
+ return false;
+ }
- var fn = function() {
- var args = Array.prototype.slice.call(arguments, 0);
- _rollbarWindowOnError(window, handler, oldOnError, args);
- };
- if (shim) {
- fn._rollbarOldOnError = oldOnError;
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+ var key;
+ for (key in obj) {
+ /**/
}
- window.onerror = fn;
-}
-function _rollbarWindowOnError(window, r, old, args) {
- if (window._rollbarWrappedError) {
- if (!args[4]) {
- args[4] = window._rollbarWrappedError;
+ return typeof key === 'undefined' || hasOwn.call(obj, key);
+};
+
+function merge() {
+ var i,
+ src,
+ copy,
+ clone,
+ name,
+ result = {},
+ current = null,
+ length = arguments.length;
+
+ for (i = 0; i < length; i++) {
+ current = arguments[i];
+ if (current == null) {
+ continue;
}
- if (!args[5]) {
- args[5] = window._rollbarWrappedError._rollbarContext;
+
+ for (name in current) {
+ src = result[name];
+ copy = current[name];
+ if (result !== copy) {
+ if (copy && isPlainObject(copy)) {
+ clone = src && isPlainObject(src) ? src : {};
+ result[name] = merge(clone, copy);
+ } else if (typeof copy !== 'undefined') {
+ result[name] = copy;
+ }
+ }
}
- window._rollbarWrappedError = null;
}
+ return result;
+}
- var ret = r.handleUncaughtException.apply(r, args);
+module.exports = merge;
- if (old) {
- old.apply(window, args);
- }
- // Let other chained onerror handlers above run before setting this.
- // If an error is thrown and caught within a chained onerror handler,
- // Error.prepareStackTrace() will see that one before the one we want.
- if (ret === 'anonymous') {
- r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()
- }
+/***/ }),
+
+/***/ 314:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+var _ = __webpack_require__(702);
+
+/*
+ * Notifier - the internal object responsible for delegating between the client exposed API, the
+ * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the
+ * queue which handles the communcation with the Rollbar API servers.
+ *
+ * @param queue - an object that conforms to the interface: addItem(item, callback)
+ * @param options - an object representing the options to be set for this notifier, this should have
+ * any defaults already set by the caller
+ */
+function Notifier(queue, options) {
+ this.queue = queue;
+ this.options = options;
+ this.transforms = [];
+ this.diagnostic = {};
}
-function captureUnhandledRejections(window, handler, shim) {
- if (!window) { return; }
+/*
+ * configure - updates the options for this notifier with the passed in object
+ *
+ * @param options - an object which gets merged with the current options set on this notifier
+ * @returns this
+ */
+Notifier.prototype.configure = function (options) {
+ this.queue && this.queue.configure(options);
+ var oldOptions = this.options;
+ this.options = _.merge(oldOptions, options);
+ return this;
+};
- if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {
- window.removeEventListener('unhandledrejection', window._rollbarURH);
+/*
+ * addTransform - adds a transform onto the end of the queue of transforms for this notifier
+ *
+ * @param transform - a function which takes three arguments:
+ * * item: An Object representing the data to eventually be sent to Rollbar
+ * * options: The current value of the options for this notifier
+ * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this
+ * callback with a null value for error if it wants the processing chain to continue, otherwise
+ * with an error to terminate the processing. The item should be the updated item after this
+ * transform is finished modifying it.
+ */
+Notifier.prototype.addTransform = function (transform) {
+ if (_.isFunction(transform)) {
+ this.transforms.push(transform);
}
+ return this;
+};
- var rejectionHandler = function (evt) {
- var reason, promise, detail;
- try {
- reason = evt.reason;
- } catch (e) {
- reason = undefined;
- }
- try {
- promise = evt.promise;
- } catch (e) {
- promise = '[unhandledrejection] error getting `promise` from event';
- }
- try {
- detail = evt.detail;
- if (!reason && detail) {
- reason = detail.reason;
- promise = detail.promise;
+/*
+ * log - the internal log function which applies the configured transforms and then pushes onto the
+ * queue to be sent to the backend.
+ *
+ * @param item - An object with the following structure:
+ * message [String] - An optional string to be sent to rollbar
+ * error [Error] - An optional error
+ *
+ * @param callback - A function of type function(err, resp) which will be called with exactly one
+ * null argument and one non-null argument. The callback will be called once, either during the
+ * transform stage if an error occurs inside a transform, or in response to the communication with
+ * the backend. The second argument will be the response from the backend in case of success.
+ */
+Notifier.prototype.log = function (item, callback) {
+ if (!callback || !_.isFunction(callback)) {
+ callback = function () {};
+ }
+
+ if (!this.options.enabled) {
+ return callback(new Error('Rollbar is not enabled'));
+ }
+
+ this.queue.addPendingItem(item);
+ var originalError = item.err;
+ this._applyTransforms(
+ item,
+ function (err, i) {
+ if (err) {
+ this.queue.removePendingItem(item);
+ return callback(err, null);
}
- } catch (e) {
- // Ignore
- }
- if (!reason) {
- reason = '[unhandledrejection] error getting `reason` from event';
+ this.queue.addItem(i, callback, originalError, item);
+ }.bind(this),
+ );
+};
+
+/* Internal */
+
+/*
+ * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See
+ * `addTransform` for more information.
+ *
+ * @param item - An item to be transformed
+ * @param callback - A function of type function(err, item) which will be called with a non-null
+ * error and a null item in the case of a transform failure, or a null error and non-null item after
+ * all transforms have been applied.
+ */
+Notifier.prototype._applyTransforms = function (item, callback) {
+ var transformIndex = -1;
+ var transformsLength = this.transforms.length;
+ var transforms = this.transforms;
+ var options = this.options;
+
+ var cb = function (err, i) {
+ if (err) {
+ callback(err, null);
+ return;
}
- if (handler && handler.handleUnhandledRejection) {
- handler.handleUnhandledRejection(reason, promise);
+ transformIndex++;
+
+ if (transformIndex === transformsLength) {
+ callback(null, i);
+ return;
}
- };
- rejectionHandler.belongsToShim = shim;
- window._rollbarURH = rejectionHandler;
- window.addEventListener('unhandledrejection', rejectionHandler);
-}
+ transforms[transformIndex](i, options, cb);
+ };
-module.exports = {
- captureUncaughtExceptions: captureUncaughtExceptions,
- captureUnhandledRejections: captureUnhandledRejections
+ cb(null, item);
};
+module.exports = Notifier;
+
/***/ }),
-/* 20 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 61:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-/*global XDomainRequest*/
+var _ = __webpack_require__(702);
-var _ = __webpack_require__(0);
-var logger = __webpack_require__(1);
+function checkLevel(item, settings) {
+ var level = item.level;
+ var levelVal = _.LEVELS[level] || 0;
+ var reportLevel = settings.reportLevel;
+ var reportLevelVal = _.LEVELS[reportLevel] || 0;
-/*
- * accessToken may be embedded in payload but that should not
- * be assumed
- *
- * options: {
- * hostname
- * protocol
- * path
- * port
- * method
- * }
- *
- * params is an object containing key/value pairs. These
- * will be appended to the path as 'key=value&key=value'
- *
- * payload is an unserialized object
- */
-function Transport(truncation) {
- this.truncation = truncation;
+ if (levelVal < reportLevelVal) {
+ return false;
+ }
+ return true;
+}
+
+function userCheckIgnore(logger) {
+ return function (item, settings) {
+ var isUncaught = !!item._isUncaught;
+ delete item._isUncaught;
+ var args = item._originalArgs;
+ delete item._originalArgs;
+ try {
+ if (_.isFunction(settings.onSendCallback)) {
+ settings.onSendCallback(isUncaught, args, item);
+ }
+ } catch (e) {
+ settings.onSendCallback = null;
+ logger.error('Error while calling onSendCallback, removing', e);
+ }
+ try {
+ if (
+ _.isFunction(settings.checkIgnore) &&
+ settings.checkIgnore(isUncaught, args, item)
+ ) {
+ return false;
+ }
+ } catch (e) {
+ settings.checkIgnore = null;
+ logger.error('Error while calling custom checkIgnore(), removing', e);
+ }
+ return true;
+ };
}
-Transport.prototype.get = function(accessToken, options, params, callback, requestFactory) {
- if (!callback || !_.isFunction(callback)) {
- callback = function() {};
- }
- _.addParamsAndAccessTokenToPath(accessToken, options, params);
+function urlIsNotBlockListed(logger) {
+ return function (item, settings) {
+ return !urlIsOnAList(item, settings, 'blocklist', logger);
+ };
+}
- var method = 'GET';
- var url = _.formatUrl(options);
- _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);
+function urlIsSafeListed(logger) {
+ return function (item, settings) {
+ return urlIsOnAList(item, settings, 'safelist', logger);
+ };
}
-Transport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {
- if (!callback || !_.isFunction(callback)) {
- callback = function() {};
+function matchFrames(trace, list, block) {
+ if (!trace) {
+ return !block;
}
- if (!payload) {
- return callback(new Error('Cannot send empty request'));
- }
+ var frames = trace.frames;
- var stringifyResult;
- if (this.truncation) {
- stringifyResult = this.truncation.truncate(payload);
- } else {
- stringifyResult = _.stringify(payload)
- }
- if (stringifyResult.error) {
- return callback(stringifyResult.error);
+ if (!frames || frames.length === 0) {
+ return !block;
}
- var writeData = stringifyResult.value;
- var method = 'POST';
- var url = _.formatUrl(options);
- _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);
-}
+ var frame, filename, url, urlRegex;
+ var listLength = list.length;
+ var frameLength = frames.length;
+ for (var i = 0; i < frameLength; i++) {
+ frame = frames[i];
+ filename = frame.filename;
-Transport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {
- if (!callback || !_.isFunction(callback)) {
- callback = function() {};
- }
+ if (!_.isType(filename, 'string')) {
+ return !block;
+ }
- var method = 'POST';
- var url = _.formatUrl(options);
- _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);
+ for (var j = 0; j < listLength; j++) {
+ url = list[j];
+ urlRegex = new RegExp(url);
+
+ if (urlRegex.test(filename)) {
+ return true;
+ }
+ }
+ }
+ return false;
}
+function urlIsOnAList(item, settings, safeOrBlock, logger) {
+ // safelist is the default
+ var block = false;
+ if (safeOrBlock === 'blocklist') {
+ block = true;
+ }
-// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope
-// so Angular change detection isn't triggered on each API call.
-// This is the equivalent of runOutsideAngular().
-//
-function _makeZoneRequest() {
- var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);
- var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;
- var args = Array.prototype.slice.call(arguments);
+ var list, traces;
+ try {
+ list = block ? settings.hostBlockList : settings.hostSafeList;
+ traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];
- if (currentZone && currentZone._name === 'angular') {
- var rootZone = currentZone._parent;
- rootZone.run(function () {
- _makeRequest.apply(undefined, args);
- });
- } else {
- _makeRequest.apply(undefined, args);
- }
-}
+ // These two checks are important to come first as they are defaults
+ // in case the list is missing or the trace is missing or not well-formed
+ if (!list || list.length === 0) {
+ return !block;
+ }
+ if (traces.length === 0 || !traces[0]) {
+ return !block;
+ }
-/* global RollbarProxy */
-function _proxyRequest(json, callback) {
- var rollbarProxy = new RollbarProxy();
- rollbarProxy.sendJsonPayload(
- json,
- function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars
- function(err) {
- callback(new Error(err));
+ var tracesLength = traces.length;
+ for (var i = 0; i < tracesLength; i++) {
+ if (matchFrames(traces[i], list, block)) {
+ return true;
+ }
}
- );
+ } catch (
+ e
+ /* istanbul ignore next */
+ ) {
+ if (block) {
+ settings.hostBlockList = null;
+ } else {
+ settings.hostSafeList = null;
+ }
+ var listName = block ? 'hostBlockList' : 'hostSafeList';
+ logger.error(
+ "Error while reading your configuration's " +
+ listName +
+ ' option. Removing custom ' +
+ listName +
+ '.',
+ e,
+ );
+ return !block;
+ }
+ return false;
}
-function _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {
- if (typeof RollbarProxy !== 'undefined') {
- return _proxyRequest(data, callback);
- }
+function messageIsIgnored(logger) {
+ return function (item, settings) {
+ var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;
- var request;
- if (requestFactory) {
- request = requestFactory();
- } else {
- request = _createXMLHTTPObject();
- }
- if (!request) {
- // Give up, no way to send requests
- return callback(new Error('No way to send a request'));
- }
- try {
try {
- var onreadystatechange = function() {
- try {
- if (onreadystatechange && request.readyState === 4) {
- onreadystatechange = undefined;
-
- var parseResponse = _.jsonParse(request.responseText);
- if (_isSuccess(request)) {
- callback(parseResponse.error, parseResponse.value);
- return;
- } else if (_isNormalFailure(request)) {
- if (request.status === 403) {
- // likely caused by using a server access token
- var message = parseResponse.value && parseResponse.value.message;
- logger.error(message);
- }
- // return valid http status codes
- callback(new Error(String(request.status)));
- } else {
- // IE will return a status 12000+ on some sort of connection failure,
- // so we return a blank error
- // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx
- var msg = 'XHR response had no status code (likely connection failure)';
- callback(_newRetriableError(msg));
- }
- }
- } catch (ex) {
- //jquery source mentions firefox may error out while accessing the
- //request members if there is a network error
- //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111
- var exc;
- if (ex && ex.stack) {
- exc = ex;
- } else {
- exc = new Error(ex);
- }
- callback(exc);
- }
- };
+ messageIsIgnored = false;
+ ignoredMessages = settings.ignoredMessages;
- request.open(method, url, true);
- if (request.setRequestHeader) {
- request.setRequestHeader('Content-Type', 'application/json');
- request.setRequestHeader('X-Rollbar-Access-Token', accessToken);
+ if (!ignoredMessages || ignoredMessages.length === 0) {
+ return true;
}
- if(_.isFiniteNumber(timeout)) {
- request.timeout = timeout;
- }
+ messages = messagesFromItem(item);
- request.onreadystatechange = onreadystatechange;
- request.send(data);
- } catch (e1) {
- // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest
- if (typeof XDomainRequest !== 'undefined') {
+ if (messages.length === 0) {
+ return true;
+ }
- // Assume we are in a really old browser which has a bunch of limitations:
- // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx
+ len = ignoredMessages.length;
+ for (i = 0; i < len; i++) {
+ rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');
- // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case
- if (!window || !window.location) {
- return callback(new Error('No window available during request, unknown environment'));
- }
+ for (j = 0; j < messages.length; j++) {
+ messageIsIgnored = rIgnoredMessage.test(messages[j]);
- // If the current page is http, try and send over http
- if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {
- url = 'http' + url.substring(5);
+ if (messageIsIgnored) {
+ return false;
+ }
}
-
- var xdomainrequest = new XDomainRequest();
- xdomainrequest.onprogress = function() {};
- xdomainrequest.ontimeout = function() {
- var msg = 'Request timed out';
- var code = 'ETIMEDOUT';
- callback(_newRetriableError(msg, code));
- };
- xdomainrequest.onerror = function() {
- callback(new Error('Error during request'));
- };
- xdomainrequest.onload = function() {
- var parseResponse = _.jsonParse(xdomainrequest.responseText);
- callback(parseResponse.error, parseResponse.value);
- };
- xdomainrequest.open(method, url, true);
- xdomainrequest.send(data);
- } else {
- callback(new Error('Cannot find a method to transport a request'));
}
+ } catch (
+ e
+ /* istanbul ignore next */
+ ) {
+ settings.ignoredMessages = null;
+ logger.error(
+ "Error while reading your configuration's ignoredMessages option. Removing custom ignoredMessages.",
+ );
}
- } catch (e2) {
- callback(e2);
- }
+
+ return true;
+ };
}
-function _createXMLHTTPObject() {
- /* global ActiveXObject:false */
+function messagesFromItem(item) {
+ var body = item.body;
+ var messages = [];
- var factories = [
- function () {
- return new XMLHttpRequest();
- },
- function () {
- return new ActiveXObject('Msxml2.XMLHTTP');
- },
- function () {
- return new ActiveXObject('Msxml3.XMLHTTP');
- },
- function () {
- return new ActiveXObject('Microsoft.XMLHTTP');
- }
- ];
- var xmlhttp;
- var i;
- var numFactories = factories.length;
- for (i = 0; i < numFactories; i++) {
- /* eslint-disable no-empty */
- try {
- xmlhttp = factories[i]();
- break;
- } catch (e) {
- // pass
+ // The payload schema only allows one of trace_chain, message, or trace.
+ // However, existing test cases are based on having both trace and message present.
+ // So here we preserve the ability to collect strings from any combination of these keys.
+ if (body.trace_chain) {
+ var traceChain = body.trace_chain;
+ for (var i = 0; i < traceChain.length; i++) {
+ var trace = traceChain[i];
+ messages.push(_.get(trace, 'exception.message'));
}
- /* eslint-enable no-empty */
}
- return xmlhttp;
-}
-
-function _isSuccess(r) {
- return r && r.status && r.status === 200;
-}
-
-function _isNormalFailure(r) {
- return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;
-}
-
-function _newRetriableError(message, code) {
- var err = new Error(message);
- err.code = code || 'ENOTFOUND';
- return err;
+ if (body.trace) {
+ messages.push(_.get(body, 'trace.exception.message'));
+ }
+ if (body.message) {
+ messages.push(_.get(body, 'message.body'));
+ }
+ return messages;
}
-module.exports = Transport;
+module.exports = {
+ checkLevel: checkLevel,
+ userCheckIgnore: userCheckIgnore,
+ urlIsNotBlockListed: urlIsNotBlockListed,
+ urlIsSafeListed: urlIsSafeListed,
+ messageIsIgnored: messageIsIgnored,
+};
/***/ }),
-/* 21 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 358:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var _ = __webpack_require__(0);
-var errorParser = __webpack_require__(3);
-var logger = __webpack_require__(1);
+var _ = __webpack_require__(702);
-function handleDomException(item, options, callback) {
- if(item.err && errorParser.Stack(item.err).name === 'DOMException') {
- var originalError = new Error();
- originalError.name = item.err.name;
- originalError.message = item.err.message;
- originalError.stack = item.err.stack;
- originalError.nested = item.err;
- item.err = originalError;
- }
- callback(null, item);
+/*
+ * Queue - an object which handles which handles a queue of items to be sent to Rollbar.
+ * This object handles rate limiting via a passed in rate limiter, retries based on connection
+ * errors, and filtering of items based on a set of configurable predicates. The communication to
+ * the backend is performed via a given API object.
+ *
+ * @param rateLimiter - An object which conforms to the interface
+ * rateLimiter.shouldSend(item) -> bool
+ * @param api - An object which conforms to the interface
+ * api.postItem(payload, function(err, response))
+ * @param logger - An object used to log verbose messages if desired
+ * @param options - see Queue.prototype.configure
+ */
+function Queue(rateLimiter, api, logger, options) {
+ this.rateLimiter = rateLimiter;
+ this.api = api;
+ this.logger = logger;
+ this.options = options;
+ this.predicates = [];
+ this.pendingItems = [];
+ this.pendingRequests = [];
+ this.retryQueue = [];
+ this.retryHandle = null;
+ this.waitCallback = null;
+ this.waitIntervalID = null;
}
-function handleItemWithError(item, options, callback) {
- item.data = item.data || {};
- if (item.err) {
- try {
- item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);
+/*
+ * configure - updates the options this queue uses
+ *
+ * @param options
+ */
+Queue.prototype.configure = function (options) {
+ this.api && this.api.configure(options);
+ var oldOptions = this.options;
+ this.options = _.merge(oldOptions, options);
+ return this;
+};
- if (options.addErrorContext) {
- addErrorContext(item);
- }
- } catch (e) {
- logger.error('Error while parsing the error object.', e);
- try {
- item.message = item.err.message || item.err.description || item.message || String(item.err);
- } catch (e2) {
- item.message = String(item.err) || String(e2);
- }
- delete item.err;
- }
+/*
+ * addPredicate - adds a predicate to the end of the list of predicates for this queue
+ *
+ * @param predicate - function(item, options) -> (bool|{err: Error})
+ * Returning true means that this predicate passes and the item is okay to go on the queue
+ * Returning false means do not add the item to the queue, but it is not an error
+ * Returning {err: Error} means do not add the item to the queue, and the given error explains why
+ * Returning {err: undefined} is equivalent to returning true but don't do that
+ */
+Queue.prototype.addPredicate = function (predicate) {
+ if (_.isFunction(predicate)) {
+ this.predicates.push(predicate);
}
- callback(null, item);
-}
-
-function addErrorContext(item) {
- var chain = [];
- var err = item.err;
+ return this;
+};
- chain.push(err);
+Queue.prototype.addPendingItem = function (item) {
+ this.pendingItems.push(item);
+};
- while (err.nested) {
- err = err.nested;
- chain.push(err);
+Queue.prototype.removePendingItem = function (item) {
+ var idx = this.pendingItems.indexOf(item);
+ if (idx !== -1) {
+ this.pendingItems.splice(idx, 1);
}
+};
- _.addErrorContext(item, chain);
-}
-
-function ensureItemHasSomethingToSay(item, options, callback) {
- if (!item.message && !item.stackInfo && !item.custom) {
- callback(new Error('No message, stack info, or custom data'), null);
+/*
+ * addItem - Send an item to the Rollbar API if all of the predicates are satisfied
+ *
+ * @param item - The payload to send to the backend
+ * @param callback - function(error, repsonse) which will be called with the response from the API
+ * in the case of a success, otherwise response will be null and error will have a value. If both
+ * error and response are null then the item was stopped by a predicate which did not consider this
+ * to be an error condition, but nonetheless did not send the item to the API.
+ * @param originalError - The original error before any transformations that is to be logged if any
+ */
+Queue.prototype.addItem = function (
+ item,
+ callback,
+ originalError,
+ originalItem,
+) {
+ if (!callback || !_.isFunction(callback)) {
+ callback = function () {
+ return;
+ };
}
- callback(null, item);
-}
-
-function addBaseInfo(item, options, callback) {
- var environment = (options.payload && options.payload.environment) || options.environment;
- item.data = _.merge(item.data, {
- environment: environment,
- level: item.level,
- endpoint: options.endpoint,
- platform: 'browser',
- framework: 'browser-js',
- language: 'javascript',
- server: {},
- uuid: item.uuid,
- notifier: {
- name: 'rollbar-browser-js',
- version: options.version
- },
- custom: item.custom
- });
- callback(null, item);
-}
-
-function addRequestInfo(window) {
- return function(item, options, callback) {
- if (!window || !window.location) {
- return callback(null, item);
- }
- var remoteString = '$remote_ip';
- if (!options.captureIp) {
- remoteString = null;
- } else if (options.captureIp !== true) {
- remoteString += '_anonymize';
- }
- _.set(item, 'data.request', {
- url: window.location.href,
- query_string: window.location.search,
- user_ip: remoteString
- });
- callback(null, item);
- };
-}
-
-function addClientInfo(window) {
- return function(item, options, callback) {
- if (!window) {
- return callback(null, item);
- }
- var nav = window.navigator || {};
- var scr = window.screen || {};
- _.set(item, 'data.client', {
- runtime_ms: item.timestamp - window._rollbarStartTime,
- timestamp: Math.round(item.timestamp / 1000),
- javascript: {
- browser: nav.userAgent,
- language: nav.language,
- cookie_enabled: nav.cookieEnabled,
- screen: {
- width: scr.width,
- height: scr.height
- }
- }
- });
- callback(null, item);
- };
-}
+ var predicateResult = this._applyPredicates(item);
+ if (predicateResult.stop) {
+ this.removePendingItem(originalItem);
+ callback(predicateResult.err);
+ return;
+ }
+ this._maybeLog(item, originalError);
+ this.removePendingItem(originalItem);
+ if (!this.options.transmit) {
+ callback(new Error('Transmit disabled'));
+ return;
+ }
+ this.pendingRequests.push(item);
+ try {
+ this._makeApiRequest(
+ item,
+ function (err, resp) {
+ this._dequeuePendingRequest(item);
+ callback(err, resp);
+ }.bind(this),
+ );
+ } catch (e) {
+ this._dequeuePendingRequest(item);
+ callback(e);
+ }
+};
-function addPluginInfo(window) {
- return function(item, options, callback) {
- if (!window || !window.navigator) {
- return callback(null, item);
- }
- var plugins = [];
- var navPlugins = window.navigator.plugins || [];
- var cur;
- for (var i=0, l=navPlugins.length; i < l; ++i) {
- cur = navPlugins[i];
- plugins.push({name: cur.name, description: cur.description});
- }
- _.set(item, 'data.client.javascript.plugins', plugins);
- callback(null, item);
- };
-}
+/*
+ * wait - Stop any further errors from being added to the queue, and get called back when all items
+ * currently processing have finished sending to the backend.
+ *
+ * @param callback - function() called when all pending items have been sent
+ */
+Queue.prototype.wait = function (callback) {
+ if (!_.isFunction(callback)) {
+ return;
+ }
+ this.waitCallback = callback;
+ if (this._maybeCallWait()) {
+ return;
+ }
+ if (this.waitIntervalID) {
+ this.waitIntervalID = clearInterval(this.waitIntervalID);
+ }
+ this.waitIntervalID = setInterval(
+ function () {
+ this._maybeCallWait();
+ }.bind(this),
+ 500,
+ );
+};
-function addBody(item, options, callback) {
- if (item.stackInfo) {
- if (item.stackInfo.traceChain) {
- addBodyTraceChain(item, options, callback);
- } else {
- addBodyTrace(item, options, callback);
+/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the
+ * given item with the currently configured options.
+ *
+ * @param item - An item in the queue
+ * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,
+ * the error value should be passed up to a callbak if we are stopping.
+ */
+Queue.prototype._applyPredicates = function (item) {
+ var p = null;
+ for (var i = 0, len = this.predicates.length; i < len; i++) {
+ p = this.predicates[i](item, this.options);
+ if (!p || p.err !== undefined) {
+ return { stop: true, err: p.err };
}
+ }
+ return { stop: false, err: null };
+};
+
+/*
+ * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an
+ * effort to retry if we are configured to do so.
+ *
+ * @param item - an item ready to send to the backend
+ * @param callback - function(err, response)
+ */
+Queue.prototype._makeApiRequest = function (item, callback) {
+ var rateLimitResponse = this.rateLimiter.shouldSend(item);
+ if (rateLimitResponse.shouldSend) {
+ this.api.postItem(
+ item,
+ function (err, resp) {
+ if (err) {
+ this._maybeRetry(err, item, callback);
+ } else {
+ callback(err, resp);
+ }
+ }.bind(this),
+ );
+ } else if (rateLimitResponse.error) {
+ callback(rateLimitResponse.error);
} else {
- addBodyMessage(item, options, callback);
+ this.api.postItem(rateLimitResponse.payload, callback);
}
-}
+};
-function addBodyMessage(item, options, callback) {
- var message = item.message;
- var custom = item.custom;
+// These are errors basically mean there is no internet connection
+var RETRIABLE_ERRORS = [
+ 'ECONNRESET',
+ 'ENOTFOUND',
+ 'ESOCKETTIMEDOUT',
+ 'ETIMEDOUT',
+ 'ECONNREFUSED',
+ 'EHOSTUNREACH',
+ 'EPIPE',
+ 'EAI_AGAIN',
+];
- if (!message) {
- message = 'Item sent with null or missing arguments.';
+/*
+ * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback
+ * with the error.
+ *
+ * @param err - an error returned by the API transport
+ * @param item - the item that was trying to be sent when this error occured
+ * @param callback - function(err, response)
+ */
+Queue.prototype._maybeRetry = function (err, item, callback) {
+ var shouldRetry = false;
+ if (this.options.retryInterval) {
+ for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {
+ if (err.code === RETRIABLE_ERRORS[i]) {
+ shouldRetry = true;
+ break;
+ }
+ }
+ if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {
+ item.retries = item.retries ? item.retries + 1 : 1;
+ if (item.retries > this.options.maxRetries) {
+ shouldRetry = false;
+ }
+ }
}
- var result = {
- body: message
- };
-
- if (custom) {
- result.extra = _.merge(custom);
+ if (shouldRetry) {
+ this._retryApiRequest(item, callback);
+ } else {
+ callback(err);
}
+};
- _.set(item, 'data.body', {message: result});
- callback(null, item);
-}
+/*
+ * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process
+ * that queue based on the retryInterval in the options for this queue.
+ *
+ * @param item - an item that failed to send due to an error we deem retriable
+ * @param callback - function(err, response)
+ */
+Queue.prototype._retryApiRequest = function (item, callback) {
+ this.retryQueue.push({ item: item, callback: callback });
-function stackFromItem(item) {
- // Transform a TraceKit stackInfo object into a Rollbar trace
- var stack = item.stackInfo.stack;
- if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {
- stack = item._unhandledStackInfo.stack;
+ if (!this.retryHandle) {
+ this.retryHandle = setInterval(
+ function () {
+ while (this.retryQueue.length) {
+ var retryObject = this.retryQueue.shift();
+ this._makeApiRequest(retryObject.item, retryObject.callback);
+ }
+ }.bind(this),
+ this.options.retryInterval,
+ );
}
- return stack;
-}
+};
-function addBodyTraceChain(item, options, callback) {
- var traceChain = item.stackInfo.traceChain;
- var traces = [];
+/*
+ * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to
+ * enable to functionality of providing a callback that clients can pass to `wait` to be notified
+ * when the pending request queue has been emptied. This must be called when the API finishes
+ * processing this item. If a `wait` callback is configured, it is called by this function.
+ *
+ * @param item - the item previously added to the pending request queue
+ */
+Queue.prototype._dequeuePendingRequest = function (item) {
+ var idx = this.pendingRequests.indexOf(item);
+ if (idx !== -1) {
+ this.pendingRequests.splice(idx, 1);
+ this._maybeCallWait();
+ }
+};
- var traceChainLength = traceChain.length;
- for (var i = 0; i < traceChainLength; i++) {
- var trace = buildTrace(item, traceChain[i], options);
- traces.push(trace);
+Queue.prototype._maybeLog = function (data, originalError) {
+ if (this.logger && this.options.verbose) {
+ var message = originalError;
+ message = message || _.get(data, 'body.trace.exception.message');
+ message = message || _.get(data, 'body.trace_chain.0.exception.message');
+ if (message) {
+ this.logger.error(message);
+ return;
+ }
+ message = _.get(data, 'body.message.body');
+ if (message) {
+ this.logger.log(message);
+ }
}
+};
- _.set(item, 'data.body', {trace_chain: traces});
- callback(null, item);
-}
+Queue.prototype._maybeCallWait = function () {
+ if (
+ _.isFunction(this.waitCallback) &&
+ this.pendingItems.length === 0 &&
+ this.pendingRequests.length === 0
+ ) {
+ if (this.waitIntervalID) {
+ this.waitIntervalID = clearInterval(this.waitIntervalID);
+ }
+ this.waitCallback();
+ return true;
+ }
+ return false;
+};
-function addBodyTrace(item, options, callback) {
- var stack = stackFromItem(item);
+module.exports = Queue;
- if (stack) {
- var trace = buildTrace(item, item.stackInfo, options);
- _.set(item, 'data.body', {trace: trace});
- callback(null, item);
- } else {
- var stackInfo = item.stackInfo;
- var guess = errorParser.guessErrorClass(stackInfo.message);
- var className = errorClass(stackInfo, guess[0], options);
- var message = guess[1];
- item.message = className + ': ' + message;
- addBodyMessage(item, options, callback);
- }
-}
+/***/ }),
-function buildTrace(item, stackInfo, options) {
- var description = item && item.data.description;
- var custom = item && item.custom;
- var stack = stackFromItem(item);
+/***/ 790:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- var guess = errorParser.guessErrorClass(stackInfo.message);
- var className = errorClass(stackInfo, guess[0], options);
- var message = guess[1];
- var trace = {
- exception: {
- 'class': className,
- message: message
- }
- };
+"use strict";
- if (description) {
- trace.exception.description = description;
- }
- if (stack) {
- if (stack.length === 0) {
- trace.exception.stack = stackInfo.rawStack;
- trace.exception.raw = String(stackInfo.rawException);
- }
- var stackFrame;
- var frame;
- var code;
- var pre;
- var post;
- var contextLength;
- var i, mid;
+var _ = __webpack_require__(702);
- trace.frames = [];
- for (i = 0; i < stack.length; ++i) {
- stackFrame = stack[i];
- frame = {
- filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',
- lineno: stackFrame.line || null,
- method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,
- colno: stackFrame.column
- };
- if (options.sendFrameUrl) {
- frame.url = stackFrame.url;
- }
- if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {
- continue;
- }
+/*
+ * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar
+ *
+ * @param options - the same options that are accepted by configureGlobal offered as a convenience
+ */
+function RateLimiter(options) {
+ this.startTime = _.now();
+ this.counter = 0;
+ this.perMinCounter = 0;
+ this.platform = null;
+ this.platformOptions = {};
+ this.configureGlobal(options);
+}
- code = pre = post = null;
- contextLength = stackFrame.context ? stackFrame.context.length : 0;
- if (contextLength) {
- mid = Math.floor(contextLength / 2);
- pre = stackFrame.context.slice(0, mid);
- code = stackFrame.context[mid];
- post = stackFrame.context.slice(mid);
- }
+RateLimiter.globalSettings = {
+ startTime: _.now(),
+ maxItems: undefined,
+ itemsPerMinute: undefined,
+};
- if (code) {
- frame.code = code;
- }
+/*
+ * configureGlobal - set the global rate limiter options
+ *
+ * @param options - Only the following values are recognized:
+ * startTime: a timestamp of the form returned by (new Date()).getTime()
+ * maxItems: the maximum items
+ * itemsPerMinute: the max number of items to send in a given minute
+ */
+RateLimiter.prototype.configureGlobal = function (options) {
+ if (options.startTime !== undefined) {
+ RateLimiter.globalSettings.startTime = options.startTime;
+ }
+ if (options.maxItems !== undefined) {
+ RateLimiter.globalSettings.maxItems = options.maxItems;
+ }
+ if (options.itemsPerMinute !== undefined) {
+ RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;
+ }
+};
- if (pre || post) {
- frame.context = {};
- if (pre && pre.length) {
- frame.context.pre = pre;
- }
- if (post && post.length) {
- frame.context.post = post;
- }
- }
+/*
+ * shouldSend - determine if we should send a given item based on rate limit settings
+ *
+ * @param item - the item we are about to send
+ * @returns An object with the following structure:
+ * error: (Error|null)
+ * shouldSend: bool
+ * payload: (Object|null)
+ * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and
+ * exactly one of error or payload will be non-null. If error is non-null, the returned Error will
+ * describe the situation, but it means that we were already over a rate limit (either globally or
+ * per minute) when this item was checked. If error is null, and therefore payload is non-null, it
+ * means this item put us over the global rate limit and the payload should be sent to Rollbar in
+ * place of the passed in item.
+ */
+RateLimiter.prototype.shouldSend = function (item, now) {
+ now = now || _.now();
+ var elapsedTime = now - this.startTime;
+ if (elapsedTime < 0 || elapsedTime >= 60000) {
+ this.startTime = now;
+ this.perMinCounter = 0;
+ }
- if (stackFrame.args) {
- frame.args = stackFrame.args;
- }
+ var globalRateLimit = RateLimiter.globalSettings.maxItems;
+ var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;
- trace.frames.push(frame);
- }
+ if (checkRate(item, globalRateLimit, this.counter)) {
+ return shouldSendValue(
+ this.platform,
+ this.platformOptions,
+ globalRateLimit + ' max items reached',
+ false,
+ );
+ } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {
+ return shouldSendValue(
+ this.platform,
+ this.platformOptions,
+ globalRateLimitPerMin + ' items per minute reached',
+ false,
+ );
+ }
+ this.counter++;
+ this.perMinCounter++;
- // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last
- trace.frames.reverse();
+ var shouldSend = !checkRate(item, globalRateLimit, this.counter);
+ var perMinute = shouldSend;
+ shouldSend =
+ shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);
+ return shouldSendValue(
+ this.platform,
+ this.platformOptions,
+ null,
+ shouldSend,
+ globalRateLimit,
+ globalRateLimitPerMin,
+ perMinute,
+ );
+};
- if (custom) {
- trace.extra = _.merge(custom);
- }
- }
+RateLimiter.prototype.setPlatformOptions = function (platform, options) {
+ this.platform = platform;
+ this.platformOptions = options;
+};
- return trace;
+/* Helpers */
+
+function checkRate(item, limit, counter) {
+ return !item.ignoreRateLimit && limit >= 1 && counter > limit;
}
-function errorClass(stackInfo, guess, options) {
- if (stackInfo.name) {
- return stackInfo.name;
- } else if (options.guessErrorClass) {
- return guess;
- } else {
- return '(unknown)';
+function shouldSendValue(
+ platform,
+ options,
+ error,
+ shouldSend,
+ globalRateLimit,
+ limitPerMin,
+ perMinute,
+) {
+ var payload = null;
+ if (error) {
+ error = new Error(error);
}
+ if (!error && !shouldSend) {
+ payload = rateLimitPayload(
+ platform,
+ options,
+ globalRateLimit,
+ limitPerMin,
+ perMinute,
+ );
+ }
+ return { error: error, shouldSend: shouldSend, payload: payload };
}
-function addScrubber(scrubFn) {
- return function (item, options, callback) {
- if (scrubFn) {
- var scrubFields = options.scrubFields || [];
- var scrubPaths = options.scrubPaths || [];
- item.data = scrubFn(item.data, scrubFields, scrubPaths);
- }
- callback(null, item);
+function rateLimitPayload(
+ platform,
+ options,
+ globalRateLimit,
+ limitPerMin,
+ perMinute,
+) {
+ var environment =
+ options.environment || (options.payload && options.payload.environment);
+ var msg;
+ if (perMinute) {
+ msg = 'item per minute limit reached, ignoring errors until timeout';
+ } else {
+ msg = 'maxItems has been hit, ignoring errors until reset.';
+ }
+ var item = {
+ body: {
+ message: {
+ body: msg,
+ extra: {
+ maxItems: globalRateLimit,
+ itemsPerMinute: limitPerMin,
+ },
+ },
+ },
+ language: 'javascript',
+ environment: environment,
+ notifier: {
+ version:
+ (options.notifier && options.notifier.version) || options.version,
+ },
+ };
+ if (platform === 'browser') {
+ item.platform = 'browser';
+ item.framework = 'browser-js';
+ item.notifier.name = 'rollbar-browser-js';
+ } else if (platform === 'server') {
+ item.framework = options.framework || 'node-js';
+ item.notifier.name = options.notifier.name;
+ } else if (platform === 'react-native') {
+ item.framework = options.framework || 'react-native';
+ item.notifier.name = options.notifier.name;
}
+ return item;
}
-module.exports = {
- handleDomException: handleDomException,
- handleItemWithError: handleItemWithError,
- ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,
- addBaseInfo: addBaseInfo,
- addRequestInfo: addRequestInfo,
- addClientInfo: addClientInfo,
- addPluginInfo: addPluginInfo,
- addBody: addBody,
- addScrubber: addScrubber
-};
+module.exports = RateLimiter;
/***/ }),
-/* 22 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {
- 'use strict';
- // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
-
- /* istanbul ignore next */
- if (true) {
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(23)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- } else {}
-}(this, function ErrorStackParser(StackFrame) {
- 'use strict';
-
- var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\S+:\d+/;
- var CHROME_IE_STACK_REGEXP = /^\s*at .*(\S+:\d+|\(native\))/m;
- var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\[native code])?$/;
-
- return {
- /**
- * Given an Error object, extract the most information from it.
- *
- * @param {Error} error object
- * @return {Array} of StackFrames
- */
- parse: function ErrorStackParser$$parse(error) {
- if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {
- return this.parseOpera(error);
- } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {
- return this.parseV8OrIE(error);
- } else if (error.stack) {
- return this.parseFFOrSafari(error);
- } else {
- throw new Error('Cannot parse given Error object');
- }
- },
-
- // Separate line and column numbers from a string of the form: (URI:Line:Column)
- extractLocation: function ErrorStackParser$$extractLocation(urlLike) {
- // Fail-fast but return locations like "(native)"
- if (urlLike.indexOf(':') === -1) {
- return [urlLike];
- }
-
- var regExp = /(.+?)(?::(\d+))?(?::(\d+))?$/;
- var parts = regExp.exec(urlLike.replace(/[()]/g, ''));
- return [parts[1], parts[2] || undefined, parts[3] || undefined];
- },
-
- parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {
- var filtered = error.stack.split('\n').filter(function(line) {
- return !!line.match(CHROME_IE_STACK_REGEXP);
- }, this);
-
- return filtered.map(function(line) {
- if (line.indexOf('(eval ') > -1) {
- // Throw away eval information until we implement stacktrace.js/stackframe#8
- line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(\),.*$)/g, '');
- }
- var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '(');
-
- // capture and preseve the parenthesized location "(/foo/my bar.js:12:87)" in
- // case it has spaces in it, as the string is split on \s+ later on
- var location = sanitizedLine.match(/ (\((.+):(\d+):(\d+)\)$)/);
-
- // remove the parenthesized location from the line, if it was matched
- sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;
-
- var tokens = sanitizedLine.split(/\s+/).slice(1);
- // if a location was matched, pass it to extractLocation() otherwise pop the last token
- var locationParts = this.extractLocation(location ? location[1] : tokens.pop());
- var functionName = tokens.join(' ') || undefined;
- var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];
-
- return new StackFrame({
- functionName: functionName,
- fileName: fileName,
- lineNumber: locationParts[1],
- columnNumber: locationParts[2],
- source: line
- });
- }, this);
- },
-
- parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {
- var filtered = error.stack.split('\n').filter(function(line) {
- return !line.match(SAFARI_NATIVE_CODE_REGEXP);
- }, this);
- return filtered.map(function(line) {
- // Throw away eval information until we implement stacktrace.js/stackframe#8
- if (line.indexOf(' > eval') > -1) {
- line = line.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ':$1');
- }
+/***/ 562:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {
- // Safari eval frames only have function names and nothing else
- return new StackFrame({
- functionName: line
- });
- } else {
- var functionNameRegex = /((.*".+"[^@]*)?[^@]*)(?:@)/;
- var matches = line.match(functionNameRegex);
- var functionName = matches && matches[1] ? matches[1] : undefined;
- var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));
+"use strict";
- return new StackFrame({
- functionName: functionName,
- fileName: locationParts[0],
- lineNumber: locationParts[1],
- columnNumber: locationParts[2],
- source: line
- });
- }
- }, this);
- },
- parseOpera: function ErrorStackParser$$parseOpera(e) {
- if (!e.stacktrace || (e.message.indexOf('\n') > -1 &&
- e.message.split('\n').length > e.stacktrace.split('\n').length)) {
- return this.parseOpera9(e);
- } else if (!e.stack) {
- return this.parseOpera10(e);
- } else {
- return this.parseOpera11(e);
- }
- },
+var RateLimiter = __webpack_require__(790);
+var Queue = __webpack_require__(358);
+var Notifier = __webpack_require__(314);
+var _ = __webpack_require__(702);
- parseOpera9: function ErrorStackParser$$parseOpera9(e) {
- var lineRE = /Line (\d+).*script (?:in )?(\S+)/i;
- var lines = e.message.split('\n');
- var result = [];
+/*
+ * Rollbar - the interface to Rollbar
+ *
+ * @param options
+ * @param api
+ * @param logger
+ */
+function Rollbar(options, api, logger, telemeter, platform) {
+ this.options = _.merge(options);
+ this.logger = logger;
+ Rollbar.rateLimiter.configureGlobal(this.options);
+ Rollbar.rateLimiter.setPlatformOptions(platform, this.options);
+ this.api = api;
+ this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);
- for (var i = 2, len = lines.length; i < len; i += 2) {
- var match = lineRE.exec(lines[i]);
- if (match) {
- result.push(new StackFrame({
- fileName: match[2],
- lineNumber: match[1],
- source: lines[i]
- }));
- }
- }
+ // This must happen before the Notifier is created
+ var tracer = this.options.tracer || null;
+ if (validateTracer(tracer)) {
+ this.tracer = tracer;
+ // set to a string for api response serialization
+ this.options.tracer = 'opentracing-tracer-enabled';
+ this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';
+ } else {
+ this.tracer = null;
+ }
- return result;
- },
+ this.notifier = new Notifier(this.queue, this.options);
+ this.telemeter = telemeter;
+ setStackTraceLimit(options);
+ this.lastError = null;
+ this.lastErrorHash = 'none';
+}
- parseOpera10: function ErrorStackParser$$parseOpera10(e) {
- var lineRE = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i;
- var lines = e.stacktrace.split('\n');
- var result = [];
+var defaultOptions = {
+ maxItems: 0,
+ itemsPerMinute: 60,
+};
- for (var i = 0, len = lines.length; i < len; i += 2) {
- var match = lineRE.exec(lines[i]);
- if (match) {
- result.push(
- new StackFrame({
- functionName: match[3] || undefined,
- fileName: match[2],
- lineNumber: match[1],
- source: lines[i]
- })
- );
- }
- }
+Rollbar.rateLimiter = new RateLimiter(defaultOptions);
- return result;
- },
+Rollbar.prototype.global = function (options) {
+ Rollbar.rateLimiter.configureGlobal(options);
+ return this;
+};
- // Opera 10.65+ Error.stack very similar to FF/Safari
- parseOpera11: function ErrorStackParser$$parseOpera11(error) {
- var filtered = error.stack.split('\n').filter(function(line) {
- return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);
- }, this);
+Rollbar.prototype.configure = function (options, payloadData) {
+ var oldOptions = this.options;
+ var payload = {};
+ if (payloadData) {
+ payload = { payload: payloadData };
+ }
- return filtered.map(function(line) {
- var tokens = line.split('@');
- var locationParts = this.extractLocation(tokens.pop());
- var functionCall = (tokens.shift() || '');
- var functionName = functionCall
- .replace(//, '$2')
- .replace(/\([^)]*\)/g, '') || undefined;
- var argsRaw;
- if (functionCall.match(/\(([^)]*)\)/)) {
- argsRaw = functionCall.replace(/^[^(]+\(([^)]*)\)$/, '$1');
- }
- var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?
- undefined : argsRaw.split(',');
+ this.options = _.merge(oldOptions, options, payload);
- return new StackFrame({
- functionName: functionName,
- args: args,
- fileName: locationParts[0],
- lineNumber: locationParts[1],
- columnNumber: locationParts[2],
- source: line
- });
- }, this);
- }
- };
-}));
+ // This must happen before the Notifier is configured
+ var tracer = this.options.tracer || null;
+ if (validateTracer(tracer)) {
+ this.tracer = tracer;
+ // set to a string for api response serialization
+ this.options.tracer = 'opentracing-tracer-enabled';
+ this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';
+ } else {
+ this.tracer = null;
+ }
+ this.notifier && this.notifier.configure(this.options);
+ this.telemeter && this.telemeter.configure(this.options);
+ setStackTraceLimit(options);
+ this.global(this.options);
-/***/ }),
-/* 23 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (validateTracer(options.tracer)) {
+ this.tracer = options.tracer;
+ }
-var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {
- 'use strict';
- // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
+ return this;
+};
- /* istanbul ignore next */
- if (true) {
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- } else {}
-}(this, function() {
- 'use strict';
- function _isNumber(n) {
- return !isNaN(parseFloat(n)) && isFinite(n);
- }
+Rollbar.prototype.log = function (item) {
+ var level = this._defaultLogLevel();
+ return this._log(level, item);
+};
- function _capitalize(str) {
- return str.charAt(0).toUpperCase() + str.substring(1);
- }
+Rollbar.prototype.debug = function (item) {
+ this._log('debug', item);
+};
- function _getter(p) {
- return function() {
- return this[p];
- };
- }
+Rollbar.prototype.info = function (item) {
+ this._log('info', item);
+};
- var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];
- var numericProps = ['columnNumber', 'lineNumber'];
- var stringProps = ['fileName', 'functionName', 'source'];
- var arrayProps = ['args'];
- var objectProps = ['evalOrigin'];
+Rollbar.prototype.warn = function (item) {
+ this._log('warning', item);
+};
- var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);
+Rollbar.prototype.warning = function (item) {
+ this._log('warning', item);
+};
- function StackFrame(obj) {
- if (!obj) return;
- for (var i = 0; i < props.length; i++) {
- if (obj[props[i]] !== undefined) {
- this['set' + _capitalize(props[i])](obj[props[i]]);
- }
- }
- }
+Rollbar.prototype.error = function (item) {
+ this._log('error', item);
+};
- StackFrame.prototype = {
- getArgs: function() {
- return this.args;
- },
- setArgs: function(v) {
- if (Object.prototype.toString.call(v) !== '[object Array]') {
- throw new TypeError('Args must be an Array');
- }
- this.args = v;
- },
+Rollbar.prototype.critical = function (item) {
+ this._log('critical', item);
+};
- getEvalOrigin: function() {
- return this.evalOrigin;
- },
- setEvalOrigin: function(v) {
- if (v instanceof StackFrame) {
- this.evalOrigin = v;
- } else if (v instanceof Object) {
- this.evalOrigin = new StackFrame(v);
- } else {
- throw new TypeError('Eval Origin must be an Object or StackFrame');
- }
- },
+Rollbar.prototype.wait = function (callback) {
+ this.queue.wait(callback);
+};
- toString: function() {
- var fileName = this.getFileName() || '';
- var lineNumber = this.getLineNumber() || '';
- var columnNumber = this.getColumnNumber() || '';
- var functionName = this.getFunctionName() || '';
- if (this.getIsEval()) {
- if (fileName) {
- return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';
- }
- return '[eval]:' + lineNumber + ':' + columnNumber;
- }
- if (functionName) {
- return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';
- }
- return fileName + ':' + lineNumber + ':' + columnNumber;
- }
- };
+Rollbar.prototype.captureEvent = function (type, metadata, level) {
+ return this.telemeter && this.telemeter.captureEvent(type, metadata, level);
+};
- StackFrame.fromString = function StackFrame$$fromString(str) {
- var argsStartIndex = str.indexOf('(');
- var argsEndIndex = str.lastIndexOf(')');
+Rollbar.prototype.captureDomContentLoaded = function (ts) {
+ return this.telemeter && this.telemeter.captureDomContentLoaded(ts);
+};
- var functionName = str.substring(0, argsStartIndex);
- var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');
- var locationString = str.substring(argsEndIndex + 1);
+Rollbar.prototype.captureLoad = function (ts) {
+ return this.telemeter && this.telemeter.captureLoad(ts);
+};
- if (locationString.indexOf('@') === 0) {
- var parts = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(locationString, '');
- var fileName = parts[1];
- var lineNumber = parts[2];
- var columnNumber = parts[3];
- }
+Rollbar.prototype.buildJsonPayload = function (item) {
+ return this.api.buildJsonPayload(item);
+};
- return new StackFrame({
- functionName: functionName,
- args: args || undefined,
- fileName: fileName,
- lineNumber: lineNumber || undefined,
- columnNumber: columnNumber || undefined
- });
- };
+Rollbar.prototype.sendJsonPayload = function (jsonPayload) {
+ this.api.postJsonPayload(jsonPayload);
+};
- for (var i = 0; i < booleanProps.length; i++) {
- StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);
- StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {
- return function(v) {
- this[p] = Boolean(v);
- };
- })(booleanProps[i]);
- }
+/* Internal */
- for (var j = 0; j < numericProps.length; j++) {
- StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);
- StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {
- return function(v) {
- if (!_isNumber(v)) {
- throw new TypeError(p + ' must be a Number');
- }
- this[p] = Number(v);
- };
- })(numericProps[j]);
+Rollbar.prototype._log = function (defaultLevel, item) {
+ var callback;
+ if (item.callback) {
+ callback = item.callback;
+ delete item.callback;
+ }
+ if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {
+ if (callback) {
+ var error = new Error('ignored identical item');
+ error.item = item;
+ callback(error);
}
-
- for (var k = 0; k < stringProps.length; k++) {
- StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);
- StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {
- return function(v) {
- this[p] = String(v);
- };
- })(stringProps[k]);
+ return;
+ }
+ try {
+ this._addTracingInfo(item);
+ item.level = item.level || defaultLevel;
+ this.telemeter && this.telemeter._captureRollbarItem(item);
+ item.telemetryEvents =
+ (this.telemeter && this.telemeter.copyEvents()) || [];
+ this.notifier.log(item, callback);
+ } catch (e) {
+ if (callback) {
+ callback(e);
}
+ this.logger.error(e);
+ }
+};
- return StackFrame;
-}));
-
+Rollbar.prototype._defaultLogLevel = function () {
+ return this.options.logLevel || 'debug';
+};
-/***/ }),
-/* 24 */
-/***/ (function(module, exports, __webpack_require__) {
+Rollbar.prototype._sameAsLastError = function (item) {
+ if (!item._isUncaught) {
+ return false;
+ }
+ var itemHash = generateItemHash(item);
+ if (this.lastErrorHash === itemHash) {
+ return true;
+ }
+ this.lastError = item.err;
+ this.lastErrorHash = itemHash;
+ return false;
+};
-"use strict";
+Rollbar.prototype._addTracingInfo = function (item) {
+ // Tracer validation occurs in the constructor
+ // or in the Rollbar.prototype.configure methods
+ if (this.tracer) {
+ // add rollbar occurrence uuid to span
+ var span = this.tracer.scope().active();
+ if (validateSpan(span)) {
+ span.setTag('rollbar.error_uuid', item.uuid);
+ span.setTag('rollbar.has_error', true);
+ span.setTag('error', true);
+ span.setTag(
+ 'rollbar.item_url',
+ `https://rollbar.com/item/uuid/?uuid=${item.uuid}`,
+ );
+ span.setTag(
+ 'rollbar.occurrence_url',
+ `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`,
+ );
-var _ = __webpack_require__(0);
+ // add span ID & trace ID to occurrence
+ var opentracingSpanId = span.context().toSpanId();
+ var opentracingTraceId = span.context().toTraceId();
-function itemToPayload(item, options, callback) {
- var payloadOptions = options.payload || {};
- if (payloadOptions.body) {
- delete payloadOptions.body;
+ if (item.custom) {
+ item.custom.opentracing_span_id = opentracingSpanId;
+ item.custom.opentracing_trace_id = opentracingTraceId;
+ } else {
+ item.custom = {
+ opentracing_span_id: opentracingSpanId,
+ opentracing_trace_id: opentracingTraceId,
+ };
+ }
+ }
}
+};
- var data = _.merge(item.data, payloadOptions);
- if (item._isUncaught) {
- data._isUncaught = true;
- }
- if (item._originalArgs) {
- data._originalArgs = item._originalArgs;
- }
- callback(null, data);
+function generateItemHash(item) {
+ var message = item.message || '';
+ var stack = (item.err || {}).stack || String(item.err);
+ return message + '::' + stack;
}
-function addTelemetryData(item, options, callback) {
- if (item.telemetryEvents) {
- _.set(item, 'data.body.telemetry', item.telemetryEvents);
+// Node.js, Chrome, Safari, and some other browsers support this property
+// which globally sets the number of stack frames returned in an Error object.
+// If a browser can't use it, no harm done.
+function setStackTraceLimit(options) {
+ if (options.stackTraceLimit) {
+ Error.stackTraceLimit = options.stackTraceLimit;
}
- callback(null, item);
}
-function addMessageWithError(item, options, callback) {
- if (!item.message) {
- callback(null, item);
- return;
- }
- var tracePath = 'data.body.trace_chain.0';
- var trace = _.get(item, tracePath);
- if (!trace) {
- tracePath = 'data.body.trace';
- trace = _.get(item, tracePath);
+/**
+ * Validate the Tracer object provided to the Client
+ * is valid for our Opentracing use case.
+ * @param {opentracer.Tracer} tracer
+ */
+function validateTracer(tracer) {
+ if (!tracer) {
+ return false;
}
- if (trace) {
- if (!(trace.exception && trace.exception.description)) {
- _.set(item, tracePath+'.exception.description', item.message);
- callback(null, item);
- return;
- }
- var extra = _.get(item, tracePath+'.extra') || {};
- var newExtra = _.merge(extra, {message: item.message});
- _.set(item, tracePath+'.extra', newExtra);
+
+ if (!tracer.scope || typeof tracer.scope !== 'function') {
+ return false;
}
- callback(null, item);
-}
-function userTransform(logger) {
- return function(item, options, callback) {
- var newItem = _.merge(item);
- var response = null;
- try {
- if (_.isFunction(options.transform)) {
- response = options.transform(newItem.data, item);
- }
- } catch (e) {
- options.transform = null;
- logger.error('Error while calling custom transform() function. Removing custom transform().', e);
- callback(null, item);
- return;
- }
- if(_.isPromise(response)) {
- response.then(function (promisedItem) {
- if(promisedItem) {
- newItem.data = promisedItem;
- }
- callback(null, newItem);
- }, function (error) {
- callback(error, item);
- });
- } else {
- callback(null, newItem);
- }
+ var scope = tracer.scope();
+
+ if (!scope || !scope.active || typeof scope.active !== 'function') {
+ return false;
}
+
+ return true;
}
-function addConfigToPayload(item, options, callback) {
- if (!options.sendConfig) {
- return callback(null, item);
+/**
+ * Validate the Span object provided
+ * @param {opentracer.Span} span
+ */
+function validateSpan(span) {
+ if (!span || !span.context || typeof span.context !== 'function') {
+ return false;
}
- var configKey = '_rollbarConfig';
- var custom = _.get(item, 'data.custom') || {};
- custom[configKey] = options;
- item.data.custom = custom;
- callback(null, item);
-}
-function addFunctionOption(options, name) {
- if(_.isFunction(options[name])) {
- options[name] = options[name].toString();
+ var spanContext = span.context();
+
+ if (
+ !spanContext ||
+ !spanContext.toSpanId ||
+ !spanContext.toTraceId ||
+ typeof spanContext.toSpanId !== 'function' ||
+ typeof spanContext.toTraceId !== 'function'
+ ) {
+ return false;
}
+
+ return true;
}
-function addConfiguredOptions(item, options, callback) {
- var configuredOptions = options._configuredOptions;
+module.exports = Rollbar;
- // These must be stringified or they'll get dropped during serialization.
- addFunctionOption(configuredOptions, 'transform');
- addFunctionOption(configuredOptions, 'checkIgnore');
- addFunctionOption(configuredOptions, 'onSendCallback');
- delete configuredOptions.accessToken;
- item.data.notifier.configured_options = configuredOptions;
- callback(null, item);
-}
+/***/ }),
-function addDiagnosticKeys(item, options, callback) {
- var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);
+/***/ 369:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- if (_.get(item, 'err._isAnonymous')) {
- diagnostic.is_anonymous = true;
- }
+"use strict";
- if (item._isUncaught) {
- diagnostic.is_uncaught = item._isUncaught;
- }
- if (item.err) {
- try {
- diagnostic.raw_error = {
- message: item.err.message,
- name: item.err.name,
- constructor_name: item.err.constructor && item.err.constructor.name,
- filename: item.err.fileName,
- line: item.err.lineNumber,
- column: item.err.columnNumber,
- stack: item.err.stack
- };
- } catch (e) {
- diagnostic.raw_error = { failed: String(e) };
+var _ = __webpack_require__(702);
+var traverse = __webpack_require__(267);
+
+function scrub(data, scrubFields, scrubPaths) {
+ scrubFields = scrubFields || [];
+
+ if (scrubPaths) {
+ for (var i = 0; i < scrubPaths.length; ++i) {
+ scrubPath(data, scrubPaths[i]);
}
}
- item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);
- callback(null, item);
-}
+ var paramRes = _getScrubFieldRegexs(scrubFields);
+ var queryRes = _getScrubQueryParamRegexs(scrubFields);
-module.exports = {
- itemToPayload: itemToPayload,
- addTelemetryData: addTelemetryData,
- addMessageWithError: addMessageWithError,
- userTransform: userTransform,
- addConfigToPayload: addConfigToPayload,
- addConfiguredOptions: addConfiguredOptions,
- addDiagnosticKeys: addDiagnosticKeys
-};
+ function redactQueryParam(dummy0, paramPart) {
+ return paramPart + _.redact();
+ }
+
+ function paramScrubber(v) {
+ var i;
+ if (_.isType(v, 'string')) {
+ for (i = 0; i < queryRes.length; ++i) {
+ v = v.replace(queryRes[i], redactQueryParam);
+ }
+ }
+ return v;
+ }
+ function valScrubber(k, v) {
+ var i;
+ for (i = 0; i < paramRes.length; ++i) {
+ if (paramRes[i].test(k)) {
+ v = _.redact();
+ break;
+ }
+ }
+ return v;
+ }
-/***/ }),
-/* 25 */
-/***/ (function(module, exports, __webpack_require__) {
+ function scrubber(k, v, seen) {
+ var tmpV = valScrubber(k, v);
+ if (tmpV === v) {
+ if (_.isType(v, 'object') || _.isType(v, 'array')) {
+ return traverse(v, scrubber, seen);
+ }
+ return paramScrubber(tmpV);
+ } else {
+ return tmpV;
+ }
+ }
-"use strict";
+ return traverse(data, scrubber);
+}
+function scrubPath(obj, path) {
+ var keys = path.split('.');
+ var last = keys.length - 1;
+ try {
+ for (var i = 0; i <= last; ++i) {
+ if (i < last) {
+ obj = obj[keys[i]];
+ } else {
+ obj[keys[i]] = _.redact();
+ }
+ }
+ } catch (e) {
+ // Missing key is OK;
+ }
+}
-var _ = __webpack_require__(0);
+function _getScrubFieldRegexs(scrubFields) {
+ var ret = [];
+ var pat;
+ for (var i = 0; i < scrubFields.length; ++i) {
+ pat = '^\\[?(%5[bB])?' + scrubFields[i] + '\\[?(%5[bB])?\\]?(%5[dD])?$';
+ ret.push(new RegExp(pat, 'i'));
+ }
+ return ret;
+}
-function checkIgnore(item, settings) {
- if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {
- return !_.get(item, 'body.message.extra.isAjax');
+function _getScrubQueryParamRegexs(scrubFields) {
+ var ret = [];
+ var pat;
+ for (var i = 0; i < scrubFields.length; ++i) {
+ pat = '\\[?(%5[bB])?' + scrubFields[i] + '\\[?(%5[bB])?\\]?(%5[dD])?';
+ ret.push(new RegExp('(' + pat + '=)([^&\\n]+)', 'igm'));
}
- return true;
+ return ret;
}
-module.exports = {
- checkIgnore: checkIgnore
-};
+module.exports = scrub;
/***/ }),
-/* 26 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 773:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var _ = __webpack_require__(0);
+var _ = __webpack_require__(702);
-function checkLevel(item, settings) {
- var level = item.level;
- var levelVal = _.LEVELS[level] || 0;
- var reportLevel = settings.reportLevel;
- var reportLevelVal = _.LEVELS[reportLevel] || 0;
+var MAX_EVENTS = 100;
- if (levelVal < reportLevelVal) {
- return false;
- }
- return true;
+function Telemeter(options) {
+ this.queue = [];
+ this.options = _.merge(options);
+ var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;
+ this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));
}
-function userCheckIgnore(logger) {
- return function(item, settings) {
- var isUncaught = !!item._isUncaught;
- delete item._isUncaught;
- var args = item._originalArgs;
- delete item._originalArgs;
- try {
- if (_.isFunction(settings.onSendCallback)) {
- settings.onSendCallback(isUncaught, args, item);
- }
- } catch (e) {
- settings.onSendCallback = null;
- logger.error('Error while calling onSendCallback, removing', e);
- }
+Telemeter.prototype.configure = function (options) {
+ var oldOptions = this.options;
+ this.options = _.merge(oldOptions, options);
+ var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;
+ var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));
+ var deleteCount = 0;
+ if (this.queue.length > newMaxEvents) {
+ deleteCount = this.queue.length - newMaxEvents;
+ }
+ this.maxQueueSize = newMaxEvents;
+ this.queue.splice(0, deleteCount);
+};
+
+Telemeter.prototype.copyEvents = function () {
+ var events = Array.prototype.slice.call(this.queue, 0);
+ if (_.isFunction(this.options.filterTelemetry)) {
try {
- if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {
- return false;
+ var i = events.length;
+ while (i--) {
+ if (this.options.filterTelemetry(events[i])) {
+ events.splice(i, 1);
+ }
}
} catch (e) {
- settings.checkIgnore = null;
- logger.error('Error while calling custom checkIgnore(), removing', e);
+ this.options.filterTelemetry = null;
}
- return true;
}
-}
+ return events;
+};
-function urlIsNotBlockListed(logger) {
- return function(item, settings) {
- return !urlIsOnAList(item, settings, 'blocklist', logger);
+Telemeter.prototype.capture = function (
+ type,
+ metadata,
+ level,
+ rollbarUUID,
+ timestamp,
+) {
+ var e = {
+ level: getLevel(type, level),
+ type: type,
+ timestamp_ms: timestamp || _.now(),
+ body: metadata,
+ source: 'client',
+ };
+ if (rollbarUUID) {
+ e.uuid = rollbarUUID;
}
-}
-function urlIsSafeListed(logger) {
- return function(item, settings) {
- return urlIsOnAList(item, settings, 'safelist', logger);
+ try {
+ if (
+ _.isFunction(this.options.filterTelemetry) &&
+ this.options.filterTelemetry(e)
+ ) {
+ return false;
+ }
+ } catch (exc) {
+ this.options.filterTelemetry = null;
}
-}
-
-function matchFrames(trace, list, block) {
- if (!trace) { return !block }
- var frames = trace.frames;
+ this.push(e);
+ return e;
+};
- if (!frames || frames.length === 0) { return !block; }
+Telemeter.prototype.captureEvent = function (
+ type,
+ metadata,
+ level,
+ rollbarUUID,
+) {
+ return this.capture(type, metadata, level, rollbarUUID);
+};
- var frame, filename, url, urlRegex;
- var listLength = list.length;
- var frameLength = frames.length;
- for (var i = 0; i < frameLength; i++) {
- frame = frames[i];
- filename = frame.filename;
+Telemeter.prototype.captureError = function (
+ err,
+ level,
+ rollbarUUID,
+ timestamp,
+) {
+ var metadata = {
+ message: err.message || String(err),
+ };
+ if (err.stack) {
+ metadata.stack = err.stack;
+ }
+ return this.capture('error', metadata, level, rollbarUUID, timestamp);
+};
- if (!_.isType(filename, 'string')) { return !block; }
+Telemeter.prototype.captureLog = function (
+ message,
+ level,
+ rollbarUUID,
+ timestamp,
+) {
+ return this.capture(
+ 'log',
+ {
+ message: message,
+ },
+ level,
+ rollbarUUID,
+ timestamp,
+ );
+};
- for (var j = 0; j < listLength; j++) {
- url = list[j];
- urlRegex = new RegExp(url);
+Telemeter.prototype.captureNetwork = function (
+ metadata,
+ subtype,
+ rollbarUUID,
+ requestData,
+) {
+ subtype = subtype || 'xhr';
+ metadata.subtype = metadata.subtype || subtype;
+ if (requestData) {
+ metadata.request = requestData;
+ }
+ var level = this.levelFromStatus(metadata.status_code);
+ return this.capture('network', metadata, level, rollbarUUID);
+};
- if (urlRegex.test(filename)) {
- return true;
- }
- }
+Telemeter.prototype.levelFromStatus = function (statusCode) {
+ if (statusCode >= 200 && statusCode < 400) {
+ return 'info';
}
- return false;
-}
+ if (statusCode === 0 || statusCode >= 400) {
+ return 'error';
+ }
+ return 'info';
+};
-function urlIsOnAList(item, settings, safeOrBlock, logger) {
- // safelist is the default
- var block = false;
- if (safeOrBlock === 'blocklist') {
- block = true;
+Telemeter.prototype.captureDom = function (
+ subtype,
+ element,
+ value,
+ checked,
+ rollbarUUID,
+) {
+ var metadata = {
+ subtype: subtype,
+ element: element,
+ };
+ if (value !== undefined) {
+ metadata.value = value;
}
+ if (checked !== undefined) {
+ metadata.checked = checked;
+ }
+ return this.capture('dom', metadata, 'info', rollbarUUID);
+};
- var list, traces;
- try {
- list = block ? settings.hostBlockList : settings.hostSafeList;
- traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];
+Telemeter.prototype.captureNavigation = function (from, to, rollbarUUID) {
+ return this.capture(
+ 'navigation',
+ { from: from, to: to },
+ 'info',
+ rollbarUUID,
+ );
+};
- // These two checks are important to come first as they are defaults
- // in case the list is missing or the trace is missing or not well-formed
- if (!list || list.length === 0) {
- return !block;
- }
- if (traces.length === 0 || !traces[0]) {
- return !block;
- }
+Telemeter.prototype.captureDomContentLoaded = function (ts) {
+ return this.capture(
+ 'navigation',
+ { subtype: 'DOMContentLoaded' },
+ 'info',
+ undefined,
+ ts && ts.getTime(),
+ );
+ /**
+ * If we decide to make this a dom event instead, then use the line below:
+ return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());
+ */
+};
+Telemeter.prototype.captureLoad = function (ts) {
+ return this.capture(
+ 'navigation',
+ { subtype: 'load' },
+ 'info',
+ undefined,
+ ts && ts.getTime(),
+ );
+ /**
+ * If we decide to make this a dom event instead, then use the line below:
+ return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());
+ */
+};
- var tracesLength = traces.length;
- for (var i = 0; i < tracesLength; i++) {
- if(matchFrames(traces[i], list, block)) {
- return true;
- }
- }
- } catch (e)
- /* istanbul ignore next */
- {
- if (block) {
- settings.hostBlockList = null;
- } else {
- settings.hostSafeList = null;
- }
- var listName = block ? 'hostBlockList' : 'hostSafeList';
- logger.error('Error while reading your configuration\'s ' + listName + ' option. Removing custom ' + listName + '.', e);
- return !block;
+Telemeter.prototype.captureConnectivityChange = function (type, rollbarUUID) {
+ return this.captureNetwork({ change: type }, 'connectivity', rollbarUUID);
+};
+
+// Only intended to be used internally by the notifier
+Telemeter.prototype._captureRollbarItem = function (item) {
+ if (!this.options.includeItemsInTelemetry) {
+ return;
}
- return false;
+ if (item.err) {
+ return this.captureError(item.err, item.level, item.uuid, item.timestamp);
+ }
+ if (item.message) {
+ return this.captureLog(item.message, item.level, item.uuid, item.timestamp);
+ }
+ if (item.custom) {
+ return this.capture(
+ 'log',
+ item.custom,
+ item.level,
+ item.uuid,
+ item.timestamp,
+ );
+ }
+};
+
+Telemeter.prototype.push = function (e) {
+ this.queue.push(e);
+ if (this.queue.length > this.maxQueueSize) {
+ this.queue.shift();
+ }
+};
+
+function getLevel(type, level) {
+ if (level) {
+ return level;
+ }
+ var defaultLevel = {
+ error: 'error',
+ manual: 'info',
+ };
+ return defaultLevel[type] || 'info';
}
-function messageIsIgnored(logger) {
- return function(item, settings) {
- var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;
+module.exports = Telemeter;
+
- try {
- messageIsIgnored = false;
- ignoredMessages = settings.ignoredMessages;
+/***/ }),
- if (!ignoredMessages || ignoredMessages.length === 0) {
- return true;
- }
+/***/ 417:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- messages = messagesFromItem(item);
+"use strict";
- if (messages.length === 0){
- return true;
- }
- len = ignoredMessages.length;
- for (i = 0; i < len; i++) {
- rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');
+var _ = __webpack_require__(702);
- for (j = 0; j < messages.length; j++) {
- messageIsIgnored = rIgnoredMessage.test(messages[j]);
+function itemToPayload(item, options, callback) {
+ var data = item.data;
- if (messageIsIgnored) {
- return false;
- }
- }
- }
- } catch(e)
- /* istanbul ignore next */
- {
- settings.ignoredMessages = null;
- logger.error('Error while reading your configuration\'s ignoredMessages option. Removing custom ignoredMessages.');
- }
+ if (item._isUncaught) {
+ data._isUncaught = true;
+ }
+ if (item._originalArgs) {
+ data._originalArgs = item._originalArgs;
+ }
+ callback(null, data);
+}
- return true;
+function addPayloadOptions(item, options, callback) {
+ var payloadOptions = options.payload || {};
+ if (payloadOptions.body) {
+ delete payloadOptions.body;
}
+
+ item.data = _.merge(item.data, payloadOptions);
+ callback(null, item);
}
-function messagesFromItem(item) {
- var body = item.body;
- var messages = [];
+function addTelemetryData(item, options, callback) {
+ if (item.telemetryEvents) {
+ _.set(item, 'data.body.telemetry', item.telemetryEvents);
+ }
+ callback(null, item);
+}
- // The payload schema only allows one of trace_chain, message, or trace.
- // However, existing test cases are based on having both trace and message present.
- // So here we preserve the ability to collect strings from any combination of these keys.
- if (body.trace_chain) {
- var traceChain = body.trace_chain;
- for (var i = 0; i < traceChain.length; i++) {
- var trace = traceChain[i];
- messages.push(_.get(trace, 'exception.message'));
- }
+function addMessageWithError(item, options, callback) {
+ if (!item.message) {
+ callback(null, item);
+ return;
}
- if (body.trace) {
- messages.push(_.get(body, 'trace.exception.message'));
+ var tracePath = 'data.body.trace_chain.0';
+ var trace = _.get(item, tracePath);
+ if (!trace) {
+ tracePath = 'data.body.trace';
+ trace = _.get(item, tracePath);
}
- if (body.message) {
- messages.push(_.get(body, 'message.body'));
+ if (trace) {
+ if (!(trace.exception && trace.exception.description)) {
+ _.set(item, tracePath + '.exception.description', item.message);
+ callback(null, item);
+ return;
+ }
+ var extra = _.get(item, tracePath + '.extra') || {};
+ var newExtra = _.merge(extra, { message: item.message });
+ _.set(item, tracePath + '.extra', newExtra);
}
- return messages;
+ callback(null, item);
}
-module.exports = {
- checkLevel: checkLevel,
- userCheckIgnore: userCheckIgnore,
- urlIsNotBlockListed: urlIsNotBlockListed,
- urlIsSafeListed: urlIsSafeListed,
- messageIsIgnored: messageIsIgnored
-};
+function userTransform(logger) {
+ return function (item, options, callback) {
+ var newItem = _.merge(item);
+ var response = null;
+ try {
+ if (_.isFunction(options.transform)) {
+ response = options.transform(newItem.data, item);
+ }
+ } catch (e) {
+ options.transform = null;
+ logger.error(
+ 'Error while calling custom transform() function. Removing custom transform().',
+ e,
+ );
+ callback(null, item);
+ return;
+ }
+ if (_.isPromise(response)) {
+ response.then(
+ function (promisedItem) {
+ if (promisedItem) {
+ newItem.data = promisedItem;
+ }
+ callback(null, newItem);
+ },
+ function (error) {
+ callback(error, item);
+ },
+ );
+ } else {
+ callback(null, newItem);
+ }
+ };
+}
+function addConfigToPayload(item, options, callback) {
+ if (!options.sendConfig) {
+ return callback(null, item);
+ }
+ var configKey = '_rollbarConfig';
+ var custom = _.get(item, 'data.custom') || {};
+ custom[configKey] = options;
+ item.data.custom = custom;
+ callback(null, item);
+}
-/***/ }),
-/* 27 */
-/***/ (function(module, exports, __webpack_require__) {
+function addFunctionOption(options, name) {
+ if (_.isFunction(options[name])) {
+ options[name] = options[name].toString();
+ }
+}
-"use strict";
+function addConfiguredOptions(item, options, callback) {
+ var configuredOptions = options._configuredOptions;
+ // These must be stringified or they'll get dropped during serialization.
+ addFunctionOption(configuredOptions, 'transform');
+ addFunctionOption(configuredOptions, 'checkIgnore');
+ addFunctionOption(configuredOptions, 'onSendCallback');
-module.exports = {
- version: '2.24.0',
- endpoint: 'api.rollbar.com/api/1/item/',
- logLevel: 'debug',
- reportLevel: 'debug',
- uncaughtErrorLevel: 'error',
- maxItems: 0,
- itemsPerMin: 60
+ delete configuredOptions.accessToken;
+ item.data.notifier.configured_options = configuredOptions;
+ callback(null, item);
}
+function addDiagnosticKeys(item, options, callback) {
+ var diagnostic = _.merge(
+ item.notifier.client.notifier.diagnostic,
+ item.diagnostic,
+ );
-/***/ }),
-/* 28 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (_.get(item, 'err._isAnonymous')) {
+ diagnostic.is_anonymous = true;
+ }
-"use strict";
+ if (item._isUncaught) {
+ diagnostic.is_uncaught = item._isUncaught;
+ }
+ if (item.err) {
+ try {
+ diagnostic.raw_error = {
+ message: item.err.message,
+ name: item.err.name,
+ constructor_name: item.err.constructor && item.err.constructor.name,
+ filename: item.err.fileName,
+ line: item.err.lineNumber,
+ column: item.err.columnNumber,
+ stack: item.err.stack,
+ };
+ } catch (e) {
+ diagnostic.raw_error = { failed: String(e) };
+ }
+ }
-module.exports = {
- scrubFields: [
- 'pw',
- 'pass',
- 'passwd',
- 'password',
- 'secret',
- 'confirm_password',
- 'confirmPassword',
- 'password_confirmation',
- 'passwordConfirmation',
- 'access_token',
- 'accessToken',
- 'X-Rollbar-Access-Token',
- 'secret_key',
- 'secretKey',
- 'secretToken',
- 'cc-number',
- 'card number',
- 'cardnumber',
- 'cardnum',
- 'ccnum',
- 'ccnumber',
- 'cc num',
- 'creditcardnumber',
- 'credit card number',
- 'newcreditcardnumber',
- 'new credit card',
- 'creditcardno',
- 'credit card no',
- 'card#',
- 'card #',
- 'cc-csc',
- 'cvc',
- 'cvc2',
- 'cvv2',
- 'ccv2',
- 'security code',
- 'card verification',
- 'name on credit card',
- 'name on card',
- 'nameoncard',
- 'cardholder',
- 'card holder',
- 'name des karteninhabers',
- 'ccname',
- 'card type',
- 'cardtype',
- 'cc type',
- 'cctype',
- 'payment type',
- 'expiration date',
- 'expirationdate',
- 'expdate',
- 'cc-exp',
- 'ccmonth',
- 'ccyear'
- ]
+ item.data.notifier.diagnostic = _.merge(
+ item.data.notifier.diagnostic,
+ diagnostic,
+ );
+ callback(null, item);
}
+module.exports = {
+ itemToPayload: itemToPayload,
+ addPayloadOptions: addPayloadOptions,
+ addTelemetryData: addTelemetryData,
+ addMessageWithError: addMessageWithError,
+ userTransform: userTransform,
+ addConfigToPayload: addConfigToPayload,
+ addConfiguredOptions: addConfiguredOptions,
+ addDiagnosticKeys: addDiagnosticKeys,
+};
+
/***/ }),
-/* 29 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 473:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var _ = __webpack_require__(0);
+var _ = __webpack_require__(702);
+var traverse = __webpack_require__(267);
-var MAX_EVENTS = 100;
+function raw(payload, jsonBackup) {
+ return [payload, _.stringify(payload, jsonBackup)];
+}
-function Telemeter(options) {
- this.queue = [];
- this.options = _.merge(options);
- var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;
- this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));
+function selectFrames(frames, range) {
+ var len = frames.length;
+ if (len > range * 2) {
+ return frames.slice(0, range).concat(frames.slice(len - range));
+ }
+ return frames;
+}
+
+function truncateFrames(payload, jsonBackup, range) {
+ range = typeof range === 'undefined' ? 30 : range;
+ var body = payload.data.body;
+ var frames;
+ if (body.trace_chain) {
+ var chain = body.trace_chain;
+ for (var i = 0; i < chain.length; i++) {
+ frames = chain[i].frames;
+ frames = selectFrames(frames, range);
+ chain[i].frames = frames;
+ }
+ } else if (body.trace) {
+ frames = body.trace.frames;
+ frames = selectFrames(frames, range);
+ body.trace.frames = frames;
+ }
+ return [payload, _.stringify(payload, jsonBackup)];
}
-Telemeter.prototype.configure = function(options) {
- var oldOptions = this.options;
- this.options = _.merge(oldOptions, options);
- var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;
- var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));
- var deleteCount = 0;
- if (this.maxQueueSize > newMaxEvents) {
- deleteCount = this.maxQueueSize - newMaxEvents;
+function maybeTruncateValue(len, val) {
+ if (!val) {
+ return val;
}
- this.maxQueueSize = newMaxEvents;
- this.queue.splice(0, deleteCount);
-};
+ if (val.length > len) {
+ return val.slice(0, len - 3).concat('...');
+ }
+ return val;
+}
-Telemeter.prototype.copyEvents = function() {
- var events = Array.prototype.slice.call(this.queue, 0);
- if (_.isFunction(this.options.filterTelemetry)) {
- try {
- var i = events.length;
- while (i--) {
- if (this.options.filterTelemetry(events[i])) {
- events.splice(i, 1);
- }
- }
- } catch (e) {
- this.options.filterTelemetry = null;
+function truncateStrings(len, payload, jsonBackup) {
+ function truncator(k, v, seen) {
+ switch (_.typeName(v)) {
+ case 'string':
+ return maybeTruncateValue(len, v);
+ case 'object':
+ case 'array':
+ return traverse(v, truncator, seen);
+ default:
+ return v;
}
}
- return events;
-};
+ payload = traverse(payload, truncator);
+ return [payload, _.stringify(payload, jsonBackup)];
+}
-Telemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {
- var e = {
- level: getLevel(type, level),
- type: type,
- timestamp_ms: timestamp || _.now(),
- body: metadata,
- source: 'client'
- };
- if (rollbarUUID) {
- e.uuid = rollbarUUID;
+function truncateTraceData(traceData) {
+ if (traceData.exception) {
+ delete traceData.exception.description;
+ traceData.exception.message = maybeTruncateValue(
+ 255,
+ traceData.exception.message,
+ );
}
+ traceData.frames = selectFrames(traceData.frames, 1);
+ return traceData;
+}
- try {
- if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {
- return false;
+function minBody(payload, jsonBackup) {
+ var body = payload.data.body;
+ if (body.trace_chain) {
+ var chain = body.trace_chain;
+ for (var i = 0; i < chain.length; i++) {
+ chain[i] = truncateTraceData(chain[i]);
}
- } catch (exc) {
- this.options.filterTelemetry = null;
+ } else if (body.trace) {
+ body.trace = truncateTraceData(body.trace);
}
+ return [payload, _.stringify(payload, jsonBackup)];
+}
- this.push(e);
- return e;
-};
+function needsTruncation(payload, maxSize) {
+ return _.maxByteSize(payload) > maxSize;
+}
-Telemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {
- return this.capture(type, metadata, level, rollbarUUID);
-};
+function truncate(payload, jsonBackup, maxSize) {
+ maxSize = typeof maxSize === 'undefined' ? 512 * 1024 : maxSize;
+ var strategies = [
+ raw,
+ truncateFrames,
+ truncateStrings.bind(null, 1024),
+ truncateStrings.bind(null, 512),
+ truncateStrings.bind(null, 256),
+ minBody,
+ ];
+ var strategy, results, result;
-Telemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {
- var metadata = {
- message: err.message || String(err)
- };
- if (err.stack) {
- metadata.stack = err.stack;
+ while ((strategy = strategies.shift())) {
+ results = strategy(payload, jsonBackup);
+ payload = results[0];
+ result = results[1];
+ if (result.error || !needsTruncation(result.value, maxSize)) {
+ return result;
+ }
}
- return this.capture('error', metadata, level, rollbarUUID, timestamp);
-};
+ return result;
+}
-Telemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {
- return this.capture('log', {
- message: message
- }, level, rollbarUUID, timestamp);
-};
+module.exports = {
+ truncate: truncate,
-Telemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {
- subtype = subtype || 'xhr';
- metadata.subtype = metadata.subtype || subtype;
- if (requestData) {
- metadata.request = requestData;
- }
- var level = this.levelFromStatus(metadata.status_code);
- return this.capture('network', metadata, level, rollbarUUID);
+ /* for testing */
+ raw: raw,
+ truncateFrames: truncateFrames,
+ truncateStrings: truncateStrings,
+ maybeTruncateValue: maybeTruncateValue,
};
-Telemeter.prototype.levelFromStatus = function(statusCode) {
- if (statusCode >= 200 && statusCode < 400) {
- return 'info';
- }
- if (statusCode === 0 || statusCode >= 400) {
- return 'error';
- }
- return 'info';
-};
-Telemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {
- var metadata = {
- subtype: subtype,
- element: element
- };
- if (value !== undefined) {
- metadata.value = value;
- }
- if (checked !== undefined) {
- metadata.checked = checked;
- }
- return this.capture('dom', metadata, 'info', rollbarUUID);
-};
+/***/ }),
-Telemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {
- return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);
-};
+/***/ 702:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-Telemeter.prototype.captureDomContentLoaded = function(ts) {
- return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());
- /**
- * If we decide to make this a dom event instead, then use the line below:
- return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());
- */
-};
-Telemeter.prototype.captureLoad = function(ts) {
- return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());
- /**
- * If we decide to make this a dom event instead, then use the line below:
- return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());
- */
-};
+"use strict";
-Telemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {
- return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);
-};
-// Only intended to be used internally by the notifier
-Telemeter.prototype._captureRollbarItem = function(item) {
- if (!this.options.includeItemsInTelemetry) {
+var merge = __webpack_require__(420);
+
+var RollbarJSON = {};
+function setupJSON(polyfillJSON) {
+ if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {
return;
}
- if (item.err) {
- return this.captureError(item.err, item.level, item.uuid, item.timestamp);
+
+ if (isDefined(JSON)) {
+ // If polyfill is provided, prefer it over existing non-native shims.
+ if (polyfillJSON) {
+ if (isNativeFunction(JSON.stringify)) {
+ RollbarJSON.stringify = JSON.stringify;
+ }
+ if (isNativeFunction(JSON.parse)) {
+ RollbarJSON.parse = JSON.parse;
+ }
+ } else {
+ // else accept any interface that is present.
+ if (isFunction(JSON.stringify)) {
+ RollbarJSON.stringify = JSON.stringify;
+ }
+ if (isFunction(JSON.parse)) {
+ RollbarJSON.parse = JSON.parse;
+ }
+ }
}
- if (item.message) {
- return this.captureLog(item.message, item.level, item.uuid, item.timestamp);
+ if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {
+ polyfillJSON && polyfillJSON(RollbarJSON);
}
- if (item.custom) {
- return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);
+}
+
+/*
+ * isType - Given a Javascript value and a string, returns true if the type of the value matches the
+ * given string.
+ *
+ * @param x - any value
+ * @param t - a lowercase string containing one of the following type names:
+ * - undefined
+ * - null
+ * - error
+ * - number
+ * - boolean
+ * - string
+ * - symbol
+ * - function
+ * - object
+ * - array
+ * @returns true if x is of type t, otherwise false
+ */
+function isType(x, t) {
+ return t === typeName(x);
+}
+
+/*
+ * typeName - Given a Javascript value, returns the type of the object as a string
+ */
+function typeName(x) {
+ var name = typeof x;
+ if (name !== 'object') {
+ return name;
}
-};
+ if (!x) {
+ return 'null';
+ }
+ if (x instanceof Error) {
+ return 'error';
+ }
+ return {}.toString
+ .call(x)
+ .match(/\s([a-zA-Z]+)/)[1]
+ .toLowerCase();
+}
+
+/* isFunction - a convenience function for checking if a value is a function
+ *
+ * @param f - any value
+ * @returns true if f is a function, otherwise false
+ */
+function isFunction(f) {
+ 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');
+}
-Telemeter.prototype.push = function(e) {
- this.queue.push(e);
- if (this.queue.length > this.maxQueueSize) {
- this.queue.shift();
- }
-};
+/* isString - Checks if the argument is a string
+ *
+ * @param value - any value
+ * @returns true if value is a string
+ */
+function isString(value) {
+ return typeof value === 'string' || value instanceof String;
+}
-function getLevel(type, level) {
- if (level) {
- return level;
- }
- var defaultLevel = {
- error: 'error',
- manual: 'info'
- };
- return defaultLevel[type] || 'info';
+/**
+ * isFiniteNumber - determines whether the passed value is a finite number
+ *
+ * @param {*} n - any value
+ * @returns true if value is a finite number
+ */
+function isFiniteNumber(n) {
+ return Number.isFinite(n);
}
-module.exports = Telemeter;
+/*
+ * isDefined - a convenience function for checking if a value is not equal to undefined
+ *
+ * @param u - any value
+ * @returns true if u is anything other than undefined
+ */
+function isDefined(u) {
+ return !isType(u, 'undefined');
+}
+/*
+ * isIterable - convenience function for checking if a value can be iterated, essentially
+ * whether it is an object or an array.
+ *
+ * @param i - any value
+ * @returns true if i is an object or an array as determined by `typeName`
+ */
+function isIterable(i) {
+ var type = typeName(i);
+ return type === 'object' || type === 'array';
+}
-/***/ }),
-/* 30 */
-/***/ (function(module, exports, __webpack_require__) {
+/*
+ * isError - convenience function for checking if a value is of an error type
+ *
+ * @param e - any value
+ * @returns true if e is an error
+ */
+function isError(e) {
+ // Detect both Error and Firefox Exception type
+ return isType(e, 'error') || isType(e, 'exception');
+}
-"use strict";
+/* isPromise - a convenience function for checking if a value is a promise
+ *
+ * @param p - any value
+ * @returns true if f is a function, otherwise false
+ */
+function isPromise(p) {
+ return isObject(p) && isType(p.then, 'function');
+}
+function redact() {
+ return '********';
+}
-var _ = __webpack_require__(0);
-var scrub = __webpack_require__(4);
-var urlparser = __webpack_require__(2);
-var domUtil = __webpack_require__(31);
+// from http://stackoverflow.com/a/8809472/1138191
+function uuid4() {
+ var d = now();
+ var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(
+ /[xy]/g,
+ function (c) {
+ var r = (d + Math.random() * 16) % 16 | 0;
+ d = Math.floor(d / 16);
+ return (c === 'x' ? r : (r & 0x7) | 0x8).toString(16);
+ },
+ );
+ return uuid;
+}
-var defaults = {
- network: true,
- networkResponseHeaders: false,
- networkResponseBody: false,
- networkRequestHeaders: false,
- networkRequestBody: false,
- networkErrorOnHttp5xx: false,
- networkErrorOnHttp4xx: false,
- networkErrorOnHttp0: false,
- log: true,
- dom: true,
- navigation: true,
- connectivity: true,
- contentSecurityPolicy: true,
- errorOnContentSecurityPolicy: false
+var LEVELS = {
+ debug: 0,
+ info: 1,
+ warning: 2,
+ error: 3,
+ critical: 4,
};
-function replace(obj, name, replacement, replacements, type) {
- var orig = obj[name];
- obj[name] = replacement(orig);
- if (replacements) {
- replacements[type].push([obj, name, orig]);
+function sanitizeUrl(url) {
+ var baseUrlParts = parseUri(url);
+ if (!baseUrlParts) {
+ return '(unknown)';
}
-}
-function restore(replacements, type) {
- var b;
- while (replacements[type].length) {
- b = replacements[type].shift();
- b[0][b[1]] = b[2];
+ // remove a trailing # if there is no anchor
+ if (baseUrlParts.anchor === '') {
+ baseUrlParts.source = baseUrlParts.source.replace('#', '');
}
+
+ url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');
+ return url;
}
-function nameFromDescription(description) {
- if (!description || !description.attributes) { return null; }
- var attrs = description.attributes;
- for (var a = 0; a < attrs.length; ++a) {
- if (attrs[a].key === 'name') {
- return attrs[a].value;
- }
+var parseUriOptions = {
+ strictMode: false,
+ key: [
+ 'source',
+ 'protocol',
+ 'authority',
+ 'userInfo',
+ 'user',
+ 'password',
+ 'host',
+ 'port',
+ 'relative',
+ 'path',
+ 'directory',
+ 'file',
+ 'query',
+ 'anchor',
+ ],
+ q: {
+ name: 'queryKey',
+ parser: /(?:^|&)([^&=]*)=?([^&]*)/g,
+ },
+ parser: {
+ strict:
+ /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
+ loose:
+ /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,
+ },
+};
+
+function parseUri(str) {
+ if (!isType(str, 'string')) {
+ return undefined;
}
- return null;
-}
-function defaultValueScrubber(scrubFields) {
- var patterns = [];
- for (var i = 0; i < scrubFields.length; ++i) {
- patterns.push(new RegExp(scrubFields[i], 'i'));
+ var o = parseUriOptions;
+ var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);
+ var uri = {};
+
+ for (var i = 0, l = o.key.length; i < l; ++i) {
+ uri[o.key[i]] = m[i] || '';
}
- return function(description) {
- var name = nameFromDescription(description);
- if (!name) { return false; }
- for (var i = 0; i < patterns.length; ++i) {
- if (patterns[i].test(name)) {
- return true;
- }
+
+ uri[o.q.name] = {};
+ uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
+ if ($1) {
+ uri[o.q.name][$1] = $2;
}
- return false;
- };
+ });
+
+ return uri;
}
-function Instrumenter(options, telemeter, rollbar, _window, _document) {
- this.options = options;
- var autoInstrument = options.autoInstrument;
- if (options.enabled === false || autoInstrument === false) {
- this.autoInstrument = {};
- } else {
- if (!_.isType(autoInstrument, 'object')) {
- autoInstrument = defaults;
+function addParamsAndAccessTokenToPath(accessToken, options, params) {
+ params = params || {};
+ params.access_token = accessToken;
+ var paramsArray = [];
+ var k;
+ for (k in params) {
+ if (Object.prototype.hasOwnProperty.call(params, k)) {
+ paramsArray.push([k, params[k]].join('='));
}
- this.autoInstrument = _.merge(defaults, autoInstrument);
}
- this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;
- this.telemetryScrubber = options.telemetryScrubber;
- this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);
- this.telemeter = telemeter;
- this.rollbar = rollbar;
- this.diagnostic = rollbar.client.notifier.diagnostic;
- this._window = _window || {};
- this._document = _document || {};
- this.replacements = {
- network: [],
- log: [],
- navigation: [],
- connectivity: []
- };
- this.eventRemovers = {
- dom: [],
- connectivity: [],
- contentsecuritypolicy: []
- };
+ var query = '?' + paramsArray.sort().join('&');
- this._location = this._window.location;
- this._lastHref = this._location && this._location.href;
+ options = options || {};
+ options.path = options.path || '';
+ var qs = options.path.indexOf('?');
+ var h = options.path.indexOf('#');
+ var p;
+ if (qs !== -1 && (h === -1 || h > qs)) {
+ p = options.path;
+ options.path = p.substring(0, qs) + query + '&' + p.substring(qs + 1);
+ } else {
+ if (h !== -1) {
+ p = options.path;
+ options.path = p.substring(0, h) + query + p.substring(h);
+ } else {
+ options.path = options.path + query;
+ }
+ }
}
-Instrumenter.prototype.configure = function(options) {
- this.options = _.merge(this.options, options);
- var autoInstrument = options.autoInstrument;
- var oldSettings = _.merge(this.autoInstrument);
- if (options.enabled === false || autoInstrument === false) {
- this.autoInstrument = {};
- } else {
- if (!_.isType(autoInstrument, 'object')) {
- autoInstrument = defaults;
+function formatUrl(u, protocol) {
+ protocol = protocol || u.protocol;
+ if (!protocol && u.port) {
+ if (u.port === 80) {
+ protocol = 'http:';
+ } else if (u.port === 443) {
+ protocol = 'https:';
}
- this.autoInstrument = _.merge(defaults, autoInstrument);
}
- this.instrument(oldSettings);
- if (options.scrubTelemetryInputs !== undefined) {
- this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;
+ protocol = protocol || 'https:';
+
+ if (!u.hostname) {
+ return null;
}
- if (options.telemetryScrubber !== undefined) {
- this.telemetryScrubber = options.telemetryScrubber;
+ var result = protocol + '//' + u.hostname;
+ if (u.port) {
+ result = result + ':' + u.port;
}
-};
-
-// eslint-disable-next-line complexity
-Instrumenter.prototype.instrument = function(oldSettings) {
- if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {
- this.instrumentNetwork();
- } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {
- this.deinstrumentNetwork();
+ if (u.path) {
+ result = result + u.path;
}
+ return result;
+}
- if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {
- this.instrumentConsole();
- } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {
- this.deinstrumentConsole();
+function stringify(obj, backup) {
+ var value, error;
+ try {
+ value = RollbarJSON.stringify(obj);
+ } catch (jsonError) {
+ if (backup && isFunction(backup)) {
+ try {
+ value = backup(obj);
+ } catch (backupError) {
+ error = backupError;
+ }
+ } else {
+ error = jsonError;
+ }
}
+ return { error: error, value: value };
+}
- if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {
- this.instrumentDom();
- } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {
- this.deinstrumentDom();
- }
+function maxByteSize(string) {
+ // The transport will use utf-8, so assume utf-8 encoding.
+ //
+ // This minimal implementation will accurately count bytes for all UCS-2 and
+ // single code point UTF-16. If presented with multi code point UTF-16,
+ // which should be rare, it will safely overcount, not undercount.
+ //
+ // While robust utf-8 encoders exist, this is far smaller and far more performant.
+ // For quickly counting payload size for truncation, smaller is better.
- if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {
- this.instrumentNavigation();
- } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {
- this.deinstrumentNavigation();
- }
+ var count = 0;
+ var length = string.length;
- if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {
- this.instrumentConnectivity();
- } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {
- this.deinstrumentConnectivity();
+ for (var i = 0; i < length; i++) {
+ var code = string.charCodeAt(i);
+ if (code < 128) {
+ // up to 7 bits
+ count = count + 1;
+ } else if (code < 2048) {
+ // up to 11 bits
+ count = count + 2;
+ } else if (code < 65536) {
+ // up to 16 bits
+ count = count + 3;
+ }
}
- if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {
- this.instrumentContentSecurityPolicy();
- } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {
- this.deinstrumentContentSecurityPolicy();
- }
-};
+ return count;
+}
-Instrumenter.prototype.deinstrumentNetwork = function() {
- restore(this.replacements, 'network');
-};
+function jsonParse(s) {
+ var value, error;
+ try {
+ value = RollbarJSON.parse(s);
+ } catch (e) {
+ error = e;
+ }
+ return { error: error, value: value };
+}
-Instrumenter.prototype.instrumentNetwork = function() {
- var self = this;
+function makeUnhandledStackInfo(
+ message,
+ url,
+ lineno,
+ colno,
+ error,
+ mode,
+ backupMessage,
+ errorParser,
+) {
+ var location = {
+ url: url || '',
+ line: lineno,
+ column: colno,
+ };
+ location.func = errorParser.guessFunctionName(location.url, location.line);
+ location.context = errorParser.gatherContext(location.url, location.line);
+ var href =
+ typeof document !== 'undefined' &&
+ document &&
+ document.location &&
+ document.location.href;
+ var useragent =
+ typeof window !== 'undefined' &&
+ window &&
+ window.navigator &&
+ window.navigator.userAgent;
+ return {
+ mode: mode,
+ message: error ? String(error) : message || backupMessage,
+ url: href,
+ stack: [location],
+ useragent: useragent,
+ };
+}
- function wrapProp(prop, xhr) {
- if (prop in xhr && _.isFunction(xhr[prop])) {
- replace(xhr, prop, function(orig) {
- return self.rollbar.wrap(orig);
- });
+function wrapCallback(logger, f) {
+ return function (err, resp) {
+ try {
+ f(err, resp);
+ } catch (e) {
+ logger.error(e);
}
- }
+ };
+}
- if ('XMLHttpRequest' in this._window) {
- var xhrp = this._window.XMLHttpRequest.prototype;
- replace(xhrp, 'open', function(orig) {
- return function(method, url) {
- if (_.isType(url, 'string')) {
- if (this.__rollbar_xhr) {
- this.__rollbar_xhr.method = method;
- this.__rollbar_xhr.url = url;
- this.__rollbar_xhr.status_code = null;
- this.__rollbar_xhr.start_time_ms = _.now();
- this.__rollbar_xhr.end_time_ms = null;
+function nonCircularClone(obj) {
+ var seen = [obj];
+
+ function clone(obj, seen) {
+ var value,
+ name,
+ newSeen,
+ result = {};
+
+ try {
+ for (name in obj) {
+ value = obj[name];
+
+ if (value && (isType(value, 'object') || isType(value, 'array'))) {
+ if (seen.includes(value)) {
+ result[name] = 'Removed circular reference: ' + typeName(value);
} else {
- this.__rollbar_xhr = {
- method: method,
- url: url,
- status_code: null,
- start_time_ms: _.now(),
- end_time_ms: null
- };
+ newSeen = seen.slice();
+ newSeen.push(value);
+ result[name] = clone(value, newSeen);
}
+ continue;
}
- return orig.apply(this, arguments);
- };
- }, this.replacements, 'network');
- replace(xhrp, 'setRequestHeader', function(orig) {
- return function(header, value) {
- // If xhr.open is async, __rollbar_xhr may not be initialized yet.
- if (!this.__rollbar_xhr) {
- this.__rollbar_xhr = {};
+ result[name] = value;
+ }
+ } catch (e) {
+ result = 'Failed cloning custom data: ' + e.message;
+ }
+ return result;
+ }
+ return clone(obj, seen);
+}
+
+function createItem(args, logger, notifier, requestKeys, lambdaContext) {
+ var message, err, custom, callback, request;
+ var arg;
+ var extraArgs = [];
+ var diagnostic = {};
+ var argTypes = [];
+
+ for (var i = 0, l = args.length; i < l; ++i) {
+ arg = args[i];
+
+ var typ = typeName(arg);
+ argTypes.push(typ);
+ switch (typ) {
+ case 'undefined':
+ break;
+ case 'string':
+ message ? extraArgs.push(arg) : (message = arg);
+ break;
+ case 'function':
+ callback = wrapCallback(logger, arg);
+ break;
+ case 'date':
+ extraArgs.push(arg);
+ break;
+ case 'error':
+ case 'domexception':
+ case 'exception': // Firefox Exception type
+ err ? extraArgs.push(arg) : (err = arg);
+ break;
+ case 'object':
+ case 'array':
+ if (
+ arg instanceof Error ||
+ (typeof DOMException !== 'undefined' && arg instanceof DOMException)
+ ) {
+ err ? extraArgs.push(arg) : (err = arg);
+ break;
}
- if (_.isType(header, 'string') && _.isType(value, 'string')) {
- if (self.autoInstrument.networkRequestHeaders) {
- if (!this.__rollbar_xhr.request_headers) {
- this.__rollbar_xhr.request_headers = {};
+ if (requestKeys && typ === 'object' && !request) {
+ for (var j = 0, len = requestKeys.length; j < len; ++j) {
+ if (arg[requestKeys[j]] !== undefined) {
+ request = arg;
+ break;
}
- this.__rollbar_xhr.request_headers[header] = value;
}
- // We want the content type even if request header telemetry is off.
- if (header.toLowerCase() === 'content-type') {
- this.__rollbar_xhr.request_content_type = value;
+ if (request) {
+ break;
}
}
- return orig.apply(this, arguments);
- };
- }, this.replacements, 'network');
-
- replace(xhrp, 'send', function(orig) {
- /* eslint-disable no-unused-vars */
- return function(data) {
- /* eslint-enable no-unused-vars */
- var xhr = this;
-
- function onreadystatechangeHandler() {
- if (xhr.__rollbar_xhr) {
- if (xhr.__rollbar_xhr.status_code === null) {
- xhr.__rollbar_xhr.status_code = 0;
- if (self.autoInstrument.networkRequestBody) {
- xhr.__rollbar_xhr.request = data;
- }
- xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);
- }
- if (xhr.readyState < 2) {
- xhr.__rollbar_xhr.start_time_ms = _.now();
- }
- if (xhr.readyState > 3) {
- xhr.__rollbar_xhr.end_time_ms = _.now();
-
- var headers = null;
- xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');
- if (self.autoInstrument.networkResponseHeaders) {
- var headersConfig = self.autoInstrument.networkResponseHeaders;
- headers = {};
- try {
- var header, i;
- if (headersConfig === true) {
- var allHeaders = xhr.getAllResponseHeaders();
- if (allHeaders) {
- var arr = allHeaders.trim().split(/[\r\n]+/);
- var parts, value;
- for (i=0; i < arr.length; i++) {
- parts = arr[i].split(': ');
- header = parts.shift();
- value = parts.join(': ');
- headers[header] = value;
- }
- }
- } else {
- for (i=0; i < headersConfig.length; i++) {
- header = headersConfig[i];
- headers[header] = xhr.getResponseHeader(header);
- }
- }
- } catch (e) {
- /* we ignore the errors here that could come from different
- * browser issues with the xhr methods */
- }
- }
- var body = null;
- if (self.autoInstrument.networkResponseBody) {
- try {
- body = xhr.responseText;
- } catch (e) {
- /* ignore errors from reading responseText */
- }
- }
- var response = null;
- if (body || headers) {
- response = {};
- if (body) {
- if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {
- response.body = self.scrubJson(body);
- } else {
- response.body = body;
- }
- }
- if (headers) {
- response.headers = headers;
- }
- }
- if (response) {
- xhr.__rollbar_xhr.response = response;
- }
- try {
- var code = xhr.status;
- code = code === 1223 ? 204 : code;
- xhr.__rollbar_xhr.status_code = code;
- xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);
- self.errorOnHttpStatus(xhr.__rollbar_xhr);
- } catch (e) {
- /* ignore possible exception from xhr.status */
- }
- }
- }
+ custom ? extraArgs.push(arg) : (custom = arg);
+ break;
+ default:
+ if (
+ arg instanceof Error ||
+ (typeof DOMException !== 'undefined' && arg instanceof DOMException)
+ ) {
+ err ? extraArgs.push(arg) : (err = arg);
+ break;
}
+ extraArgs.push(arg);
+ }
+ }
- wrapProp('onload', xhr);
- wrapProp('onerror', xhr);
- wrapProp('onprogress', xhr);
+ // if custom is an array this turns it into an object with integer keys
+ if (custom) custom = nonCircularClone(custom);
- if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {
- replace(xhr, 'onreadystatechange', function(orig) {
- return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);
- });
- } else {
- xhr.onreadystatechange = onreadystatechangeHandler;
- }
- if (xhr.__rollbar_xhr && self.trackHttpErrors()) {
- xhr.__rollbar_xhr.stack = (new Error()).stack;
- }
- return orig.apply(this, arguments);
- }
- }, this.replacements, 'network');
+ if (extraArgs.length > 0) {
+ if (!custom) custom = nonCircularClone({});
+ custom.extraArgs = nonCircularClone(extraArgs);
}
- if ('fetch' in this._window) {
- replace(this._window, 'fetch', function(orig) {
- /* eslint-disable no-unused-vars */
- return function(fn, t) {
- /* eslint-enable no-unused-vars */
- var args = new Array(arguments.length);
- for (var i=0, len=args.length; i < len; i++) {
- args[i] = arguments[i];
- }
- var input = args[0];
- var method = 'GET';
- var url;
- if (_.isType(input, 'string')) {
- url = input;
- } else if (input) {
- url = input.url;
- if (input.method) {
- method = input.method;
- }
- }
- if (args[1] && args[1].method) {
- method = args[1].method;
- }
- var metadata = {
- method: method,
- url: url,
- status_code: null,
- start_time_ms: _.now(),
- end_time_ms: null
- };
- if (args[1] && args[1].headers) {
- // Argument may be a Headers object, or plain object. Ensure here that
- // we are working with a Headers object with case-insensitive keys.
- var reqHeaders = new Headers(args[1].headers);
-
- metadata.request_content_type = reqHeaders.get('Content-Type');
+ var item = {
+ message: message,
+ err: err,
+ custom: custom,
+ timestamp: now(),
+ callback: callback,
+ notifier: notifier,
+ diagnostic: diagnostic,
+ uuid: uuid4(),
+ };
- if (self.autoInstrument.networkRequestHeaders) {
- metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)
- }
- }
+ setCustomItemKeys(item, custom);
- if (self.autoInstrument.networkRequestBody) {
- if (args[1] && args[1].body) {
- metadata.request = args[1].body;
- } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {
- metadata.request = args[0].body;
- }
- }
- self.captureNetwork(metadata, 'fetch', undefined);
- if (self.trackHttpErrors()) {
- metadata.stack = (new Error()).stack;
- }
- return orig.apply(this, args).then(function (resp) {
- metadata.end_time_ms = _.now();
- metadata.status_code = resp.status;
- metadata.response_content_type = resp.headers.get('Content-Type');
- var headers = null;
- if (self.autoInstrument.networkResponseHeaders) {
- headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);
- }
- var body = null;
- if (self.autoInstrument.networkResponseBody) {
- if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms
- // The response must be cloned to prevent reading (and locking) the original stream.
- body = resp.clone().text(); //returns a Promise
- }
- }
- if (headers || body) {
- metadata.response = {};
- if (body) {
- // Test to ensure body is a Promise, which it should always be.
- if (typeof body.then === 'function') {
- body.then(function (text) {
- if (self.isJsonContentType(metadata.response_content_type)) {
- metadata.response.body = self.scrubJson(text);
- }
- });
- } else {
- metadata.response.body = body;
- }
- }
- if (headers) {
- metadata.response.headers = headers;
- }
- }
- self.errorOnHttpStatus(metadata);
- return resp;
- });
- };
- }, this.replacements, 'network');
+ if (requestKeys && request) {
+ item.request = request;
}
-};
-
-Instrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {
- if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {
- metadata.request = this.scrubJson(metadata.request);
+ if (lambdaContext) {
+ item.lambdaContext = lambdaContext;
}
- return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);
-};
+ item._originalArgs = args;
+ item.diagnostic.original_arg_types = argTypes;
+ return item;
+}
-Instrumenter.prototype.isJsonContentType = function(contentType) {
- return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;
+function setCustomItemKeys(item, custom) {
+ if (custom && custom.level !== undefined) {
+ item.level = custom.level;
+ delete custom.level;
+ }
+ if (custom && custom.skipFrames !== undefined) {
+ item.skipFrames = custom.skipFrames;
+ delete custom.skipFrames;
+ }
}
-Instrumenter.prototype.scrubJson = function(json) {
- return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));
-}
+function addErrorContext(item, errors) {
+ var custom = item.data.custom || {};
+ var contextAdded = false;
-Instrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {
- var outHeaders = {};
try {
- var i;
- if (headersConfig === true) {
- if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE
- var allHeaders = inHeaders.entries();
- var currentHeader = allHeaders.next();
- while (!currentHeader.done) {
- outHeaders[currentHeader.value[0]] = currentHeader.value[1];
- currentHeader = allHeaders.next();
- }
- }
- } else {
- for (i=0; i < headersConfig.length; i++) {
- var header = headersConfig[i];
- outHeaders[header] = inHeaders.get(header);
+ for (var i = 0; i < errors.length; ++i) {
+ if (errors[i].hasOwnProperty('rollbarContext')) {
+ custom = merge(custom, nonCircularClone(errors[i].rollbarContext));
+ contextAdded = true;
}
}
+
+ // Avoid adding an empty object to the data.
+ if (contextAdded) {
+ item.data.custom = custom;
+ }
} catch (e) {
- /* ignore probable IE errors */
+ item.diagnostic.error_context = 'Failed: ' + e.message;
}
- return outHeaders;
-}
-
-Instrumenter.prototype.trackHttpErrors = function() {
- return this.autoInstrument.networkErrorOnHttp5xx ||
- this.autoInstrument.networkErrorOnHttp4xx ||
- this.autoInstrument.networkErrorOnHttp0;
}
-Instrumenter.prototype.errorOnHttpStatus = function(metadata) {
- var status = metadata.status_code;
+var TELEMETRY_TYPES = [
+ 'log',
+ 'network',
+ 'dom',
+ 'navigation',
+ 'error',
+ 'manual',
+];
+var TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];
- if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||
- (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||
- (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {
- var error = new Error('HTTP request failed with Status ' + status);
- error.stack = metadata.stack;
- this.rollbar.error(error, { skipFrames: 1 });
+function arrayIncludes(arr, val) {
+ for (var k = 0; k < arr.length; ++k) {
+ if (arr[k] === val) {
+ return true;
+ }
}
+
+ return false;
}
-Instrumenter.prototype.deinstrumentConsole = function() {
- if (!('console' in this._window && this._window.console.log)) {
- return;
- }
- var b;
- while (this.replacements['log'].length) {
- b = this.replacements['log'].shift();
- this._window.console[b[0]] = b[1];
- }
-};
+function createTelemetryEvent(args) {
+ var type, metadata, level;
+ var arg;
-Instrumenter.prototype.instrumentConsole = function() {
- if (!('console' in this._window && this._window.console.log)) {
- return;
- }
+ for (var i = 0, l = args.length; i < l; ++i) {
+ arg = args[i];
- var self = this;
- var c = this._window.console;
+ var typ = typeName(arg);
+ switch (typ) {
+ case 'string':
+ if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {
+ type = arg;
+ } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {
+ level = arg;
+ }
+ break;
+ case 'object':
+ metadata = arg;
+ break;
+ default:
+ break;
+ }
+ }
+ var event = {
+ type: type || 'manual',
+ metadata: metadata || {},
+ level: level,
+ };
- function wrapConsole(method) {
- 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778
+ return event;
+}
- var orig = c[method];
- var origConsole = c;
- var level = method === 'warn' ? 'warning' : method;
- c[method] = function() {
- var args = Array.prototype.slice.call(arguments);
- var message = _.formatArgsAsString(args);
- self.telemeter.captureLog(message, level);
- if (orig) {
- Function.prototype.apply.call(orig, origConsole, args);
- }
- };
- self.replacements['log'].push([method, orig]);
+/*
+ * get - given an obj/array and a keypath, return the value at that keypath or
+ * undefined if not possible.
+ *
+ * @param obj - an object or array
+ * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'
+ * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`
+ */
+function get(obj, path) {
+ if (!obj) {
+ return undefined;
}
- var methods = ['debug','info','warn','error','log'];
+ var keys = path.split('.');
+ var result = obj;
try {
- for (var i=0, len=methods.length; i < len; i++) {
- wrapConsole(methods[i]);
+ for (var i = 0, len = keys.length; i < len; ++i) {
+ result = result[keys[i]];
}
} catch (e) {
- this.diagnostic.instrumentConsole = { error: e.message };
+ result = undefined;
}
-};
+ return result;
+}
-Instrumenter.prototype.deinstrumentDom = function() {
- if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {
+function set(obj, path, value) {
+ if (!obj) {
return;
}
- this.removeListeners('dom');
-};
-
-Instrumenter.prototype.instrumentDom = function() {
- if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {
+ var keys = path.split('.');
+ var len = keys.length;
+ if (len < 1) {
return;
}
- var clickHandler = this.handleClick.bind(this);
- var blurHandler = this.handleBlur.bind(this);
- this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);
- this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);
-};
-
-Instrumenter.prototype.handleClick = function(evt) {
- try {
- var e = domUtil.getElementFromEvent(evt, this._document);
- var hasTag = e && e.tagName;
- 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 (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {
- this.captureDomEvent('input', e, e.value, e.checked);
- }
- } catch (exc) {
- // TODO: Not sure what to do here
+ if (len === 1) {
+ obj[keys[0]] = value;
+ return;
}
-};
-
-Instrumenter.prototype.handleBlur = function(evt) {
try {
- var e = domUtil.getElementFromEvent(evt, this._document);
- if (e && e.tagName) {
- if (domUtil.isDescribedElement(e, 'textarea')) {
- this.captureDomEvent('input', e, e.value);
- } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {
- this.handleSelectInputChanged(e);
- } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {
- this.captureDomEvent('input', e, e.value);
- }
- }
- } catch (exc) {
- // TODO: Not sure what to do here
- }
-};
-
-Instrumenter.prototype.handleSelectInputChanged = function(elem) {
- if (elem.multiple) {
- for (var i = 0; i < elem.options.length; i++) {
- if (elem.options[i].selected) {
- this.captureDomEvent('input', elem, elem.options[i].value);
- }
+ var temp = obj[keys[0]] || {};
+ var replacement = temp;
+ for (var i = 1; i < len - 1; ++i) {
+ temp[keys[i]] = temp[keys[i]] || {};
+ temp = temp[keys[i]];
}
- } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {
- this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);
+ temp[keys[len - 1]] = value;
+ obj[keys[0]] = replacement;
+ } catch (e) {
+ return;
}
-};
+}
-Instrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {
- if (value !== undefined) {
- if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {
- value = '[scrubbed]';
- } else {
- var description = domUtil.describeElement(element);
- if (this.telemetryScrubber) {
- if (this.telemetryScrubber(description)) {
- value = '[scrubbed]';
+function formatArgsAsString(args) {
+ var i, len, arg;
+ var result = [];
+ for (i = 0, len = args.length; i < len; ++i) {
+ arg = args[i];
+ switch (typeName(arg)) {
+ case 'object':
+ arg = stringify(arg);
+ arg = arg.error || arg.value;
+ if (arg.length > 500) {
+ arg = arg.substr(0, 497) + '...';
}
- } else if (this.defaultValueScrubber(description)) {
- value = '[scrubbed]';
- }
+ break;
+ case 'null':
+ arg = 'null';
+ break;
+ case 'undefined':
+ arg = 'undefined';
+ break;
+ case 'symbol':
+ arg = arg.toString();
+ break;
}
+ result.push(arg);
}
- var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));
- this.telemeter.captureDom(subtype, elementString, value, isChecked);
-};
-
-Instrumenter.prototype.deinstrumentNavigation = function() {
- var chrome = this._window.chrome;
- var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;
- // See https://github.com/angular/angular.js/pull/13945/files
- var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;
- if (!hasPushState) {
- return;
- }
- restore(this.replacements, 'navigation');
-};
-
-Instrumenter.prototype.instrumentNavigation = function() {
- var chrome = this._window.chrome;
- var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;
- // See https://github.com/angular/angular.js/pull/13945/files
- var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;
- if (!hasPushState) {
- return;
- }
- var self = this;
- replace(this._window, 'onpopstate', function(orig) {
- return function() {
- var current = self._location.href;
- self.handleUrlChange(self._lastHref, current);
- if (orig) {
- orig.apply(this, arguments);
- }
- };
- }, this.replacements, 'navigation');
-
- replace(this._window.history, 'pushState', function(orig) {
- return function() {
- var url = arguments.length > 2 ? arguments[2] : undefined;
- if (url) {
- self.handleUrlChange(self._lastHref, url + '');
- }
- return orig.apply(this, arguments);
- };
- }, this.replacements, 'navigation');
-};
-
-Instrumenter.prototype.handleUrlChange = function(from, to) {
- var parsedHref = urlparser.parse(this._location.href);
- var parsedTo = urlparser.parse(to);
- var parsedFrom = urlparser.parse(from);
- this._lastHref = to;
- if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {
- to = parsedTo.path + (parsedTo.hash || '');
- }
- if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {
- from = parsedFrom.path + (parsedFrom.hash || '');
- }
- this.telemeter.captureNavigation(from, to);
-};
-
-Instrumenter.prototype.deinstrumentConnectivity = function() {
- if (!('addEventListener' in this._window || 'body' in this._document)) {
- return;
- }
- if (this._window.addEventListener) {
- this.removeListeners('connectivity');
- } else {
- restore(this.replacements, 'connectivity');
- }
-};
+ return result.join(' ');
+}
-Instrumenter.prototype.instrumentConnectivity = function() {
- if (!('addEventListener' in this._window || 'body' in this._document)) {
+function now() {
+ if (Date.now) {
+ return +Date.now();
+ }
+ return +new Date();
+}
+
+function filterIp(requestData, captureIp) {
+ if (!requestData || !requestData['user_ip'] || captureIp === true) {
return;
}
- if (this._window.addEventListener) {
- this.addListener('connectivity', this._window, 'online', undefined, function() {
- this.telemeter.captureConnectivityChange('online');
- }.bind(this), true);
- this.addListener('connectivity', this._window, 'offline', undefined, function() {
- this.telemeter.captureConnectivityChange('offline');
- }.bind(this), true);
+ var newIp = requestData['user_ip'];
+ if (!captureIp) {
+ newIp = null;
} else {
- var self = this;
- replace(this._document.body, 'ononline', function(orig) {
- return function() {
- self.telemeter.captureConnectivityChange('online');
- if (orig) {
- orig.apply(this, arguments);
- }
- }
- }, this.replacements, 'connectivity');
- replace(this._document.body, 'onoffline', function(orig) {
- return function() {
- self.telemeter.captureConnectivityChange('offline');
- if (orig) {
- orig.apply(this, arguments);
+ try {
+ var parts;
+ if (newIp.indexOf('.') !== -1) {
+ parts = newIp.split('.');
+ parts.pop();
+ parts.push('0');
+ newIp = parts.join('.');
+ } else if (newIp.indexOf(':') !== -1) {
+ parts = newIp.split(':');
+ if (parts.length > 2) {
+ var beginning = parts.slice(0, 3);
+ var slashIdx = beginning[2].indexOf('/');
+ if (slashIdx !== -1) {
+ beginning[2] = beginning[2].substring(0, slashIdx);
+ }
+ var terminal = '0000:0000:0000:0000:0000';
+ newIp = beginning.concat(terminal).join(':');
}
+ } else {
+ newIp = null;
}
- }, this.replacements, 'connectivity');
- }
-};
-
-Instrumenter.prototype.handleCspEvent = function(cspEvent) {
- var message = 'Security Policy Violation: ' +
- 'blockedURI: ' + cspEvent.blockedURI + ', ' +
- 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +
- 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';
-
- if (cspEvent.sourceFile) {
- message += 'location: ' + cspEvent.sourceFile + ', ' +
- 'line: ' + cspEvent.lineNumber + ', ' +
- 'col: ' + cspEvent.columnNumber + ', ';
+ } catch (e) {
+ newIp = null;
+ }
}
-
- message += 'originalPolicy: ' + cspEvent.originalPolicy;
-
- this.telemeter.captureLog(message, 'error');
- this.handleCspError(message);
+ requestData['user_ip'] = newIp;
}
-Instrumenter.prototype.handleCspError = function(message) {
- if (this.autoInstrument.errorOnContentSecurityPolicy) {
- this.rollbar.error(message);
+function handleOptions(current, input, payload, logger) {
+ var result = merge(current, input, payload);
+ result = updateDeprecatedOptions(result, logger);
+ if (!input || input.overwriteScrubFields) {
+ return result;
+ }
+ if (input.scrubFields) {
+ result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);
}
+ return result;
}
-Instrumenter.prototype.deinstrumentContentSecurityPolicy = function() {
- if (!('addEventListener' in this._window)) { return; }
-
- this.removeListeners('contentsecuritypolicy');
-};
-
-Instrumenter.prototype.instrumentContentSecurityPolicy = function() {
- if (!('addEventListener' in this._window)) { return; }
-
- var cspHandler = this.handleCspEvent.bind(this);
- this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);
-};
-
-Instrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {
- if (obj.addEventListener) {
- obj.addEventListener(type, handler, capture);
- this.eventRemovers[section].push(function() {
- obj.removeEventListener(type, handler, capture);
- });
- } else if (altType) {
- obj.attachEvent(altType, handler);
- this.eventRemovers[section].push(function() {
- obj.detachEvent(altType, handler);
- });
+function updateDeprecatedOptions(options, logger) {
+ if (options.hostWhiteList && !options.hostSafeList) {
+ options.hostSafeList = options.hostWhiteList;
+ options.hostWhiteList = undefined;
+ logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');
}
-};
-
-Instrumenter.prototype.removeListeners = function(section) {
- var r;
- while (this.eventRemovers[section].length) {
- r = this.eventRemovers[section].shift();
- r();
+ if (options.hostBlackList && !options.hostBlockList) {
+ options.hostBlockList = options.hostBlackList;
+ options.hostBlackList = undefined;
+ logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');
}
-};
+ return options;
+}
-module.exports = Instrumenter;
+module.exports = {
+ addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,
+ createItem: createItem,
+ addErrorContext: addErrorContext,
+ createTelemetryEvent: createTelemetryEvent,
+ filterIp: filterIp,
+ formatArgsAsString: formatArgsAsString,
+ formatUrl: formatUrl,
+ get: get,
+ handleOptions: handleOptions,
+ isError: isError,
+ isFiniteNumber: isFiniteNumber,
+ isFunction: isFunction,
+ isIterable: isIterable,
+ isNativeFunction: isNativeFunction,
+ isObject: isObject,
+ isString: isString,
+ isType: isType,
+ isPromise: isPromise,
+ jsonParse: jsonParse,
+ LEVELS: LEVELS,
+ makeUnhandledStackInfo: makeUnhandledStackInfo,
+ merge: merge,
+ now: now,
+ redact: redact,
+ RollbarJSON: RollbarJSON,
+ sanitizeUrl: sanitizeUrl,
+ set: set,
+ setupJSON: setupJSON,
+ stringify: stringify,
+ maxByteSize: maxByteSize,
+ typeName: typeName,
+ uuid4: uuid4,
+};
/***/ }),
-/* 31 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 650:
+/***/ ((module) => {
"use strict";
-function getElementType(e) {
- return (e.getAttribute('type') || '').toLowerCase();
+/*
+ * headers - Detect when fetch Headers are undefined and use a partial polyfill.
+ *
+ * A full polyfill is not used in order to keep package size as small as possible.
+ * Since this is only used internally and is not added to the window object,
+ * the full interface doesn't need to be supported.
+ *
+ * This implementation is modified from whatwg-fetch:
+ * https://github.com/github/fetch
+ */
+function headers(headers) {
+ if (typeof Headers === 'undefined') {
+ return new FetchHeaders(headers);
+ }
+
+ return new Headers(headers);
}
-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;
- }
+function normalizeName(name) {
+ if (typeof name !== 'string') {
+ name = String(name);
}
- return false;
+ return name.toLowerCase();
}
-function getElementFromEvent(evt, doc) {
- if (evt.target) {
- return evt.target;
- }
- if (doc && doc.elementFromPoint) {
- return doc.elementFromPoint(evt.clientX, evt.clientY);
+function normalizeValue(value) {
+ if (typeof value !== 'string') {
+ value = String(value);
}
- return undefined;
+ return value;
}
-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 iteratorFor(items) {
+ var iterator = {
+ next: function () {
+ var value = items.shift();
+ return { done: value === undefined, value: value };
+ },
+ };
+
+ return iterator;
}
-function elementArrayToString(a) {
- var MAX_LENGTH = 80;
- var separator = ' > ', separatorLength = separator.length;
- var out = [], len = 0, nextStr, totalLength;
+function FetchHeaders(headers) {
+ this.map = {};
- 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;
+ if (headers instanceof FetchHeaders) {
+ headers.forEach(function (value, name) {
+ this.append(name, value);
+ }, this);
+ } else if (Array.isArray(headers)) {
+ headers.forEach(function (header) {
+ this.append(header[0], header[1]);
+ }, this);
+ } else if (headers) {
+ Object.getOwnPropertyNames(headers).forEach(function (name) {
+ this.append(name, headers[name]);
+ }, this);
}
- 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 + '"]');
- }
+FetchHeaders.prototype.append = function (name, value) {
+ name = normalizeName(name);
+ value = normalizeValue(value);
+ var oldValue = this.map[name];
+ this.map[name] = oldValue ? oldValue + ', ' + value : value;
+};
- return out.join('');
-}
+FetchHeaders.prototype.get = function (name) {
+ name = normalizeName(name);
+ return this.has(name) ? this.map[name] : null;
+};
-/**
- * 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});
+FetchHeaders.prototype.has = function (name) {
+ return this.map.hasOwnProperty(normalizeName(name));
+};
+
+FetchHeaders.prototype.forEach = function (callback, thisArg) {
+ for (var name in this.map) {
+ if (this.map.hasOwnProperty(name)) {
+ callback.call(thisArg, this.map[name], name, this);
}
}
- return out;
+};
+
+FetchHeaders.prototype.entries = function () {
+ var items = [];
+ this.forEach(function (value, name) {
+ items.push([name, value]);
+ });
+ return iteratorFor(items);
+};
+
+module.exports = headers;
+
+
+/***/ }),
+
+/***/ 876:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+var polyfillJSON = __webpack_require__(708);
+
+module.exports = polyfillJSON;
+
+
+/***/ }),
+
+/***/ 297:
+/***/ ((module) => {
+
+"use strict";
+
+
+function replace(obj, name, replacement, replacements, type) {
+ var orig = obj[name];
+ obj[name] = replacement(orig);
+ if (replacements) {
+ replacements[type].push([obj, name, orig]);
+ }
}
-module.exports = {
- describeElement: describeElement,
- descriptionToString: descriptionToString,
- elementArrayToString: elementArrayToString,
- treeToArray: treeToArray,
- getElementFromEvent: getElementFromEvent,
- isDescribedElement: isDescribedElement,
- getElementType: getElementType
-};
+module.exports = replace;
/***/ }),
-/* 32 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 267:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var polyfillJSON = __webpack_require__(33);
+var _ = __webpack_require__(702);
-module.exports = polyfillJSON;
+function traverse(obj, func, seen) {
+ var k, v, i;
+ var isObj = _.isType(obj, 'object');
+ var isArray = _.isType(obj, 'array');
+ var keys = [];
+ var seenIndex;
+
+ // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.
+ seen = seen || { obj: [], mapped: [] };
+
+ if (isObj) {
+ seenIndex = seen.obj.indexOf(obj);
+
+ if (isObj && seenIndex !== -1) {
+ // Prefer the mapped object if there is one.
+ return seen.mapped[seenIndex] || seen.obj[seenIndex];
+ }
+
+ seen.obj.push(obj);
+ seenIndex = seen.obj.length - 1;
+ }
+
+ if (isObj) {
+ for (k in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, k)) {
+ keys.push(k);
+ }
+ }
+ } else if (isArray) {
+ for (i = 0; i < obj.length; ++i) {
+ keys.push(i);
+ }
+ }
+
+ var result = isObj ? {} : [];
+ var same = true;
+ for (i = 0; i < keys.length; ++i) {
+ k = keys[i];
+ v = obj[k];
+ result[k] = func(k, v, seen);
+ same = same && result[k] === obj[k];
+ }
+
+ if (isObj && !same) {
+ seen.mapped[seenIndex] = result;
+ }
+
+ return !same ? result : obj;
+}
+
+module.exports = traverse;
/***/ }),
-/* 33 */
-/***/ (function(module, exports) {
+
+/***/ 708:
+/***/ ((module) => {
// json3.js
// 2017-02-21
@@ -6507,184 +7541,43 @@ var setupCustomJSON = function(JSON) {
module.exports = setupCustomJSON;
-/***/ }),
-/* 34 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-function wrapGlobals(window, handler, shim) {
- if (!window) { return; }
- // Adapted from https://github.com/bugsnag/bugsnag-js
- 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(',');
- var i, global;
- for (i = 0; i < globals.length; ++i) {
- global = globals[i];
-
- if (window[global] && window[global].prototype) {
- _extendListenerPrototype(handler, window[global].prototype, shim);
- }
- }
-}
-
-function _extendListenerPrototype(handler, prototype, shim) {
- if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {
- var oldAddEventListener = prototype.addEventListener;
- while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {
- oldAddEventListener = oldAddEventListener._rollbarOldAdd;
- }
- var addFn = function(event, callback, bubble) {
- oldAddEventListener.call(this, event, handler.wrap(callback), bubble);
- };
- addFn._rollbarOldAdd = oldAddEventListener;
- addFn.belongsToShim = shim;
- prototype.addEventListener = addFn;
-
- var oldRemoveEventListener = prototype.removeEventListener;
- while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {
- oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;
- }
- var removeFn = function(event, callback, bubble) {
- oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);
- };
- removeFn._rollbarOldRemove = oldRemoveEventListener;
- removeFn.belongsToShim = shim;
- prototype.removeEventListener = removeFn;
- }
-}
-
-module.exports = wrapGlobals;
-
-
-/***/ }),
-/* 35 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var _ = __webpack_require__(0);
-var traverse = __webpack_require__(5);
-
-function raw(payload, jsonBackup) {
- return [payload, _.stringify(payload, jsonBackup)];
-}
-
-function selectFrames(frames, range) {
- var len = frames.length;
- if (len > range * 2) {
- return frames.slice(0, range).concat(frames.slice(len - range));
- }
- return frames;
-}
-
-function truncateFrames(payload, jsonBackup, range) {
- range = (typeof range === 'undefined') ? 30 : range;
- var body = payload.data.body;
- var frames;
- if (body.trace_chain) {
- var chain = body.trace_chain;
- for (var i = 0; i < chain.length; i++) {
- frames = chain[i].frames;
- frames = selectFrames(frames, range);
- chain[i].frames = frames;
- }
- } else if (body.trace) {
- frames = body.trace.frames;
- frames = selectFrames(frames, range);
- body.trace.frames = frames;
- }
- return [payload, _.stringify(payload, jsonBackup)];
-}
-
-function maybeTruncateValue(len, val) {
- if (!val) {
- return val;
- }
- if (val.length > len) {
- return val.slice(0, len - 3).concat('...');
- }
- return val;
-}
-
-function truncateStrings(len, payload, jsonBackup) {
- function truncator(k, v, seen) {
- switch (_.typeName(v)) {
- case 'string':
- return maybeTruncateValue(len, v);
- case 'object':
- case 'array':
- return traverse(v, truncator, seen);
- default:
- return v;
- }
- }
- payload = traverse(payload, truncator);
- return [payload, _.stringify(payload, jsonBackup)];
-}
-
-function truncateTraceData(traceData) {
- if (traceData.exception) {
- delete traceData.exception.description;
- traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);
- }
- traceData.frames = selectFrames(traceData.frames, 1);
- return traceData;
-}
-
-function minBody(payload, jsonBackup) {
- var body = payload.data.body;
- if (body.trace_chain) {
- var chain = body.trace_chain;
- for (var i = 0; i < chain.length; i++) {
- chain[i] = truncateTraceData(chain[i]);
- }
- } else if (body.trace) {
- body.trace = truncateTraceData(body.trace);
- }
- return [payload, _.stringify(payload, jsonBackup)];
-}
-
-function needsTruncation(payload, maxSize) {
- return _.maxByteSize(payload) > maxSize;
-}
-
-function truncate(payload, jsonBackup, maxSize) {
- maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;
- var strategies = [
- raw,
- truncateFrames,
- truncateStrings.bind(null, 1024),
- truncateStrings.bind(null, 512),
- truncateStrings.bind(null, 256),
- minBody
- ];
- var strategy, results, result;
-
- while ((strategy = strategies.shift())) {
- results = strategy(payload, jsonBackup);
- payload = results[0];
- result = results[1];
- if (result.error || !needsTruncation(result.value, maxSize)) {
- return result;
- }
- }
- return result;
-}
-
-module.exports = {
- truncate: truncate,
-
- /* for testing */
- raw: raw,
- truncateFrames: truncateFrames,
- truncateStrings: truncateStrings,
- maybeTruncateValue: maybeTruncateValue
-};
-
-
/***/ })
-/******/ ]);
+
+/******/ });
+/************************************************************************/
+/******/ // The module cache
+/******/ var __webpack_module_cache__ = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/ // Check if module is in cache
+/******/ var cachedModule = __webpack_module_cache__[moduleId];
+/******/ if (cachedModule !== undefined) {
+/******/ return cachedModule.exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = __webpack_module_cache__[moduleId] = {
+/******/ // no module.id needed
+/******/ // no module.loaded needed
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/************************************************************************/
+/******/
+/******/ // startup
+/******/ // Load entry module and return exports
+/******/ // This entry module is referenced by other modules so it can't be inlined
+/******/ var __webpack_exports__ = __webpack_require__(739);
+/******/
+/******/ return __webpack_exports__;
+/******/ })()
+;
});
//# sourceMappingURL=rollbar.noconflict.umd.js.map
\ No newline at end of file
diff --git a/dist/rollbar.noconflict.umd.js.map b/dist/rollbar.noconflict.umd.js.map
index f5a4727f8..e4be13d89 100644
--- a/dist/rollbar.noconflict.umd.js.map
+++ b/dist/rollbar.noconflict.umd.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.noconflict.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3uBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC9Fa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,eAAe,gBAAgB;AAC/B;AACA;AACA;;AAEA,yBA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;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;ACvGa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAY;AAC5B,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvQa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9UA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrJa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC/vBa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.noconflict.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n if (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = merge(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 notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, errors[i].rollbarContext);\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"rollbar.noconflict.umd.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,wBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,kGAAC;AAC7D,MAAM,KAAK,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,kGAAC;AACzC,MAAM,KAAK,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,oBAAoB,wBAAwB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,GAAW;AAC3B,cAAc,mBAAO,CAAC,GAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;;AAEA;;;;;;;;;ACvHa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7Ga;;AAEb,cAAc,mBAAO,CAAC,GAAY;;AAElC;AACA;AACA;;AAEA;;;;;;;;;ACRa;;AAEb,aAAa,mBAAO,CAAC,GAAY;AACjC,QAAQ,mBAAO,CAAC,GAAY;AAC5B,UAAU,mBAAO,CAAC,GAAQ;AAC1B,aAAa,mBAAO,CAAC,GAAU;AAC/B,cAAc,mBAAO,CAAC,GAAe;;AAErC,gBAAgB,mBAAO,CAAC,GAAa;AACrC,aAAa,mBAAO,CAAC,GAAO;;AAE5B,iBAAiB,mBAAO,CAAC,GAAc;AACvC,uBAAuB,mBAAO,CAAC,GAAe;AAC9C,iBAAiB,mBAAO,CAAC,GAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,kBAAkB,mBAAO,CAAC,GAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;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;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,GAAa;AACpC,kBAAkB,mBAAO,CAAC,GAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AC9lBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5Da;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;AC9Ba;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,6BAA6B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAA6B,QAAQ;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7Ia;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AAC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GAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,gBAAgB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,kCAAkC,0BAA0B;AAC5D;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;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,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,mBAAmB;AACnB,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kBAAkB,0BAA0B;AAC5C;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,eAAe;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,SAAS;AACnD;AACA;AACA,IAAI;AACJ,0CAA0C;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;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,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;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,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;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,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;ACj+Ba;;AAEb,QAAQ,mBAAO,CAAC,GAAY;AAC5B,kBAAkB,mBAAO,CAAC,GAAgB;AAC1C,aAAa,mBAAO,CAAC,GAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA,qBAAqB,8CAA8C;AACnE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAA6B,iBAAiB;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;;AAEA,6BAA6B,qBAAqB;AAClD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,kBAAkB;AAClC;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;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtWa;;AAEb,QAAQ,mBAAO,CAAC,GAAY;AAC5B,uBAAuB,mBAAO,CAAC,GAAmB;AAClD,qBAAqB,mBAAO,CAAC,EAAiB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;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;;AAEA;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;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;;ACxLa;;AAEb,aAAa,mBAAO,CAAC,GAAW;AAChC,QAAQ,mBAAO,CAAC,GAAe;;AAE/B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;;AAEA;;;;;;;;;ACtCa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,GAAe;AAC/B,aAAa,mBAAO,CAAC,GAAW;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AChLa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;ACxFa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,oBAAoB;AAClC;;AAEA;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;;AAEA;;;;;;;;;AC7Da;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACVa;;AAEb,uBAAuB,mBAAO,CAAC,GAAoB;;AAEnD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA,uBAAuB,wBAAwB;AAC/C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChIa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;;AAEA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AChEa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;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;;;;;;;;;AC3Ha;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;AACA;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAkB,SAAS;AAC3B;;AAEA,oBAAoB,qBAAqB;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtNa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,YAAY;AAC3B,eAAe,gBAAgB;AAC/B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA,eAAe;AACf;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,gCAAgC;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AC7Sa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;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;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACzLa;;AAEb,kBAAkB,mBAAO,CAAC,GAAe;AACzC,YAAY,mBAAO,CAAC,GAAS;AAC7B,eAAe,mBAAO,CAAC,GAAY;AACnC,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,UAAU;AACzD;AACA;AACA;AACA,qDAAqD,UAAU;AAC/D;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;AC5Ra;;AAEb,QAAQ,mBAAO,CAAC,GAAW;AAC3B,eAAe,mBAAO,CAAC,GAAoB;;AAE3C;AACA;;AAEA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AC7Fa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;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,KAAK;AACL;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,oBAAoB;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,6BAA6B;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA;AACA;AACA,MAAM,iBAAiB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,+BAA+B,cAAc;AAC7C;;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AClPa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,uBAAuB;AAC3D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,+BAA+B;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxKa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;AAC3B,eAAe,mBAAO,CAAC,GAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1Ha;;AAEb,YAAY,mBAAO,CAAC,GAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;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,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oCAAoC,OAAO;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,SAAS;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,SAAS;AAChD;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAiC,SAAS;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjzBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;AC/Fa;;AAEb,mBAAmB,mBAAO,CAAC,GAA4B;;AAEvD;;;;;;;;;ACJa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACVa;;AAEb,QAAQ,mBAAO,CAAC,GAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,gBAAgB,gBAAgB;AAChC;AACA;AACA;;AAEA,0BAA0B;AAC1B;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,oBAAoB;AACpB,oBAAoB;AACpB,oBAAoB;AACpB;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,sBAAsB,YAAY;AAClC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,sBAAsB,YAAY;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oBAAoB,WAAW;AAC/B;AACA;;AAEA;;AAEA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,cAAc;;AAEd;AACA;;AAEA;AACA;AACA,cAAc;;AAEd;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,UAAU;AACV;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,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;UC1vBA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./src/browser/bundles/rollbar.noconflict.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transport/fetch.js","webpack://rollbar/./src/browser/transport/xhr.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/truncation.js","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./src/utility/replace.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/webpack/bootstrap","webpack://rollbar/webpack/before-startup","webpack://rollbar/webpack/startup","webpack://rollbar/webpack/after-startup"],"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, () => {\nreturn ","// 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","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443,\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function (data, callback) {\n var transportOptions = helpers.transportOptions(\n this.transportOptions,\n 'POST',\n );\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function () {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function (data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload);\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function (jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(\n this.transportOptions,\n 'POST',\n );\n this.transport.postJsonPayload(\n this.accessToken,\n transportOptions,\n jsonPayload,\n callback,\n );\n};\n\nApi.prototype.configure = function (options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = \"Error: could not serialize 'context'\";\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data,\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options);\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport,\n };\n}\n\nfunction detectTransport(options) {\n var gWindow =\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port =\n transport.port ||\n (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI,\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath,\n};\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client =\n client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = typeof document != 'undefined' && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(\n this.options,\n this.client.telemeter,\n this,\n gWindow,\n gDocument,\n );\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n\n // Used with rollbar-react for rollbar-react-native compatibility.\n this.rollbar = this;\n}\n\nvar _instance = null;\nRollbar.init = function (options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function (components) {\n Rollbar.prototype.components = components;\n};\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function (options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function (options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(\n oldOptions._configuredOptions,\n options,\n payload,\n );\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function (options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function () {\n return this.client.lastError;\n};\nRollbar.lastError = function () {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return { uuid: uuid };\n};\nRollbar.log = function () {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return { uuid: uuid };\n};\nRollbar.debug = function () {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return { uuid: uuid };\n};\nRollbar.info = function () {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return { uuid: uuid };\n};\nRollbar.warn = function () {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return { uuid: uuid };\n};\nRollbar.warning = function () {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return { uuid: uuid };\n};\nRollbar.error = function () {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return { uuid: uuid };\n};\nRollbar.critical = function () {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function () {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function () {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function () {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (\n this.options.captureUnhandledRejections ||\n this.options.handleUnhandledRejections\n ) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function (\n message,\n url,\n lineno,\n colno,\n error,\n context,\n) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (\n this.options.inspectAnonymousErrors &&\n this.isChrome &&\n error === null &&\n url === ''\n ) {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser,\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function () {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) {\n // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n};\n\nRollbar.prototype.handleUnhandledRejection = function (reason, promise) {\n if (\n !this.options.captureUnhandledRejections &&\n !this.options.handleUnhandledRejections\n ) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context =\n (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 () {\n return context || {};\n };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch (exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function (f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function () {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function () {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function (e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.addPayloadOptions)\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function () {\n logger.info(\n 'Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.',\n );\n};\n\nRollbar.prototype._createItem = function (args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return (\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self)\n );\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false,\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear',\n ],\n};\n","'use strict';\n\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 var undef;\n if (typeof document === 'undefined') {\n return undef;\n }\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n ((div.innerHTML = ''), all[0])\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion,\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction 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 = ' > ',\n separatorLength = separator.length;\n var out = [],\n len = 0,\n nextStr,\n 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(\n '[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]',\n );\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 = {},\n className,\n key,\n attr,\n i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && typeof className === 'string') {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({ key: key, value: attr });\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType,\n};\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) {\n return;\n }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function () {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) {\n return;\n }\n\n if (\n typeof window._rollbarURH === 'function' &&\n window._rollbarURH.belongsToShim\n ) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections,\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log,\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore,\n};\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation,\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar replace = require('../utility/replace');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false,\n};\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) {\n return null;\n }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function (description) {\n var name = nameFromDescription(description);\n if (!name) {\n return false;\n }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: [],\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: [],\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function (options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function (oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (\n !this.autoInstrument.network &&\n oldSettings &&\n oldSettings.network\n ) {\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 (\n this.autoInstrument.navigation &&\n !(oldSettings && oldSettings.navigation)\n ) {\n this.instrumentNavigation();\n } else if (\n !this.autoInstrument.navigation &&\n oldSettings &&\n oldSettings.navigation\n ) {\n this.deinstrumentNavigation();\n }\n\n if (\n this.autoInstrument.connectivity &&\n !(oldSettings && oldSettings.connectivity)\n ) {\n this.instrumentConnectivity();\n } else if (\n !this.autoInstrument.connectivity &&\n oldSettings &&\n oldSettings.connectivity\n ) {\n this.deinstrumentConnectivity();\n }\n\n if (\n this.autoInstrument.contentSecurityPolicy &&\n !(oldSettings && oldSettings.contentSecurityPolicy)\n ) {\n this.instrumentContentSecurityPolicy();\n } else if (\n !this.autoInstrument.contentSecurityPolicy &&\n oldSettings &&\n oldSettings.contentSecurityPolicy\n ) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function () {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function () {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function (orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(\n xhrp,\n 'open',\n function (orig) {\n return function (method, url) {\n var isUrlObject = _isUrlObject(url);\n if (_.isType(url, 'string') || isUrlObject) {\n url = isUrlObject ? url.toString() : url;\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null,\n };\n }\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n\n replace(\n xhrp,\n 'setRequestHeader',\n function (orig) {\n return function (header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n\n replace(\n xhrp,\n 'send',\n function (orig) {\n /* eslint-disable no-unused-vars */\n return function (data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(\n xhr.__rollbar_xhr,\n 'xhr',\n undefined,\n );\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type =\n xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig =\n self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i = 0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i = 0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (\n self.isJsonContentType(\n xhr.__rollbar_xhr.response_content_type,\n )\n ) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level =\n self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if (\n 'onreadystatechange' in xhr &&\n _.isFunction(xhr.onreadystatechange)\n ) {\n replace(xhr, 'onreadystatechange', function (orig) {\n return self.rollbar.wrap(\n orig,\n undefined,\n onreadystatechangeHandler,\n );\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = new Error().stack;\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n }\n\n if ('fetch' in this._window) {\n replace(\n this._window,\n 'fetch',\n 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 var isUrlObject = _isUrlObject(input);\n if (_.isType(input, 'string') || isUrlObject) {\n url = isUrlObject ? input.toString() : input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null,\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(\n reqHeaders,\n self.autoInstrument.networkRequestHeaders,\n );\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (\n args[0] &&\n !_.isType(args[0], 'string') &&\n args[0].body\n ) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = new Error().stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(\n resp.headers,\n self.autoInstrument.networkResponseHeaders,\n );\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') {\n // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (\n text &&\n self.isJsonContentType(metadata.response_content_type)\n ) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n },\n this.replacements,\n 'network',\n );\n }\n};\n\nInstrumenter.prototype.captureNetwork = function (\n metadata,\n subtype,\n rollbarUUID,\n) {\n if (\n metadata.request &&\n this.isJsonContentType(metadata.request_content_type)\n ) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function (contentType) {\n return contentType &&\n _.isType(contentType, 'string') &&\n contentType.toLowerCase().includes('json')\n ? true\n : false;\n};\n\nInstrumenter.prototype.scrubJson = function (json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n};\n\nInstrumenter.prototype.fetchHeaders = function (inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') {\n // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i = 0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n};\n\nInstrumenter.prototype.trackHttpErrors = function () {\n return (\n this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0\n );\n};\n\nInstrumenter.prototype.errorOnHttpStatus = function (metadata) {\n var status = metadata.status_code;\n\n if (\n (status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)\n ) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n};\n\nInstrumenter.prototype.deinstrumentConsole = function () {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function () {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function () {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug', 'info', 'warn', 'error', 'log'];\n try {\n for (var i = 0, len = methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function () {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function () {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener(\n 'dom',\n this._window,\n 'blur',\n 'onfocusout',\n blurHandler,\n true,\n );\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 =\n domUtil.isDescribedElement(e, 'a') ||\n domUtil.isDescribedElement(e, 'button');\n if (\n hasTag &&\n (anchorOrButton ||\n domUtil.isDescribedElement(e, 'input', ['button', 'submit']))\n ) {\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 (\n domUtil.isDescribedElement(e, 'select') &&\n e.options &&\n e.options.length\n ) {\n this.handleSelectInputChanged(e);\n } else if (\n domUtil.isDescribedElement(e, 'input') &&\n !domUtil.isDescribedElement(e, 'input', [\n 'button',\n 'submit',\n 'hidden',\n 'checkbox',\n 'radio',\n ])\n ) {\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 (\n subtype,\n element,\n value,\n isChecked,\n) {\n if (value !== undefined) {\n if (\n this.scrubTelemetryInputs ||\n domUtil.getElementType(element) === 'password'\n ) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(\n domUtil.treeToArray(element),\n );\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 =\n !chromePackagedApp &&\n this._window.history &&\n 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 =\n !chromePackagedApp &&\n this._window.history &&\n this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(\n this._window,\n 'onpopstate',\n 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 },\n this.replacements,\n 'navigation',\n );\n\n replace(\n this._window.history,\n 'pushState',\n 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 },\n this.replacements,\n 'navigation',\n );\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 (\n parsedHref.protocol === parsedTo.protocol &&\n parsedHref.host === parsedTo.host\n ) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (\n parsedHref.protocol === parsedFrom.protocol &&\n parsedHref.host === parsedFrom.host\n ) {\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(\n 'connectivity',\n this._window,\n 'online',\n undefined,\n function () {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this),\n true,\n );\n this.addListener(\n 'connectivity',\n this._window,\n 'offline',\n undefined,\n function () {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this),\n true,\n );\n } else {\n var self = this;\n replace(\n this._document.body,\n 'ononline',\n function (orig) {\n return function () {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n },\n this.replacements,\n 'connectivity',\n );\n replace(\n this._document.body,\n 'onoffline',\n function (orig) {\n return function () {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n },\n this.replacements,\n 'connectivity',\n );\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function (cspEvent) {\n var message =\n 'Security Policy Violation: ' +\n 'blockedURI: ' +\n cspEvent.blockedURI +\n ', ' +\n 'violatedDirective: ' +\n cspEvent.violatedDirective +\n ', ' +\n 'effectiveDirective: ' +\n cspEvent.effectiveDirective +\n ', ';\n\n if (cspEvent.sourceFile) {\n message +=\n 'location: ' +\n cspEvent.sourceFile +\n ', ' +\n 'line: ' +\n cspEvent.lineNumber +\n ', ' +\n 'col: ' +\n cspEvent.columnNumber +\n ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n};\n\nInstrumenter.prototype.handleCspError = function (message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n};\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function () {\n if (!('addEventListener' in this._document)) {\n return;\n }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function () {\n if (!('addEventListener' in this._document)) {\n return;\n }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener(\n 'contentsecuritypolicy',\n this._document,\n 'securitypolicyviolation',\n null,\n cspHandler,\n false,\n );\n};\n\nInstrumenter.prototype.addListener = function (\n section,\n obj,\n type,\n altType,\n handler,\n capture,\n) {\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\nfunction _isUrlObject(input) {\n return typeof URL !== 'undefined' && input instanceof URL;\n}\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if (item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo =\n item.err._savedStackTrace ||\n errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message =\n item.err.message ||\n item.err.description ||\n item.message ||\n String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment =\n (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version,\n },\n custom: item.custom,\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function (item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function (item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height,\n },\n },\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function (item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i = 0, l = navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({ name: cur.name, description: cur.description });\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message,\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', { message: result });\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (\n stack &&\n stack.length === 0 &&\n item._unhandledStackInfo &&\n item._unhandledStackInfo.stack\n ) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', { trace_chain: traces });\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', { trace: trace });\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n class: className,\n message: message,\n },\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method:\n !stackFrame.func || stackFrame.func === '?'\n ? '[anonymous]'\n : stackFrame.func,\n colno: stackFrame.column,\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (\n frame.method &&\n frame.method.endsWith &&\n frame.method.endsWith('_rollbar_wrapped')\n ) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n };\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber,\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function (\n accessToken,\n options,\n params,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n null,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\nTransport.prototype.post = function (\n accessToken,\n options,\n payload,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload);\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n writeData,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\nTransport.prototype.postJsonPayload = function (\n accessToken,\n options,\n jsonPayload,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n jsonPayload,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow =\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n var self = this;\n rootZone.run(function () {\n self._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n};\n\nTransport.prototype._makeRequest = function (\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n transport,\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout);\n } else {\n makeXhrRequest(\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n );\n }\n};\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function (_msg) {\n /* do nothing */\n }, // eslint-disable-line no-unused-vars\n function (err) {\n callback(new Error(err));\n },\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if (_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(function () {\n controller.abort();\n }, timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal,\n },\n body: data,\n })\n .then(function (response) {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then(function (data) {\n callback(null, data);\n })\n .catch(function (error) {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function () {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message =\n 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 =\n 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if (_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n // 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(\n new Error(\n 'No window available during request, unknown environment',\n ),\n );\n }\n\n // If the current page is http, try and send over http\n if (\n window.location.href.substring(0, 5) === 'http:' &&\n url.substring(0, 5) === 'https'\n ) {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function () {};\n xdomainrequest.ontimeout = function () {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function () {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function () {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n },\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null,\n auth: null,\n host: null,\n path: null,\n hash: null,\n href: url,\n hostname: null,\n port: null,\n pathname: null,\n search: null,\n query: null,\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0, i);\n last = i + 2;\n } else {\n last = 0;\n }\n\n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i + 1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse,\n};\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) {\n return;\n }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals =\n '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 ',',\n );\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 (\n prototype.hasOwnProperty &&\n prototype.hasOwnProperty('addEventListener')\n ) {\n var oldAddEventListener = prototype.addEventListener;\n while (\n oldAddEventListener._rollbarOldAdd &&\n oldAddEventListener.belongsToShim\n ) {\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 (\n oldRemoveEventListener._rollbarOldRemove &&\n oldRemoveEventListener.belongsToShim\n ) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function (event, callback, bubble) {\n oldRemoveEventListener.call(\n this,\n event,\n (callback && callback._rollbar_wrapped) || callback,\n bubble,\n );\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nmodule.exports = {\n version: '2.26.4',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60,\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp(\n '^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ',\n);\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\nfunction gatherContext() {\n return null;\n}\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch (e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception,\n };\n}\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace(\n (errClassMatch[errClassMatch.length - 2] || '') + errClass + ':',\n '',\n );\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName =\n error.constructor.name &&\n error.constructor.name.length &&\n error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame,\n};\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n if (!obj || toStr.call(obj) !== '[object Object]') {\n return false;\n }\n\n var hasOwnConstructor = hasOwn.call(obj, 'constructor');\n var hasIsPrototypeOf =\n obj.constructor &&\n obj.constructor.prototype &&\n hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n // Not own constructor property must be Object\n if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n return false;\n }\n\n // Own properties are enumerated firstly, so to speed up,\n // if last one is own, then all properties are own.\n var key;\n for (key in obj) {\n /**/\n }\n\n return typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i,\n src,\n copy,\n clone,\n name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i = 0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function (options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function (transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function (item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(\n item,\n 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\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function (item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function (err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function (item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (\n _.isFunction(settings.checkIgnore) &&\n settings.checkIgnore(isUncaught, args, item)\n ) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n };\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function (item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n };\n}\n\nfunction urlIsSafeListed(logger) {\n return function (item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n };\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) {\n return !block;\n }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) {\n return !block;\n }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) {\n return !block;\n }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if (matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (\n e\n /* istanbul ignore next */\n ) {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error(\n \"Error while reading your configuration's \" +\n listName +\n ' option. Removing custom ' +\n listName +\n '.',\n e,\n );\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function (item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0) {\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch (\n e\n /* istanbul ignore next */\n ) {\n settings.ignoredMessages = null;\n logger.error(\n \"Error while reading your configuration's ignoredMessages option. Removing custom ignoredMessages.\",\n );\n }\n\n return true;\n };\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored,\n};\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function (options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function (predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function (item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function (item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function (\n item,\n callback,\n originalError,\n originalItem,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {\n return;\n };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(\n item,\n function (err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this),\n );\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(\n function () {\n this._maybeCallWait();\n }.bind(this),\n 500,\n );\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(\n item,\n function (err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this),\n );\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 = [\n 'ECONNRESET',\n 'ENOTFOUND',\n 'ESOCKETTIMEDOUT',\n 'ETIMEDOUT',\n 'ECONNREFUSED',\n 'EHOSTUNREACH',\n 'EPIPE',\n 'EAI_AGAIN',\n];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function (err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function (item, callback) {\n this.retryQueue.push({ item: item, callback: callback });\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(\n function () {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this),\n this.options.retryInterval,\n );\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 (\n _.isFunction(this.waitCallback) &&\n this.pendingItems.length === 0 &&\n this.pendingRequests.length === 0\n ) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined,\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function (options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function (item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n globalRateLimit + ' max items reached',\n false,\n );\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n globalRateLimitPerMin + ' items per minute reached',\n false,\n );\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend =\n shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n null,\n shouldSend,\n globalRateLimit,\n globalRateLimitPerMin,\n perMinute,\n );\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(\n platform,\n options,\n error,\n shouldSend,\n globalRateLimit,\n limitPerMin,\n perMinute,\n) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(\n platform,\n options,\n globalRateLimit,\n limitPerMin,\n perMinute,\n );\n }\n return { error: error, shouldSend: shouldSend, payload: payload };\n}\n\nfunction rateLimitPayload(\n platform,\n options,\n globalRateLimit,\n limitPerMin,\n perMinute,\n) {\n var environment =\n options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin,\n },\n },\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version:\n (options.notifier && options.notifier.version) || options.version,\n },\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60,\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer;\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents =\n (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag(\n 'rollbar.item_url',\n `https://rollbar.com/item/uuid/?uuid=${item.uuid}`,\n );\n span.setTag(\n 'rollbar.occurrence_url',\n `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`,\n );\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId,\n };\n }\n }\n }\n};\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (\n !spanContext ||\n !spanContext.toSpanId ||\n !spanContext.toTraceId ||\n typeof spanContext.toSpanId !== 'function' ||\n typeof spanContext.toTraceId !== 'function'\n ) {\n return false;\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function (options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.queue.length > newMaxEvents) {\n deleteCount = this.queue.length - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function () {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function (\n type,\n metadata,\n level,\n rollbarUUID,\n timestamp,\n) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client',\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (\n _.isFunction(this.options.filterTelemetry) &&\n this.options.filterTelemetry(e)\n ) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function (\n type,\n metadata,\n level,\n rollbarUUID,\n) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function (\n err,\n level,\n rollbarUUID,\n timestamp,\n) {\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 (\n message,\n level,\n rollbarUUID,\n timestamp,\n) {\n return this.capture(\n 'log',\n {\n message: message,\n },\n level,\n rollbarUUID,\n timestamp,\n );\n};\n\nTelemeter.prototype.captureNetwork = function (\n metadata,\n subtype,\n rollbarUUID,\n requestData,\n) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function (statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function (\n subtype,\n element,\n value,\n checked,\n rollbarUUID,\n) {\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(\n 'navigation',\n { from: from, to: to },\n 'info',\n rollbarUUID,\n );\n};\n\nTelemeter.prototype.captureDomContentLoaded = function (ts) {\n return this.capture(\n 'navigation',\n { subtype: 'DOMContentLoaded' },\n 'info',\n undefined,\n ts && ts.getTime(),\n );\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(\n 'navigation',\n { subtype: 'load' },\n 'info',\n undefined,\n ts && ts.getTime(),\n );\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function (type, rollbarUUID) {\n return this.captureNetwork({ change: type }, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function (item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture(\n 'log',\n item.custom,\n item.level,\n item.uuid,\n item.timestamp,\n );\n }\n};\n\nTelemeter.prototype.push = function (e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info',\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var data = item.data;\n\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 addPayloadOptions(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n item.data = _.merge(item.data, payloadOptions);\n callback(null, item);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath + '.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath + '.extra') || {};\n var newExtra = _.merge(extra, { message: item.message });\n _.set(item, tracePath + '.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function (item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error(\n 'Error while calling custom transform() function. Removing custom transform().',\n e,\n );\n callback(null, item);\n return;\n }\n if (_.isPromise(response)) {\n response.then(\n function (promisedItem) {\n if (promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n },\n function (error) {\n callback(error, item);\n },\n );\n } else {\n callback(null, newItem);\n }\n };\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if (_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(\n item.notifier.client.notifier.diagnostic,\n item.diagnostic,\n );\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack,\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(\n item.data.notifier.diagnostic,\n diagnostic,\n );\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addPayloadOptions: addPayloadOptions,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys,\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = typeof range === 'undefined' ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(\n 255,\n traceData.exception.message,\n );\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = typeof maxSize === 'undefined' ? 512 * 1024 : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody,\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue,\n};\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if (polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else {\n // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return {}.toString\n .call(x)\n .match(/\\s([a-zA-Z]+)/)[1]\n .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\n .call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n */\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String;\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\nfunction isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return type === 'object' || type === 'array';\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(\n /[xy]/g,\n 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 );\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4,\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor',\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g,\n },\n parser: {\n strict:\n /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose:\n /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n },\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0, qs) + query + '&' + p.substring(qs + 1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0, h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return { error: error, value: value };\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) {\n // up to 7 bits\n count = count + 1;\n } else if (code < 2048) {\n // up to 11 bits\n count = count + 2;\n } else if (code < 65536) {\n // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return { error: error, value: value };\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser,\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno,\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href =\n typeof document !== 'undefined' &&\n document &&\n document.location &&\n document.location.href;\n var useragent =\n typeof window !== 'undefined' &&\n window &&\n window.navigator &&\n window.navigator.userAgent;\n return {\n mode: mode,\n message: error ? String(error) : message || backupMessage,\n url: href,\n stack: [location],\n useragent: useragent,\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function (err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value,\n name,\n newSeen,\n result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : (message = arg);\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : (err = arg);\n break;\n case 'object':\n case 'array':\n if (\n arg instanceof Error ||\n (typeof DOMException !== 'undefined' && arg instanceof DOMException)\n ) {\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 (\n arg instanceof Error ||\n (typeof DOMException !== 'undefined' && arg instanceof DOMException)\n ) {\n err ? extraArgs.push(arg) : (err = arg);\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4(),\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = [\n 'log',\n 'network',\n 'dom',\n 'navigation',\n 'error',\n 'manual',\n];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level,\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len - 1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if (options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if (options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4,\n};\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n return name.toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value;\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function () {\n var value = items.shift();\n return { done: value === undefined, value: value };\n },\n };\n\n return iterator;\n}\n\nfunction FetchHeaders(headers) {\n this.map = {};\n\n if (headers instanceof FetchHeaders) {\n headers.forEach(function (value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function (header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function (name) {\n this.append(name, headers[name]);\n }, this);\n }\n}\n\nFetchHeaders.prototype.append = function (name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n};\n\nFetchHeaders.prototype.get = function (name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null;\n};\n\nFetchHeaders.prototype.has = function (name) {\n return this.map.hasOwnProperty(normalizeName(name));\n};\n\nFetchHeaders.prototype.forEach = function (callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n};\n\nFetchHeaders.prototype.entries = function () {\n var items = [];\n this.forEach(function (value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items);\n};\n\nmodule.exports = headers;\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","'use strict';\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\nmodule.exports = replace;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: [] };\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","// 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","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(739);\n",""],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/dist/rollbar.noconflict.umd.min.js b/dist/rollbar.noconflict.umd.min.js
index 50a884ae5..6d4b462cc 100644
--- a/dist/rollbar.noconflict.umd.min.js
+++ b/dist/rollbar.noconflict.umd.min.js
@@ -1,2 +1,2 @@
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rollbar=e():t.rollbar=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=v();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}var d=["log","network","dom","navigation","error","manual"],m=["critical","error","warning","info","debug"];function g(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,o,i){for(var a,u,c,p,f,d,m=[],g=[],y=0,b=t.length;y0&&((c=n(c)).extraArgs=m);var k={message:a,err:u,custom:c,timestamp:v(),callback:p,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,c),o&&f&&(k.request=f),i&&(k.lambdaContext=i),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,r,n,e)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=t.proxy;if(t.endpoint){var l=r.parse(t.endpoint);n=l.hostname,o=l.protocol,i=l.port,s=l.pathname,a=l.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]> 4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t){this.truncation=t}function s(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){a.apply(void 0,r)}))}else a.apply(void 0,r)}function a(t,e,r,i,s,a,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(i,s);var l;if(!(l=a?a():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}s(new Error(String(l.status)))}else{s(u("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),s(r)}var i};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(i)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return s(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){s(u("Request timed out","ETIMEDOUT"))},f.onerror=function(){s(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);s(t.error,t.value)},f.open(r,e,!0),f.send(i)}else s(new Error("Cannot find a method to transport a request"))}}catch(t){s(t)}}function u(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}i.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);s(t,n.formatUrl(e),"GET",null,o,i,e.timeout)},i.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var a;if((a=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(a.error);var u=a.value;s(t,n.formatUrl(e),"POST",u,o,i,e.timeout)},i.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});s(t,n.formatUrl(e),"POST",r,o,i,e.timeout)},t.exports=i},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(" ")||void 0,a=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(4),i=r(2),s=r(31),a={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function u(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function c(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function l(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=a),this.autoInstrument=n.merge(a,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},l.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},l.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},l.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===s.getElementType(e))r="[scrubbed]";else{var o=s.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=s.elementArrayToString(s.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},l.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&c(this.replacements,"navigation")},l.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;u(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),u(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},l.prototype.handleUrlChange=function(t,e){var r=i.parse(this._location.href),n=i.parse(e),o=i.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},l.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):c(this.replacements,"connectivity"))},l.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;u(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),u(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},l.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},l.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},l.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._window&&this.removeListeners("contentsecuritypolicy")},l.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._window){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._window,"securitypolicyviolation",null,t,!1)}},l.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},l.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=l},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r ".length,i=[],s=0,a=t.length-1;a>=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])}));
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rollbar=e():t.rollbar=e()}(this,(()=>{return t={276:function(){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},180:function(t,e,r){var n,o,i;!function(s,a){"use strict";o=[r(124)],void 0===(i="function"==typeof(n=function(t){var e=/(^|@)\S+:\d+/,r=/^\s*at .*(\S+:\d+|\(native\))/m,n=/^(eval@)?(\[native code])?$/;return{parse:function(t){if(void 0!==t.stacktrace||void 0!==t["opera#sourceloc"])return this.parseOpera(t);if(t.stack&&t.stack.match(r))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")},extractLocation:function(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));return[e[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(t){return!!t.match(r)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(" ")||void 0,a=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},124:function(t,e){var r,n,o;!function(i,s){"use strict";n=[],void 0===(o="function"==typeof(r=function(){function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t){return t.charAt(0).toUpperCase()+t.substring(1)}function r(t){return function(){return this[t]}}var n=["isConstructor","isEval","isNative","isToplevel"],o=["columnNumber","lineNumber"],i=["fileName","functionName","source"],s=["args"],a=["evalOrigin"],u=n.concat(o,i,s,a);function c(t){if(t)for(var r=0;r{"use strict";var n=r(702),o=r(817),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup),i=this;setTimeout((function(){i.transport.post(i.accessToken,r,n,e)}),0)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},817:(t,e,r)=>{"use strict";var n=r(702);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=function(t){var e="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,r=t.defaultTransport||"xhr";return void 0===e.fetch&&(r="xhr"),void 0===e.XMLHttpRequest&&(r="fetch"),r}(t),l=t.proxy;if(t.endpoint){var p=r.parse(t.endpoint);n=p.hostname,o=p.protocol,i=p.port,s=p.pathname,a=p.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:l,transport:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout,a=t.transport;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e,transport:a}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},739:(t,e,r)=>{"use strict";var n=r(343);"undefined"==typeof window||window._rollbarStartTime||(window._rollbarStartTime=(new Date).getTime()),t.exports=n},403:(t,e,r)=>{"use strict";var n=r(562),o=r(702),i=r(815),s=r(802),a=r(349),u=r(477),c=r(509),l=r(860),p=r(417),h=r(172),f=r(61),d=r(303);function m(t,e){this.options=o.handleOptions(x,t,null,s),this.options._configuredOptions=t;var r=this.components.telemeter,a=this.components.instrumenter,d=this.components.polyfillJSON;this.wrapGlobals=this.components.wrapGlobals,this.scrub=this.components.scrub;var m=this.components.truncation,g=new u(m),v=new i(this.options,g,c,m);r&&(this.telemeter=new r(this.options)),this.client=e||new n(this.options,v,s,this.telemeter,"browser");var y=b(),w="undefined"!=typeof document&&document;this.isChrome=y.chrome&&y.chrome.runtime,this.anonymousErrorsPending=0,function(t,e,r){t.addTransform(l.handleDomException).addTransform(l.handleItemWithError).addTransform(l.ensureItemHasSomethingToSay).addTransform(l.addBaseInfo).addTransform(l.addRequestInfo(r)).addTransform(l.addClientInfo(r)).addTransform(l.addPluginInfo(r)).addTransform(l.addBody).addTransform(p.addMessageWithError).addTransform(p.addTelemetryData).addTransform(p.addConfigToPayload).addTransform(l.addScrubber(e.scrub)).addTransform(p.addPayloadOptions).addTransform(p.userTransform(s)).addTransform(p.addConfiguredOptions).addTransform(p.addDiagnosticKeys).addTransform(p.itemToPayload)}(this.client.notifier,this,y),this.client.queue.addPredicate(f.checkLevel).addPredicate(h.checkIgnore).addPredicate(f.userCheckIgnore(s)).addPredicate(f.urlIsNotBlockListed(s)).addPredicate(f.urlIsSafeListed(s)).addPredicate(f.messageIsIgnored(s)),this.setupUnhandledCapture(),a&&(this.instrumenter=new a(this.options,this.client.telemeter,this,y,w),this.instrumenter.instrument()),o.setupJSON(d),this.rollbar=this}var g=null;function v(t){var e="Rollbar is not initialized";s.error(e),t&&t(new Error(e))}function y(t){for(var e=0,r=t.length;e{"use strict";t.exports={scrubFields:["pw","pass","passwd","password","secret","confirm_password","confirmPassword","password_confirmation","passwordConfirmation","access_token","accessToken","X-Rollbar-Access-Token","secret_key","secretKey","secretToken","cc-number","card number","cardnumber","cardnum","ccnum","ccnumber","cc num","creditcardnumber","credit card number","newcreditcardnumber","new credit card","creditcardno","credit card no","card#","card #","cc-csc","cvc","cvc2","cvv2","ccv2","security code","card verification","name on credit card","name on card","nameoncard","cardholder","card holder","name des karteninhabers","ccname","card type","cardtype","cc type","cctype","payment type","expiration date","expirationdate","expdate","cc-exp","ccmonth","ccyear"]}},616:t=>{"use strict";var e={ieVersion:function(){var t;if("undefined"==typeof document)return t;for(var e=3,r=document.createElement("div"),n=r.getElementsByTagName("i");r.innerHTML="\x3c!--[if gt IE "+ ++e+"]> 4?e:t}};t.exports=e},300:t=>{"use strict";function e(t){return(t.getAttribute("type")||"").toLowerCase()}function r(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;s--){if(e=r(t[s]),n=i+3*o.length+e.length,s=83){o.unshift("...");break}o.unshift(e),i+=e.length}return o.join(" > ")},treeToArray:function(t){for(var e,r=[],o=0;t&&o<5&&"html"!==(e=n(t)).tagName;o++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,r,n){if(t.tagName.toLowerCase()!==r.toLowerCase())return!1;if(!n)return!0;t=e(t);for(var o=0;o{"use strict";t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var n;if("function"==typeof e._rollbarOldOnError)n=e._rollbarOldOnError;else if(t.onerror){for(n=t.onerror;n._rollbarOldOnError;)n=n._rollbarOldOnError;e._rollbarOldOnError=n}e.handleAnonymousErrors();var o=function(){var r=Array.prototype.slice.call(arguments,0);!function(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}(t,e,n,r)};r&&(o._rollbarOldOnError=n),t.onerror=o}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},802:(t,e,r)=>{"use strict";r(276);var n=r(616),o=r(702);t.exports={error:function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),n.ieVersion()<=8?console.error(o.formatArgsAsString(t)):console.error.apply(console,t)},info:function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),n.ieVersion()<=8?console.info(o.formatArgsAsString(t)):console.info.apply(console,t)},log:function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),n.ieVersion()<=8?console.log(o.formatArgsAsString(t)):console.log.apply(console,t)}}},172:(t,e,r)=>{"use strict";var n=r(702);t.exports={checkIgnore:function(t,e){return!n.get(e,"plugins.jquery.ignoreAjaxErrors")||!n.get(t,"body.message.extra.isAjax")}}},343:(t,e,r)=>{"use strict";var n=r(403),o=r(773),i=r(568),s=r(876),a=r(965),u=r(369),c=r(473);n.setComponents({telemeter:o,instrumenter:i,polyfillJSON:s,wrapGlobals:a,scrub:u,truncation:c}),t.exports=n},568:(t,e,r)=>{"use strict";var n=r(702),o=r(650),i=r(297),s=r(369),a=r(509),u=r(300),c={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function l(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function p(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=c),this.autoInstrument=n.merge(c,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){s.__rollbar_xhr.end_time_ms=n.now();var e=null;if(s.__rollbar_xhr.response_content_type=s.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var i,a;if(!0===r){var u=s.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},p.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},p.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},p.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===u.getElementType(e))r="[scrubbed]";else{var o=u.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=u.elementArrayToString(u.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},p.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&l(this.replacements,"navigation")},p.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;i(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),i(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},p.prototype.handleUrlChange=function(t,e){var r=a.parse(this._location.href),n=a.parse(e),o=a.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},p.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):l(this.replacements,"connectivity"))},p.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;i(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),i(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},p.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},p.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},p.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._document&&this.removeListeners("contentsecuritypolicy")},p.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._document){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._document,"securitypolicyviolation",null,t,!1)}},p.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},p.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=p},860:(t,e,r)=>{"use strict";var n=r(702),o=r(303),i=r(802);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var h,f,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y0&&n.set(e,"data.request",i),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u{"use strict";var n=r(702),o=r(656),i=r(86);function s(t){this.truncation=t}s.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);var s=n.formatUrl(e);this._makeZoneRequest(t,s,"GET",null,o,i,e.timeout,e.transport)},s.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var s;if((s=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(s.error);var a=s.value,u=n.formatUrl(e);this._makeZoneRequest(t,u,"POST",a,o,i,e.timeout,e.transport)},s.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});var s=n.formatUrl(e);this._makeZoneRequest(t,s,"POST",r,o,i,e.timeout,e.transport)},s.prototype._makeZoneRequest=function(){var t="undefined"!=typeof window&&window||void 0!==o&&o,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent,o=this;n.run((function(){o._makeRequest.apply(void 0,r)}))}else this._makeRequest.apply(void 0,r)},s.prototype._makeRequest=function(t,e,r,n,s,a,u,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(n,s);"fetch"===c?o(t,e,r,n,s,u):i(t,e,r,n,s,a,u)},t.exports=s},656:(t,e,r)=>{"use strict";var n=r(802),o=r(702);t.exports=function(t,e,r,i,s,a){var u,c;o.isFiniteNumber(a)&&(u=new AbortController,c=setTimeout((function(){u.abort()}),a)),fetch(e,{method:r,headers:{"Content-Type":"application/json","X-Rollbar-Access-Token":t,signal:u&&u.signal},body:i}).then((function(t){return c&&clearTimeout(c),t.json()})).then((function(t){s(null,t)})).catch((function(t){n.error(t.message),s(t)}))}},86:(t,e,r)=>{"use strict";var n=r(702),o=r(802);function i(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}t.exports=function(t,e,r,s,a,u,c){var l;if(!(l=u?u():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}a(new Error(String(l.status)))}else a(i("XHR response had no status code (likely connection failure)"))}}catch(t){var r;r=t&&t.stack?t:new Error(t),a(r)}var s};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(s)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return a(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var h=new XDomainRequest;h.onprogress=function(){},h.ontimeout=function(){a(i("Request timed out","ETIMEDOUT"))},h.onerror=function(){a(new Error("Error during request"))},h.onload=function(){var t=n.jsonParse(h.responseText);a(t.error,t.value)},h.open(r,e,!0),h.send(s)}else a(new Error("Cannot find a method to transport a request"))}}catch(t){a(t)}}},509:t=>{"use strict";t.exports={parse:function(t){var e,r,n={protocol:null,auth:null,host:null,path:null,hash:null,href:t,hostname:null,port:null,pathname:null,search:null,query:null};if(-1!==(e=t.indexOf("//"))?(n.protocol=t.substring(0,e),r=e+2):r=0,-1!==(e=t.indexOf("@",r))&&(n.auth=t.substring(r,e),r=e+1),-1===(e=t.indexOf("/",r))){if(-1===(e=t.indexOf("?",r)))return-1===(e=t.indexOf("#",r))?n.host=t.substring(r):(n.host=t.substring(r,e),n.hash=t.substring(e)),n.hostname=n.host.split(":")[0],n.port=n.host.split(":")[1],n.port&&(n.port=parseInt(n.port,10)),n;n.host=t.substring(r,e),n.hostname=n.host.split(":")[0],n.port=n.host.split(":")[1],n.port&&(n.port=parseInt(n.port,10)),r=e}else n.host=t.substring(r,e),n.hostname=n.host.split(":")[0],n.port=n.host.split(":")[1],n.port&&(n.port=parseInt(n.port,10)),r=e;if(-1===(e=t.indexOf("#",r))?n.path=t.substring(r):(n.path=t.substring(r,e),n.hash=t.substring(e)),n.path){var o=n.path.split("?");n.pathname=o[0],n.query=o[1],n.search=n.query?"?"+n.query:null}return n}}},965:t=>{"use strict";function e(t,e,r){if(e.hasOwnProperty&&e.hasOwnProperty("addEventListener")){for(var n=e.addEventListener;n._rollbarOldAdd&&n.belongsToShim;)n=n._rollbarOldAdd;var o=function(e,r,o){n.call(this,e,t.wrap(r),o)};o._rollbarOldAdd=n,o.belongsToShim=r,e.addEventListener=o;for(var i=e.removeEventListener;i._rollbarOldRemove&&i.belongsToShim;)i=i._rollbarOldRemove;var s=function(t,e,r){i.call(this,t,e&&e._rollbar_wrapped||e,r)};s._rollbarOldRemove=i,s.belongsToShim=r,e.removeEventListener=s}}t.exports=function(t,r,n){if(t){var o,i,s="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(o=0;o{"use strict";t.exports={version:"2.26.4",endpoint:"api.rollbar.com/api/1/item/",logLevel:"debug",reportLevel:"debug",uncaughtErrorLevel:"error",maxItems:0,itemsPerMin:60}},303:(t,e,r)=>{"use strict";var n=r(180),o=new RegExp("^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ");function i(){return null}function s(t){var e={};return e._stackFrame=t,e.url=t.fileName,e.line=t.lineNumber,e.func=t.functionName,e.column=t.columnNumber,e.args=t.args,e.context=null,e}function a(t,e){return{stack:function(){var r=[];e=e||0;try{r=n.parse(t)}catch(t){r=[]}for(var o=[],i=e;i{"use strict";var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var n,o=e.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&e.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!o&&!i)return!1;for(n in t);return void 0===n||e.call(t,n)};t.exports=function t(){var e,r,o,i,s,a={},u=null,c=arguments.length;for(e=0;e{"use strict";var n=r(702);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},61:(t,e,r)=>{"use strict";var n=r(702);function o(t,e,r){if(!t)return!r;var o,i,s=t.frames;if(!s||0===s.length)return!r;for(var a=e.length,u=s.length,c=0;c{"use strict";var n=r(702);function o(t,e,r,n){this.rateLimiter=t,this.api=e,this.logger=r,this.options=n,this.predicates=[],this.pendingItems=[],this.pendingRequests=[],this.retryQueue=[],this.retryHandle=null,this.waitCallback=null,this.waitIntervalID=null}o.prototype.configure=function(t){this.api&&this.api.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addPredicate=function(t){return n.isFunction(t)&&this.predicates.push(t),this},o.prototype.addPendingItem=function(t){this.pendingItems.push(t)},o.prototype.removePendingItem=function(t){var e=this.pendingItems.indexOf(t);-1!==e&&this.pendingItems.splice(e,1)},o.prototype.addItem=function(t,e,r,o){e&&n.isFunction(e)||(e=function(){});var i=this._applyPredicates(t);if(i.stop)return this.removePendingItem(o),void e(i.err);if(this._maybeLog(t,r),this.removePendingItem(o),this.options.transmit){this.pendingRequests.push(t);try{this._makeApiRequest(t,function(r,n){this._dequeuePendingRequest(t),e(r,n)}.bind(this))}catch(r){this._dequeuePendingRequest(t),e(r)}}else e(new Error("Transmit disabled"))},o.prototype.wait=function(t){n.isFunction(t)&&(this.waitCallback=t,this._maybeCallWait()||(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitIntervalID=setInterval(function(){this._maybeCallWait()}.bind(this),500)))},o.prototype._applyPredicates=function(t){for(var e=null,r=0,n=this.predicates.length;rthis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length||(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),0))},t.exports=o},790:(t,e,r)=>{"use strict";var n=r(702);function o(t){this.startTime=n.now(),this.counter=0,this.perMinCounter=0,this.platform=null,this.platformOptions={},this.configureGlobal(t)}function i(t,e,r){return!t.ignoreRateLimit&&e>=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i=e.environment||e.payload&&e.payload.environment,s={body:{message:{body:o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.",extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:i,notifier:{version:e.notifier&&e.notifier.version||e.version}};return"browser"===t?(s.platform="browser",s.framework="browser-js",s.notifier.name="rollbar-browser-js"):"server"===t?(s.framework=e.framework||"node-js",s.notifier.name=e.notifier.name):"react-native"===t&&(s.framework=e.framework||"react-native",s.notifier.name=e.notifier.name),s}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},562:(t,e,r)=>{"use strict";var n=r(790),o=r(358),i=r(314),s=r(702);function a(t,e,r,n,l){this.options=s.merge(t),this.logger=r,a.rateLimiter.configureGlobal(this.options),a.rateLimiter.setPlatformOptions(l,this.options),this.api=e,this.queue=new o(a.rateLimiter,e,r,this.options);var p=this.options.tracer||null;c(p)?(this.tracer=p,this.options.tracer="opentracing-tracer-enabled",this.options._configuredOptions.tracer="opentracing-tracer-enabled"):this.tracer=null,this.notifier=new i(this.queue,this.options),this.telemeter=n,u(t),this.lastError=null,this.lastErrorHash="none"}function u(t){t.stackTraceLimit&&(Error.stackTraceLimit=t.stackTraceLimit)}function c(t){if(!t)return!1;if(!t.scope||"function"!=typeof t.scope)return!1;var e=t.scope();return!(!e||!e.active||"function"!=typeof e.active)}a.rateLimiter=new n({maxItems:0,itemsPerMinute:60}),a.prototype.global=function(t){return a.rateLimiter.configureGlobal(t),this},a.prototype.configure=function(t,e){var r=this.options,n={};e&&(n={payload:e}),this.options=s.merge(r,t,n);var o=this.options.tracer||null;return c(o)?(this.tracer=o,this.options.tracer="opentracing-tracer-enabled",this.options._configuredOptions.tracer="opentracing-tracer-enabled"):this.tracer=null,this.notifier&&this.notifier.configure(this.options),this.telemeter&&this.telemeter.configure(this.options),u(t),this.global(this.options),c(t.tracer)&&(this.tracer=t.tracer),this},a.prototype.log=function(t){var e=this._defaultLogLevel();return this._log(e,t)},a.prototype.debug=function(t){this._log("debug",t)},a.prototype.info=function(t){this._log("info",t)},a.prototype.warn=function(t){this._log("warning",t)},a.prototype.warning=function(t){this._log("warning",t)},a.prototype.error=function(t){this._log("error",t)},a.prototype.critical=function(t){this._log("critical",t)},a.prototype.wait=function(t){this.queue.wait(t)},a.prototype.captureEvent=function(t,e,r){return this.telemeter&&this.telemeter.captureEvent(t,e,r)},a.prototype.captureDomContentLoaded=function(t){return this.telemeter&&this.telemeter.captureDomContentLoaded(t)},a.prototype.captureLoad=function(t){return this.telemeter&&this.telemeter.captureLoad(t)},a.prototype.buildJsonPayload=function(t){return this.api.buildJsonPayload(t)},a.prototype.sendJsonPayload=function(t){this.api.postJsonPayload(t)},a.prototype._log=function(t,e){var r;if(e.callback&&(r=e.callback,delete e.callback),this.options.ignoreDuplicateErrors&&this._sameAsLastError(e)){if(r){var n=new Error("ignored identical item");n.item=e,r(n)}}else try{this._addTracingInfo(e),e.level=e.level||t,this.telemeter&&this.telemeter._captureRollbarItem(e),e.telemetryEvents=this.telemeter&&this.telemeter.copyEvents()||[],this.notifier.log(e,r)}catch(t){r&&r(t),this.logger.error(t)}},a.prototype._defaultLogLevel=function(){return this.options.logLevel||"debug"},a.prototype._sameAsLastError=function(t){if(!t._isUncaught)return!1;var e=function(t){var e=t.message||"",r=(t.err||{}).stack||String(t.err);return e+"::"+r}(t);return this.lastErrorHash===e||(this.lastError=t.err,this.lastErrorHash=e,!1)},a.prototype._addTracingInfo=function(t){if(this.tracer){var e=this.tracer.scope().active();if(function(t){if(!t||!t.context||"function"!=typeof t.context)return!1;var e=t.context();return!!(e&&e.toSpanId&&e.toTraceId&&"function"==typeof e.toSpanId&&"function"==typeof e.toTraceId)}(e)){e.setTag("rollbar.error_uuid",t.uuid),e.setTag("rollbar.has_error",!0),e.setTag("error",!0),e.setTag("rollbar.item_url",`https://rollbar.com/item/uuid/?uuid=${t.uuid}`),e.setTag("rollbar.occurrence_url",`https://rollbar.com/occurrence/uuid/?uuid=${t.uuid}`);var r=e.context().toSpanId(),n=e.context().toTraceId();t.custom?(t.custom.opentracing_span_id=r,t.custom.opentracing_trace_id=n):t.custom={opentracing_span_id:r,opentracing_trace_id:n}}}},t.exports=a},369:(t,e,r)=>{"use strict";var n=r(702),o=r(267);function i(t,e){var r=e.split("."),o=r.length-1;try{for(var i=0;i<=o;++i)i{"use strict";var n=r(702),o=100;function i(t){this.queue=[],this.options=n.merge(t);var e=this.options.maxTelemetryEvents||o;this.maxQueueSize=Math.max(0,Math.min(e,o))}function s(t,e){return e||({error:"error",manual:"info"}[t]||"info")}i.prototype.configure=function(t){var e=this.options;this.options=n.merge(e,t);var r=this.options.maxTelemetryEvents||o,i=Math.max(0,Math.min(r,o)),s=0;this.queue.length>i&&(s=this.queue.length-i),this.maxQueueSize=i,this.queue.splice(0,s)},i.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},i.prototype.capture=function(t,e,r,o,i){var a={level:s(t,r),type:t,timestamp_ms:i||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},i.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},i.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},i.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},i.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},i.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},i.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},i.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},i.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},i.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},i.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},i.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},i.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=i},417:(t,e,r)=>{"use strict";var n=r(702);function o(t,e){n.isFunction(t[e])&&(t[e]=t[e].toString())}t.exports={itemToPayload:function(t,e,r){var n=t.data;t._isUncaught&&(n._isUncaught=!0),t._originalArgs&&(n._originalArgs=t._originalArgs),r(null,n)},addPayloadOptions:function(t,e,r){var o=e.payload||{};o.body&&delete o.body,t.data=n.merge(t.data,o),r(null,t)},addTelemetryData:function(t,e,r){t.telemetryEvents&&n.set(t,"data.body.telemetry",t.telemetryEvents),r(null,t)},addMessageWithError:function(t,e,r){if(t.message){var o="data.body.trace_chain.0",i=n.get(t,o);if(i||(o="data.body.trace",i=n.get(t,o)),i){if(!i.exception||!i.exception.description)return n.set(t,o+".exception.description",t.message),void r(null,t);var s=n.get(t,o+".extra")||{},a=n.merge(s,{message:t.message});n.set(t,o+".extra",a)}r(null,t)}else r(null,t)},userTransform:function(t){return function(e,r,o){var i=n.merge(e),s=null;try{n.isFunction(r.transform)&&(s=r.transform(i.data,e))}catch(n){return r.transform=null,t.error("Error while calling custom transform() function. Removing custom transform().",n),void o(null,e)}n.isPromise(s)?s.then((function(t){t&&(i.data=t),o(null,i)}),(function(t){o(t,e)})):o(null,i)}},addConfigToPayload:function(t,e,r){if(!e.sendConfig)return r(null,t);var o=n.get(t,"data.custom")||{};o._rollbarConfig=e,t.data.custom=o,r(null,t)},addConfiguredOptions:function(t,e,r){var n=e._configuredOptions;o(n,"transform"),o(n,"checkIgnore"),o(n,"onSendCallback"),delete n.accessToken,t.data.notifier.configured_options=n,r(null,t)},addDiagnosticKeys:function(t,e,r){var o=n.merge(t.notifier.client.notifier.diagnostic,t.diagnostic);if(n.get(t,"err._isAnonymous")&&(o.is_anonymous=!0),t._isUncaught&&(o.is_uncaught=t._isUncaught),t.err)try{o.raw_error={message:t.err.message,name:t.err.name,constructor_name:t.err.constructor&&t.err.constructor.name,filename:t.err.fileName,line:t.err.lineNumber,column:t.err.columnNumber,stack:t.err.stack}}catch(t){o.raw_error={failed:String(t)}}t.data.notifier.diagnostic=n.merge(t.data.notifier.diagnostic,o),r(null,t)}}},473:(t,e,r)=>{"use strict";var n=r(702),o=r(267);function i(t,e){return[t,n.stringify(t,e)]}function s(t,e){var r=t.length;return r>2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),[e,n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!h(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}},702:(t,e,r)=>{"use strict";var n=r(420),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function h(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function f(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,h,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level),e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i)),r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o{"use strict";function e(t){return"string"!=typeof t&&(t=String(t)),t.toLowerCase()}function r(t){this.map={},t instanceof r?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}r.prototype.append=function(t,r){t=e(t),r=function(t){return"string"!=typeof t&&(t=String(t)),t}(r);var n=this.map[t];this.map[t]=n?n+", "+r:r},r.prototype.get=function(t){return t=e(t),this.has(t)?this.map[t]:null},r.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},r.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},r.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),function(t){return{next:function(){var e=t.shift();return{done:void 0===e,value:e}}}}(t)},t.exports=function(t){return"undefined"==typeof Headers?new r(t):new Headers(t)}},876:(t,e,r)=>{"use strict";var n=r(708);t.exports=n},297:t=>{"use strict";t.exports=function(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}},267:(t,e,r)=>{"use strict";var n=r(702);t.exports=function(t,e,r){var o,i,s,a,u=n.isType(t,"object"),c=n.isType(t,"array"),l=[];if(r=r||{obj:[],mapped:[]},u){if(a=r.obj.indexOf(t),u&&-1!==a)return r.mapped[a]||r.obj[a];r.obj.push(t),a=r.obj.length-1}if(u)for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&l.push(o);else if(c)for(s=0;s{t.exports=function(t){var e,r,n,o,i,s,a,u,c,l,p,h,f,d=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function m(t){return t<10?"0"+t:t}function g(){return this.valueOf()}function v(t){return d.lastIndex=0,d.test(t)?'"'+t.replace(d,(function(t){var e=n[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}function y(t,n){var i,s,a,u,c,l=e,p=n[t];switch(p&&"object"==typeof p&&"function"==typeof p.toJSON&&(p=p.toJSON(t)),"function"==typeof o&&(p=o.call(n,t,p)),typeof p){case"string":return v(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(e+=r,c=[],"[object Array]"===Object.prototype.toString.apply(p)){for(u=p.length,i=0;i qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n if (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = merge(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 notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, errors[i].rollbarContext);\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"rollbar.noconflict.umd.min.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAiB,QAAID,IAErBD,EAAc,QAAIC,GACnB,CATD,CASGK,MAAM,KACT,O,mBCPA,SAAUC,GACR,aACKA,EAAOC,UACVD,EAAOC,QAAU,CAAC,GASpB,IAPA,IACIC,EAAMC,EADNC,EAAMJ,EAAOC,QAEbI,EAAQ,WAAY,EACpBC,EAAa,CAAC,UACdC,EAAU,wMAE0DC,MAAM,KACvEN,EAAOI,EAAWG,OAAYL,EAAIF,KAAOE,EAAIF,GAAQ,CAAC,GAC7D,KAAOC,EAASI,EAAQE,OAAYL,EAAID,KAASC,EAAID,GAAUE,EAEhE,CAfD,CAeqB,oBAAXK,OAAyBX,KAAOW,O,sBClB1C,yBACI,aAKI,EAA6B,CAAC,aAAsB,0BAAP,EAM7C,SAA0BC,GAG9B,IAAIC,EAA8B,eAC9BC,EAAyB,iCACzBC,EAA4B,8BAEhC,MAAO,CAOHC,MAAO,SAAiCC,GACpC,QAAgC,IAArBA,EAAMC,iBAAkE,IAA7BD,EAAM,mBACxD,OAAOjB,KAAKmB,WAAWF,GACpB,GAAIA,EAAMG,OAASH,EAAMG,MAAM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,EACArB,EACA4vB,EAAMkH,EAAOtnB,GACjB,GAAIogB,GAAsB,iBAARA,EAChB,IAAKvuB,KAAKkC,EACJtD,OAAOJ,UAAUoN,eAAe9M,KAAKyvB,EAAKvuB,UAElC7E,KADVwD,EAAIw4B,EAAK5I,EAAKvuB,IAEZuuB,EAAIvuB,GAAKrB,SAEF4vB,EAAIvuB,IAKnB,OAAO+2B,EAAQj4B,KAAK22B,EAAQtnB,EAAKogB,EACnC,CAjBE,CAiBA,CAAC,GAAIrsB,GAAQ,IACfA,CACJ,GAGN,C,GCvvBIk1B,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBn8B,IAAjBo8B,EACH,OAAOA,EAAav+B,QAGrB,IAAIC,EAASm+B,EAAyBE,GAAY,CAGjDt+B,QAAS,CAAC,GAOX,OAHAw+B,EAAoBF,GAAUx4B,KAAK7F,EAAOD,QAASC,EAAQA,EAAOD,QAASq+B,GAGpEp+B,EAAOD,OACf,CCnB0Bq+B,CAAoB,K,MDF1CD,C","sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./src/browser/bundles/rollbar.noconflict.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transport/fetch.js","webpack://rollbar/./src/browser/transport/xhr.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/truncation.js","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./src/utility/replace.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/webpack/bootstrap","webpack://rollbar/webpack/startup"],"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, () => {\nreturn ","// 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","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443,\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function (data, callback) {\n var transportOptions = helpers.transportOptions(\n this.transportOptions,\n 'POST',\n );\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function () {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function (data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload);\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function (jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(\n this.transportOptions,\n 'POST',\n );\n this.transport.postJsonPayload(\n this.accessToken,\n transportOptions,\n jsonPayload,\n callback,\n );\n};\n\nApi.prototype.configure = function (options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = \"Error: could not serialize 'context'\";\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data,\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options);\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport,\n };\n}\n\nfunction detectTransport(options) {\n var gWindow =\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port =\n transport.port ||\n (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI,\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath,\n};\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client =\n client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = typeof document != 'undefined' && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(\n this.options,\n this.client.telemeter,\n this,\n gWindow,\n gDocument,\n );\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n\n // Used with rollbar-react for rollbar-react-native compatibility.\n this.rollbar = this;\n}\n\nvar _instance = null;\nRollbar.init = function (options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function (components) {\n Rollbar.prototype.components = components;\n};\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function (options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function (options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(\n oldOptions._configuredOptions,\n options,\n payload,\n );\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function (options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function () {\n return this.client.lastError;\n};\nRollbar.lastError = function () {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return { uuid: uuid };\n};\nRollbar.log = function () {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return { uuid: uuid };\n};\nRollbar.debug = function () {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return { uuid: uuid };\n};\nRollbar.info = function () {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return { uuid: uuid };\n};\nRollbar.warn = function () {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return { uuid: uuid };\n};\nRollbar.warning = function () {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return { uuid: uuid };\n};\nRollbar.error = function () {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return { uuid: uuid };\n};\nRollbar.critical = function () {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function () {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function () {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function () {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (\n this.options.captureUnhandledRejections ||\n this.options.handleUnhandledRejections\n ) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function (\n message,\n url,\n lineno,\n colno,\n error,\n context,\n) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (\n this.options.inspectAnonymousErrors &&\n this.isChrome &&\n error === null &&\n url === ''\n ) {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser,\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function () {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) {\n // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n};\n\nRollbar.prototype.handleUnhandledRejection = function (reason, promise) {\n if (\n !this.options.captureUnhandledRejections &&\n !this.options.handleUnhandledRejections\n ) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context =\n (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 () {\n return context || {};\n };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch (exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function (f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function () {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function () {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function (e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.addPayloadOptions)\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function () {\n logger.info(\n 'Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.',\n );\n};\n\nRollbar.prototype._createItem = function (args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return (\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self)\n );\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false,\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear',\n ],\n};\n","'use strict';\n\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 var undef;\n if (typeof document === 'undefined') {\n return undef;\n }\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n ((div.innerHTML = ''), all[0])\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion,\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction 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 = ' > ',\n separatorLength = separator.length;\n var out = [],\n len = 0,\n nextStr,\n 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(\n '[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]',\n );\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 = {},\n className,\n key,\n attr,\n i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && typeof className === 'string') {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({ key: key, value: attr });\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType,\n};\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) {\n return;\n }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function () {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) {\n return;\n }\n\n if (\n typeof window._rollbarURH === 'function' &&\n window._rollbarURH.belongsToShim\n ) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections,\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log,\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore,\n};\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation,\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar replace = require('../utility/replace');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false,\n};\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) {\n return null;\n }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function (description) {\n var name = nameFromDescription(description);\n if (!name) {\n return false;\n }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: [],\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: [],\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function (options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function (oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (\n !this.autoInstrument.network &&\n oldSettings &&\n oldSettings.network\n ) {\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 (\n this.autoInstrument.navigation &&\n !(oldSettings && oldSettings.navigation)\n ) {\n this.instrumentNavigation();\n } else if (\n !this.autoInstrument.navigation &&\n oldSettings &&\n oldSettings.navigation\n ) {\n this.deinstrumentNavigation();\n }\n\n if (\n this.autoInstrument.connectivity &&\n !(oldSettings && oldSettings.connectivity)\n ) {\n this.instrumentConnectivity();\n } else if (\n !this.autoInstrument.connectivity &&\n oldSettings &&\n oldSettings.connectivity\n ) {\n this.deinstrumentConnectivity();\n }\n\n if (\n this.autoInstrument.contentSecurityPolicy &&\n !(oldSettings && oldSettings.contentSecurityPolicy)\n ) {\n this.instrumentContentSecurityPolicy();\n } else if (\n !this.autoInstrument.contentSecurityPolicy &&\n oldSettings &&\n oldSettings.contentSecurityPolicy\n ) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function () {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function () {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function (orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(\n xhrp,\n 'open',\n function (orig) {\n return function (method, url) {\n var isUrlObject = _isUrlObject(url);\n if (_.isType(url, 'string') || isUrlObject) {\n url = isUrlObject ? url.toString() : url;\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null,\n };\n }\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n\n replace(\n xhrp,\n 'setRequestHeader',\n function (orig) {\n return function (header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n\n replace(\n xhrp,\n 'send',\n function (orig) {\n /* eslint-disable no-unused-vars */\n return function (data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(\n xhr.__rollbar_xhr,\n 'xhr',\n undefined,\n );\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type =\n xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig =\n self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i = 0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i = 0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (\n self.isJsonContentType(\n xhr.__rollbar_xhr.response_content_type,\n )\n ) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level =\n self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if (\n 'onreadystatechange' in xhr &&\n _.isFunction(xhr.onreadystatechange)\n ) {\n replace(xhr, 'onreadystatechange', function (orig) {\n return self.rollbar.wrap(\n orig,\n undefined,\n onreadystatechangeHandler,\n );\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = new Error().stack;\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n }\n\n if ('fetch' in this._window) {\n replace(\n this._window,\n 'fetch',\n 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 var isUrlObject = _isUrlObject(input);\n if (_.isType(input, 'string') || isUrlObject) {\n url = isUrlObject ? input.toString() : input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null,\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(\n reqHeaders,\n self.autoInstrument.networkRequestHeaders,\n );\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (\n args[0] &&\n !_.isType(args[0], 'string') &&\n args[0].body\n ) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = new Error().stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(\n resp.headers,\n self.autoInstrument.networkResponseHeaders,\n );\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') {\n // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (\n text &&\n self.isJsonContentType(metadata.response_content_type)\n ) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n },\n this.replacements,\n 'network',\n );\n }\n};\n\nInstrumenter.prototype.captureNetwork = function (\n metadata,\n subtype,\n rollbarUUID,\n) {\n if (\n metadata.request &&\n this.isJsonContentType(metadata.request_content_type)\n ) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function (contentType) {\n return contentType &&\n _.isType(contentType, 'string') &&\n contentType.toLowerCase().includes('json')\n ? true\n : false;\n};\n\nInstrumenter.prototype.scrubJson = function (json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n};\n\nInstrumenter.prototype.fetchHeaders = function (inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') {\n // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i = 0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n};\n\nInstrumenter.prototype.trackHttpErrors = function () {\n return (\n this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0\n );\n};\n\nInstrumenter.prototype.errorOnHttpStatus = function (metadata) {\n var status = metadata.status_code;\n\n if (\n (status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)\n ) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n};\n\nInstrumenter.prototype.deinstrumentConsole = function () {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function () {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function () {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug', 'info', 'warn', 'error', 'log'];\n try {\n for (var i = 0, len = methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function () {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function () {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener(\n 'dom',\n this._window,\n 'blur',\n 'onfocusout',\n blurHandler,\n true,\n );\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 =\n domUtil.isDescribedElement(e, 'a') ||\n domUtil.isDescribedElement(e, 'button');\n if (\n hasTag &&\n (anchorOrButton ||\n domUtil.isDescribedElement(e, 'input', ['button', 'submit']))\n ) {\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 (\n domUtil.isDescribedElement(e, 'select') &&\n e.options &&\n e.options.length\n ) {\n this.handleSelectInputChanged(e);\n } else if (\n domUtil.isDescribedElement(e, 'input') &&\n !domUtil.isDescribedElement(e, 'input', [\n 'button',\n 'submit',\n 'hidden',\n 'checkbox',\n 'radio',\n ])\n ) {\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 (\n subtype,\n element,\n value,\n isChecked,\n) {\n if (value !== undefined) {\n if (\n this.scrubTelemetryInputs ||\n domUtil.getElementType(element) === 'password'\n ) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(\n domUtil.treeToArray(element),\n );\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 =\n !chromePackagedApp &&\n this._window.history &&\n 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 =\n !chromePackagedApp &&\n this._window.history &&\n this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(\n this._window,\n 'onpopstate',\n 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 },\n this.replacements,\n 'navigation',\n );\n\n replace(\n this._window.history,\n 'pushState',\n 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 },\n this.replacements,\n 'navigation',\n );\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 (\n parsedHref.protocol === parsedTo.protocol &&\n parsedHref.host === parsedTo.host\n ) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (\n parsedHref.protocol === parsedFrom.protocol &&\n parsedHref.host === parsedFrom.host\n ) {\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(\n 'connectivity',\n this._window,\n 'online',\n undefined,\n function () {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this),\n true,\n );\n this.addListener(\n 'connectivity',\n this._window,\n 'offline',\n undefined,\n function () {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this),\n true,\n );\n } else {\n var self = this;\n replace(\n this._document.body,\n 'ononline',\n function (orig) {\n return function () {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n },\n this.replacements,\n 'connectivity',\n );\n replace(\n this._document.body,\n 'onoffline',\n function (orig) {\n return function () {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n },\n this.replacements,\n 'connectivity',\n );\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function (cspEvent) {\n var message =\n 'Security Policy Violation: ' +\n 'blockedURI: ' +\n cspEvent.blockedURI +\n ', ' +\n 'violatedDirective: ' +\n cspEvent.violatedDirective +\n ', ' +\n 'effectiveDirective: ' +\n cspEvent.effectiveDirective +\n ', ';\n\n if (cspEvent.sourceFile) {\n message +=\n 'location: ' +\n cspEvent.sourceFile +\n ', ' +\n 'line: ' +\n cspEvent.lineNumber +\n ', ' +\n 'col: ' +\n cspEvent.columnNumber +\n ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n};\n\nInstrumenter.prototype.handleCspError = function (message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n};\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function () {\n if (!('addEventListener' in this._document)) {\n return;\n }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function () {\n if (!('addEventListener' in this._document)) {\n return;\n }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener(\n 'contentsecuritypolicy',\n this._document,\n 'securitypolicyviolation',\n null,\n cspHandler,\n false,\n );\n};\n\nInstrumenter.prototype.addListener = function (\n section,\n obj,\n type,\n altType,\n handler,\n capture,\n) {\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\nfunction _isUrlObject(input) {\n return typeof URL !== 'undefined' && input instanceof URL;\n}\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if (item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo =\n item.err._savedStackTrace ||\n errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message =\n item.err.message ||\n item.err.description ||\n item.message ||\n String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment =\n (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version,\n },\n custom: item.custom,\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function (item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function (item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height,\n },\n },\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function (item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i = 0, l = navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({ name: cur.name, description: cur.description });\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message,\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', { message: result });\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (\n stack &&\n stack.length === 0 &&\n item._unhandledStackInfo &&\n item._unhandledStackInfo.stack\n ) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', { trace_chain: traces });\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', { trace: trace });\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n class: className,\n message: message,\n },\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method:\n !stackFrame.func || stackFrame.func === '?'\n ? '[anonymous]'\n : stackFrame.func,\n colno: stackFrame.column,\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (\n frame.method &&\n frame.method.endsWith &&\n frame.method.endsWith('_rollbar_wrapped')\n ) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n };\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber,\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function (\n accessToken,\n options,\n params,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n null,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\nTransport.prototype.post = function (\n accessToken,\n options,\n payload,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload);\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n writeData,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\nTransport.prototype.postJsonPayload = function (\n accessToken,\n options,\n jsonPayload,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n jsonPayload,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow =\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n var self = this;\n rootZone.run(function () {\n self._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n};\n\nTransport.prototype._makeRequest = function (\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n transport,\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout);\n } else {\n makeXhrRequest(\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n );\n }\n};\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function (_msg) {\n /* do nothing */\n }, // eslint-disable-line no-unused-vars\n function (err) {\n callback(new Error(err));\n },\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if (_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(function () {\n controller.abort();\n }, timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal,\n },\n body: data,\n })\n .then(function (response) {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then(function (data) {\n callback(null, data);\n })\n .catch(function (error) {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function () {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message =\n 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 =\n 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if (_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n // 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(\n new Error(\n 'No window available during request, unknown environment',\n ),\n );\n }\n\n // If the current page is http, try and send over http\n if (\n window.location.href.substring(0, 5) === 'http:' &&\n url.substring(0, 5) === 'https'\n ) {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function () {};\n xdomainrequest.ontimeout = function () {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function () {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function () {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n },\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null,\n auth: null,\n host: null,\n path: null,\n hash: null,\n href: url,\n hostname: null,\n port: null,\n pathname: null,\n search: null,\n query: null,\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0, i);\n last = i + 2;\n } else {\n last = 0;\n }\n\n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i + 1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse,\n};\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) {\n return;\n }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals =\n '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 ',',\n );\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 (\n prototype.hasOwnProperty &&\n prototype.hasOwnProperty('addEventListener')\n ) {\n var oldAddEventListener = prototype.addEventListener;\n while (\n oldAddEventListener._rollbarOldAdd &&\n oldAddEventListener.belongsToShim\n ) {\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 (\n oldRemoveEventListener._rollbarOldRemove &&\n oldRemoveEventListener.belongsToShim\n ) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function (event, callback, bubble) {\n oldRemoveEventListener.call(\n this,\n event,\n (callback && callback._rollbar_wrapped) || callback,\n bubble,\n );\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nmodule.exports = {\n version: '2.26.4',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60,\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp(\n '^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ',\n);\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\nfunction gatherContext() {\n return null;\n}\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch (e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception,\n };\n}\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace(\n (errClassMatch[errClassMatch.length - 2] || '') + errClass + ':',\n '',\n );\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName =\n error.constructor.name &&\n error.constructor.name.length &&\n error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame,\n};\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n if (!obj || toStr.call(obj) !== '[object Object]') {\n return false;\n }\n\n var hasOwnConstructor = hasOwn.call(obj, 'constructor');\n var hasIsPrototypeOf =\n obj.constructor &&\n obj.constructor.prototype &&\n hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n // Not own constructor property must be Object\n if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n return false;\n }\n\n // Own properties are enumerated firstly, so to speed up,\n // if last one is own, then all properties are own.\n var key;\n for (key in obj) {\n /**/\n }\n\n return typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i,\n src,\n copy,\n clone,\n name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i = 0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function (options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function (transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function (item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(\n item,\n 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\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function (item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function (err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function (item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (\n _.isFunction(settings.checkIgnore) &&\n settings.checkIgnore(isUncaught, args, item)\n ) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n };\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function (item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n };\n}\n\nfunction urlIsSafeListed(logger) {\n return function (item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n };\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) {\n return !block;\n }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) {\n return !block;\n }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) {\n return !block;\n }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if (matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (\n e\n /* istanbul ignore next */\n ) {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error(\n \"Error while reading your configuration's \" +\n listName +\n ' option. Removing custom ' +\n listName +\n '.',\n e,\n );\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function (item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0) {\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch (\n e\n /* istanbul ignore next */\n ) {\n settings.ignoredMessages = null;\n logger.error(\n \"Error while reading your configuration's ignoredMessages option. Removing custom ignoredMessages.\",\n );\n }\n\n return true;\n };\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored,\n};\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function (options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function (predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function (item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function (item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function (\n item,\n callback,\n originalError,\n originalItem,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {\n return;\n };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(\n item,\n function (err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this),\n );\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(\n function () {\n this._maybeCallWait();\n }.bind(this),\n 500,\n );\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(\n item,\n function (err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this),\n );\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 = [\n 'ECONNRESET',\n 'ENOTFOUND',\n 'ESOCKETTIMEDOUT',\n 'ETIMEDOUT',\n 'ECONNREFUSED',\n 'EHOSTUNREACH',\n 'EPIPE',\n 'EAI_AGAIN',\n];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function (err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function (item, callback) {\n this.retryQueue.push({ item: item, callback: callback });\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(\n function () {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this),\n this.options.retryInterval,\n );\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 (\n _.isFunction(this.waitCallback) &&\n this.pendingItems.length === 0 &&\n this.pendingRequests.length === 0\n ) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined,\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function (options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function (item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n globalRateLimit + ' max items reached',\n false,\n );\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n globalRateLimitPerMin + ' items per minute reached',\n false,\n );\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend =\n shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n null,\n shouldSend,\n globalRateLimit,\n globalRateLimitPerMin,\n perMinute,\n );\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(\n platform,\n options,\n error,\n shouldSend,\n globalRateLimit,\n limitPerMin,\n perMinute,\n) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(\n platform,\n options,\n globalRateLimit,\n limitPerMin,\n perMinute,\n );\n }\n return { error: error, shouldSend: shouldSend, payload: payload };\n}\n\nfunction rateLimitPayload(\n platform,\n options,\n globalRateLimit,\n limitPerMin,\n perMinute,\n) {\n var environment =\n options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin,\n },\n },\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version:\n (options.notifier && options.notifier.version) || options.version,\n },\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60,\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer;\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents =\n (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag(\n 'rollbar.item_url',\n `https://rollbar.com/item/uuid/?uuid=${item.uuid}`,\n );\n span.setTag(\n 'rollbar.occurrence_url',\n `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`,\n );\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId,\n };\n }\n }\n }\n};\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (\n !spanContext ||\n !spanContext.toSpanId ||\n !spanContext.toTraceId ||\n typeof spanContext.toSpanId !== 'function' ||\n typeof spanContext.toTraceId !== 'function'\n ) {\n return false;\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function (options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.queue.length > newMaxEvents) {\n deleteCount = this.queue.length - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function () {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function (\n type,\n metadata,\n level,\n rollbarUUID,\n timestamp,\n) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client',\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (\n _.isFunction(this.options.filterTelemetry) &&\n this.options.filterTelemetry(e)\n ) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function (\n type,\n metadata,\n level,\n rollbarUUID,\n) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function (\n err,\n level,\n rollbarUUID,\n timestamp,\n) {\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 (\n message,\n level,\n rollbarUUID,\n timestamp,\n) {\n return this.capture(\n 'log',\n {\n message: message,\n },\n level,\n rollbarUUID,\n timestamp,\n );\n};\n\nTelemeter.prototype.captureNetwork = function (\n metadata,\n subtype,\n rollbarUUID,\n requestData,\n) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function (statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function (\n subtype,\n element,\n value,\n checked,\n rollbarUUID,\n) {\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(\n 'navigation',\n { from: from, to: to },\n 'info',\n rollbarUUID,\n );\n};\n\nTelemeter.prototype.captureDomContentLoaded = function (ts) {\n return this.capture(\n 'navigation',\n { subtype: 'DOMContentLoaded' },\n 'info',\n undefined,\n ts && ts.getTime(),\n );\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(\n 'navigation',\n { subtype: 'load' },\n 'info',\n undefined,\n ts && ts.getTime(),\n );\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function (type, rollbarUUID) {\n return this.captureNetwork({ change: type }, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function (item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture(\n 'log',\n item.custom,\n item.level,\n item.uuid,\n item.timestamp,\n );\n }\n};\n\nTelemeter.prototype.push = function (e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info',\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var data = item.data;\n\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 addPayloadOptions(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n item.data = _.merge(item.data, payloadOptions);\n callback(null, item);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath + '.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath + '.extra') || {};\n var newExtra = _.merge(extra, { message: item.message });\n _.set(item, tracePath + '.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function (item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error(\n 'Error while calling custom transform() function. Removing custom transform().',\n e,\n );\n callback(null, item);\n return;\n }\n if (_.isPromise(response)) {\n response.then(\n function (promisedItem) {\n if (promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n },\n function (error) {\n callback(error, item);\n },\n );\n } else {\n callback(null, newItem);\n }\n };\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if (_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(\n item.notifier.client.notifier.diagnostic,\n item.diagnostic,\n );\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack,\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(\n item.data.notifier.diagnostic,\n diagnostic,\n );\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addPayloadOptions: addPayloadOptions,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys,\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = typeof range === 'undefined' ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(\n 255,\n traceData.exception.message,\n );\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = typeof maxSize === 'undefined' ? 512 * 1024 : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody,\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue,\n};\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if (polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else {\n // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return {}.toString\n .call(x)\n .match(/\\s([a-zA-Z]+)/)[1]\n .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\n .call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n */\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String;\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\nfunction isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return type === 'object' || type === 'array';\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(\n /[xy]/g,\n 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 );\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4,\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor',\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g,\n },\n parser: {\n strict:\n /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose:\n /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n },\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0, qs) + query + '&' + p.substring(qs + 1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0, h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return { error: error, value: value };\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) {\n // up to 7 bits\n count = count + 1;\n } else if (code < 2048) {\n // up to 11 bits\n count = count + 2;\n } else if (code < 65536) {\n // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return { error: error, value: value };\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser,\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno,\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href =\n typeof document !== 'undefined' &&\n document &&\n document.location &&\n document.location.href;\n var useragent =\n typeof window !== 'undefined' &&\n window &&\n window.navigator &&\n window.navigator.userAgent;\n return {\n mode: mode,\n message: error ? String(error) : message || backupMessage,\n url: href,\n stack: [location],\n useragent: useragent,\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function (err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value,\n name,\n newSeen,\n result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : (message = arg);\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : (err = arg);\n break;\n case 'object':\n case 'array':\n if (\n arg instanceof Error ||\n (typeof DOMException !== 'undefined' && arg instanceof DOMException)\n ) {\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 (\n arg instanceof Error ||\n (typeof DOMException !== 'undefined' && arg instanceof DOMException)\n ) {\n err ? extraArgs.push(arg) : (err = arg);\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4(),\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = [\n 'log',\n 'network',\n 'dom',\n 'navigation',\n 'error',\n 'manual',\n];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level,\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len - 1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if (options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if (options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4,\n};\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n return name.toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value;\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function () {\n var value = items.shift();\n return { done: value === undefined, value: value };\n },\n };\n\n return iterator;\n}\n\nfunction FetchHeaders(headers) {\n this.map = {};\n\n if (headers instanceof FetchHeaders) {\n headers.forEach(function (value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function (header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function (name) {\n this.append(name, headers[name]);\n }, this);\n }\n}\n\nFetchHeaders.prototype.append = function (name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n};\n\nFetchHeaders.prototype.get = function (name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null;\n};\n\nFetchHeaders.prototype.has = function (name) {\n return this.map.hasOwnProperty(normalizeName(name));\n};\n\nFetchHeaders.prototype.forEach = function (callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n};\n\nFetchHeaders.prototype.entries = function () {\n var items = [];\n this.forEach(function (value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items);\n};\n\nmodule.exports = headers;\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","'use strict';\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\nmodule.exports = replace;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: [] };\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","// 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","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(739);\n"],"names":["root","factory","exports","module","define","amd","this","global","console","prop","method","con","dummy","properties","methods","split","pop","window","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","parse","error","stacktrace","parseOpera","stack","match","parseV8OrIE","parseFFOrSafari","Error","extractLocation","urlLike","indexOf","parts","exec","replace","undefined","filter","line","map","sanitizedLine","location","tokens","slice","locationParts","functionName","join","fileName","lineNumber","columnNumber","source","functionNameRegex","matches","e","message","length","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","result","i","len","push","argsRaw","functionCall","shift","args","_isNumber","n","isNaN","parseFloat","isFinite","_capitalize","str","charAt","toUpperCase","substring","_getter","p","booleanProps","numericProps","stringProps","arrayProps","objectProps","props","concat","obj","prototype","getArgs","setArgs","v","Object","toString","call","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","lastIndexOf","locationString","Boolean","j","Number","k","String","_","helpers","defaultOptions","hostname","path","search","version","protocol","port","Api","options","transport","urllib","truncation","jsonBackup","url","accessToken","transportOptions","_getTransport","getTransportFromOptions","postItem","data","callback","payload","buildPayload","self","setTimeout","post","buildJsonPayload","stringifyResult","truncate","stringify","value","postJsonPayload","jsonPayload","configure","oldOptions","merge","isType","context","contextResult","substr","access_token","defaults","timeout","gWindow","defaultTransport","fetch","XMLHttpRequest","detectTransport","proxy","endpoint","opts","pathname","transportAPI","host","appendPathToPath","base","baseTrailingSlash","test","pathBeginningSlash","rollbar","_rollbarStartTime","Date","getTime","Client","API","logger","globals","Transport","transforms","sharedTransforms","predicates","sharedPredicates","errorParser","Rollbar","client","handleOptions","_configuredOptions","Telemeter","components","telemeter","Instrumenter","instrumenter","polyfillJSON","wrapGlobals","scrub","api","_gWindow","gDocument","document","isChrome","chrome","runtime","anonymousErrorsPending","notifier","addTransform","handleDomException","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","addConfigToPayload","addScrubber","addPayloadOptions","userTransform","addConfiguredOptions","addDiagnosticKeys","itemToPayload","addTransformsToNotifier","queue","addPredicate","checkLevel","checkIgnore","userCheckIgnore","urlIsNotBlockListed","urlIsSafeListed","messageIsIgnored","setupUnhandledCapture","instrument","setupJSON","_instance","handleUninitialized","maybeCallback","_getFirstFunction","isFunction","init","setComponents","payloadData","lastError","log","item","_createItem","arguments","uuid","apply","debug","info","warn","warning","critical","sendJsonPayload","unhandledExceptionsInitialized","captureUncaught","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobalEventHandlers","unhandledRejectionsInitialized","captureUnhandledRejections","handleUnhandledRejections","handleUncaughtException","lineno","colno","inspectAnonymousErrors","stackInfo","makeUnhandledStackInfo","isError","_unhandledStackInfo","level","uncaughtErrorLevel","_isUncaught","handleAnonymousErrors","r","prepareStackTrace","_stack","_isAnonymous","handleUnhandledRejection","reason","promise","reasonResult","_rollbarContext","_originalArgs","wrap","f","_before","ctxFn","_isWrap","_rollbar_wrapped","exc","_rollbarWrappedError","_wrappedSource","hasOwnProperty","captureEvent","event","createTelemetryEvent","type","metadata","captureDomContentLoaded","ts","captureLoad","loadFull","createItem","scrubFields","logLevel","reportLevel","verbose","enabled","transmit","sendConfig","includeItemsInTelemetry","captureIp","ignoreDuplicateErrors","Detection","ieVersion","undef","div","createElement","all","getElementsByTagName","innerHTML","getElementType","getAttribute","toLowerCase","descriptionToString","desc","tagName","out","id","classes","attributes","key","describeElement","elem","className","attr","elementArrayToString","a","nextStr","totalLength","separator","MAX_LENGTH","unshift","treeToArray","nextDescription","height","parentNode","getElementFromEvent","evt","doc","target","elementFromPoint","clientX","clientY","isDescribedElement","element","subtypes","handler","shim","oldOnError","_rollbarOldOnError","onerror","fn","Array","old","ret","_rollbarWindowOnError","_rollbarURH","belongsToShim","removeEventListener","rejectionHandler","detail","addEventListener","detection","formatArgsAsString","settings","get","headers","urlparser","domUtil","network","networkResponseHeaders","networkResponseBody","networkRequestHeaders","networkRequestBody","networkErrorOnHttp5xx","networkErrorOnHttp4xx","networkErrorOnHttp0","dom","navigation","connectivity","contentSecurityPolicy","errorOnContentSecurityPolicy","restore","replacements","b","_window","_document","autoInstrument","scrubTelemetryInputs","telemetryScrubber","defaultValueScrubber","patterns","RegExp","description","name","attrs","nameFromDescription","diagnostic","eventRemovers","contentsecuritypolicy","_location","_lastHref","href","_isUrlObject","input","URL","oldSettings","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","deinstrumentContentSecurityPolicy","instrumentContentSecurityPolicy","wrapProp","xhr","orig","xhrp","isUrlObject","__rollbar_xhr","status_code","start_time_ms","now","end_time_ms","header","request_headers","request_content_type","onreadystatechangeHandler","request","__rollbar_event","captureNetwork","readyState","response_content_type","getResponseHeader","headersConfig","allHeaders","getAllResponseHeaders","arr","trim","body","responseText","response","isJsonContentType","scrubJson","code","status","levelFromStatus","errorOnHttpStatus","onreadystatechange","trackHttpErrors","t","reqHeaders","fetchHeaders","then","resp","text","clone","subtype","rollbarUUID","contentType","includes","json","JSON","inHeaders","outHeaders","entries","currentHeader","next","done","skipFrames","c","wrapConsole","origConsole","captureLog","Function","removeListeners","clickHandler","handleClick","bind","blurHandler","handleBlur","addListener","hasTag","anchorOrButton","captureDomEvent","checked","handleSelectInputChanged","multiple","selected","selectedIndex","isChecked","elementString","captureDom","app","history","pushState","current","handleUrlChange","from","to","parsedHref","parsedTo","parsedFrom","hash","captureNavigation","captureConnectivityChange","handleCspEvent","cspEvent","blockedURI","violatedDirective","effectiveDirective","sourceFile","originalPolicy","handleCspError","cspHandler","section","altType","capture","attachEvent","detachEvent","addBodyMessage","custom","extra","set","stackFromItem","buildTrace","guess","guessErrorClass","trace","exception","class","errorClass","stackFrame","frame","pre","contextLength","mid","rawStack","raw","rawException","frames","filename","sanitizeUrl","func","column","sendFrameUrl","endsWith","Math","floor","reverse","err","Stack","originalError","nested","_savedStackTrace","addErrorContext","chain","cause","e2","environment","platform","framework","language","server","requestInfo","query_string","remoteString","user_ip","keys","nav","navigator","scr","screen","runtime_ms","timestamp","round","javascript","browser","userAgent","cookie_enabled","cookieEnabled","width","cur","plugins","navPlugins","l","traceChain","traces","traceChainLength","trace_chain","addBodyTraceChain","addBodyTrace","scrubFn","scrubPaths","makeFetchRequest","makeXhrRequest","params","requestFactory","addParamsAndAccessTokenToPath","formatUrl","_makeZoneRequest","writeData","currentZone","Zone","_name","rootZone","_parent","run","_makeRequest","RollbarProxy","_msg","_proxyRequest","controller","timeoutId","isFiniteNumber","AbortController","abort","signal","clearTimeout","catch","_newRetriableError","xmlhttp","factories","ActiveXObject","numFactories","_createXMLHTTPObject","parseResponse","jsonParse","_isNormalFailure","ex","open","setRequestHeader","send","e1","XDomainRequest","xdomainrequest","onprogress","ontimeout","onload","last","auth","query","parseInt","pathParts","_extendListenerPrototype","oldAddEventListener","_rollbarOldAdd","addFn","bubble","oldRemoveEventListener","_rollbarOldRemove","removeFn","maxItems","itemsPerMin","ErrorStackParser","ERR_CLASS_REGEXP","gatherContext","Frame","_stackFrame","skip","parserStack","getStack","constructorName","constructor","guessFunctionName","errMsg","errClassMatch","errClass","hasOwn","toStr","isPlainObject","hasOwnConstructor","hasIsPrototypeOf","src","copy","Notifier","transform","addPendingItem","_applyTransforms","removePendingItem","addItem","transformIndex","transformsLength","cb","matchFrames","list","block","listLength","frameLength","urlIsOnAList","safeOrBlock","hostBlockList","hostSafeList","tracesLength","listName","levelVal","LEVELS","isUncaught","onSendCallback","ignoredMessages","rIgnoredMessage","messages","messagesFromItem","Queue","rateLimiter","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","predicate","idx","splice","originalItem","predicateResult","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","wait","_maybeCallWait","clearInterval","setInterval","rateLimitResponse","shouldSend","_maybeRetry","RETRIABLE_ERRORS","shouldRetry","retryInterval","maxRetries","retries","_retryApiRequest","retryObject","RateLimiter","startTime","counter","perMinCounter","platformOptions","configureGlobal","checkRate","limit","ignoreRateLimit","shouldSendValue","globalRateLimit","limitPerMin","perMinute","itemsPerMinute","rateLimitPayload","globalSettings","elapsedTime","globalRateLimitPerMin","setPlatformOptions","tracer","validateTracer","setStackTraceLimit","lastErrorHash","stackTraceLimit","scope","active","_defaultLogLevel","_log","defaultLevel","_sameAsLastError","_addTracingInfo","_captureRollbarItem","telemetryEvents","copyEvents","itemHash","generateItemHash","span","spanContext","toSpanId","toTraceId","validateSpan","setTag","opentracingSpanId","opentracingTraceId","opentracing_span_id","opentracing_trace_id","traverse","scrubPath","redact","paramRes","pat","_getScrubFieldRegexs","queryRes","_getScrubQueryParamRegexs","redactQueryParam","dummy0","paramPart","scrubber","seen","tmpV","valScrubber","paramScrubber","MAX_EVENTS","maxTelemetryEvents","maxQueueSize","max","min","getLevel","manual","newMaxEvents","deleteCount","events","filterTelemetry","timestamp_ms","captureError","requestData","statusCode","change","addFunctionOption","payloadOptions","tracePath","newExtra","newItem","isPromise","promisedItem","configuredOptions","configured_options","is_anonymous","is_uncaught","raw_error","constructor_name","failed","selectFrames","range","truncateFrames","maybeTruncateValue","val","truncateStrings","truncator","typeName","truncateTraceData","traceData","minBody","needsTruncation","maxSize","maxByteSize","strategy","results","strategies","RollbarJSON","x","isNativeFunction","funcMatchString","reIsNative","isObject","uuid4","d","random","parseUriOptions","strictMode","q","parser","strict","loose","backup","jsonError","backupError","wrapCallback","nonCircularClone","newSeen","TELEMETRY_TYPES","TELEMETRY_LEVELS","arrayIncludes","paramsArray","sort","qs","h","requestKeys","lambdaContext","arg","extraArgs","argTypes","typ","DOMException","setCustomItemKeys","original_arg_types","errors","contextAdded","rollbarContext","error_context","filterIp","newIp","beginning","slashIdx","u","hostWhiteList","hostBlackList","updateDeprecatedOptions","overwriteScrubFields","isIterable","isString","s","mode","backupMessage","useragent","baseUrlParts","o","m","uri","$0","$1","$2","parseUri","anchor","temp","replacement","string","count","charCodeAt","normalizeName","FetchHeaders","forEach","append","isArray","getOwnPropertyNames","normalizeValue","oldValue","has","thisArg","items","iteratorFor","Headers","seenIndex","isObj","mapped","same","gap","indent","meta","rep","state","container","escapes","number","action","rx_escapable","this_value","valueOf","quote","lastIndex","holder","partial","mind","toJSON","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","replacer","space","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","reviver","tx","ignore","fromCharCode","walk","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__"],"sourceRoot":""}
\ No newline at end of file
diff --git a/dist/rollbar.snippet.js b/dist/rollbar.snippet.js
index 9562c9f53..3dff23916 100644
--- a/dist/rollbar.snippet.js
+++ b/dist/rollbar.snippet.js
@@ -1 +1 @@
-!function(r){var e={};function o(n){if(e[n])return e[n].exports;var t=e[n]={i:n,l:!1,exports:{}};return r[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.m=r,o.c=e,o.d=function(r,e,n){o.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:n})},o.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},o.t=function(r,e){if(1&e&&(r=o(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var t in r)o.d(n,t,function(e){return r[e]}.bind(null,t));return n},o.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return o.d(e,"a",e),e},o.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},o.p="",o(o.s=0)}([function(r,e,o){"use strict";var n=o(1),t=o(5);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdn.rollbar.com/rollbarjs/refs/tags/v2.24.0/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,e,o){"use strict";var n=o(2),t=o(3);function a(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}var l=0;function i(r,e){this.options=r,this._rollbarOldOnError=null;var o=l++;this.shimId=function(){return o},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[o]={handler:e,messages:[]})}var s=o(4),d=function(r,e){return new i(r,e)},c=function(r){return new s(d,r)};function u(r){return a((function(){var e=this,o=Array.prototype.slice.call(arguments,0),n={shim:e,method:r,args:o,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)}))}i.prototype.loadFull=function(r,e,o,n,t){var l=!1,i=e.createElement("script"),s=e.getElementsByTagName("script")[0],d=s.parentNode;i.crossOrigin="",i.src=n.rollbarJsUrl,o||(i.async=!0),i.onload=i.onreadystatechange=a((function(){if(!(l||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){i.onload=i.onreadystatechange=null;try{d.removeChild(i)}catch(r){}l=!0,function(){var e;if(void 0===r._rollbarDidLoad){e=new Error("rollbar.js did not load");for(var o,n,a,l,i=0;o=r._rollbarShims[i++];)for(o=o.messages||[];n=o.shift();)for(a=n.args||[],i=0;i{"use strict";var r={349:r=>{r.exports={captureUncaughtExceptions:function(r,o,e){if(r){var n;if("function"==typeof o._rollbarOldOnError)n=o._rollbarOldOnError;else if(r.onerror){for(n=r.onerror;n._rollbarOldOnError;)n=n._rollbarOldOnError;o._rollbarOldOnError=n}o.handleAnonymousErrors();var t=function(){var e=Array.prototype.slice.call(arguments,0);!function(r,o,e,n){r._rollbarWrappedError&&(n[4]||(n[4]=r._rollbarWrappedError),n[5]||(n[5]=r._rollbarWrappedError._rollbarContext),r._rollbarWrappedError=null);var t=o.handleUncaughtException.apply(o,n);e&&e.apply(r,n),"anonymous"===t&&(o.anonymousErrorsPending+=1)}(r,o,n,e)};e&&(t._rollbarOldOnError=n),r.onerror=t}},captureUnhandledRejections:function(r,o,e){if(r){"function"==typeof r._rollbarURH&&r._rollbarURH.belongsToShim&&r.removeEventListener("unhandledrejection",r._rollbarURH);var n=function(r){var e,n,t;try{e=r.reason}catch(r){e=void 0}try{n=r.promise}catch(r){n="[unhandledrejection] error getting `promise` from event"}try{t=r.detail,!e&&t&&(e=t.reason,n=t.promise)}catch(r){}e||(e="[unhandledrejection] error getting `reason` from event"),o&&o.handleUnhandledRejection&&o.handleUnhandledRejection(e,n)};n.belongsToShim=e,r._rollbarURH=n,r.addEventListener("unhandledrejection",n)}}}},202:r=>{function o(r,e){this.impl=r(e,this),this.options=e,function(r){for(var o=function(r){return function(){var o=Array.prototype.slice.call(arguments,0);if(this.impl[r])return this.impl[r].apply(this.impl,o)}},e="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleAnonymousErrors,handleUnhandledRejection,_createItem,wrap,loadFull,shimId,captureEvent,captureDomContentLoaded,captureLoad".split(","),n=0;n{var n=e(349),t=e(965);function a(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}var l=0;function i(r,o){this.options=r,this._rollbarOldOnError=null;var e=l++;this.shimId=function(){return e},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[e]={handler:o,messages:[]})}var s=e(202),d=function(r,o){return new i(r,o)},p=function(r){return new s(d,r)};function c(r){return a((function(){var o=Array.prototype.slice.call(arguments,0),e={shim:this,method:r,args:o,ts:new Date};window._rollbarShims[this.shimId()].messages.push(e)}))}i.prototype.loadFull=function(r,o,e,n,t){var l=!1,i=o.createElement("script"),s=o.getElementsByTagName("script")[0],d=s.parentNode;i.crossOrigin="",i.src=n.rollbarJsUrl,e||(i.async=!0),i.onload=i.onreadystatechange=a((function(){if(!(l||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){i.onload=i.onreadystatechange=null;try{d.removeChild(i)}catch(r){}l=!0,function(){var o;if(void 0===r._rollbarDidLoad){o=new Error("rollbar.js did not load");for(var e,n,a,l,i=0;e=r._rollbarShims[i++];)for(e=e.messages||[];n=e.shift();)for(a=n.args||[],i=0;i{r.exports=function(r){return function(o){if(!o&&!window._rollbarInitialized){for(var e,n,t=(r=r||{}).globalAlias||"Rollbar",a=window.rollbar,l=function(r){return new a(r)},i=0;e=window._rollbarShims[i++];)n||(n=e.handler),e.handler._swapAndProcessMessages(l,e.messages);window[t]=n,window._rollbarInitialized=!0}}}},965:r=>{function o(r,o,e){if(o.hasOwnProperty&&o.hasOwnProperty("addEventListener")){for(var n=o.addEventListener;n._rollbarOldAdd&&n.belongsToShim;)n=n._rollbarOldAdd;var t=function(o,e,t){n.call(this,o,r.wrap(e),t)};t._rollbarOldAdd=n,t.belongsToShim=e,o.addEventListener=t;for(var a=o.removeEventListener;a._rollbarOldRemove&&a.belongsToShim;)a=a._rollbarOldRemove;var l=function(r,o,e){a.call(this,r,o&&o._rollbar_wrapped||o,e)};l._rollbarOldRemove=a,l.belongsToShim=e,o.removeEventListener=l}}r.exports=function(r,e,n){if(r){var t,a,l="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(t=0;t{var r=e(758),o=e(157);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdn.rollbar.com/rollbarjs/refs/tags/v2.26.4/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var n=r.setupShim(window,_rollbarConfig),t=o(_rollbarConfig);window.rollbar=r.Rollbar,n.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,t)})()})();
\ No newline at end of file
diff --git a/dist/rollbar.umd.js b/dist/rollbar.umd.js
index 1ae18ae1e..25b849b19 100644
--- a/dist/rollbar.umd.js
+++ b/dist/rollbar.umd.js
@@ -7,5755 +7,6789 @@
exports["rollbar"] = factory();
else
root["rollbar"] = factory();
-})(this, function() {
-return /******/ (function(modules) { // webpackBootstrap
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {}
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
-/******/ }
-/******/ };
-/******/
-/******/ // define __esModule on exports
-/******/ __webpack_require__.r = function(exports) {
-/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
-/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
-/******/ }
-/******/ Object.defineProperty(exports, '__esModule', { value: true });
-/******/ };
-/******/
-/******/ // create a fake namespace object
-/******/ // mode & 1: value is a module id, require it
-/******/ // mode & 2: merge all properties of value into the ns
-/******/ // mode & 4: return value when already ns object
-/******/ // mode & 8|1: behave like require
-/******/ __webpack_require__.t = function(value, mode) {
-/******/ if(mode & 1) value = __webpack_require__(value);
-/******/ if(mode & 8) return value;
-/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
-/******/ var ns = Object.create(null);
-/******/ __webpack_require__.r(ns);
-/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
-/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
-/******/ return ns;
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/
-/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 6);
-/******/ })
-/************************************************************************/
-/******/ ([
-/* 0 */
+})(this, () => {
+return /******/ (() => { // webpackBootstrap
+/******/ var __webpack_modules__ = ({
+
+/***/ 276:
+/***/ (function() {
+
+// Console-polyfill. MIT license.
+// https://github.com/paulmillr/console-polyfill
+// Make it safe to do console.log() always.
+(function(global) {
+ 'use strict';
+ if (!global.console) {
+ global.console = {};
+ }
+ var con = global.console;
+ var prop, method;
+ var dummy = function() {};
+ var properties = ['memory'];
+ var methods = ('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(',');
+ while (prop = properties.pop()) if (!con[prop]) con[prop] = {};
+ while (method = methods.pop()) if (!con[method]) con[method] = dummy;
+ // Using `this` for web workers & supports Browserify / Webpack.
+})(typeof window === 'undefined' ? this : window);
+
+
+/***/ }),
+
+/***/ 180:
/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {
+ 'use strict';
+ // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
+ /* istanbul ignore next */
+ if (true) {
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(124)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
+ (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else {}
+}(this, function ErrorStackParser(StackFrame) {
+ 'use strict';
-var merge = __webpack_require__(12);
+ var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\S+:\d+/;
+ var CHROME_IE_STACK_REGEXP = /^\s*at .*(\S+:\d+|\(native\))/m;
+ var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\[native code])?$/;
-var RollbarJSON = {};
-function setupJSON(polyfillJSON) {
- if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {
- return;
- }
+ return {
+ /**
+ * Given an Error object, extract the most information from it.
+ *
+ * @param {Error} error object
+ * @return {Array} of StackFrames
+ */
+ parse: function ErrorStackParser$$parse(error) {
+ if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {
+ return this.parseOpera(error);
+ } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {
+ return this.parseV8OrIE(error);
+ } else if (error.stack) {
+ return this.parseFFOrSafari(error);
+ } else {
+ throw new Error('Cannot parse given Error object');
+ }
+ },
- if (isDefined(JSON)) {
- // If polyfill is provided, prefer it over existing non-native shims.
- if(polyfillJSON) {
- if (isNativeFunction(JSON.stringify)) {
- RollbarJSON.stringify = JSON.stringify;
- }
- if (isNativeFunction(JSON.parse)) {
- RollbarJSON.parse = JSON.parse;
- }
- } else { // else accept any interface that is present.
- if (isFunction(JSON.stringify)) {
- RollbarJSON.stringify = JSON.stringify;
- }
- if (isFunction(JSON.parse)) {
- RollbarJSON.parse = JSON.parse;
- }
+ // Separate line and column numbers from a string of the form: (URI:Line:Column)
+ extractLocation: function ErrorStackParser$$extractLocation(urlLike) {
+ // Fail-fast but return locations like "(native)"
+ if (urlLike.indexOf(':') === -1) {
+ return [urlLike];
+ }
+
+ var regExp = /(.+?)(?::(\d+))?(?::(\d+))?$/;
+ var parts = regExp.exec(urlLike.replace(/[()]/g, ''));
+ return [parts[1], parts[2] || undefined, parts[3] || undefined];
+ },
+
+ parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {
+ var filtered = error.stack.split('\n').filter(function(line) {
+ return !!line.match(CHROME_IE_STACK_REGEXP);
+ }, this);
+
+ return filtered.map(function(line) {
+ if (line.indexOf('(eval ') > -1) {
+ // Throw away eval information until we implement stacktrace.js/stackframe#8
+ line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(\),.*$)/g, '');
+ }
+ var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '(');
+
+ // capture and preseve the parenthesized location "(/foo/my bar.js:12:87)" in
+ // case it has spaces in it, as the string is split on \s+ later on
+ var location = sanitizedLine.match(/ (\((.+):(\d+):(\d+)\)$)/);
+
+ // remove the parenthesized location from the line, if it was matched
+ sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;
+
+ var tokens = sanitizedLine.split(/\s+/).slice(1);
+ // if a location was matched, pass it to extractLocation() otherwise pop the last token
+ var locationParts = this.extractLocation(location ? location[1] : tokens.pop());
+ var functionName = tokens.join(' ') || undefined;
+ var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];
+
+ return new StackFrame({
+ functionName: functionName,
+ fileName: fileName,
+ lineNumber: locationParts[1],
+ columnNumber: locationParts[2],
+ source: line
+ });
+ }, this);
+ },
+
+ parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {
+ var filtered = error.stack.split('\n').filter(function(line) {
+ return !line.match(SAFARI_NATIVE_CODE_REGEXP);
+ }, this);
+
+ return filtered.map(function(line) {
+ // Throw away eval information until we implement stacktrace.js/stackframe#8
+ if (line.indexOf(' > eval') > -1) {
+ line = line.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ':$1');
+ }
+
+ if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {
+ // Safari eval frames only have function names and nothing else
+ return new StackFrame({
+ functionName: line
+ });
+ } else {
+ var functionNameRegex = /((.*".+"[^@]*)?[^@]*)(?:@)/;
+ var matches = line.match(functionNameRegex);
+ var functionName = matches && matches[1] ? matches[1] : undefined;
+ var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));
+
+ return new StackFrame({
+ functionName: functionName,
+ fileName: locationParts[0],
+ lineNumber: locationParts[1],
+ columnNumber: locationParts[2],
+ source: line
+ });
+ }
+ }, this);
+ },
+
+ parseOpera: function ErrorStackParser$$parseOpera(e) {
+ if (!e.stacktrace || (e.message.indexOf('\n') > -1 &&
+ e.message.split('\n').length > e.stacktrace.split('\n').length)) {
+ return this.parseOpera9(e);
+ } else if (!e.stack) {
+ return this.parseOpera10(e);
+ } else {
+ return this.parseOpera11(e);
+ }
+ },
+
+ parseOpera9: function ErrorStackParser$$parseOpera9(e) {
+ var lineRE = /Line (\d+).*script (?:in )?(\S+)/i;
+ var lines = e.message.split('\n');
+ var result = [];
+
+ for (var i = 2, len = lines.length; i < len; i += 2) {
+ var match = lineRE.exec(lines[i]);
+ if (match) {
+ result.push(new StackFrame({
+ fileName: match[2],
+ lineNumber: match[1],
+ source: lines[i]
+ }));
+ }
+ }
+
+ return result;
+ },
+
+ parseOpera10: function ErrorStackParser$$parseOpera10(e) {
+ var lineRE = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i;
+ var lines = e.stacktrace.split('\n');
+ var result = [];
+
+ for (var i = 0, len = lines.length; i < len; i += 2) {
+ var match = lineRE.exec(lines[i]);
+ if (match) {
+ result.push(
+ new StackFrame({
+ functionName: match[3] || undefined,
+ fileName: match[2],
+ lineNumber: match[1],
+ source: lines[i]
+ })
+ );
+ }
+ }
+
+ return result;
+ },
+
+ // Opera 10.65+ Error.stack very similar to FF/Safari
+ parseOpera11: function ErrorStackParser$$parseOpera11(error) {
+ var filtered = error.stack.split('\n').filter(function(line) {
+ return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);
+ }, this);
+
+ return filtered.map(function(line) {
+ var tokens = line.split('@');
+ var locationParts = this.extractLocation(tokens.pop());
+ var functionCall = (tokens.shift() || '');
+ var functionName = functionCall
+ .replace(//, '$2')
+ .replace(/\([^)]*\)/g, '') || undefined;
+ var argsRaw;
+ if (functionCall.match(/\(([^)]*)\)/)) {
+ argsRaw = functionCall.replace(/^[^(]+\(([^)]*)\)$/, '$1');
+ }
+ var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?
+ undefined : argsRaw.split(',');
+
+ return new StackFrame({
+ functionName: functionName,
+ args: args,
+ fileName: locationParts[0],
+ lineNumber: locationParts[1],
+ columnNumber: locationParts[2],
+ source: line
+ });
+ }, this);
+ }
+ };
+}));
+
+
+/***/ }),
+
+/***/ 124:
+/***/ (function(module, exports) {
+
+var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {
+ 'use strict';
+ // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
+
+ /* istanbul ignore next */
+ if (true) {
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
+ (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else {}
+}(this, function() {
+ 'use strict';
+ function _isNumber(n) {
+ return !isNaN(parseFloat(n)) && isFinite(n);
}
- }
- if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {
- polyfillJSON && polyfillJSON(RollbarJSON);
- }
-}
-/*
- * isType - Given a Javascript value and a string, returns true if the type of the value matches the
- * given string.
- *
- * @param x - any value
- * @param t - a lowercase string containing one of the following type names:
- * - undefined
- * - null
- * - error
- * - number
- * - boolean
- * - string
- * - symbol
- * - function
- * - object
- * - array
- * @returns true if x is of type t, otherwise false
- */
-function isType(x, t) {
- return t === typeName(x);
-}
+ function _capitalize(str) {
+ return str.charAt(0).toUpperCase() + str.substring(1);
+ }
+
+ function _getter(p) {
+ return function() {
+ return this[p];
+ };
+ }
+
+ var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];
+ var numericProps = ['columnNumber', 'lineNumber'];
+ var stringProps = ['fileName', 'functionName', 'source'];
+ var arrayProps = ['args'];
+ var objectProps = ['evalOrigin'];
+
+ var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);
+
+ function StackFrame(obj) {
+ if (!obj) return;
+ for (var i = 0; i < props.length; i++) {
+ if (obj[props[i]] !== undefined) {
+ this['set' + _capitalize(props[i])](obj[props[i]]);
+ }
+ }
+ }
+
+ StackFrame.prototype = {
+ getArgs: function() {
+ return this.args;
+ },
+ setArgs: function(v) {
+ if (Object.prototype.toString.call(v) !== '[object Array]') {
+ throw new TypeError('Args must be an Array');
+ }
+ this.args = v;
+ },
+
+ getEvalOrigin: function() {
+ return this.evalOrigin;
+ },
+ setEvalOrigin: function(v) {
+ if (v instanceof StackFrame) {
+ this.evalOrigin = v;
+ } else if (v instanceof Object) {
+ this.evalOrigin = new StackFrame(v);
+ } else {
+ throw new TypeError('Eval Origin must be an Object or StackFrame');
+ }
+ },
+
+ toString: function() {
+ var fileName = this.getFileName() || '';
+ var lineNumber = this.getLineNumber() || '';
+ var columnNumber = this.getColumnNumber() || '';
+ var functionName = this.getFunctionName() || '';
+ if (this.getIsEval()) {
+ if (fileName) {
+ return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';
+ }
+ return '[eval]:' + lineNumber + ':' + columnNumber;
+ }
+ if (functionName) {
+ return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';
+ }
+ return fileName + ':' + lineNumber + ':' + columnNumber;
+ }
+ };
+
+ StackFrame.fromString = function StackFrame$$fromString(str) {
+ var argsStartIndex = str.indexOf('(');
+ var argsEndIndex = str.lastIndexOf(')');
+
+ var functionName = str.substring(0, argsStartIndex);
+ var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');
+ var locationString = str.substring(argsEndIndex + 1);
+
+ if (locationString.indexOf('@') === 0) {
+ var parts = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(locationString, '');
+ var fileName = parts[1];
+ var lineNumber = parts[2];
+ var columnNumber = parts[3];
+ }
+
+ return new StackFrame({
+ functionName: functionName,
+ args: args || undefined,
+ fileName: fileName,
+ lineNumber: lineNumber || undefined,
+ columnNumber: columnNumber || undefined
+ });
+ };
+
+ for (var i = 0; i < booleanProps.length; i++) {
+ StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);
+ StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {
+ return function(v) {
+ this[p] = Boolean(v);
+ };
+ })(booleanProps[i]);
+ }
+
+ for (var j = 0; j < numericProps.length; j++) {
+ StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);
+ StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {
+ return function(v) {
+ if (!_isNumber(v)) {
+ throw new TypeError(p + ' must be a Number');
+ }
+ this[p] = Number(v);
+ };
+ })(numericProps[j]);
+ }
+
+ for (var k = 0; k < stringProps.length; k++) {
+ StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);
+ StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {
+ return function(v) {
+ this[p] = String(v);
+ };
+ })(stringProps[k]);
+ }
-/*
- * typeName - Given a Javascript value, returns the type of the object as a string
- */
-function typeName(x) {
- var name = typeof x;
- if (name !== 'object') {
- return name;
- }
- if (!x) {
- return 'null';
- }
- if (x instanceof Error) {
- return 'error';
- }
- return ({}).toString.call(x).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
-}
+ return StackFrame;
+}));
-/* isFunction - a convenience function for checking if a value is a function
- *
- * @param f - any value
- * @returns true if f is a function, otherwise false
- */
-function isFunction(f) {
- 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');
-}
+/***/ 815:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-/* isString - Checks if the argument is a string
- *
- * @param value - any value
- * @returns true if value is a string
-*/
-function isString(value) {
- return typeof value === 'string' || value instanceof String
-}
+"use strict";
-/**
- * isFiniteNumber - determines whether the passed value is a finite number
- *
- * @param {*} n - any value
- * @returns true if value is a finite number
- */
- function isFiniteNumber(n) {
- return Number.isFinite(n);
-}
-/*
- * isDefined - a convenience function for checking if a value is not equal to undefined
- *
- * @param u - any value
- * @returns true if u is anything other than undefined
- */
-function isDefined(u) {
- return !isType(u, 'undefined');
-}
+var _ = __webpack_require__(702);
+var helpers = __webpack_require__(817);
-/*
- * isIterable - convenience function for checking if a value can be iterated, essentially
- * whether it is an object or an array.
+var defaultOptions = {
+ hostname: 'api.rollbar.com',
+ path: '/api/1/item/',
+ search: null,
+ version: '1',
+ protocol: 'https:',
+ port: 443,
+};
+
+/**
+ * Api is an object that encapsulates methods of communicating with
+ * the Rollbar API. It is a standard interface with some parts implemented
+ * differently for server or browser contexts. It is an object that should
+ * be instantiated when used so it can contain non-global options that may
+ * be different for another instance of RollbarApi.
*
- * @param i - any value
- * @returns true if i is an object or an array as determined by `typeName`
+ * @param options {
+ * accessToken: the accessToken to use for posting items to rollbar
+ * endpoint: an alternative endpoint to send errors to
+ * must be a valid, fully qualified URL.
+ * The default is: https://api.rollbar.com/api/1/item
+ * proxy: if you wish to proxy requests provide an object
+ * with the following keys:
+ * host or hostname (required): foo.example.com
+ * port (optional): 123
+ * protocol (optional): https
+ * }
*/
-function isIterable(i) {
- var type = typeName(i);
- return (type === 'object' || type === 'array');
+function Api(options, transport, urllib, truncation, jsonBackup) {
+ this.options = options;
+ this.transport = transport;
+ this.url = urllib;
+ this.truncation = truncation;
+ this.jsonBackup = jsonBackup;
+ this.accessToken = options.accessToken;
+ this.transportOptions = _getTransport(options, urllib);
}
-/*
- * isError - convenience function for checking if a value is of an error type
+/**
*
- * @param e - any value
- * @returns true if e is an error
+ * @param data
+ * @param callback
*/
-function isError(e) {
- // Detect both Error and Firefox Exception type
- return isType(e, 'error') || isType(e, 'exception');
-}
+Api.prototype.postItem = function (data, callback) {
+ var transportOptions = helpers.transportOptions(
+ this.transportOptions,
+ 'POST',
+ );
+ var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);
+ var self = this;
-/* isPromise - a convenience function for checking if a value is a promise
+ // ensure the network request is scheduled after the current tick.
+ setTimeout(function () {
+ self.transport.post(self.accessToken, transportOptions, payload, callback);
+ }, 0);
+};
+
+/**
*
- * @param p - any value
- * @returns true if f is a function, otherwise false
+ * @param data
+ * @param callback
*/
-function isPromise(p) {
- return isObject(p) && isType(p.then, 'function');
-}
+Api.prototype.buildJsonPayload = function (data, callback) {
+ var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);
-function redact() {
- return '********';
-}
+ var stringifyResult;
+ if (this.truncation) {
+ stringifyResult = this.truncation.truncate(payload);
+ } else {
+ stringifyResult = _.stringify(payload);
+ }
-// from http://stackoverflow.com/a/8809472/1138191
-function uuid4() {
- var d = now();
- var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
- var r = (d + Math.random() * 16) % 16 | 0;
- d = Math.floor(d / 16);
- return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);
- });
- return uuid;
-}
+ if (stringifyResult.error) {
+ if (callback) {
+ callback(stringifyResult.error);
+ }
+ return null;
+ }
-var LEVELS = {
- debug: 0,
- info: 1,
- warning: 2,
- error: 3,
- critical: 4
+ return stringifyResult.value;
};
-function sanitizeUrl(url) {
- var baseUrlParts = parseUri(url);
- if (!baseUrlParts) {
- return '(unknown)';
- }
+/**
+ *
+ * @param jsonPayload
+ * @param callback
+ */
+Api.prototype.postJsonPayload = function (jsonPayload, callback) {
+ var transportOptions = helpers.transportOptions(
+ this.transportOptions,
+ 'POST',
+ );
+ this.transport.postJsonPayload(
+ this.accessToken,
+ transportOptions,
+ jsonPayload,
+ callback,
+ );
+};
- // remove a trailing # if there is no anchor
- if (baseUrlParts.anchor === '') {
- baseUrlParts.source = baseUrlParts.source.replace('#', '');
+Api.prototype.configure = function (options) {
+ var oldOptions = this.oldOptions;
+ this.options = _.merge(oldOptions, options);
+ this.transportOptions = _getTransport(this.options, this.url);
+ if (this.options.accessToken !== undefined) {
+ this.accessToken = this.options.accessToken;
}
+ return this;
+};
- url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');
- return url;
+function _getTransport(options, url) {
+ return helpers.getTransportFromOptions(options, defaultOptions, url);
}
-var parseUriOptions = {
- strictMode: false,
- 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*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
- }
-};
+module.exports = Api;
-function parseUri(str) {
- if (!isType(str, 'string')) {
- return undefined;
- }
- var o = parseUriOptions;
- var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);
- var uri = {};
+/***/ }),
- for (var i = 0, l = o.key.length; i < l; ++i) {
- uri[o.key[i]] = m[i] || '';
- }
+/***/ 817:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- uri[o.q.name] = {};
- uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
- if ($1) {
- uri[o.q.name][$1] = $2;
- }
- });
+"use strict";
- return uri;
-}
-function addParamsAndAccessTokenToPath(accessToken, options, params) {
- params = params || {};
- params.access_token = accessToken;
- var paramsArray = [];
- var k;
- for (k in params) {
- if (Object.prototype.hasOwnProperty.call(params, k)) {
- paramsArray.push([k, params[k]].join('='));
- }
- }
- var query = '?' + paramsArray.sort().join('&');
+var _ = __webpack_require__(702);
- options = options || {};
- options.path = options.path || '';
- var qs = options.path.indexOf('?');
- var h = options.path.indexOf('#');
- var p;
- if (qs !== -1 && (h === -1 || h > qs)) {
- p = options.path;
- options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);
- } else {
- if (h !== -1) {
- p = options.path;
- options.path = p.substring(0,h) + query + p.substring(h);
+function buildPayload(accessToken, data, jsonBackup) {
+ if (!_.isType(data.context, 'string')) {
+ var contextResult = _.stringify(data.context, jsonBackup);
+ if (contextResult.error) {
+ data.context = "Error: could not serialize 'context'";
} else {
- options.path = options.path + query;
+ data.context = contextResult.value || '';
+ }
+ if (data.context.length > 255) {
+ data.context = data.context.substr(0, 255);
}
}
+ return {
+ access_token: accessToken,
+ data: data,
+ };
}
-function formatUrl(u, protocol) {
- protocol = protocol || u.protocol;
- if (!protocol && u.port) {
- if (u.port === 80) {
- protocol = 'http:';
- } else if (u.port === 443) {
- protocol = 'https:';
- }
- }
- protocol = protocol || 'https:';
+function getTransportFromOptions(options, defaults, url) {
+ var hostname = defaults.hostname;
+ var protocol = defaults.protocol;
+ var port = defaults.port;
+ var path = defaults.path;
+ var search = defaults.search;
+ var timeout = options.timeout;
+ var transport = detectTransport(options);
- if (!u.hostname) {
- return null;
+ var proxy = options.proxy;
+ if (options.endpoint) {
+ var opts = url.parse(options.endpoint);
+ hostname = opts.hostname;
+ protocol = opts.protocol;
+ port = opts.port;
+ path = opts.pathname;
+ search = opts.search;
}
- var result = protocol + '//' + u.hostname;
- if (u.port) {
- result = result + ':' + u.port;
+ return {
+ timeout: timeout,
+ hostname: hostname,
+ protocol: protocol,
+ port: port,
+ path: path,
+ search: search,
+ proxy: proxy,
+ transport: transport,
+ };
+}
+
+function detectTransport(options) {
+ var gWindow =
+ (typeof window != 'undefined' && window) ||
+ (typeof self != 'undefined' && self);
+ var transport = options.defaultTransport || 'xhr';
+ if (typeof gWindow.fetch === 'undefined') transport = 'xhr';
+ if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';
+ return transport;
+}
+
+function transportOptions(transport, method) {
+ var protocol = transport.protocol || 'https:';
+ var port =
+ transport.port ||
+ (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);
+ var hostname = transport.hostname;
+ var path = transport.path;
+ var timeout = transport.timeout;
+ var transportAPI = transport.transport;
+ if (transport.search) {
+ path = path + transport.search;
}
- if (u.path) {
- result = result + u.path;
+ if (transport.proxy) {
+ path = protocol + '//' + hostname + path;
+ hostname = transport.proxy.host || transport.proxy.hostname;
+ port = transport.proxy.port;
+ protocol = transport.proxy.protocol || protocol;
}
- return result;
+ return {
+ timeout: timeout,
+ protocol: protocol,
+ hostname: hostname,
+ path: path,
+ port: port,
+ method: method,
+ transport: transportAPI,
+ };
}
-function stringify(obj, backup) {
- var value, error;
- try {
- value = RollbarJSON.stringify(obj);
- } catch (jsonError) {
- if (backup && isFunction(backup)) {
- try {
- value = backup(obj);
- } catch (backupError) {
- error = backupError;
- }
- } else {
- error = jsonError;
- }
+function appendPathToPath(base, path) {
+ var baseTrailingSlash = /\/$/.test(base);
+ var pathBeginningSlash = /^\//.test(path);
+
+ if (baseTrailingSlash && pathBeginningSlash) {
+ path = path.substring(1);
+ } else if (!baseTrailingSlash && !pathBeginningSlash) {
+ path = '/' + path;
}
- return {error: error, value: value};
+
+ return base + path;
}
-function maxByteSize(string) {
- // The transport will use utf-8, so assume utf-8 encoding.
- //
- // This minimal implementation will accurately count bytes for all UCS-2 and
- // single code point UTF-16. If presented with multi code point UTF-16,
- // which should be rare, it will safely overcount, not undercount.
- //
- // While robust utf-8 encoders exist, this is far smaller and far more performant.
- // For quickly counting payload size for truncation, smaller is better.
+module.exports = {
+ buildPayload: buildPayload,
+ getTransportFromOptions: getTransportFromOptions,
+ transportOptions: transportOptions,
+ appendPathToPath: appendPathToPath,
+};
- var count = 0;
- var length = string.length;
- for (var i = 0; i < length; i++) {
- var code = string.charCodeAt(i);
- if (code < 128) { // up to 7 bits
- count = count + 1;
- } else if (code < 2048) { // up to 11 bits
- count = count + 2;
- } else if (code < 65536) { // up to 16 bits
- count = count + 3;
- }
- }
+/***/ }),
- return count;
-}
+/***/ 409:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-function jsonParse(s) {
- var value, error;
- try {
- value = RollbarJSON.parse(s);
- } catch (e) {
- error = e;
- }
- return {error: error, value: value};
-}
+"use strict";
-function makeUnhandledStackInfo(
- message,
- url,
- lineno,
- colno,
- error,
- mode,
- backupMessage,
- errorParser
-) {
- var location = {
- url: url || '',
- line: lineno,
- column: colno
- };
- location.func = errorParser.guessFunctionName(location.url, location.line);
- location.context = errorParser.gatherContext(location.url, location.line);
- var href = typeof document !== 'undefined' && document && document.location && document.location.href;
- var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;
- return {
- 'mode': mode,
- 'message': error ? String(error) : (message || backupMessage),
- 'url': href,
- 'stack': [location],
- 'useragent': useragent
- };
+
+var rollbar = __webpack_require__(343);
+
+var options = (typeof window !== 'undefined') && window._rollbarConfig;
+var alias = options && options.globalAlias || 'Rollbar';
+var shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;
+
+if ((typeof window !== 'undefined') && !window._rollbarStartTime) {
+ window._rollbarStartTime = (new Date()).getTime();
}
-function wrapCallback(logger, f) {
- return function(err, resp) {
- try {
- f(err, resp);
- } catch (e) {
- logger.error(e);
- }
- };
+if (!shimRunning && options) {
+ var Rollbar = new rollbar(options);
+ window[alias] = Rollbar;
+} else if (typeof window !== 'undefined') {
+ window.rollbar = rollbar;
+ window._rollbarDidLoad = true;
+} else if (typeof self !== 'undefined') {
+ self.rollbar = rollbar;
+ self._rollbarDidLoad = true;
}
-function createItem(args, logger, notifier, requestKeys, lambdaContext) {
- var message, err, custom, callback, request;
- var arg;
- var extraArgs = [];
- var diagnostic = {};
- var argTypes = [];
+module.exports = rollbar;
- for (var i = 0, l = args.length; i < l; ++i) {
- arg = args[i];
- var typ = typeName(arg);
- argTypes.push(typ);
- switch (typ) {
- case 'undefined':
- break;
- case 'string':
- message ? extraArgs.push(arg) : message = arg;
- break;
- case 'function':
- callback = wrapCallback(logger, arg);
- break;
- case 'date':
- extraArgs.push(arg);
- break;
- case 'error':
- case 'domexception':
- case 'exception': // Firefox Exception type
- err ? extraArgs.push(arg) : err = arg;
- break;
- case 'object':
- case 'array':
- if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {
- err ? extraArgs.push(arg) : err = arg;
- break;
- }
- if (requestKeys && typ === 'object' && !request) {
- for (var j = 0, len = requestKeys.length; j < len; ++j) {
- if (arg[requestKeys[j]] !== undefined) {
- request = arg;
- break;
- }
- }
- if (request) {
- break;
- }
- }
- custom ? extraArgs.push(arg) : custom = arg;
- break;
- default:
- if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {
- err ? extraArgs.push(arg) : err = arg;
- break;
- }
- extraArgs.push(arg);
- }
- }
+/***/ }),
- if (extraArgs.length > 0) {
- // if custom is an array this turns it into an object with integer keys
- custom = merge(custom);
- custom.extraArgs = extraArgs;
- }
+/***/ 403:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- var item = {
- message: message,
- err: err,
- custom: custom,
- timestamp: now(),
- callback: callback,
- notifier: notifier,
- diagnostic: diagnostic,
- uuid: uuid4()
- };
+"use strict";
- setCustomItemKeys(item, custom);
- if (requestKeys && request) {
- item.request = request;
+var Client = __webpack_require__(562);
+var _ = __webpack_require__(702);
+var API = __webpack_require__(815);
+var logger = __webpack_require__(802);
+var globals = __webpack_require__(349);
+
+var Transport = __webpack_require__(477);
+var urllib = __webpack_require__(509);
+
+var transforms = __webpack_require__(860);
+var sharedTransforms = __webpack_require__(417);
+var predicates = __webpack_require__(172);
+var sharedPredicates = __webpack_require__(61);
+var errorParser = __webpack_require__(303);
+
+function Rollbar(options, client) {
+ this.options = _.handleOptions(defaultOptions, options, null, logger);
+ this.options._configuredOptions = options;
+ var Telemeter = this.components.telemeter;
+ var Instrumenter = this.components.instrumenter;
+ var polyfillJSON = this.components.polyfillJSON;
+ this.wrapGlobals = this.components.wrapGlobals;
+ this.scrub = this.components.scrub;
+ var truncation = this.components.truncation;
+
+ var transport = new Transport(truncation);
+ var api = new API(this.options, transport, urllib, truncation);
+ if (Telemeter) {
+ this.telemeter = new Telemeter(this.options);
}
- if (lambdaContext) {
- item.lambdaContext = lambdaContext;
+ this.client =
+ client || new Client(this.options, api, logger, this.telemeter, 'browser');
+ var gWindow = _gWindow();
+ var gDocument = typeof document != 'undefined' && document;
+ this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers
+ this.anonymousErrorsPending = 0;
+ addTransformsToNotifier(this.client.notifier, this, gWindow);
+ addPredicatesToQueue(this.client.queue);
+ this.setupUnhandledCapture();
+ if (Instrumenter) {
+ this.instrumenter = new Instrumenter(
+ this.options,
+ this.client.telemeter,
+ this,
+ gWindow,
+ gDocument,
+ );
+ this.instrumenter.instrument();
}
- item._originalArgs = args;
- item.diagnostic.original_arg_types = argTypes;
- return item;
+ _.setupJSON(polyfillJSON);
+
+ // Used with rollbar-react for rollbar-react-native compatibility.
+ this.rollbar = this;
}
-function setCustomItemKeys(item, custom) {
- if (custom && custom.level !== undefined) {
- item.level = custom.level;
- delete custom.level;
- }
- if (custom && custom.skipFrames !== undefined) {
- item.skipFrames = custom.skipFrames;
- delete custom.skipFrames;
+var _instance = null;
+Rollbar.init = function (options, client) {
+ if (_instance) {
+ return _instance.global(options).configure(options);
}
-}
+ _instance = new Rollbar(options, client);
+ return _instance;
+};
-function addErrorContext(item, errors) {
- var custom = item.data.custom || {};
- var contextAdded = false;
+Rollbar.prototype.components = {};
- try {
- for (var i = 0; i < errors.length; ++i) {
- if (errors[i].hasOwnProperty('rollbarContext')) {
- custom = merge(custom, errors[i].rollbarContext);
- contextAdded = true;
- }
- }
+Rollbar.setComponents = function (components) {
+ Rollbar.prototype.components = components;
+};
- // Avoid adding an empty object to the data.
- if (contextAdded) {
- item.data.custom = custom;
- }
- } catch (e) {
- item.diagnostic.error_context = 'Failed: ' + e.message;
+function handleUninitialized(maybeCallback) {
+ var message = 'Rollbar is not initialized';
+ logger.error(message);
+ if (maybeCallback) {
+ maybeCallback(new Error(message));
}
}
-var TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];
-var TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];
+Rollbar.prototype.global = function (options) {
+ this.client.global(options);
+ return this;
+};
+Rollbar.global = function (options) {
+ if (_instance) {
+ return _instance.global(options);
+ } else {
+ handleUninitialized();
+ }
+};
-function arrayIncludes(arr, val) {
- for (var k = 0; k < arr.length; ++k) {
- if (arr[k] === val) {
- return true;
- }
+Rollbar.prototype.configure = function (options, payloadData) {
+ var oldOptions = this.options;
+ var payload = {};
+ if (payloadData) {
+ payload = { payload: payloadData };
+ }
+ this.options = _.handleOptions(oldOptions, options, payload, logger);
+ this.options._configuredOptions = _.handleOptions(
+ oldOptions._configuredOptions,
+ options,
+ payload,
+ );
+ this.client.configure(this.options, payloadData);
+ this.instrumenter && this.instrumenter.configure(this.options);
+ this.setupUnhandledCapture();
+ return this;
+};
+Rollbar.configure = function (options, payloadData) {
+ if (_instance) {
+ return _instance.configure(options, payloadData);
+ } else {
+ handleUninitialized();
}
+};
- return false;
-}
+Rollbar.prototype.lastError = function () {
+ return this.client.lastError;
+};
+Rollbar.lastError = function () {
+ if (_instance) {
+ return _instance.lastError();
+ } else {
+ handleUninitialized();
+ }
+};
-function createTelemetryEvent(args) {
- var type, metadata, level;
- var arg;
+Rollbar.prototype.log = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.log(item);
+ return { uuid: uuid };
+};
+Rollbar.log = function () {
+ if (_instance) {
+ return _instance.log.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
+ }
+};
- for (var i = 0, l = args.length; i < l; ++i) {
- arg = args[i];
+Rollbar.prototype.debug = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.debug(item);
+ return { uuid: uuid };
+};
+Rollbar.debug = function () {
+ if (_instance) {
+ return _instance.debug.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
+ }
+};
- var typ = typeName(arg);
- switch (typ) {
- case 'string':
- if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {
- type = arg;
- } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {
- level = arg;
- }
- break;
- case 'object':
- metadata = arg;
- break;
- default:
- break;
- }
+Rollbar.prototype.info = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.info(item);
+ return { uuid: uuid };
+};
+Rollbar.info = function () {
+ if (_instance) {
+ return _instance.info.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
}
- var event = {
- type: type || 'manual',
- metadata: metadata || {},
- level: level
- };
+};
- return event;
-}
+Rollbar.prototype.warn = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.warn(item);
+ return { uuid: uuid };
+};
+Rollbar.warn = function () {
+ if (_instance) {
+ return _instance.warn.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
+ }
+};
-/*
- * get - given an obj/array and a keypath, return the value at that keypath or
- * undefined if not possible.
- *
- * @param obj - an object or array
- * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'
- * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`
- */
-function get(obj, path) {
- if (!obj) {
- return undefined;
+Rollbar.prototype.warning = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.warning(item);
+ return { uuid: uuid };
+};
+Rollbar.warning = function () {
+ if (_instance) {
+ return _instance.warning.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
}
- var keys = path.split('.');
- var result = obj;
- try {
- for (var i = 0, len = keys.length; i < len; ++i) {
- result = result[keys[i]];
- }
- } catch (e) {
- result = undefined;
+};
+
+Rollbar.prototype.error = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.error(item);
+ return { uuid: uuid };
+};
+Rollbar.error = function () {
+ if (_instance) {
+ return _instance.error.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
}
- return result;
-}
+};
-function set(obj, path, value) {
- if (!obj) {
- return;
+Rollbar.prototype.critical = function () {
+ var item = this._createItem(arguments);
+ var uuid = item.uuid;
+ this.client.critical(item);
+ return { uuid: uuid };
+};
+Rollbar.critical = function () {
+ if (_instance) {
+ return _instance.critical.apply(_instance, arguments);
+ } else {
+ var maybeCallback = _getFirstFunction(arguments);
+ handleUninitialized(maybeCallback);
}
- var keys = path.split('.');
- var len = keys.length;
- if (len < 1) {
- return;
+};
+
+Rollbar.prototype.buildJsonPayload = function (item) {
+ return this.client.buildJsonPayload(item);
+};
+Rollbar.buildJsonPayload = function () {
+ if (_instance) {
+ return _instance.buildJsonPayload.apply(_instance, arguments);
+ } else {
+ handleUninitialized();
}
- if (len === 1) {
- obj[keys[0]] = value;
- return;
+};
+
+Rollbar.prototype.sendJsonPayload = function (jsonPayload) {
+ return this.client.sendJsonPayload(jsonPayload);
+};
+Rollbar.sendJsonPayload = function () {
+ if (_instance) {
+ return _instance.sendJsonPayload.apply(_instance, arguments);
+ } else {
+ handleUninitialized();
+ }
+};
+
+Rollbar.prototype.setupUnhandledCapture = function () {
+ var gWindow = _gWindow();
+
+ if (!this.unhandledExceptionsInitialized) {
+ if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {
+ globals.captureUncaughtExceptions(gWindow, this);
+ if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {
+ this.wrapGlobals(gWindow, this);
+ }
+ this.unhandledExceptionsInitialized = true;
+ }
}
- try {
- var temp = obj[keys[0]] || {};
- var replacement = temp;
- for (var i = 1; i < len - 1; ++i) {
- temp[keys[i]] = temp[keys[i]] || {};
- temp = temp[keys[i]];
+ if (!this.unhandledRejectionsInitialized) {
+ if (
+ this.options.captureUnhandledRejections ||
+ this.options.handleUnhandledRejections
+ ) {
+ globals.captureUnhandledRejections(gWindow, this);
+ this.unhandledRejectionsInitialized = true;
}
- temp[keys[len-1]] = value;
- obj[keys[0]] = replacement;
- } catch (e) {
+ }
+};
+
+Rollbar.prototype.handleUncaughtException = function (
+ message,
+ url,
+ lineno,
+ colno,
+ error,
+ context,
+) {
+ if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {
return;
}
-}
-function formatArgsAsString(args) {
- var i, len, arg;
- var result = [];
- for (i = 0, len = args.length; i < len; ++i) {
- arg = args[i];
- switch (typeName(arg)) {
- case 'object':
- arg = stringify(arg);
- arg = arg.error || arg.value;
- if (arg.length > 500) {
- arg = arg.substr(0, 497) + '...';
- }
- break;
- case 'null':
- arg = 'null';
- break;
- case 'undefined':
- arg = 'undefined';
- break;
- case 'symbol':
- arg = arg.toString();
- break;
- }
- result.push(arg);
+ // Chrome will always send 5+ arguments and error will be valid or null, not undefined.
+ // If error is undefined, we have a different caller.
+ // Chrome also sends errors from web workers with null error, but does not invoke
+ // prepareStackTrace() for these. Test for empty url to skip them.
+ if (
+ this.options.inspectAnonymousErrors &&
+ this.isChrome &&
+ error === null &&
+ url === ''
+ ) {
+ return 'anonymous';
}
- return result.join(' ');
-}
-function now() {
- if (Date.now) {
- return +Date.now();
+ var item;
+ var stackInfo = _.makeUnhandledStackInfo(
+ message,
+ url,
+ lineno,
+ colno,
+ error,
+ 'onerror',
+ 'uncaught exception',
+ errorParser,
+ );
+ if (_.isError(error)) {
+ item = this._createItem([message, error, context]);
+ item._unhandledStackInfo = stackInfo;
+ } else if (_.isError(url)) {
+ item = this._createItem([message, url, context]);
+ item._unhandledStackInfo = stackInfo;
+ } else {
+ item = this._createItem([message, context]);
+ item.stackInfo = stackInfo;
}
- return +new Date();
-}
+ item.level = this.options.uncaughtErrorLevel;
+ item._isUncaught = true;
+ this.client.log(item);
+};
-function filterIp(requestData, captureIp) {
- if (!requestData || !requestData['user_ip'] || captureIp === true) {
+/**
+ * Chrome only. Other browsers will ignore.
+ *
+ * Use Error.prepareStackTrace to extract information about errors that
+ * do not have a valid error object in onerror().
+ *
+ * In tested version of Chrome, onerror is called first but has no way
+ * to communicate with prepareStackTrace. Use a counter to let this
+ * handler know which errors to send to Rollbar.
+ *
+ * In config options, set inspectAnonymousErrors to enable.
+ */
+Rollbar.prototype.handleAnonymousErrors = function () {
+ if (!this.options.inspectAnonymousErrors || !this.isChrome) {
return;
}
- var newIp = requestData['user_ip'];
- if (!captureIp) {
- newIp = null;
- } else {
- try {
- var parts;
- if (newIp.indexOf('.') !== -1) {
- parts = newIp.split('.');
- parts.pop();
- parts.push('0');
- newIp = parts.join('.');
- } else if (newIp.indexOf(':') !== -1) {
- parts = newIp.split(':');
- if (parts.length > 2) {
- var beginning = parts.slice(0, 3);
- var slashIdx = beginning[2].indexOf('/');
- if (slashIdx !== -1) {
- beginning[2] = beginning[2].substring(0, slashIdx);
- }
- var terminal = '0000:0000:0000:0000:0000';
- newIp = beginning.concat(terminal).join(':');
+
+ var r = this;
+ function prepareStackTrace(error, _stack) {
+ // eslint-disable-line no-unused-vars
+ if (r.options.inspectAnonymousErrors) {
+ if (r.anonymousErrorsPending) {
+ // This is the only known way to detect that onerror saw an anonymous error.
+ // It depends on onerror reliably being called before Error.prepareStackTrace,
+ // which so far holds true on tested versions of Chrome. If versions of Chrome
+ // are tested that behave differently, this logic will need to be updated
+ // accordingly.
+ r.anonymousErrorsPending -= 1;
+
+ if (!error) {
+ // Not likely to get here, but calling handleUncaughtException from here
+ // without an error object would throw off the anonymousErrorsPending counter,
+ // so return now.
+ return;
}
- } else {
- newIp = null;
+
+ // Allow this to be tracked later.
+ error._isAnonymous = true;
+
+ // url, lineno, colno shouldn't be needed for these errors.
+ // If that changes, update this accordingly, using the unused
+ // _stack param as needed (rather than parse error.toString()).
+ r.handleUncaughtException(error.message, null, null, null, error);
}
- } catch (e) {
- newIp = null;
}
- }
- requestData['user_ip'] = newIp;
-}
-function handleOptions(current, input, payload, logger) {
- var result = merge(current, input, payload);
- result = updateDeprecatedOptions(result, logger);
- if (!input || input.overwriteScrubFields) {
- return result;
+ // Workaround to ensure stack is preserved for normal errors.
+ return error.stack;
}
- if (input.scrubFields) {
- result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);
+
+ // https://v8.dev/docs/stack-trace-api
+ try {
+ Error.prepareStackTrace = prepareStackTrace;
+ } catch (e) {
+ this.options.inspectAnonymousErrors = false;
+ this.error('anonymous error handler failed', e);
}
- return result;
-}
+};
-function updateDeprecatedOptions(options, logger) {
- if(options.hostWhiteList && !options.hostSafeList) {
- options.hostSafeList = options.hostWhiteList;
- options.hostWhiteList = undefined;
- logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');
+Rollbar.prototype.handleUnhandledRejection = function (reason, promise) {
+ if (
+ !this.options.captureUnhandledRejections &&
+ !this.options.handleUnhandledRejections
+ ) {
+ return;
}
- if(options.hostBlackList && !options.hostBlockList) {
- options.hostBlockList = options.hostBlackList;
- options.hostBlackList = undefined;
- logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');
+
+ var message = 'unhandled rejection was null or undefined!';
+ if (reason) {
+ if (reason.message) {
+ message = reason.message;
+ } else {
+ var reasonResult = _.stringify(reason);
+ if (reasonResult.value) {
+ message = reasonResult.value;
+ }
+ }
}
- return options;
-}
+ var context =
+ (reason && reason._rollbarContext) || (promise && promise._rollbarContext);
-module.exports = {
- addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,
- createItem: createItem,
- addErrorContext: addErrorContext,
- createTelemetryEvent: createTelemetryEvent,
- filterIp: filterIp,
- formatArgsAsString: formatArgsAsString,
- formatUrl: formatUrl,
- get: get,
- handleOptions: handleOptions,
- isError: isError,
- isFiniteNumber: isFiniteNumber,
- isFunction: isFunction,
- isIterable: isIterable,
- isNativeFunction: isNativeFunction,
- isObject: isObject,
- isString: isString,
- isType: isType,
- isPromise: isPromise,
- jsonParse: jsonParse,
- LEVELS: LEVELS,
- makeUnhandledStackInfo: makeUnhandledStackInfo,
- merge: merge,
- now: now,
- redact: redact,
- RollbarJSON: RollbarJSON,
- sanitizeUrl: sanitizeUrl,
- set: set,
- setupJSON: setupJSON,
- stringify: stringify,
- maxByteSize: maxByteSize,
- typeName: typeName,
- uuid4: uuid4
+ var item;
+ if (_.isError(reason)) {
+ item = this._createItem([message, reason, context]);
+ } else {
+ item = this._createItem([message, reason, context]);
+ item.stackInfo = _.makeUnhandledStackInfo(
+ message,
+ '',
+ 0,
+ 0,
+ null,
+ 'unhandledrejection',
+ '',
+ errorParser,
+ );
+ }
+ item.level = this.options.uncaughtErrorLevel;
+ item._isUncaught = true;
+ item._originalArgs = item._originalArgs || [];
+ item._originalArgs.push(promise);
+ this.client.log(item);
};
+Rollbar.prototype.wrap = function (f, context, _before) {
+ try {
+ var ctxFn;
+ if (_.isFunction(context)) {
+ ctxFn = context;
+ } else {
+ ctxFn = function () {
+ return context || {};
+ };
+ }
+
+ if (!_.isFunction(f)) {
+ return f;
+ }
+
+ if (f._isWrap) {
+ return f;
+ }
-/***/ }),
-/* 1 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (!f._rollbar_wrapped) {
+ f._rollbar_wrapped = function () {
+ if (_before && _.isFunction(_before)) {
+ _before.apply(this, arguments);
+ }
+ try {
+ return f.apply(this, arguments);
+ } catch (exc) {
+ var e = exc;
+ if (e && window._rollbarWrappedError !== e) {
+ if (_.isType(e, 'string')) {
+ e = new String(e);
+ }
+ e._rollbarContext = ctxFn() || {};
+ e._rollbarContext._wrappedSource = f.toString();
-"use strict";
+ window._rollbarWrappedError = e;
+ }
+ throw e;
+ }
+ };
+ f._rollbar_wrapped._isWrap = true;
-/* eslint-disable no-console */
-__webpack_require__(17);
-var detection = __webpack_require__(18);
-var _ = __webpack_require__(0);
+ if (f.hasOwnProperty) {
+ for (var prop in f) {
+ if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {
+ f._rollbar_wrapped[prop] = f[prop];
+ }
+ }
+ }
+ }
-function error() {
- var args = Array.prototype.slice.call(arguments, 0);
- args.unshift('Rollbar:');
- if (detection.ieVersion() <= 8) {
- console.error(_.formatArgsAsString(args));
+ return f._rollbar_wrapped;
+ } catch (e) {
+ // Return the original function if the wrap fails.
+ return f;
+ }
+};
+Rollbar.wrap = function (f, context) {
+ if (_instance) {
+ return _instance.wrap(f, context);
} else {
- console.error.apply(console, args);
+ handleUninitialized();
}
-}
+};
-function info() {
- var args = Array.prototype.slice.call(arguments, 0);
- args.unshift('Rollbar:');
- if (detection.ieVersion() <= 8) {
- console.info(_.formatArgsAsString(args));
+Rollbar.prototype.captureEvent = function () {
+ var event = _.createTelemetryEvent(arguments);
+ return this.client.captureEvent(event.type, event.metadata, event.level);
+};
+Rollbar.captureEvent = function () {
+ if (_instance) {
+ return _instance.captureEvent.apply(_instance, arguments);
} else {
- console.info.apply(console, args);
+ handleUninitialized();
}
-}
+};
-function log() {
- var args = Array.prototype.slice.call(arguments, 0);
- args.unshift('Rollbar:');
- if (detection.ieVersion() <= 8) {
- console.log(_.formatArgsAsString(args));
- } else {
- console.log.apply(console, args);
+// The following two methods are used internally and are not meant for public use
+Rollbar.prototype.captureDomContentLoaded = function (e, ts) {
+ if (!ts) {
+ ts = new Date();
+ }
+ return this.client.captureDomContentLoaded(ts);
+};
+
+Rollbar.prototype.captureLoad = function (e, ts) {
+ if (!ts) {
+ ts = new Date();
}
+ return this.client.captureLoad(ts);
+};
+
+/* Internal */
+
+function addTransformsToNotifier(notifier, rollbar, gWindow) {
+ notifier
+ .addTransform(transforms.handleDomException)
+ .addTransform(transforms.handleItemWithError)
+ .addTransform(transforms.ensureItemHasSomethingToSay)
+ .addTransform(transforms.addBaseInfo)
+ .addTransform(transforms.addRequestInfo(gWindow))
+ .addTransform(transforms.addClientInfo(gWindow))
+ .addTransform(transforms.addPluginInfo(gWindow))
+ .addTransform(transforms.addBody)
+ .addTransform(sharedTransforms.addMessageWithError)
+ .addTransform(sharedTransforms.addTelemetryData)
+ .addTransform(sharedTransforms.addConfigToPayload)
+ .addTransform(transforms.addScrubber(rollbar.scrub))
+ .addTransform(sharedTransforms.addPayloadOptions)
+ .addTransform(sharedTransforms.userTransform(logger))
+ .addTransform(sharedTransforms.addConfiguredOptions)
+ .addTransform(sharedTransforms.addDiagnosticKeys)
+ .addTransform(sharedTransforms.itemToPayload);
}
-/* eslint-enable no-console */
+function addPredicatesToQueue(queue) {
+ queue
+ .addPredicate(sharedPredicates.checkLevel)
+ .addPredicate(predicates.checkIgnore)
+ .addPredicate(sharedPredicates.userCheckIgnore(logger))
+ .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))
+ .addPredicate(sharedPredicates.urlIsSafeListed(logger))
+ .addPredicate(sharedPredicates.messageIsIgnored(logger));
+}
-module.exports = {
- error: error,
- info: info,
- log: log
+Rollbar.prototype.loadFull = function () {
+ logger.info(
+ 'Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.',
+ );
};
+Rollbar.prototype._createItem = function (args) {
+ return _.createItem(args, logger, this);
+};
-/***/ }),
-/* 2 */
-/***/ (function(module, exports, __webpack_require__) {
+function _getFirstFunction(args) {
+ for (var i = 0, len = args.length; i < len; ++i) {
+ if (_.isFunction(args[i])) {
+ return args[i];
+ }
+ }
+ return undefined;
+}
-"use strict";
+function _gWindow() {
+ return (
+ (typeof window != 'undefined' && window) ||
+ (typeof self != 'undefined' && self)
+ );
+}
+var defaults = __webpack_require__(948);
+var scrubFields = __webpack_require__(677);
-// See https://nodejs.org/docs/latest/api/url.html
-function parse(url) {
- var result = {
- protocol: null, auth: null, host: null, path: null,
- hash: null, href: url, hostname: null, port: null,
- pathname: null, search: null, query: null
- };
+var defaultOptions = {
+ version: defaults.version,
+ scrubFields: scrubFields.scrubFields,
+ logLevel: defaults.logLevel,
+ reportLevel: defaults.reportLevel,
+ uncaughtErrorLevel: defaults.uncaughtErrorLevel,
+ endpoint: defaults.endpoint,
+ verbose: false,
+ enabled: true,
+ transmit: true,
+ sendConfig: false,
+ includeItemsInTelemetry: true,
+ captureIp: true,
+ inspectAnonymousErrors: true,
+ ignoreDuplicateErrors: true,
+ wrapGlobalEventHandlers: false,
+};
- var i, last;
- i = url.indexOf('//');
- if (i !== -1) {
- result.protocol = url.substring(0,i);
- last = i+2;
- } else {
- last = 0;
- }
-
- i = url.indexOf('@', last);
- if (i !== -1) {
- result.auth = url.substring(last, i);
- last = i+1;
- }
+module.exports = Rollbar;
- i = url.indexOf('/', last);
- if (i === -1) {
- i = url.indexOf('?', last);
- if (i === -1) {
- i = url.indexOf('#', last);
- if (i === -1) {
- result.host = url.substring(last);
- } else {
- result.host = url.substring(last, i);
- result.hash = url.substring(i);
- }
- result.hostname = result.host.split(':')[0];
- result.port = result.host.split(':')[1];
- if (result.port) {
- result.port = parseInt(result.port, 10);
- }
- return result;
- } else {
- result.host = url.substring(last, i);
- result.hostname = result.host.split(':')[0];
- result.port = result.host.split(':')[1];
- if (result.port) {
- result.port = parseInt(result.port, 10);
- }
- last = i;
- }
- } else {
- result.host = url.substring(last, i);
- result.hostname = result.host.split(':')[0];
- result.port = result.host.split(':')[1];
- if (result.port) {
- result.port = parseInt(result.port, 10);
- }
- last = i;
- }
- i = url.indexOf('#', last);
- if (i === -1) {
- result.path = url.substring(last);
- } else {
- result.path = url.substring(last, i);
- result.hash = url.substring(i);
- }
+/***/ }),
+
+/***/ 677:
+/***/ ((module) => {
+
+"use strict";
- if (result.path) {
- var pathParts = result.path.split('?');
- result.pathname = pathParts[0];
- result.query = pathParts[1];
- result.search = result.query ? '?' + result.query : null;
- }
- return result;
-}
module.exports = {
- parse: parse
+ scrubFields: [
+ 'pw',
+ 'pass',
+ 'passwd',
+ 'password',
+ 'secret',
+ 'confirm_password',
+ 'confirmPassword',
+ 'password_confirmation',
+ 'passwordConfirmation',
+ 'access_token',
+ 'accessToken',
+ 'X-Rollbar-Access-Token',
+ 'secret_key',
+ 'secretKey',
+ 'secretToken',
+ 'cc-number',
+ 'card number',
+ 'cardnumber',
+ 'cardnum',
+ 'ccnum',
+ 'ccnumber',
+ 'cc num',
+ 'creditcardnumber',
+ 'credit card number',
+ 'newcreditcardnumber',
+ 'new credit card',
+ 'creditcardno',
+ 'credit card no',
+ 'card#',
+ 'card #',
+ 'cc-csc',
+ 'cvc',
+ 'cvc2',
+ 'cvv2',
+ 'ccv2',
+ 'security code',
+ 'card verification',
+ 'name on credit card',
+ 'name on card',
+ 'nameoncard',
+ 'cardholder',
+ 'card holder',
+ 'name des karteninhabers',
+ 'ccname',
+ 'card type',
+ 'cardtype',
+ 'cc type',
+ 'cctype',
+ 'payment type',
+ 'expiration date',
+ 'expirationdate',
+ 'expdate',
+ 'cc-exp',
+ 'ccmonth',
+ 'ccyear',
+ ],
};
/***/ }),
-/* 3 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var ErrorStackParser = __webpack_require__(22);
-
-var UNKNOWN_FUNCTION = '?';
-var ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');
-
-function guessFunctionName() {
- return UNKNOWN_FUNCTION;
-}
+/***/ 616:
+/***/ ((module) => {
-function gatherContext() {
- return null;
-}
+"use strict";
-function Frame(stackFrame) {
- var data = {};
+// This detection.js module is used to encapsulate any ugly browser/feature
+// detection we may need to do.
- data._stackFrame = stackFrame;
+// Figure out which version of IE we're using, if any.
+// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library
+// Will return an integer on IE (i.e. 8)
+// Will return undefined otherwise
+function getIEVersion() {
+ var undef;
+ if (typeof document === 'undefined') {
+ return undef;
+ }
- data.url = stackFrame.fileName;
- data.line = stackFrame.lineNumber;
- data.func = stackFrame.functionName;
- data.column = stackFrame.columnNumber;
- data.args = stackFrame.args;
+ var v = 3,
+ div = document.createElement('div'),
+ all = div.getElementsByTagName('i');
- data.context = gatherContext();
+ while (
+ ((div.innerHTML = ''), all[0])
+ );
- return data;
+ return v > 4 ? v : undef;
}
+var Detection = {
+ ieVersion: getIEVersion,
+};
-function Stack(exception, skip) {
- function getStack() {
- var parserStack = [];
+module.exports = Detection;
- skip = skip || 0;
- try {
- parserStack = ErrorStackParser.parse(exception);
- } catch(e) {
- parserStack = [];
- }
+/***/ }),
- var stack = [];
+/***/ 300:
+/***/ ((module) => {
- for (var i = skip; i < parserStack.length; i++) {
- stack.push(new Frame(parserStack[i]));
- }
+"use strict";
- return stack;
- }
- return {
- stack: getStack(),
- message: exception.message,
- name: _mostSpecificErrorName(exception),
- rawStack: exception.stack,
- rawException: exception
- };
+function getElementType(e) {
+ return (e.getAttribute('type') || '').toLowerCase();
}
-
-function parse(e, skip) {
- var err = e;
-
- if (err.nested) {
- var traceChain = [];
- while (err) {
- traceChain.push(new Stack(err, skip));
- err = err.nested;
-
- skip = 0; // Only apply skip value to primary error
+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 primary error with full trace chain attached.
- traceChain[0].traceChain = traceChain;
- return traceChain[0];
- } else {
- return new Stack(err, skip);
}
+ return false;
}
-
-function guessErrorClass(errMsg) {
- if (!errMsg || !errMsg.match) {
- return ['Unknown error. There was no error message to display.', ''];
+function getElementFromEvent(evt, doc) {
+ if (evt.target) {
+ return evt.target;
}
- var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);
- var errClass = '(unknown)';
-
- if (errClassMatch) {
- errClass = errClassMatch[errClassMatch.length - 1];
- errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');
- errMsg = errMsg.replace(/(^[\s]+|[\s]+$)/g, '');
+ if (doc && doc.elementFromPoint) {
+ return doc.elementFromPoint(evt.clientX, evt.clientY);
}
- return [errClass, errMsg];
+ return undefined;
}
-// * Prefers any value over an empty string
-// * Prefers any value over 'Error' where possible
-// * Prefers name over constructor.name when both are more specific than 'Error'
-function _mostSpecificErrorName(error) {
- var name = error.name && error.name.length && error.name;
- var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;
-
- if (!name || !constructorName) {
- return name || constructorName;
- }
-
- if (name === 'Error') {
- return constructorName;
+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 name;
+ return out;
}
-module.exports = {
- guessFunctionName: guessFunctionName,
- guessErrorClass: guessErrorClass,
- gatherContext: gatherContext,
- parse: parse,
- Stack: Stack,
- Frame: Frame
-};
-
-
-/***/ }),
-/* 4 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var _ = __webpack_require__(0);
-var traverse = __webpack_require__(5);
-
-function scrub(data, scrubFields, scrubPaths) {
- scrubFields = scrubFields || [];
+function elementArrayToString(a) {
+ var MAX_LENGTH = 80;
+ var separator = ' > ',
+ separatorLength = separator.length;
+ var out = [],
+ len = 0,
+ nextStr,
+ totalLength;
- if (scrubPaths) {
- for (var i = 0; i < scrubPaths.length; ++i) {
- scrubPath(data, scrubPaths[i]);
+ 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);
+}
- var paramRes = _getScrubFieldRegexs(scrubFields);
- var queryRes = _getScrubQueryParamRegexs(scrubFields);
-
- function redactQueryParam(dummy0, paramPart) {
- return paramPart + _.redact();
+function descriptionToString(desc) {
+ if (!desc || !desc.tagName) {
+ return '';
}
-
- function paramScrubber(v) {
- var i;
- if (_.isType(v, 'string')) {
- for (i = 0; i < queryRes.length; ++i) {
- v = v.replace(queryRes[i], redactQueryParam);
- }
- }
- return v;
+ var out = [desc.tagName];
+ if (desc.id) {
+ out.push('#' + desc.id);
}
-
- function valScrubber(k, v) {
- var i;
- for (i = 0; i < paramRes.length; ++i) {
- if (paramRes[i].test(k)) {
- v = _.redact();
- break;
- }
- }
- return v;
+ if (desc.classes) {
+ out.push('.' + desc.classes.join('.'));
}
-
- function scrubber(k, v, seen) {
- var tmpV = valScrubber(k, v);
- if (tmpV === v) {
- if (_.isType(v, 'object') || _.isType(v, 'array')) {
- return traverse(v, scrubber, seen);
- }
- return paramScrubber(tmpV);
- } else {
- return tmpV;
- }
+ for (var i = 0; i < desc.attributes.length; i++) {
+ out.push(
+ '[' + desc.attributes[i].key + '="' + desc.attributes[i].value + '"]',
+ );
}
- return traverse(data, scrubber);
+ return out.join('');
}
-function scrubPath(obj, path) {
- var keys = path.split('.');
- var last = keys.length - 1;
- try {
- for (var i = 0; i <= last; ++i) {
- if (i < last) {
- obj = obj[keys[i]];
- } else {
- obj[keys[i]] = _.redact();
- }
- }
- } catch (e) {
- // Missing key is OK;
+/**
+ * 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;
}
-}
-
-function _getScrubFieldRegexs(scrubFields) {
- var ret = [];
- var pat;
- for (var i = 0; i < scrubFields.length; ++i) {
- pat = '^\\[?(%5[bB])?' + scrubFields[i] + '\\[?(%5[bB])?\\]?(%5[dD])?$';
- ret.push(new RegExp(pat, 'i'));
+ var out = {},
+ className,
+ key,
+ attr,
+ i;
+ out.tagName = elem.tagName.toLowerCase();
+ if (elem.id) {
+ out.id = elem.id;
}
- return ret;
-}
-
-
-function _getScrubQueryParamRegexs(scrubFields) {
- var ret = [];
- var pat;
- for (var i = 0; i < scrubFields.length; ++i) {
- pat = '\\[?(%5[bB])?' + scrubFields[i] + '\\[?(%5[bB])?\\]?(%5[dD])?';
- ret.push(new RegExp('(' + pat + '=)([^&\\n]+)', 'igm'));
+ className = elem.className;
+ if (className && typeof className === 'string') {
+ out.classes = className.split(/\s+/);
}
- return ret;
+ 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 = scrub;
+module.exports = {
+ describeElement: describeElement,
+ descriptionToString: descriptionToString,
+ elementArrayToString: elementArrayToString,
+ treeToArray: treeToArray,
+ getElementFromEvent: getElementFromEvent,
+ isDescribedElement: isDescribedElement,
+ getElementType: getElementType,
+};
/***/ }),
-/* 5 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
+/***/ 349:
+/***/ ((module) => {
-var _ = __webpack_require__(0);
-
-function traverse(obj, func, seen) {
- var k, v, i;
- var isObj = _.isType(obj, 'object');
- var isArray = _.isType(obj, 'array');
- var keys = [];
- var seenIndex;
+"use strict";
- // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.
- seen = seen || { obj: [], mapped: []};
- if (isObj) {
- seenIndex = seen.obj.indexOf(obj);
+function captureUncaughtExceptions(window, handler, shim) {
+ if (!window) {
+ return;
+ }
+ var oldOnError;
- if (isObj && seenIndex !== -1) {
- // Prefer the mapped object if there is one.
- return seen.mapped[seenIndex] || seen.obj[seenIndex];
+ if (typeof handler._rollbarOldOnError === 'function') {
+ oldOnError = handler._rollbarOldOnError;
+ } else if (window.onerror) {
+ oldOnError = window.onerror;
+ while (oldOnError._rollbarOldOnError) {
+ oldOnError = oldOnError._rollbarOldOnError;
}
+ handler._rollbarOldOnError = oldOnError;
+ }
- seen.obj.push(obj);
- seenIndex = seen.obj.length - 1;
+ handler.handleAnonymousErrors();
+
+ var fn = function () {
+ var args = Array.prototype.slice.call(arguments, 0);
+ _rollbarWindowOnError(window, handler, oldOnError, args);
+ };
+ if (shim) {
+ fn._rollbarOldOnError = oldOnError;
}
+ window.onerror = fn;
+}
- if (isObj) {
- for (k in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, k)) {
- keys.push(k);
- }
+function _rollbarWindowOnError(window, r, old, args) {
+ if (window._rollbarWrappedError) {
+ if (!args[4]) {
+ args[4] = window._rollbarWrappedError;
}
- } else if (isArray) {
- for (i = 0; i < obj.length; ++i) {
- keys.push(i);
+ if (!args[5]) {
+ args[5] = window._rollbarWrappedError._rollbarContext;
}
+ window._rollbarWrappedError = null;
}
- var result = isObj ? {} : [];
- var same = true;
- for (i = 0; i < keys.length; ++i) {
- k = keys[i];
- v = obj[k];
- result[k] = func(k, v, seen);
- same = same && result[k] === obj[k];
- }
+ var ret = r.handleUncaughtException.apply(r, args);
- if (isObj && !same) {
- seen.mapped[seenIndex] = result;
+ if (old) {
+ old.apply(window, args);
}
- return !same ? result : obj;
+ // Let other chained onerror handlers above run before setting this.
+ // If an error is thrown and caught within a chained onerror handler,
+ // Error.prepareStackTrace() will see that one before the one we want.
+ if (ret === 'anonymous') {
+ r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()
+ }
}
-module.exports = traverse;
-
-
-/***/ }),
-/* 6 */
-/***/ (function(module, exports, __webpack_require__) {
-
-module.exports = __webpack_require__(7);
-
-
-/***/ }),
-/* 7 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var rollbar = __webpack_require__(8);
+function captureUnhandledRejections(window, handler, shim) {
+ if (!window) {
+ return;
+ }
-var options = (typeof window !== 'undefined') && window._rollbarConfig;
-var alias = options && options.globalAlias || 'Rollbar';
-var shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;
+ if (
+ typeof window._rollbarURH === 'function' &&
+ window._rollbarURH.belongsToShim
+ ) {
+ window.removeEventListener('unhandledrejection', window._rollbarURH);
+ }
-if ((typeof window !== 'undefined') && !window._rollbarStartTime) {
- window._rollbarStartTime = (new Date()).getTime();
-}
+ var rejectionHandler = function (evt) {
+ var reason, promise, detail;
+ try {
+ reason = evt.reason;
+ } catch (e) {
+ reason = undefined;
+ }
+ try {
+ promise = evt.promise;
+ } catch (e) {
+ promise = '[unhandledrejection] error getting `promise` from event';
+ }
+ try {
+ detail = evt.detail;
+ if (!reason && detail) {
+ reason = detail.reason;
+ promise = detail.promise;
+ }
+ } catch (e) {
+ // Ignore
+ }
+ if (!reason) {
+ reason = '[unhandledrejection] error getting `reason` from event';
+ }
-if (!shimRunning && options) {
- var Rollbar = new rollbar(options);
- window[alias] = Rollbar;
-} else if (typeof window !== 'undefined') {
- window.rollbar = rollbar;
- window._rollbarDidLoad = true;
-} else if (typeof self !== 'undefined') {
- self.rollbar = rollbar;
- self._rollbarDidLoad = true;
+ if (handler && handler.handleUnhandledRejection) {
+ handler.handleUnhandledRejection(reason, promise);
+ }
+ };
+ rejectionHandler.belongsToShim = shim;
+ window._rollbarURH = rejectionHandler;
+ window.addEventListener('unhandledrejection', rejectionHandler);
}
-module.exports = rollbar;
+module.exports = {
+ captureUncaughtExceptions: captureUncaughtExceptions,
+ captureUnhandledRejections: captureUnhandledRejections,
+};
/***/ }),
-/* 8 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var Rollbar = __webpack_require__(9);
-var telemeter = __webpack_require__(29);
-var instrumenter = __webpack_require__(30);
-var polyfillJSON = __webpack_require__(32);
-var wrapGlobals = __webpack_require__(34);
-var scrub = __webpack_require__(4);
-var truncation = __webpack_require__(35);
-
-Rollbar.setComponents({
- telemeter: telemeter,
- instrumenter: instrumenter,
- polyfillJSON: polyfillJSON,
- wrapGlobals: wrapGlobals,
- scrub: scrub,
- truncation: truncation
-});
-
-module.exports = Rollbar;
-
-/***/ }),
-/* 9 */
-/***/ (function(module, exports, __webpack_require__) {
+/***/ 802:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var Client = __webpack_require__(10);
-var _ = __webpack_require__(0);
-var API = __webpack_require__(15);
-var logger = __webpack_require__(1);
-var globals = __webpack_require__(19);
-
-var Transport = __webpack_require__(20);
-var urllib = __webpack_require__(2);
-
-var transforms = __webpack_require__(21);
-var sharedTransforms = __webpack_require__(24);
-var predicates = __webpack_require__(25);
-var sharedPredicates = __webpack_require__(26);
-var errorParser = __webpack_require__(3);
+/* eslint-disable no-console */
+__webpack_require__(276);
+var detection = __webpack_require__(616);
+var _ = __webpack_require__(702);
-function Rollbar(options, client) {
- this.options = _.handleOptions(defaultOptions, options, null, logger);
- this.options._configuredOptions = options;
- var Telemeter = this.components.telemeter;
- var Instrumenter = this.components.instrumenter;
- var polyfillJSON = this.components.polyfillJSON;
- this.wrapGlobals = this.components.wrapGlobals;
- this.scrub = this.components.scrub;
- var truncation = this.components.truncation;
+function error() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ args.unshift('Rollbar:');
+ if (detection.ieVersion() <= 8) {
+ console.error(_.formatArgsAsString(args));
+ } else {
+ console.error.apply(console, args);
+ }
+}
- var transport = new Transport(truncation);
- var api = new API(this.options, transport, urllib, truncation);
- if (Telemeter) {
- this.telemeter = new Telemeter(this.options);
+function info() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ args.unshift('Rollbar:');
+ if (detection.ieVersion() <= 8) {
+ console.info(_.formatArgsAsString(args));
+ } else {
+ console.info.apply(console, args);
}
- this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');
- var gWindow = _gWindow();
- var gDocument = (typeof document != 'undefined') && document;
- this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers
- this.anonymousErrorsPending = 0;
- addTransformsToNotifier(this.client.notifier, this, gWindow);
- addPredicatesToQueue(this.client.queue);
- this.setupUnhandledCapture();
- if (Instrumenter) {
- this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);
- this.instrumenter.instrument();
+}
+
+function log() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ args.unshift('Rollbar:');
+ if (detection.ieVersion() <= 8) {
+ console.log(_.formatArgsAsString(args));
+ } else {
+ console.log.apply(console, args);
}
- _.setupJSON(polyfillJSON);
}
-var _instance = null;
-Rollbar.init = function(options, client) {
- if (_instance) {
- return _instance.global(options).configure(options);
- }
- _instance = new Rollbar(options, client);
- return _instance;
+/* eslint-enable no-console */
+
+module.exports = {
+ error: error,
+ info: info,
+ log: log,
};
-Rollbar.prototype.components = {};
-Rollbar.setComponents = function(components) {
- Rollbar.prototype.components = components;
-}
+/***/ }),
-function handleUninitialized(maybeCallback) {
- var message = 'Rollbar is not initialized';
- logger.error(message);
- if (maybeCallback) {
- maybeCallback(new Error(message));
+/***/ 172:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+var _ = __webpack_require__(702);
+
+function checkIgnore(item, settings) {
+ if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {
+ return !_.get(item, 'body.message.extra.isAjax');
}
+ return true;
}
-Rollbar.prototype.global = function(options) {
- this.client.global(options);
- return this;
-};
-Rollbar.global = function(options) {
- if (_instance) {
- return _instance.global(options);
- } else {
- handleUninitialized();
- }
+module.exports = {
+ checkIgnore: checkIgnore,
};
-Rollbar.prototype.configure = function(options, payloadData) {
- var oldOptions = this.options;
- var payload = {};
- if (payloadData) {
- payload = {payload: payloadData};
- }
- this.options = _.handleOptions(oldOptions, options, payload, logger);
- this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);
- this.client.configure(this.options, payloadData);
- this.instrumenter && this.instrumenter.configure(this.options);
- this.setupUnhandledCapture();
- return this;
-};
-Rollbar.configure = function(options, payloadData) {
- if (_instance) {
- return _instance.configure(options, payloadData);
- } else {
- handleUninitialized();
- }
-};
-Rollbar.prototype.lastError = function() {
- return this.client.lastError;
-};
-Rollbar.lastError = function() {
- if (_instance) {
- return _instance.lastError();
- } else {
- handleUninitialized();
- }
-};
+/***/ }),
-Rollbar.prototype.log = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.log(item);
- return {uuid: uuid};
-};
-Rollbar.log = function() {
- if (_instance) {
- return _instance.log.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
- }
-};
+/***/ 343:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-Rollbar.prototype.debug = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.debug(item);
- return {uuid: uuid};
-};
-Rollbar.debug = function() {
- if (_instance) {
- return _instance.debug.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
- }
-};
+"use strict";
-Rollbar.prototype.info = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.info(item);
- return {uuid: uuid};
-};
-Rollbar.info = function() {
- if (_instance) {
- return _instance.info.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
- }
-};
-Rollbar.prototype.warn = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.warn(item);
- return {uuid: uuid};
-};
-Rollbar.warn = function() {
- if (_instance) {
- return _instance.warn.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
- }
-};
+var Rollbar = __webpack_require__(403);
+var telemeter = __webpack_require__(773);
+var instrumenter = __webpack_require__(568);
+var polyfillJSON = __webpack_require__(876);
+var wrapGlobals = __webpack_require__(965);
+var scrub = __webpack_require__(369);
+var truncation = __webpack_require__(473);
-Rollbar.prototype.warning = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.warning(item);
- return {uuid: uuid};
-};
-Rollbar.warning = function() {
- if (_instance) {
- return _instance.warning.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
- }
-};
+Rollbar.setComponents({
+ telemeter: telemeter,
+ instrumenter: instrumenter,
+ polyfillJSON: polyfillJSON,
+ wrapGlobals: wrapGlobals,
+ scrub: scrub,
+ truncation: truncation,
+});
-Rollbar.prototype.error = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.error(item);
- return {uuid: uuid};
+module.exports = Rollbar;
+
+
+/***/ }),
+
+/***/ 568:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+var _ = __webpack_require__(702);
+var headers = __webpack_require__(650);
+var replace = __webpack_require__(297);
+var scrub = __webpack_require__(369);
+var urlparser = __webpack_require__(509);
+var domUtil = __webpack_require__(300);
+
+var defaults = {
+ network: true,
+ networkResponseHeaders: false,
+ networkResponseBody: false,
+ networkRequestHeaders: false,
+ networkRequestBody: false,
+ networkErrorOnHttp5xx: false,
+ networkErrorOnHttp4xx: false,
+ networkErrorOnHttp0: false,
+ log: true,
+ dom: true,
+ navigation: true,
+ connectivity: true,
+ contentSecurityPolicy: true,
+ errorOnContentSecurityPolicy: false,
};
-Rollbar.error = function() {
- if (_instance) {
- return _instance.error.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
+
+function restore(replacements, type) {
+ var b;
+ while (replacements[type].length) {
+ b = replacements[type].shift();
+ b[0][b[1]] = b[2];
}
-};
+}
-Rollbar.prototype.critical = function() {
- var item = this._createItem(arguments);
- var uuid = item.uuid;
- this.client.critical(item);
- return {uuid: uuid};
-};
-Rollbar.critical = function() {
- if (_instance) {
- return _instance.critical.apply(_instance, arguments);
- } else {
- var maybeCallback = _getFirstFunction(arguments);
- handleUninitialized(maybeCallback);
+function nameFromDescription(description) {
+ if (!description || !description.attributes) {
+ return null;
}
-};
+ var attrs = description.attributes;
+ for (var a = 0; a < attrs.length; ++a) {
+ if (attrs[a].key === 'name') {
+ return attrs[a].value;
+ }
+ }
+ return null;
+}
-Rollbar.prototype.buildJsonPayload = function(item) {
- return this.client.buildJsonPayload(item);
-};
-Rollbar.buildJsonPayload = function() {
- if (_instance) {
- return _instance.buildJsonPayload.apply(_instance, arguments);
- } else {
- handleUninitialized();
+function defaultValueScrubber(scrubFields) {
+ var patterns = [];
+ for (var i = 0; i < scrubFields.length; ++i) {
+ patterns.push(new RegExp(scrubFields[i], 'i'));
}
-};
+ return function (description) {
+ var name = nameFromDescription(description);
+ if (!name) {
+ return false;
+ }
+ for (var i = 0; i < patterns.length; ++i) {
+ if (patterns[i].test(name)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
-Rollbar.prototype.sendJsonPayload = function(jsonPayload) {
- return this.client.sendJsonPayload(jsonPayload);
-};
-Rollbar.sendJsonPayload = function() {
- if (_instance) {
- return _instance.sendJsonPayload.apply(_instance, arguments);
+function Instrumenter(options, telemeter, rollbar, _window, _document) {
+ this.options = options;
+ var autoInstrument = options.autoInstrument;
+ if (options.enabled === false || autoInstrument === false) {
+ this.autoInstrument = {};
} else {
- handleUninitialized();
+ if (!_.isType(autoInstrument, 'object')) {
+ autoInstrument = defaults;
+ }
+ this.autoInstrument = _.merge(defaults, autoInstrument);
}
-};
-
-Rollbar.prototype.setupUnhandledCapture = function() {
- var gWindow = _gWindow();
-
- if (!this.unhandledExceptionsInitialized) {
- if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {
- globals.captureUncaughtExceptions(gWindow, this);
- if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {
- this.wrapGlobals(gWindow, this);
- }
- this.unhandledExceptionsInitialized = true;
+ this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;
+ this.telemetryScrubber = options.telemetryScrubber;
+ this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);
+ this.telemeter = telemeter;
+ this.rollbar = rollbar;
+ this.diagnostic = rollbar.client.notifier.diagnostic;
+ this._window = _window || {};
+ this._document = _document || {};
+ this.replacements = {
+ network: [],
+ log: [],
+ navigation: [],
+ connectivity: [],
+ };
+ this.eventRemovers = {
+ dom: [],
+ connectivity: [],
+ contentsecuritypolicy: [],
+ };
+
+ this._location = this._window.location;
+ this._lastHref = this._location && this._location.href;
+}
+
+Instrumenter.prototype.configure = function (options) {
+ this.options = _.merge(this.options, options);
+ var autoInstrument = options.autoInstrument;
+ var oldSettings = _.merge(this.autoInstrument);
+ if (options.enabled === false || autoInstrument === false) {
+ this.autoInstrument = {};
+ } else {
+ if (!_.isType(autoInstrument, 'object')) {
+ autoInstrument = defaults;
}
+ this.autoInstrument = _.merge(defaults, autoInstrument);
}
- if (!this.unhandledRejectionsInitialized) {
- if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {
- globals.captureUnhandledRejections(gWindow, this);
- this.unhandledRejectionsInitialized = true;
- }
+ this.instrument(oldSettings);
+ if (options.scrubTelemetryInputs !== undefined) {
+ this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;
+ }
+ if (options.telemetryScrubber !== undefined) {
+ this.telemetryScrubber = options.telemetryScrubber;
}
};
-Rollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {
- if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {
- return;
+// eslint-disable-next-line complexity
+Instrumenter.prototype.instrument = function (oldSettings) {
+ if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {
+ this.instrumentNetwork();
+ } else if (
+ !this.autoInstrument.network &&
+ oldSettings &&
+ oldSettings.network
+ ) {
+ this.deinstrumentNetwork();
}
- // Chrome will always send 5+ arguments and error will be valid or null, not undefined.
- // If error is undefined, we have a different caller.
- // Chrome also sends errors from web workers with null error, but does not invoke
- // prepareStackTrace() for these. Test for empty url to skip them.
- if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {
- return 'anonymous';
+ if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {
+ this.instrumentConsole();
+ } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {
+ this.deinstrumentConsole();
}
- var item;
- var stackInfo = _.makeUnhandledStackInfo(
- message,
- url,
- lineno,
- colno,
- error,
- 'onerror',
- 'uncaught exception',
- errorParser
- );
- if (_.isError(error)) {
- item = this._createItem([message, error, context]);
- item._unhandledStackInfo = stackInfo;
- } else if (_.isError(url)) {
- item = this._createItem([message, url, context]);
- item._unhandledStackInfo = stackInfo;
- } else {
- item = this._createItem([message, context]);
- item.stackInfo = stackInfo;
+ if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {
+ this.instrumentDom();
+ } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {
+ this.deinstrumentDom();
}
- item.level = this.options.uncaughtErrorLevel;
- item._isUncaught = true;
- this.client.log(item);
-};
-/**
- * Chrome only. Other browsers will ignore.
- *
- * Use Error.prepareStackTrace to extract information about errors that
- * do not have a valid error object in onerror().
- *
- * In tested version of Chrome, onerror is called first but has no way
- * to communicate with prepareStackTrace. Use a counter to let this
- * handler know which errors to send to Rollbar.
- *
- * In config options, set inspectAnonymousErrors to enable.
- */
-Rollbar.prototype.handleAnonymousErrors = function() {
- if (!this.options.inspectAnonymousErrors || !this.isChrome) {
- return;
+ if (
+ this.autoInstrument.navigation &&
+ !(oldSettings && oldSettings.navigation)
+ ) {
+ this.instrumentNavigation();
+ } else if (
+ !this.autoInstrument.navigation &&
+ oldSettings &&
+ oldSettings.navigation
+ ) {
+ this.deinstrumentNavigation();
}
- var r = this;
- function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars
- if (r.options.inspectAnonymousErrors) {
- if (r.anonymousErrorsPending) {
- // This is the only known way to detect that onerror saw an anonymous error.
- // It depends on onerror reliably being called before Error.prepareStackTrace,
- // which so far holds true on tested versions of Chrome. If versions of Chrome
- // are tested that behave differently, this logic will need to be updated
- // accordingly.
- r.anonymousErrorsPending -= 1;
-
- if (!error) {
- // Not likely to get here, but calling handleUncaughtException from here
- // without an error object would throw off the anonymousErrorsPending counter,
- // so return now.
- return;
- }
-
- // Allow this to be tracked later.
- error._isAnonymous = true;
-
- // url, lineno, colno shouldn't be needed for these errors.
- // If that changes, update this accordingly, using the unused
- // _stack param as needed (rather than parse error.toString()).
- r.handleUncaughtException(error.message, null, null, null, error);
- }
- }
-
- // Workaround to ensure stack is preserved for normal errors.
- return error.stack;
+ if (
+ this.autoInstrument.connectivity &&
+ !(oldSettings && oldSettings.connectivity)
+ ) {
+ this.instrumentConnectivity();
+ } else if (
+ !this.autoInstrument.connectivity &&
+ oldSettings &&
+ oldSettings.connectivity
+ ) {
+ this.deinstrumentConnectivity();
}
- // https://v8.dev/docs/stack-trace-api
- try {
- Error.prepareStackTrace = prepareStackTrace;
- } catch (e) {
- this.options.inspectAnonymousErrors = false;
- this.error('anonymous error handler failed', e);
+ if (
+ this.autoInstrument.contentSecurityPolicy &&
+ !(oldSettings && oldSettings.contentSecurityPolicy)
+ ) {
+ this.instrumentContentSecurityPolicy();
+ } else if (
+ !this.autoInstrument.contentSecurityPolicy &&
+ oldSettings &&
+ oldSettings.contentSecurityPolicy
+ ) {
+ this.deinstrumentContentSecurityPolicy();
}
-}
+};
-Rollbar.prototype.handleUnhandledRejection = function(reason, promise) {
- if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {
- return;
- }
+Instrumenter.prototype.deinstrumentNetwork = function () {
+ restore(this.replacements, 'network');
+};
- var message = 'unhandled rejection was null or undefined!';
- if (reason) {
- if (reason.message) {
- message = reason.message;
- } else {
- var reasonResult = _.stringify(reason);
- if (reasonResult.value) {
- message = reasonResult.value;
- }
+Instrumenter.prototype.instrumentNetwork = function () {
+ var self = this;
+
+ function wrapProp(prop, xhr) {
+ if (prop in xhr && _.isFunction(xhr[prop])) {
+ replace(xhr, prop, function (orig) {
+ return self.rollbar.wrap(orig);
+ });
}
}
- var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);
- var item;
- if (_.isError(reason)) {
- item = this._createItem([message, reason, context]);
- } else {
- item = this._createItem([message, reason, context]);
- item.stackInfo = _.makeUnhandledStackInfo(
- message,
- '',
- 0,
- 0,
- null,
- 'unhandledrejection',
- '',
- errorParser
+ if ('XMLHttpRequest' in this._window) {
+ var xhrp = this._window.XMLHttpRequest.prototype;
+ replace(
+ xhrp,
+ 'open',
+ function (orig) {
+ return function (method, url) {
+ var isUrlObject = _isUrlObject(url);
+ if (_.isType(url, 'string') || isUrlObject) {
+ url = isUrlObject ? url.toString() : url;
+ if (this.__rollbar_xhr) {
+ this.__rollbar_xhr.method = method;
+ this.__rollbar_xhr.url = url;
+ this.__rollbar_xhr.status_code = null;
+ this.__rollbar_xhr.start_time_ms = _.now();
+ this.__rollbar_xhr.end_time_ms = null;
+ } else {
+ this.__rollbar_xhr = {
+ method: method,
+ url: url,
+ status_code: null,
+ start_time_ms: _.now(),
+ end_time_ms: null,
+ };
+ }
+ }
+ return orig.apply(this, arguments);
+ };
+ },
+ this.replacements,
+ 'network',
);
- }
- item.level = this.options.uncaughtErrorLevel;
- item._isUncaught = true;
- item._originalArgs = item._originalArgs || [];
- item._originalArgs.push(promise);
- this.client.log(item);
-};
-
-Rollbar.prototype.wrap = function(f, context, _before) {
- try {
- var ctxFn;
- if(_.isFunction(context)) {
- ctxFn = context;
- } else {
- ctxFn = function() { return context || {}; };
- }
-
- if (!_.isFunction(f)) {
- return f;
- }
- if (f._isWrap) {
- return f;
- }
+ replace(
+ xhrp,
+ 'setRequestHeader',
+ function (orig) {
+ return function (header, value) {
+ // If xhr.open is async, __rollbar_xhr may not be initialized yet.
+ if (!this.__rollbar_xhr) {
+ this.__rollbar_xhr = {};
+ }
+ if (_.isType(header, 'string') && _.isType(value, 'string')) {
+ if (self.autoInstrument.networkRequestHeaders) {
+ if (!this.__rollbar_xhr.request_headers) {
+ this.__rollbar_xhr.request_headers = {};
+ }
+ this.__rollbar_xhr.request_headers[header] = value;
+ }
+ // We want the content type even if request header telemetry is off.
+ if (header.toLowerCase() === 'content-type') {
+ this.__rollbar_xhr.request_content_type = value;
+ }
+ }
+ return orig.apply(this, arguments);
+ };
+ },
+ this.replacements,
+ 'network',
+ );
- if (!f._rollbar_wrapped) {
- f._rollbar_wrapped = function () {
- if (_before && _.isFunction(_before)) {
- _before.apply(this, arguments);
- }
- try {
- return f.apply(this, arguments);
- } catch(exc) {
- var e = exc;
- if (e && window._rollbarWrappedError !== e) {
- if (_.isType(e, 'string')) {
- e = new String(e);
+ replace(
+ xhrp,
+ 'send',
+ function (orig) {
+ /* eslint-disable no-unused-vars */
+ return function (data) {
+ /* eslint-enable no-unused-vars */
+ var xhr = this;
+
+ function onreadystatechangeHandler() {
+ if (xhr.__rollbar_xhr) {
+ if (xhr.__rollbar_xhr.status_code === null) {
+ xhr.__rollbar_xhr.status_code = 0;
+ if (self.autoInstrument.networkRequestBody) {
+ xhr.__rollbar_xhr.request = data;
+ }
+ xhr.__rollbar_event = self.captureNetwork(
+ xhr.__rollbar_xhr,
+ 'xhr',
+ undefined,
+ );
+ }
+ if (xhr.readyState < 2) {
+ xhr.__rollbar_xhr.start_time_ms = _.now();
+ }
+ if (xhr.readyState > 3) {
+ xhr.__rollbar_xhr.end_time_ms = _.now();
+
+ var headers = null;
+ xhr.__rollbar_xhr.response_content_type =
+ xhr.getResponseHeader('Content-Type');
+ if (self.autoInstrument.networkResponseHeaders) {
+ var headersConfig =
+ self.autoInstrument.networkResponseHeaders;
+ headers = {};
+ try {
+ var header, i;
+ if (headersConfig === true) {
+ var allHeaders = xhr.getAllResponseHeaders();
+ if (allHeaders) {
+ var arr = allHeaders.trim().split(/[\r\n]+/);
+ var parts, value;
+ for (i = 0; i < arr.length; i++) {
+ parts = arr[i].split(': ');
+ header = parts.shift();
+ value = parts.join(': ');
+ headers[header] = value;
+ }
+ }
+ } else {
+ for (i = 0; i < headersConfig.length; i++) {
+ header = headersConfig[i];
+ headers[header] = xhr.getResponseHeader(header);
+ }
+ }
+ } catch (e) {
+ /* we ignore the errors here that could come from different
+ * browser issues with the xhr methods */
+ }
+ }
+ var body = null;
+ if (self.autoInstrument.networkResponseBody) {
+ try {
+ body = xhr.responseText;
+ } catch (e) {
+ /* ignore errors from reading responseText */
+ }
+ }
+ var response = null;
+ if (body || headers) {
+ response = {};
+ if (body) {
+ if (
+ self.isJsonContentType(
+ xhr.__rollbar_xhr.response_content_type,
+ )
+ ) {
+ response.body = self.scrubJson(body);
+ } else {
+ response.body = body;
+ }
+ }
+ if (headers) {
+ response.headers = headers;
+ }
+ }
+ if (response) {
+ xhr.__rollbar_xhr.response = response;
+ }
+ try {
+ var code = xhr.status;
+ code = code === 1223 ? 204 : code;
+ xhr.__rollbar_xhr.status_code = code;
+ xhr.__rollbar_event.level =
+ self.telemeter.levelFromStatus(code);
+ self.errorOnHttpStatus(xhr.__rollbar_xhr);
+ } catch (e) {
+ /* ignore possible exception from xhr.status */
+ }
+ }
}
- e._rollbarContext = ctxFn() || {};
- e._rollbarContext._wrappedSource = f.toString();
+ }
- window._rollbarWrappedError = e;
+ wrapProp('onload', xhr);
+ wrapProp('onerror', xhr);
+ wrapProp('onprogress', xhr);
+
+ if (
+ 'onreadystatechange' in xhr &&
+ _.isFunction(xhr.onreadystatechange)
+ ) {
+ replace(xhr, 'onreadystatechange', function (orig) {
+ return self.rollbar.wrap(
+ orig,
+ undefined,
+ onreadystatechangeHandler,
+ );
+ });
+ } else {
+ xhr.onreadystatechange = onreadystatechangeHandler;
}
- throw e;
- }
- };
+ if (xhr.__rollbar_xhr && self.trackHttpErrors()) {
+ xhr.__rollbar_xhr.stack = new Error().stack;
+ }
+ return orig.apply(this, arguments);
+ };
+ },
+ this.replacements,
+ 'network',
+ );
+ }
- f._rollbar_wrapped._isWrap = true;
+ if ('fetch' in this._window) {
+ replace(
+ this._window,
+ 'fetch',
+ function (orig) {
+ /* eslint-disable no-unused-vars */
+ return function (fn, t) {
+ /* eslint-enable no-unused-vars */
+ var args = new Array(arguments.length);
+ for (var i = 0, len = args.length; i < len; i++) {
+ args[i] = arguments[i];
+ }
+ var input = args[0];
+ var method = 'GET';
+ var url;
+ var isUrlObject = _isUrlObject(input);
+ if (_.isType(input, 'string') || isUrlObject) {
+ url = isUrlObject ? input.toString() : input;
+ } else if (input) {
+ url = input.url;
+ if (input.method) {
+ method = input.method;
+ }
+ }
+ if (args[1] && args[1].method) {
+ method = args[1].method;
+ }
+ var metadata = {
+ method: method,
+ url: url,
+ status_code: null,
+ start_time_ms: _.now(),
+ end_time_ms: null,
+ };
+ if (args[1] && args[1].headers) {
+ // Argument may be a Headers object, or plain object. Ensure here that
+ // we are working with a Headers object with case-insensitive keys.
+ var reqHeaders = headers(args[1].headers);
+
+ metadata.request_content_type = reqHeaders.get('Content-Type');
+
+ if (self.autoInstrument.networkRequestHeaders) {
+ metadata.request_headers = self.fetchHeaders(
+ reqHeaders,
+ self.autoInstrument.networkRequestHeaders,
+ );
+ }
+ }
- if (f.hasOwnProperty) {
- for (var prop in f) {
- if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {
- f._rollbar_wrapped[prop] = f[prop];
+ if (self.autoInstrument.networkRequestBody) {
+ if (args[1] && args[1].body) {
+ metadata.request = args[1].body;
+ } else if (
+ args[0] &&
+ !_.isType(args[0], 'string') &&
+ args[0].body
+ ) {
+ metadata.request = args[0].body;
+ }
+ }
+ self.captureNetwork(metadata, 'fetch', undefined);
+ if (self.trackHttpErrors()) {
+ metadata.stack = new Error().stack;
}
- }
- }
- }
- return f._rollbar_wrapped;
- } catch (e) {
- // Return the original function if the wrap fails.
- return f;
+ // Start our handler before returning the promise. This allows resp.clone()
+ // to execute before other handlers touch the response.
+ return orig.apply(this, args).then(function (resp) {
+ metadata.end_time_ms = _.now();
+ metadata.status_code = resp.status;
+ metadata.response_content_type = resp.headers.get('Content-Type');
+ var headers = null;
+ if (self.autoInstrument.networkResponseHeaders) {
+ headers = self.fetchHeaders(
+ resp.headers,
+ self.autoInstrument.networkResponseHeaders,
+ );
+ }
+ var body = null;
+ if (self.autoInstrument.networkResponseBody) {
+ if (typeof resp.text === 'function') {
+ // Response.text() is not implemented on some platforms
+ // The response must be cloned to prevent reading (and locking) the original stream.
+ // This must be done before other handlers touch the response.
+ body = resp.clone().text(); //returns a Promise
+ }
+ }
+ if (headers || body) {
+ metadata.response = {};
+ if (body) {
+ // Test to ensure body is a Promise, which it should always be.
+ if (typeof body.then === 'function') {
+ body.then(function (text) {
+ if (
+ text &&
+ self.isJsonContentType(metadata.response_content_type)
+ ) {
+ metadata.response.body = self.scrubJson(text);
+ } else {
+ metadata.response.body = text;
+ }
+ });
+ } else {
+ metadata.response.body = body;
+ }
+ }
+ if (headers) {
+ metadata.response.headers = headers;
+ }
+ }
+ self.errorOnHttpStatus(metadata);
+ return resp;
+ });
+ };
+ },
+ this.replacements,
+ 'network',
+ );
}
};
-Rollbar.wrap = function(f, context) {
- if (_instance) {
- return _instance.wrap(f, context);
- } else {
- handleUninitialized();
+
+Instrumenter.prototype.captureNetwork = function (
+ metadata,
+ subtype,
+ rollbarUUID,
+) {
+ if (
+ metadata.request &&
+ this.isJsonContentType(metadata.request_content_type)
+ ) {
+ metadata.request = this.scrubJson(metadata.request);
}
+ return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);
};
-Rollbar.prototype.captureEvent = function() {
- var event = _.createTelemetryEvent(arguments);
- return this.client.captureEvent(event.type, event.metadata, event.level);
-};
-Rollbar.captureEvent = function() {
- if (_instance) {
- return _instance.captureEvent.apply(_instance, arguments);
- } else {
- handleUninitialized();
- }
+Instrumenter.prototype.isJsonContentType = function (contentType) {
+ return contentType &&
+ _.isType(contentType, 'string') &&
+ contentType.toLowerCase().includes('json')
+ ? true
+ : false;
};
-// The following two methods are used internally and are not meant for public use
-Rollbar.prototype.captureDomContentLoaded = function(e, ts) {
- if (!ts) {
- ts = new Date();
- }
- return this.client.captureDomContentLoaded(ts);
+Instrumenter.prototype.scrubJson = function (json) {
+ return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));
};
-Rollbar.prototype.captureLoad = function(e, ts) {
- if (!ts) {
- ts = new Date();
+Instrumenter.prototype.fetchHeaders = function (inHeaders, headersConfig) {
+ var outHeaders = {};
+ try {
+ var i;
+ if (headersConfig === true) {
+ if (typeof inHeaders.entries === 'function') {
+ // Headers.entries() is not implemented in IE
+ var allHeaders = inHeaders.entries();
+ var currentHeader = allHeaders.next();
+ while (!currentHeader.done) {
+ outHeaders[currentHeader.value[0]] = currentHeader.value[1];
+ currentHeader = allHeaders.next();
+ }
+ }
+ } else {
+ for (i = 0; i < headersConfig.length; i++) {
+ var header = headersConfig[i];
+ outHeaders[header] = inHeaders.get(header);
+ }
+ }
+ } catch (e) {
+ /* ignore probable IE errors */
}
- return this.client.captureLoad(ts);
+ return outHeaders;
};
-/* Internal */
-
-function addTransformsToNotifier(notifier, rollbar, gWindow) {
- notifier
- .addTransform(transforms.handleDomException)
- .addTransform(transforms.handleItemWithError)
- .addTransform(transforms.ensureItemHasSomethingToSay)
- .addTransform(transforms.addBaseInfo)
- .addTransform(transforms.addRequestInfo(gWindow))
- .addTransform(transforms.addClientInfo(gWindow))
- .addTransform(transforms.addPluginInfo(gWindow))
- .addTransform(transforms.addBody)
- .addTransform(sharedTransforms.addMessageWithError)
- .addTransform(sharedTransforms.addTelemetryData)
- .addTransform(sharedTransforms.addConfigToPayload)
- .addTransform(transforms.addScrubber(rollbar.scrub))
- .addTransform(sharedTransforms.userTransform(logger))
- .addTransform(sharedTransforms.addConfiguredOptions)
- .addTransform(sharedTransforms.addDiagnosticKeys)
- .addTransform(sharedTransforms.itemToPayload);
-}
+Instrumenter.prototype.trackHttpErrors = function () {
+ return (
+ this.autoInstrument.networkErrorOnHttp5xx ||
+ this.autoInstrument.networkErrorOnHttp4xx ||
+ this.autoInstrument.networkErrorOnHttp0
+ );
+};
-function addPredicatesToQueue(queue) {
- queue
- .addPredicate(sharedPredicates.checkLevel)
- .addPredicate(predicates.checkIgnore)
- .addPredicate(sharedPredicates.userCheckIgnore(logger))
- .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))
- .addPredicate(sharedPredicates.urlIsSafeListed(logger))
- .addPredicate(sharedPredicates.messageIsIgnored(logger));
-}
+Instrumenter.prototype.errorOnHttpStatus = function (metadata) {
+ var status = metadata.status_code;
-Rollbar.prototype.loadFull = function() {
- logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');
+ if (
+ (status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||
+ (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||
+ (status === 0 && this.autoInstrument.networkErrorOnHttp0)
+ ) {
+ var error = new Error('HTTP request failed with Status ' + status);
+ error.stack = metadata.stack;
+ this.rollbar.error(error, { skipFrames: 1 });
+ }
};
-Rollbar.prototype._createItem = function(args) {
- return _.createItem(args, logger, this);
+Instrumenter.prototype.deinstrumentConsole = function () {
+ if (!('console' in this._window && this._window.console.log)) {
+ return;
+ }
+ var b;
+ while (this.replacements['log'].length) {
+ b = this.replacements['log'].shift();
+ this._window.console[b[0]] = b[1];
+ }
};
-function _getFirstFunction(args) {
- for (var i = 0, len = args.length; i < len; ++i) {
- if (_.isFunction(args[i])) {
- return args[i];
- }
+Instrumenter.prototype.instrumentConsole = function () {
+ if (!('console' in this._window && this._window.console.log)) {
+ return;
}
- return undefined;
-}
-function _gWindow() {
- return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);
-}
+ var self = this;
+ var c = this._window.console;
-var defaults = __webpack_require__(27);
-var scrubFields = __webpack_require__(28);
+ function wrapConsole(method) {
+ 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778
-var defaultOptions = {
- version: defaults.version,
- scrubFields: scrubFields.scrubFields,
- logLevel: defaults.logLevel,
- reportLevel: defaults.reportLevel,
- uncaughtErrorLevel: defaults.uncaughtErrorLevel,
- endpoint: defaults.endpoint,
- verbose: false,
- enabled: true,
- transmit: true,
- sendConfig: false,
- includeItemsInTelemetry: true,
- captureIp: true,
- inspectAnonymousErrors: true,
- ignoreDuplicateErrors: true,
- wrapGlobalEventHandlers: false
+ var orig = c[method];
+ var origConsole = c;
+ var level = method === 'warn' ? 'warning' : method;
+ c[method] = function () {
+ var args = Array.prototype.slice.call(arguments);
+ var message = _.formatArgsAsString(args);
+ self.telemeter.captureLog(message, level);
+ if (orig) {
+ Function.prototype.apply.call(orig, origConsole, args);
+ }
+ };
+ self.replacements['log'].push([method, orig]);
+ }
+ var methods = ['debug', 'info', 'warn', 'error', 'log'];
+ try {
+ for (var i = 0, len = methods.length; i < len; i++) {
+ wrapConsole(methods[i]);
+ }
+ } catch (e) {
+ this.diagnostic.instrumentConsole = { error: e.message };
+ }
};
-module.exports = Rollbar;
-
-
-/***/ }),
-/* 10 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var RateLimiter = __webpack_require__(11);
-var Queue = __webpack_require__(13);
-var Notifier = __webpack_require__(14);
-var _ = __webpack_require__(0);
-
-/*
- * Rollbar - the interface to Rollbar
- *
- * @param options
- * @param api
- * @param logger
- */
-function Rollbar(options, api, logger, telemeter, platform) {
- this.options = _.merge(options);
- this.logger = logger;
- Rollbar.rateLimiter.configureGlobal(this.options);
- Rollbar.rateLimiter.setPlatformOptions(platform, this.options);
- this.api = api;
- this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);
-
- // This must happen before the Notifier is created
- var tracer = this.options.tracer || null;
- if (validateTracer(tracer)) {
- this.tracer = tracer;
- // set to a string for api response serialization
- this.options.tracer = 'opentracing-tracer-enabled';
- this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';
- } else {
- this.tracer = null;
+Instrumenter.prototype.deinstrumentDom = function () {
+ if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {
+ return;
}
-
- this.notifier = new Notifier(this.queue, this.options);
- this.telemeter = telemeter;
- setStackTraceLimit(options);
- this.lastError = null;
- this.lastErrorHash = 'none';
-}
-
-var defaultOptions = {
- maxItems: 0,
- itemsPerMinute: 60
+ this.removeListeners('dom');
};
-Rollbar.rateLimiter = new RateLimiter(defaultOptions);
-
-Rollbar.prototype.global = function (options) {
- Rollbar.rateLimiter.configureGlobal(options);
- return this;
+Instrumenter.prototype.instrumentDom = function () {
+ if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {
+ return;
+ }
+ var clickHandler = this.handleClick.bind(this);
+ var blurHandler = this.handleBlur.bind(this);
+ this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);
+ this.addListener(
+ 'dom',
+ this._window,
+ 'blur',
+ 'onfocusout',
+ blurHandler,
+ true,
+ );
};
-Rollbar.prototype.configure = function (options, payloadData) {
- var oldOptions = this.options;
- var payload = {};
- if (payloadData) {
- payload = { payload: payloadData };
+Instrumenter.prototype.handleClick = function (evt) {
+ try {
+ var e = domUtil.getElementFromEvent(evt, this._document);
+ var hasTag = e && e.tagName;
+ 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 (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {
+ this.captureDomEvent('input', e, e.value, e.checked);
+ }
+ } catch (exc) {
+ // TODO: Not sure what to do here
}
+};
- this.options = _.merge(oldOptions, options, payload);
-
- // This must happen before the Notifier is configured
- var tracer = this.options.tracer || null;
- if (validateTracer(tracer)) {
- this.tracer = tracer;
- // set to a string for api response serialization
- this.options.tracer = 'opentracing-tracer-enabled';
- this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';
- } else {
- this.tracer = null;
+Instrumenter.prototype.handleBlur = function (evt) {
+ try {
+ var e = domUtil.getElementFromEvent(evt, this._document);
+ if (e && e.tagName) {
+ if (domUtil.isDescribedElement(e, 'textarea')) {
+ this.captureDomEvent('input', e, e.value);
+ } else if (
+ domUtil.isDescribedElement(e, 'select') &&
+ e.options &&
+ e.options.length
+ ) {
+ this.handleSelectInputChanged(e);
+ } else if (
+ domUtil.isDescribedElement(e, 'input') &&
+ !domUtil.isDescribedElement(e, 'input', [
+ 'button',
+ 'submit',
+ 'hidden',
+ 'checkbox',
+ 'radio',
+ ])
+ ) {
+ this.captureDomEvent('input', e, e.value);
+ }
+ }
+ } catch (exc) {
+ // TODO: Not sure what to do here
}
+};
- this.notifier && this.notifier.configure(this.options);
- this.telemeter && this.telemeter.configure(this.options);
- setStackTraceLimit(options);
- this.global(this.options);
-
- if (validateTracer(options.tracer)) {
- this.tracer = options.tracer
+Instrumenter.prototype.handleSelectInputChanged = function (elem) {
+ if (elem.multiple) {
+ for (var i = 0; i < elem.options.length; i++) {
+ if (elem.options[i].selected) {
+ this.captureDomEvent('input', elem, elem.options[i].value);
+ }
+ }
+ } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {
+ this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);
}
-
- return this;
};
-Rollbar.prototype.log = function (item) {
- var level = this._defaultLogLevel();
- return this._log(level, item);
+Instrumenter.prototype.captureDomEvent = function (
+ subtype,
+ element,
+ value,
+ isChecked,
+) {
+ if (value !== undefined) {
+ if (
+ this.scrubTelemetryInputs ||
+ domUtil.getElementType(element) === 'password'
+ ) {
+ value = '[scrubbed]';
+ } else {
+ var description = domUtil.describeElement(element);
+ if (this.telemetryScrubber) {
+ if (this.telemetryScrubber(description)) {
+ value = '[scrubbed]';
+ }
+ } else if (this.defaultValueScrubber(description)) {
+ value = '[scrubbed]';
+ }
+ }
+ }
+ var elementString = domUtil.elementArrayToString(
+ domUtil.treeToArray(element),
+ );
+ this.telemeter.captureDom(subtype, elementString, value, isChecked);
};
-Rollbar.prototype.debug = function (item) {
- this._log('debug', item);
+Instrumenter.prototype.deinstrumentNavigation = function () {
+ var chrome = this._window.chrome;
+ var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;
+ // See https://github.com/angular/angular.js/pull/13945/files
+ var hasPushState =
+ !chromePackagedApp &&
+ this._window.history &&
+ this._window.history.pushState;
+ if (!hasPushState) {
+ return;
+ }
+ restore(this.replacements, 'navigation');
};
-Rollbar.prototype.info = function (item) {
- this._log('info', item);
-};
+Instrumenter.prototype.instrumentNavigation = function () {
+ var chrome = this._window.chrome;
+ var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;
+ // See https://github.com/angular/angular.js/pull/13945/files
+ var hasPushState =
+ !chromePackagedApp &&
+ this._window.history &&
+ this._window.history.pushState;
+ if (!hasPushState) {
+ return;
+ }
+ var self = this;
+ replace(
+ this._window,
+ 'onpopstate',
+ function (orig) {
+ return function () {
+ var current = self._location.href;
+ self.handleUrlChange(self._lastHref, current);
+ if (orig) {
+ orig.apply(this, arguments);
+ }
+ };
+ },
+ this.replacements,
+ 'navigation',
+ );
-Rollbar.prototype.warn = function (item) {
- this._log('warning', item);
+ replace(
+ this._window.history,
+ 'pushState',
+ function (orig) {
+ return function () {
+ var url = arguments.length > 2 ? arguments[2] : undefined;
+ if (url) {
+ self.handleUrlChange(self._lastHref, url + '');
+ }
+ return orig.apply(this, arguments);
+ };
+ },
+ this.replacements,
+ 'navigation',
+ );
};
-Rollbar.prototype.warning = function (item) {
- this._log('warning', item);
+Instrumenter.prototype.handleUrlChange = function (from, to) {
+ var parsedHref = urlparser.parse(this._location.href);
+ var parsedTo = urlparser.parse(to);
+ var parsedFrom = urlparser.parse(from);
+ this._lastHref = to;
+ if (
+ parsedHref.protocol === parsedTo.protocol &&
+ parsedHref.host === parsedTo.host
+ ) {
+ to = parsedTo.path + (parsedTo.hash || '');
+ }
+ if (
+ parsedHref.protocol === parsedFrom.protocol &&
+ parsedHref.host === parsedFrom.host
+ ) {
+ from = parsedFrom.path + (parsedFrom.hash || '');
+ }
+ this.telemeter.captureNavigation(from, to);
};
-Rollbar.prototype.error = function (item) {
- this._log('error', item);
+Instrumenter.prototype.deinstrumentConnectivity = function () {
+ if (!('addEventListener' in this._window || 'body' in this._document)) {
+ return;
+ }
+ if (this._window.addEventListener) {
+ this.removeListeners('connectivity');
+ } else {
+ restore(this.replacements, 'connectivity');
+ }
};
-Rollbar.prototype.critical = function (item) {
- this._log('critical', item);
+Instrumenter.prototype.instrumentConnectivity = function () {
+ if (!('addEventListener' in this._window || 'body' in this._document)) {
+ return;
+ }
+ if (this._window.addEventListener) {
+ this.addListener(
+ 'connectivity',
+ this._window,
+ 'online',
+ undefined,
+ function () {
+ this.telemeter.captureConnectivityChange('online');
+ }.bind(this),
+ true,
+ );
+ this.addListener(
+ 'connectivity',
+ this._window,
+ 'offline',
+ undefined,
+ function () {
+ this.telemeter.captureConnectivityChange('offline');
+ }.bind(this),
+ true,
+ );
+ } else {
+ var self = this;
+ replace(
+ this._document.body,
+ 'ononline',
+ function (orig) {
+ return function () {
+ self.telemeter.captureConnectivityChange('online');
+ if (orig) {
+ orig.apply(this, arguments);
+ }
+ };
+ },
+ this.replacements,
+ 'connectivity',
+ );
+ replace(
+ this._document.body,
+ 'onoffline',
+ function (orig) {
+ return function () {
+ self.telemeter.captureConnectivityChange('offline');
+ if (orig) {
+ orig.apply(this, arguments);
+ }
+ };
+ },
+ this.replacements,
+ 'connectivity',
+ );
+ }
};
-Rollbar.prototype.wait = function (callback) {
- this.queue.wait(callback);
-};
+Instrumenter.prototype.handleCspEvent = function (cspEvent) {
+ var message =
+ 'Security Policy Violation: ' +
+ 'blockedURI: ' +
+ cspEvent.blockedURI +
+ ', ' +
+ 'violatedDirective: ' +
+ cspEvent.violatedDirective +
+ ', ' +
+ 'effectiveDirective: ' +
+ cspEvent.effectiveDirective +
+ ', ';
-Rollbar.prototype.captureEvent = function (type, metadata, level) {
- return this.telemeter && this.telemeter.captureEvent(type, metadata, level);
-};
+ if (cspEvent.sourceFile) {
+ message +=
+ 'location: ' +
+ cspEvent.sourceFile +
+ ', ' +
+ 'line: ' +
+ cspEvent.lineNumber +
+ ', ' +
+ 'col: ' +
+ cspEvent.columnNumber +
+ ', ';
+ }
-Rollbar.prototype.captureDomContentLoaded = function (ts) {
- return this.telemeter && this.telemeter.captureDomContentLoaded(ts);
-};
+ message += 'originalPolicy: ' + cspEvent.originalPolicy;
-Rollbar.prototype.captureLoad = function (ts) {
- return this.telemeter && this.telemeter.captureLoad(ts);
+ this.telemeter.captureLog(message, 'error');
+ this.handleCspError(message);
};
-Rollbar.prototype.buildJsonPayload = function (item) {
- return this.api.buildJsonPayload(item);
+Instrumenter.prototype.handleCspError = function (message) {
+ if (this.autoInstrument.errorOnContentSecurityPolicy) {
+ this.rollbar.error(message);
+ }
};
-Rollbar.prototype.sendJsonPayload = function (jsonPayload) {
- this.api.postJsonPayload(jsonPayload);
-};
+Instrumenter.prototype.deinstrumentContentSecurityPolicy = function () {
+ if (!('addEventListener' in this._document)) {
+ return;
+ }
-/* Internal */
+ this.removeListeners('contentsecuritypolicy');
+};
-Rollbar.prototype._log = function (defaultLevel, item) {
- var callback;
- if (item.callback) {
- callback = item.callback;
- delete item.callback;
- }
- if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {
- if (callback) {
- var error = new Error('ignored identical item');
- error.item = item;
- callback(error);
- }
+Instrumenter.prototype.instrumentContentSecurityPolicy = function () {
+ if (!('addEventListener' in this._document)) {
return;
}
- try {
- this._addTracingInfo(item);
- item.level = item.level || defaultLevel;
- this.telemeter && this.telemeter._captureRollbarItem(item);
- item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];
- this.notifier.log(item, callback);
- } catch (e) {
- if (callback) {
- callback(e);
- }
- this.logger.error(e);
- }
-};
-Rollbar.prototype._defaultLogLevel = function () {
- return this.options.logLevel || 'debug';
+ var cspHandler = this.handleCspEvent.bind(this);
+ this.addListener(
+ 'contentsecuritypolicy',
+ this._document,
+ 'securitypolicyviolation',
+ null,
+ cspHandler,
+ false,
+ );
};
-Rollbar.prototype._sameAsLastError = function (item) {
- if (!item._isUncaught) {
- return false;
+Instrumenter.prototype.addListener = function (
+ section,
+ obj,
+ type,
+ altType,
+ handler,
+ capture,
+) {
+ if (obj.addEventListener) {
+ obj.addEventListener(type, handler, capture);
+ this.eventRemovers[section].push(function () {
+ obj.removeEventListener(type, handler, capture);
+ });
+ } else if (altType) {
+ obj.attachEvent(altType, handler);
+ this.eventRemovers[section].push(function () {
+ obj.detachEvent(altType, handler);
+ });
}
- var itemHash = generateItemHash(item);
- if (this.lastErrorHash === itemHash) {
- return true;
+};
+
+Instrumenter.prototype.removeListeners = function (section) {
+ var r;
+ while (this.eventRemovers[section].length) {
+ r = this.eventRemovers[section].shift();
+ r();
}
- this.lastError = item.err;
- this.lastErrorHash = itemHash;
- return false;
};
-Rollbar.prototype._addTracingInfo = function (item) {
- // Tracer validation occurs in the constructor
- // or in the Rollbar.prototype.configure methods
- if (this.tracer) {
- // add rollbar occurrence uuid to span
- var span = this.tracer.scope().active();
+function _isUrlObject(input) {
+ return typeof URL !== 'undefined' && input instanceof URL;
+}
- if (validateSpan(span)) {
- span.setTag('rollbar.error_uuid', item.uuid);
- span.setTag('rollbar.has_error', true);
- span.setTag('error', true);
- span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);
- span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);
+module.exports = Instrumenter;
- // add span ID & trace ID to occurrence
- var opentracingSpanId = span.context().toSpanId();
- var opentracingTraceId = span.context().toTraceId();
- if (item.custom) {
- item.custom.opentracing_span_id = opentracingSpanId;
- item.custom.opentracing_trace_id = opentracingTraceId;
- } else {
- item.custom = {
- opentracing_span_id: opentracingSpanId,
- opentracing_trace_id: opentracingTraceId
- };
- }
- }
- }
-}
+/***/ }),
-function generateItemHash(item) {
- var message = item.message || '';
- var stack = (item.err || {}).stack || String(item.err);
- return message + '::' + stack;
-}
+/***/ 860:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-// Node.js, Chrome, Safari, and some other browsers support this property
-// which globally sets the number of stack frames returned in an Error object.
-// If a browser can't use it, no harm done.
-function setStackTraceLimit(options) {
- if (options.stackTraceLimit) {
- Error.stackTraceLimit = options.stackTraceLimit;
- }
-}
+"use strict";
-/**
- * Validate the Tracer object provided to the Client
- * is valid for our Opentracing use case.
- * @param {opentracer.Tracer} tracer
- */
-function validateTracer(tracer) {
- if (!tracer) {
- return false;
- }
- if (!tracer.scope || typeof tracer.scope !== 'function') {
- return false;
+var _ = __webpack_require__(702);
+var errorParser = __webpack_require__(303);
+var logger = __webpack_require__(802);
+
+function handleDomException(item, options, callback) {
+ if (item.err && errorParser.Stack(item.err).name === 'DOMException') {
+ var originalError = new Error();
+ originalError.name = item.err.name;
+ originalError.message = item.err.message;
+ originalError.stack = item.err.stack;
+ originalError.nested = item.err;
+ item.err = originalError;
}
+ callback(null, item);
+}
- var scope = tracer.scope();
+function handleItemWithError(item, options, callback) {
+ item.data = item.data || {};
+ if (item.err) {
+ try {
+ item.stackInfo =
+ item.err._savedStackTrace ||
+ errorParser.parse(item.err, item.skipFrames);
- if (!scope || !scope.active || typeof scope.active !== 'function') {
- return false;
+ if (options.addErrorContext) {
+ addErrorContext(item);
+ }
+ } catch (e) {
+ logger.error('Error while parsing the error object.', e);
+ try {
+ item.message =
+ item.err.message ||
+ item.err.description ||
+ item.message ||
+ String(item.err);
+ } catch (e2) {
+ item.message = String(item.err) || String(e2);
+ }
+ delete item.err;
+ }
}
-
- return true;
+ callback(null, item);
}
-/**
- * Validate the Span object provided
- * @param {opentracer.Span} span
- */
-function validateSpan(span) {
- if (!span || !span.context || typeof span.context !== 'function') {
- return false;
- }
+function addErrorContext(item) {
+ var chain = [];
+ var err = item.err;
- var spanContext = span.context();
+ chain.push(err);
- if (!spanContext
- || !spanContext.toSpanId
- || !spanContext.toTraceId
- || typeof spanContext.toSpanId !== 'function'
- || typeof spanContext.toTraceId !== 'function') {
- return false
+ while (err.nested || err.cause) {
+ err = err.nested || err.cause;
+ chain.push(err);
}
- return true;
+ _.addErrorContext(item, chain);
}
-module.exports = Rollbar;
+function ensureItemHasSomethingToSay(item, options, callback) {
+ if (!item.message && !item.stackInfo && !item.custom) {
+ callback(new Error('No message, stack info, or custom data'), null);
+ }
+ callback(null, item);
+}
+function addBaseInfo(item, options, callback) {
+ var environment =
+ (options.payload && options.payload.environment) || options.environment;
+ item.data = _.merge(item.data, {
+ environment: environment,
+ level: item.level,
+ endpoint: options.endpoint,
+ platform: 'browser',
+ framework: 'browser-js',
+ language: 'javascript',
+ server: {},
+ uuid: item.uuid,
+ notifier: {
+ name: 'rollbar-browser-js',
+ version: options.version,
+ },
+ custom: item.custom,
+ });
+ callback(null, item);
+}
-/***/ }),
-/* 11 */
-/***/ (function(module, exports, __webpack_require__) {
+function addRequestInfo(window) {
+ return function (item, options, callback) {
+ var requestInfo = {};
-"use strict";
+ if (window && window.location) {
+ requestInfo.url = window.location.href;
+ requestInfo.query_string = window.location.search;
+ }
+ var remoteString = '$remote_ip';
+ if (!options.captureIp) {
+ remoteString = null;
+ } else if (options.captureIp !== true) {
+ remoteString += '_anonymize';
+ }
+ if (remoteString) requestInfo.user_ip = remoteString;
-var _ = __webpack_require__(0);
+ if (Object.keys(requestInfo).length > 0) {
+ _.set(item, 'data.request', requestInfo);
+ }
-/*
- * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar
- *
- * @param options - the same options that are accepted by configureGlobal offered as a convenience
- */
-function RateLimiter(options) {
- this.startTime = _.now();
- this.counter = 0;
- this.perMinCounter = 0;
- this.platform = null;
- this.platformOptions = {};
- this.configureGlobal(options);
+ callback(null, item);
+ };
}
-RateLimiter.globalSettings = {
- startTime: _.now(),
- maxItems: undefined,
- itemsPerMinute: undefined
-};
+function addClientInfo(window) {
+ return function (item, options, callback) {
+ if (!window) {
+ return callback(null, item);
+ }
+ var nav = window.navigator || {};
+ var scr = window.screen || {};
+ _.set(item, 'data.client', {
+ runtime_ms: item.timestamp - window._rollbarStartTime,
+ timestamp: Math.round(item.timestamp / 1000),
+ javascript: {
+ browser: nav.userAgent,
+ language: nav.language,
+ cookie_enabled: nav.cookieEnabled,
+ screen: {
+ width: scr.width,
+ height: scr.height,
+ },
+ },
+ });
+ callback(null, item);
+ };
+}
-/*
- * configureGlobal - set the global rate limiter options
- *
- * @param options - Only the following values are recognized:
- * startTime: a timestamp of the form returned by (new Date()).getTime()
- * maxItems: the maximum items
- * itemsPerMinute: the max number of items to send in a given minute
- */
-RateLimiter.prototype.configureGlobal = function(options) {
- if (options.startTime !== undefined) {
- RateLimiter.globalSettings.startTime = options.startTime;
- }
- if (options.maxItems !== undefined) {
- RateLimiter.globalSettings.maxItems = options.maxItems;
- }
- if (options.itemsPerMinute !== undefined) {
- RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;
- }
-};
+function addPluginInfo(window) {
+ return function (item, options, callback) {
+ if (!window || !window.navigator) {
+ return callback(null, item);
+ }
+ var plugins = [];
+ var navPlugins = window.navigator.plugins || [];
+ var cur;
+ for (var i = 0, l = navPlugins.length; i < l; ++i) {
+ cur = navPlugins[i];
+ plugins.push({ name: cur.name, description: cur.description });
+ }
+ _.set(item, 'data.client.javascript.plugins', plugins);
+ callback(null, item);
+ };
+}
-/*
- * shouldSend - determine if we should send a given item based on rate limit settings
- *
- * @param item - the item we are about to send
- * @returns An object with the following structure:
- * error: (Error|null)
- * shouldSend: bool
- * payload: (Object|null)
- * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and
- * exactly one of error or payload will be non-null. If error is non-null, the returned Error will
- * describe the situation, but it means that we were already over a rate limit (either globally or
- * per minute) when this item was checked. If error is null, and therefore payload is non-null, it
- * means this item put us over the global rate limit and the payload should be sent to Rollbar in
- * place of the passed in item.
- */
-RateLimiter.prototype.shouldSend = function(item, now) {
- now = now || _.now();
- var elapsedTime = now - this.startTime;
- if (elapsedTime < 0 || elapsedTime >= 60000) {
- this.startTime = now;
- this.perMinCounter = 0;
+function addBody(item, options, callback) {
+ if (item.stackInfo) {
+ if (item.stackInfo.traceChain) {
+ addBodyTraceChain(item, options, callback);
+ } else {
+ addBodyTrace(item, options, callback);
+ }
+ } else {
+ addBodyMessage(item, options, callback);
}
+}
- var globalRateLimit = RateLimiter.globalSettings.maxItems;
- var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;
+function addBodyMessage(item, options, callback) {
+ var message = item.message;
+ var custom = item.custom;
- if (checkRate(item, globalRateLimit, this.counter)) {
- return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);
- } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {
- return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);
+ if (!message) {
+ message = 'Item sent with null or missing arguments.';
}
- this.counter++;
- this.perMinCounter++;
-
- var shouldSend = !checkRate(item, globalRateLimit, this.counter);
- var perMinute = shouldSend;
- shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);
- return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);
-};
-
-RateLimiter.prototype.setPlatformOptions = function(platform, options) {
- this.platform = platform;
- this.platformOptions = options;
-};
-
-/* Helpers */
-
-function checkRate(item, limit, counter) {
- return !item.ignoreRateLimit && limit >= 1 && counter > limit;
-}
+ var result = {
+ body: message,
+ };
-function shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {
- var payload = null;
- if (error) {
- error = new Error(error);
- }
- if (!error && !shouldSend) {
- payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);
+ if (custom) {
+ result.extra = _.merge(custom);
}
- return {error: error, shouldSend: shouldSend, payload: payload};
+
+ _.set(item, 'data.body', { message: result });
+ callback(null, item);
}
-function rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {
- var environment = options.environment || (options.payload && options.payload.environment);
- var msg;
- if (perMinute) {
- msg = 'item per minute limit reached, ignoring errors until timeout';
- } else {
- msg = 'maxItems has been hit, ignoring errors until reset.';
- }
- var item = {
- body: {
- message: {
- body: msg,
- extra: {
- maxItems: globalRateLimit,
- itemsPerMinute: limitPerMin
- }
- }
- },
- language: 'javascript',
- environment: environment,
- notifier: {
- version: (options.notifier && options.notifier.version) || options.version
- }
- };
- if (platform === 'browser') {
- item.platform = 'browser';
- item.framework = 'browser-js';
- item.notifier.name = 'rollbar-browser-js';
- } else if (platform === 'server') {
- item.framework = options.framework || 'node-js';
- item.notifier.name = options.notifier.name;
- } else if (platform === 'react-native') {
- item.framework = options.framework || 'react-native';
- item.notifier.name = options.notifier.name;
+function stackFromItem(item) {
+ // Transform a TraceKit stackInfo object into a Rollbar trace
+ var stack = item.stackInfo.stack;
+ if (
+ stack &&
+ stack.length === 0 &&
+ item._unhandledStackInfo &&
+ item._unhandledStackInfo.stack
+ ) {
+ stack = item._unhandledStackInfo.stack;
}
- return item;
+ return stack;
}
-module.exports = RateLimiter;
+function addBodyTraceChain(item, options, callback) {
+ var traceChain = item.stackInfo.traceChain;
+ var traces = [];
+ var traceChainLength = traceChain.length;
+ for (var i = 0; i < traceChainLength; i++) {
+ var trace = buildTrace(item, traceChain[i], options);
+ traces.push(trace);
+ }
-/***/ }),
-/* 12 */
-/***/ (function(module, exports, __webpack_require__) {
+ _.set(item, 'data.body', { trace_chain: traces });
+ callback(null, item);
+}
-"use strict";
+function addBodyTrace(item, options, callback) {
+ var stack = stackFromItem(item);
+ if (stack) {
+ var trace = buildTrace(item, item.stackInfo, options);
+ _.set(item, 'data.body', { trace: trace });
+ callback(null, item);
+ } else {
+ var stackInfo = item.stackInfo;
+ var guess = errorParser.guessErrorClass(stackInfo.message);
+ var className = errorClass(stackInfo, guess[0], options);
+ var message = guess[1];
-'use strict';
+ item.message = className + ': ' + message;
+ addBodyMessage(item, options, callback);
+ }
+}
-var hasOwn = Object.prototype.hasOwnProperty;
-var toStr = Object.prototype.toString;
+function buildTrace(item, stackInfo, options) {
+ var description = item && item.data.description;
+ var custom = item && item.custom;
+ var stack = stackFromItem(item);
-var isPlainObject = function isPlainObject(obj) {
- if (!obj || toStr.call(obj) !== '[object Object]') {
- return false;
- }
+ var guess = errorParser.guessErrorClass(stackInfo.message);
+ var className = errorClass(stackInfo, guess[0], options);
+ var message = guess[1];
+ var trace = {
+ exception: {
+ class: className,
+ message: message,
+ },
+ };
- var hasOwnConstructor = hasOwn.call(obj, 'constructor');
- var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
- // Not own constructor property must be Object
- if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
- return false;
- }
+ if (description) {
+ trace.exception.description = description;
+ }
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
- var key;
- for (key in obj) {/**/}
+ if (stack) {
+ if (stack.length === 0) {
+ trace.exception.stack = stackInfo.rawStack;
+ trace.exception.raw = String(stackInfo.rawException);
+ }
+ var stackFrame;
+ var frame;
+ var code;
+ var pre;
+ var post;
+ var contextLength;
+ var i, mid;
- return typeof key === 'undefined' || hasOwn.call(obj, key);
-};
+ trace.frames = [];
+ for (i = 0; i < stack.length; ++i) {
+ stackFrame = stack[i];
+ frame = {
+ filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',
+ lineno: stackFrame.line || null,
+ method:
+ !stackFrame.func || stackFrame.func === '?'
+ ? '[anonymous]'
+ : stackFrame.func,
+ colno: stackFrame.column,
+ };
+ if (options.sendFrameUrl) {
+ frame.url = stackFrame.url;
+ }
+ if (
+ frame.method &&
+ frame.method.endsWith &&
+ frame.method.endsWith('_rollbar_wrapped')
+ ) {
+ continue;
+ }
-function merge() {
- var i, src, copy, clone, name,
- result = {},
- current = null,
- length = arguments.length;
+ code = pre = post = null;
+ contextLength = stackFrame.context ? stackFrame.context.length : 0;
+ if (contextLength) {
+ mid = Math.floor(contextLength / 2);
+ pre = stackFrame.context.slice(0, mid);
+ code = stackFrame.context[mid];
+ post = stackFrame.context.slice(mid);
+ }
- for (i=0; i < length; i++) {
- current = arguments[i];
- if (current == null) {
- continue;
- }
+ if (code) {
+ frame.code = code;
+ }
- for (name in current) {
- src = result[name];
- copy = current[name];
- if (result !== copy) {
- if (copy && isPlainObject(copy)) {
- clone = src && isPlainObject(src) ? src : {};
- result[name] = merge(clone, copy);
- } else if (typeof copy !== 'undefined') {
- result[name] = copy;
+ if (pre || post) {
+ frame.context = {};
+ if (pre && pre.length) {
+ frame.context.pre = pre;
+ }
+ if (post && post.length) {
+ frame.context.post = post;
}
}
- }
- }
- return result;
-}
-module.exports = merge;
+ if (stackFrame.args) {
+ frame.args = stackFrame.args;
+ }
+ trace.frames.push(frame);
+ }
-/***/ }),
-/* 13 */
-/***/ (function(module, exports, __webpack_require__) {
+ // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last
+ trace.frames.reverse();
-"use strict";
+ if (custom) {
+ trace.extra = _.merge(custom);
+ }
+ }
+ return trace;
+}
-var _ = __webpack_require__(0);
+function errorClass(stackInfo, guess, options) {
+ if (stackInfo.name) {
+ return stackInfo.name;
+ } else if (options.guessErrorClass) {
+ return guess;
+ } else {
+ return '(unknown)';
+ }
+}
-/*
- * Queue - an object which handles which handles a queue of items to be sent to Rollbar.
- * This object handles rate limiting via a passed in rate limiter, retries based on connection
- * errors, and filtering of items based on a set of configurable predicates. The communication to
- * the backend is performed via a given API object.
- *
- * @param rateLimiter - An object which conforms to the interface
- * rateLimiter.shouldSend(item) -> bool
- * @param api - An object which conforms to the interface
- * api.postItem(payload, function(err, response))
- * @param logger - An object used to log verbose messages if desired
- * @param options - see Queue.prototype.configure
- */
-function Queue(rateLimiter, api, logger, options) {
- this.rateLimiter = rateLimiter;
- this.api = api;
- this.logger = logger;
- this.options = options;
- this.predicates = [];
- this.pendingItems = [];
- this.pendingRequests = [];
- this.retryQueue = [];
- this.retryHandle = null;
- this.waitCallback = null;
- this.waitIntervalID = null;
+function addScrubber(scrubFn) {
+ return function (item, options, callback) {
+ if (scrubFn) {
+ var scrubFields = options.scrubFields || [];
+ var scrubPaths = options.scrubPaths || [];
+ item.data = scrubFn(item.data, scrubFields, scrubPaths);
+ }
+ callback(null, item);
+ };
}
-/*
- * configure - updates the options this queue uses
- *
- * @param options
- */
-Queue.prototype.configure = function(options) {
- this.api && this.api.configure(options);
- var oldOptions = this.options;
- this.options = _.merge(oldOptions, options);
- return this;
+module.exports = {
+ handleDomException: handleDomException,
+ handleItemWithError: handleItemWithError,
+ ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,
+ addBaseInfo: addBaseInfo,
+ addRequestInfo: addRequestInfo,
+ addClientInfo: addClientInfo,
+ addPluginInfo: addPluginInfo,
+ addBody: addBody,
+ addScrubber: addScrubber,
};
-/*
- * addPredicate - adds a predicate to the end of the list of predicates for this queue
- *
- * @param predicate - function(item, options) -> (bool|{err: Error})
- * Returning true means that this predicate passes and the item is okay to go on the queue
- * Returning false means do not add the item to the queue, but it is not an error
- * Returning {err: Error} means do not add the item to the queue, and the given error explains why
- * Returning {err: undefined} is equivalent to returning true but don't do that
- */
-Queue.prototype.addPredicate = function(predicate) {
- if (_.isFunction(predicate)) {
- this.predicates.push(predicate);
- }
- return this;
-};
-Queue.prototype.addPendingItem = function(item) {
- this.pendingItems.push(item);
-};
+/***/ }),
-Queue.prototype.removePendingItem = function(item) {
- var idx = this.pendingItems.indexOf(item);
- if (idx !== -1) {
- this.pendingItems.splice(idx, 1);
- }
-};
+/***/ 477:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-/*
- * addItem - Send an item to the Rollbar API if all of the predicates are satisfied
- *
- * @param item - The payload to send to the backend
- * @param callback - function(error, repsonse) which will be called with the response from the API
- * in the case of a success, otherwise response will be null and error will have a value. If both
- * error and response are null then the item was stopped by a predicate which did not consider this
- * to be an error condition, but nonetheless did not send the item to the API.
- * @param originalError - The original error before any transformations that is to be logged if any
- */
-Queue.prototype.addItem = function(item, callback, originalError, originalItem) {
- if (!callback || !_.isFunction(callback)) {
- callback = function() { return; };
- }
- var predicateResult = this._applyPredicates(item);
- if (predicateResult.stop) {
- this.removePendingItem(originalItem);
- callback(predicateResult.err);
- return;
- }
- this._maybeLog(item, originalError);
- this.removePendingItem(originalItem);
- if (!this.options.transmit) {
- callback(new Error('Transmit disabled'));
- return;
- }
- this.pendingRequests.push(item);
- try {
- this._makeApiRequest(item, function(err, resp) {
- this._dequeuePendingRequest(item);
- callback(err, resp);
- }.bind(this));
- } catch (e) {
- this._dequeuePendingRequest(item);
- callback(e);
- }
-};
+"use strict";
-/*
- * wait - Stop any further errors from being added to the queue, and get called back when all items
- * currently processing have finished sending to the backend.
- *
- * @param callback - function() called when all pending items have been sent
- */
-Queue.prototype.wait = function(callback) {
- if (!_.isFunction(callback)) {
- return;
- }
- this.waitCallback = callback;
- if (this._maybeCallWait()) {
- return;
- }
- if (this.waitIntervalID) {
- this.waitIntervalID = clearInterval(this.waitIntervalID);
- }
- this.waitIntervalID = setInterval(function() {
- this._maybeCallWait();
- }.bind(this), 500);
-};
-/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the
- * given item with the currently configured options.
- *
- * @param item - An item in the queue
- * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,
- * the error value should be passed up to a callbak if we are stopping.
- */
-Queue.prototype._applyPredicates = function(item) {
- var p = null;
- for (var i = 0, len = this.predicates.length; i < len; i++) {
- p = this.predicates[i](item, this.options);
- if (!p || p.err !== undefined) {
- return {stop: true, err: p.err};
- }
- }
- return {stop: false, err: null};
-};
+var _ = __webpack_require__(702);
+var makeFetchRequest = __webpack_require__(656);
+var makeXhrRequest = __webpack_require__(86);
/*
- * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an
- * effort to retry if we are configured to do so.
+ * accessToken may be embedded in payload but that should not
+ * be assumed
*
- * @param item - an item ready to send to the backend
- * @param callback - function(err, response)
+ * options: {
+ * hostname
+ * protocol
+ * path
+ * port
+ * method
+ * transport ('xhr' | 'fetch')
+ * }
+ *
+ * params is an object containing key/value pairs. These
+ * will be appended to the path as 'key=value&key=value'
+ *
+ * payload is an unserialized object
*/
-Queue.prototype._makeApiRequest = function(item, callback) {
- var rateLimitResponse = this.rateLimiter.shouldSend(item);
- if (rateLimitResponse.shouldSend) {
- this.api.postItem(item, function(err, resp) {
- if (err) {
- this._maybeRetry(err, item, callback);
- } else {
- callback(err, resp);
- }
- }.bind(this));
- } else if (rateLimitResponse.error) {
- callback(rateLimitResponse.error);
- } else {
- this.api.postItem(rateLimitResponse.payload, callback);
+function Transport(truncation) {
+ this.truncation = truncation;
+}
+
+Transport.prototype.get = function (
+ accessToken,
+ options,
+ params,
+ callback,
+ requestFactory,
+) {
+ if (!callback || !_.isFunction(callback)) {
+ callback = function () {};
}
+ _.addParamsAndAccessTokenToPath(accessToken, options, params);
+
+ var method = 'GET';
+ var url = _.formatUrl(options);
+ this._makeZoneRequest(
+ accessToken,
+ url,
+ method,
+ null,
+ callback,
+ requestFactory,
+ options.timeout,
+ options.transport,
+ );
};
-// These are errors basically mean there is no internet connection
-var RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];
+Transport.prototype.post = function (
+ accessToken,
+ options,
+ payload,
+ callback,
+ requestFactory,
+) {
+ if (!callback || !_.isFunction(callback)) {
+ callback = function () {};
+ }
-/*
- * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback
- * with the error.
- *
- * @param err - an error returned by the API transport
- * @param item - the item that was trying to be sent when this error occured
- * @param callback - function(err, response)
- */
-Queue.prototype._maybeRetry = function(err, item, callback) {
- var shouldRetry = false;
- if (this.options.retryInterval) {
- for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {
- if (err.code === RETRIABLE_ERRORS[i]) {
- shouldRetry = true;
- break;
- }
- }
- if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {
- item.retries = item.retries ? item.retries + 1 : 1;
- if (item.retries > this.options.maxRetries) {
- shouldRetry = false;
- }
- }
+ if (!payload) {
+ return callback(new Error('Cannot send empty request'));
}
- if (shouldRetry) {
- this._retryApiRequest(item, callback);
+
+ var stringifyResult;
+ if (this.truncation) {
+ stringifyResult = this.truncation.truncate(payload);
} else {
- callback(err);
+ stringifyResult = _.stringify(payload);
+ }
+ if (stringifyResult.error) {
+ return callback(stringifyResult.error);
}
-};
-/*
- * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process
- * that queue based on the retryInterval in the options for this queue.
- *
- * @param item - an item that failed to send due to an error we deem retriable
- * @param callback - function(err, response)
- */
-Queue.prototype._retryApiRequest = function(item, callback) {
- this.retryQueue.push({item: item, callback: callback});
+ var writeData = stringifyResult.value;
+ var method = 'POST';
+ var url = _.formatUrl(options);
+ this._makeZoneRequest(
+ accessToken,
+ url,
+ method,
+ writeData,
+ callback,
+ requestFactory,
+ options.timeout,
+ options.transport,
+ );
+};
- if (!this.retryHandle) {
- this.retryHandle = setInterval(function() {
- while (this.retryQueue.length) {
- var retryObject = this.retryQueue.shift();
- this._makeApiRequest(retryObject.item, retryObject.callback);
- }
- }.bind(this), this.options.retryInterval);
+Transport.prototype.postJsonPayload = function (
+ accessToken,
+ options,
+ jsonPayload,
+ callback,
+ requestFactory,
+) {
+ if (!callback || !_.isFunction(callback)) {
+ callback = function () {};
}
+
+ var method = 'POST';
+ var url = _.formatUrl(options);
+ this._makeZoneRequest(
+ accessToken,
+ url,
+ method,
+ jsonPayload,
+ callback,
+ requestFactory,
+ options.timeout,
+ options.transport,
+ );
};
-/*
- * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to
- * enable to functionality of providing a callback that clients can pass to `wait` to be notified
- * when the pending request queue has been emptied. This must be called when the API finishes
- * processing this item. If a `wait` callback is configured, it is called by this function.
- *
- * @param item - the item previously added to the pending request queue
- */
-Queue.prototype._dequeuePendingRequest = function(item) {
- var idx = this.pendingRequests.indexOf(item);
- if (idx !== -1) {
- this.pendingRequests.splice(idx, 1);
- this._maybeCallWait();
+// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope
+// so Angular change detection isn't triggered on each API call.
+// This is the equivalent of runOutsideAngular().
+//
+Transport.prototype._makeZoneRequest = function () {
+ var gWindow =
+ (typeof window != 'undefined' && window) ||
+ (typeof self != 'undefined' && self);
+ var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;
+ var args = Array.prototype.slice.call(arguments);
+
+ if (currentZone && currentZone._name === 'angular') {
+ var rootZone = currentZone._parent;
+ var self = this;
+ rootZone.run(function () {
+ self._makeRequest.apply(undefined, args);
+ });
+ } else {
+ this._makeRequest.apply(undefined, args);
}
};
-Queue.prototype._maybeLog = function(data, originalError) {
- if (this.logger && this.options.verbose) {
- var message = originalError;
- message = message || _.get(data, 'body.trace.exception.message');
- message = message || _.get(data, 'body.trace_chain.0.exception.message');
- if (message) {
- this.logger.error(message);
- return;
- }
- message = _.get(data, 'body.message.body');
- if (message) {
- this.logger.log(message);
- }
+Transport.prototype._makeRequest = function (
+ accessToken,
+ url,
+ method,
+ data,
+ callback,
+ requestFactory,
+ timeout,
+ transport,
+) {
+ if (typeof RollbarProxy !== 'undefined') {
+ return _proxyRequest(data, callback);
}
-};
-Queue.prototype._maybeCallWait = function() {
- if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {
- if (this.waitIntervalID) {
- this.waitIntervalID = clearInterval(this.waitIntervalID);
- }
- this.waitCallback();
- return true;
+ if (transport === 'fetch') {
+ makeFetchRequest(accessToken, url, method, data, callback, timeout);
+ } else {
+ makeXhrRequest(
+ accessToken,
+ url,
+ method,
+ data,
+ callback,
+ requestFactory,
+ timeout,
+ );
}
- return false;
};
-module.exports = Queue;
+/* global RollbarProxy */
+function _proxyRequest(json, callback) {
+ var rollbarProxy = new RollbarProxy();
+ rollbarProxy.sendJsonPayload(
+ json,
+ function (_msg) {
+ /* do nothing */
+ }, // eslint-disable-line no-unused-vars
+ function (err) {
+ callback(new Error(err));
+ },
+ );
+}
+
+module.exports = Transport;
/***/ }),
-/* 14 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 656:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var _ = __webpack_require__(0);
+var logger = __webpack_require__(802);
+var _ = __webpack_require__(702);
-/*
- * Notifier - the internal object responsible for delegating between the client exposed API, the
- * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the
- * queue which handles the communcation with the Rollbar API servers.
- *
- * @param queue - an object that conforms to the interface: addItem(item, callback)
- * @param options - an object representing the options to be set for this notifier, this should have
- * any defaults already set by the caller
- */
-function Notifier(queue, options) {
- this.queue = queue;
- this.options = options;
- this.transforms = [];
- this.diagnostic = {};
+function makeFetchRequest(accessToken, url, method, data, callback, timeout) {
+ var controller;
+ var timeoutId;
+
+ if (_.isFiniteNumber(timeout)) {
+ controller = new AbortController();
+ timeoutId = setTimeout(function () {
+ controller.abort();
+ }, timeout);
+ }
+
+ fetch(url, {
+ method: method,
+ headers: {
+ 'Content-Type': 'application/json',
+ 'X-Rollbar-Access-Token': accessToken,
+ signal: controller && controller.signal,
+ },
+ body: data,
+ })
+ .then(function (response) {
+ if (timeoutId) clearTimeout(timeoutId);
+ return response.json();
+ })
+ .then(function (data) {
+ callback(null, data);
+ })
+ .catch(function (error) {
+ logger.error(error.message);
+ callback(error);
+ });
}
-/*
- * configure - updates the options for this notifier with the passed in object
- *
- * @param options - an object which gets merged with the current options set on this notifier
- * @returns this
- */
-Notifier.prototype.configure = function(options) {
- this.queue && this.queue.configure(options);
- var oldOptions = this.options;
- this.options = _.merge(oldOptions, options);
- return this;
-};
+module.exports = makeFetchRequest;
-/*
- * addTransform - adds a transform onto the end of the queue of transforms for this notifier
- *
- * @param transform - a function which takes three arguments:
- * * item: An Object representing the data to eventually be sent to Rollbar
- * * options: The current value of the options for this notifier
- * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this
- * callback with a null value for error if it wants the processing chain to continue, otherwise
- * with an error to terminate the processing. The item should be the updated item after this
- * transform is finished modifying it.
- */
-Notifier.prototype.addTransform = function(transform) {
- if (_.isFunction(transform)) {
- this.transforms.push(transform);
- }
- return this;
-};
-/*
- * log - the internal log function which applies the configured transforms and then pushes onto the
- * queue to be sent to the backend.
- *
- * @param item - An object with the following structure:
- * message [String] - An optional string to be sent to rollbar
- * error [Error] - An optional error
- *
- * @param callback - A function of type function(err, resp) which will be called with exactly one
- * null argument and one non-null argument. The callback will be called once, either during the
- * transform stage if an error occurs inside a transform, or in response to the communication with
- * the backend. The second argument will be the response from the backend in case of success.
- */
-Notifier.prototype.log = function(item, callback) {
- if (!callback || !_.isFunction(callback)) {
- callback = function() {};
- }
+/***/ }),
- if (!this.options.enabled) {
- return callback(new Error('Rollbar is not enabled'));
+/***/ 86:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+/*global XDomainRequest*/
+
+var _ = __webpack_require__(702);
+var logger = __webpack_require__(802);
+
+function makeXhrRequest(
+ accessToken,
+ url,
+ method,
+ data,
+ callback,
+ requestFactory,
+ timeout,
+) {
+ var request;
+ if (requestFactory) {
+ request = requestFactory();
+ } else {
+ request = _createXMLHTTPObject();
+ }
+ if (!request) {
+ // Give up, no way to send requests
+ return callback(new Error('No way to send a request'));
}
+ try {
+ try {
+ var onreadystatechange = function () {
+ try {
+ if (onreadystatechange && request.readyState === 4) {
+ onreadystatechange = undefined;
+
+ var parseResponse = _.jsonParse(request.responseText);
+ if (_isSuccess(request)) {
+ callback(parseResponse.error, parseResponse.value);
+ return;
+ } else if (_isNormalFailure(request)) {
+ if (request.status === 403) {
+ // likely caused by using a server access token
+ var message =
+ parseResponse.value && parseResponse.value.message;
+ logger.error(message);
+ }
+ // return valid http status codes
+ callback(new Error(String(request.status)));
+ } else {
+ // IE will return a status 12000+ on some sort of connection failure,
+ // so we return a blank error
+ // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx
+ var msg =
+ 'XHR response had no status code (likely connection failure)';
+ callback(_newRetriableError(msg));
+ }
+ }
+ } catch (ex) {
+ //jquery source mentions firefox may error out while accessing the
+ //request members if there is a network error
+ //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111
+ var exc;
+ if (ex && ex.stack) {
+ exc = ex;
+ } else {
+ exc = new Error(ex);
+ }
+ callback(exc);
+ }
+ };
- this.queue.addPendingItem(item);
- var originalError = item.err;
- this._applyTransforms(item, function(err, i) {
- if (err) {
- this.queue.removePendingItem(item);
- return callback(err, null);
- }
- this.queue.addItem(i, callback, originalError, item);
- }.bind(this));
-};
+ request.open(method, url, true);
+ if (request.setRequestHeader) {
+ request.setRequestHeader('Content-Type', 'application/json');
+ request.setRequestHeader('X-Rollbar-Access-Token', accessToken);
+ }
-/* Internal */
+ if (_.isFiniteNumber(timeout)) {
+ request.timeout = timeout;
+ }
-/*
- * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See
- * `addTransform` for more information.
- *
- * @param item - An item to be transformed
- * @param callback - A function of type function(err, item) which will be called with a non-null
- * error and a null item in the case of a transform failure, or a null error and non-null item after
- * all transforms have been applied.
- */
-Notifier.prototype._applyTransforms = function(item, callback) {
- var transformIndex = -1;
- var transformsLength = this.transforms.length;
- var transforms = this.transforms;
- var options = this.options;
+ request.onreadystatechange = onreadystatechange;
+ request.send(data);
+ } catch (e1) {
+ // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest
+ if (typeof XDomainRequest !== 'undefined') {
+ // Assume we are in a really old browser which has a bunch of limitations:
+ // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx
- var cb = function(err, i) {
- if (err) {
- callback(err, null);
- return;
- }
+ // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case
+ if (!window || !window.location) {
+ return callback(
+ new Error(
+ 'No window available during request, unknown environment',
+ ),
+ );
+ }
- transformIndex++;
+ // If the current page is http, try and send over http
+ if (
+ window.location.href.substring(0, 5) === 'http:' &&
+ url.substring(0, 5) === 'https'
+ ) {
+ url = 'http' + url.substring(5);
+ }
- if (transformIndex === transformsLength) {
- callback(null, i);
- return;
+ var xdomainrequest = new XDomainRequest();
+ xdomainrequest.onprogress = function () {};
+ xdomainrequest.ontimeout = function () {
+ var msg = 'Request timed out';
+ var code = 'ETIMEDOUT';
+ callback(_newRetriableError(msg, code));
+ };
+ xdomainrequest.onerror = function () {
+ callback(new Error('Error during request'));
+ };
+ xdomainrequest.onload = function () {
+ var parseResponse = _.jsonParse(xdomainrequest.responseText);
+ callback(parseResponse.error, parseResponse.value);
+ };
+ xdomainrequest.open(method, url, true);
+ xdomainrequest.send(data);
+ } else {
+ callback(new Error('Cannot find a method to transport a request'));
+ }
}
+ } catch (e2) {
+ callback(e2);
+ }
+}
- transforms[transformIndex](i, options, cb);
- };
+function _createXMLHTTPObject() {
+ /* global ActiveXObject:false */
- cb(null, item);
-};
+ var factories = [
+ function () {
+ return new XMLHttpRequest();
+ },
+ function () {
+ return new ActiveXObject('Msxml2.XMLHTTP');
+ },
+ function () {
+ return new ActiveXObject('Msxml3.XMLHTTP');
+ },
+ function () {
+ return new ActiveXObject('Microsoft.XMLHTTP');
+ },
+ ];
+ var xmlhttp;
+ var i;
+ var numFactories = factories.length;
+ for (i = 0; i < numFactories; i++) {
+ /* eslint-disable no-empty */
+ try {
+ xmlhttp = factories[i]();
+ break;
+ } catch (e) {
+ // pass
+ }
+ /* eslint-enable no-empty */
+ }
+ return xmlhttp;
+}
-module.exports = Notifier;
+function _isSuccess(r) {
+ return r && r.status && r.status === 200;
+}
+function _isNormalFailure(r) {
+ return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;
+}
-/***/ }),
-/* 15 */
-/***/ (function(module, exports, __webpack_require__) {
+function _newRetriableError(message, code) {
+ var err = new Error(message);
+ err.code = code || 'ENOTFOUND';
+ return err;
+}
-"use strict";
+module.exports = makeXhrRequest;
-var _ = __webpack_require__(0);
-var helpers = __webpack_require__(16);
+/***/ }),
-var defaultOptions = {
- hostname: 'api.rollbar.com',
- path: '/api/1/item/',
- search: null,
- version: '1',
- protocol: 'https:',
- port: 443
-};
+/***/ 509:
+/***/ ((module) => {
-/**
- * Api is an object that encapsulates methods of communicating with
- * the Rollbar API. It is a standard interface with some parts implemented
- * differently for server or browser contexts. It is an object that should
- * be instantiated when used so it can contain non-global options that may
- * be different for another instance of RollbarApi.
- *
- * @param options {
- * accessToken: the accessToken to use for posting items to rollbar
- * endpoint: an alternative endpoint to send errors to
- * must be a valid, fully qualified URL.
- * The default is: https://api.rollbar.com/api/1/item
- * proxy: if you wish to proxy requests provide an object
- * with the following keys:
- * host or hostname (required): foo.example.com
- * port (optional): 123
- * protocol (optional): https
- * }
- */
-function Api(options, transport, urllib, truncation, jsonBackup) {
- this.options = options;
- this.transport = transport;
- this.url = urllib;
- this.truncation = truncation;
- this.jsonBackup = jsonBackup;
- this.accessToken = options.accessToken;
- this.transportOptions = _getTransport(options, urllib);
-}
+"use strict";
-/**
- *
- * @param data
- * @param callback
- */
-Api.prototype.postItem = function(data, callback) {
- var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');
- var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);
- this.transport.post(this.accessToken, transportOptions, payload, callback);
-};
-/**
- *
- * @param data
- * @param callback
- */
-Api.prototype.buildJsonPayload = function(data, callback) {
- var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);
+// See https://nodejs.org/docs/latest/api/url.html
+function parse(url) {
+ var result = {
+ protocol: null,
+ auth: null,
+ host: null,
+ path: null,
+ hash: null,
+ href: url,
+ hostname: null,
+ port: null,
+ pathname: null,
+ search: null,
+ query: null,
+ };
- var stringifyResult;
- if (this.truncation) {
- stringifyResult = this.truncation.truncate(payload);
+ var i, last;
+ i = url.indexOf('//');
+ if (i !== -1) {
+ result.protocol = url.substring(0, i);
+ last = i + 2;
} else {
- stringifyResult = _.stringify(payload)
+ last = 0;
}
- if (stringifyResult.error) {
- if (callback) {
- callback(stringifyResult.error);
- }
- return null;
+ i = url.indexOf('@', last);
+ if (i !== -1) {
+ result.auth = url.substring(last, i);
+ last = i + 1;
}
- return stringifyResult.value;
-};
+ i = url.indexOf('/', last);
+ if (i === -1) {
+ i = url.indexOf('?', last);
+ if (i === -1) {
+ i = url.indexOf('#', last);
+ if (i === -1) {
+ result.host = url.substring(last);
+ } else {
+ result.host = url.substring(last, i);
+ result.hash = url.substring(i);
+ }
+ result.hostname = result.host.split(':')[0];
+ result.port = result.host.split(':')[1];
+ if (result.port) {
+ result.port = parseInt(result.port, 10);
+ }
+ return result;
+ } else {
+ result.host = url.substring(last, i);
+ result.hostname = result.host.split(':')[0];
+ result.port = result.host.split(':')[1];
+ if (result.port) {
+ result.port = parseInt(result.port, 10);
+ }
+ last = i;
+ }
+ } else {
+ result.host = url.substring(last, i);
+ result.hostname = result.host.split(':')[0];
+ result.port = result.host.split(':')[1];
+ if (result.port) {
+ result.port = parseInt(result.port, 10);
+ }
+ last = i;
+ }
-/**
- *
- * @param jsonPayload
- * @param callback
- */
-Api.prototype.postJsonPayload = function(jsonPayload, callback) {
- var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');
- this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);
-};
+ i = url.indexOf('#', last);
+ if (i === -1) {
+ result.path = url.substring(last);
+ } else {
+ result.path = url.substring(last, i);
+ result.hash = url.substring(i);
+ }
-Api.prototype.configure = function(options) {
- var oldOptions = this.oldOptions;
- this.options = _.merge(oldOptions, options);
- this.transportOptions = _getTransport(this.options, this.url);
- if (this.options.accessToken !== undefined) {
- this.accessToken = this.options.accessToken;
+ if (result.path) {
+ var pathParts = result.path.split('?');
+ result.pathname = pathParts[0];
+ result.query = pathParts[1];
+ result.search = result.query ? '?' + result.query : null;
}
- return this;
-};
-
-function _getTransport(options, url) {
- return helpers.getTransportFromOptions(options, defaultOptions, url);
+ return result;
}
-module.exports = Api;
+module.exports = {
+ parse: parse,
+};
/***/ }),
-/* 16 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 965:
+/***/ ((module) => {
"use strict";
-var _ = __webpack_require__(0);
+function wrapGlobals(window, handler, shim) {
+ if (!window) {
+ return;
+ }
+ // Adapted from https://github.com/bugsnag/bugsnag-js
+ 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(
+ ',',
+ );
+ var i, global;
+ for (i = 0; i < globals.length; ++i) {
+ global = globals[i];
-function buildPayload(accessToken, data, jsonBackup) {
- if (!_.isType(data.context, 'string')) {
- var contextResult = _.stringify(data.context, jsonBackup);
- if (contextResult.error) {
- data.context = 'Error: could not serialize \'context\'';
- } else {
- data.context = contextResult.value || '';
- }
- if (data.context.length > 255) {
- data.context = data.context.substr(0, 255);
+ if (window[global] && window[global].prototype) {
+ _extendListenerPrototype(handler, window[global].prototype, shim);
}
}
- return {
- access_token: accessToken,
- data: data
- };
}
-function getTransportFromOptions(options, defaults, url) {
- var hostname = defaults.hostname;
- var protocol = defaults.protocol;
- var port = defaults.port;
- var path = defaults.path;
- var search = defaults.search;
- var timeout = options.timeout;
+function _extendListenerPrototype(handler, prototype, shim) {
+ if (
+ prototype.hasOwnProperty &&
+ prototype.hasOwnProperty('addEventListener')
+ ) {
+ var oldAddEventListener = prototype.addEventListener;
+ while (
+ oldAddEventListener._rollbarOldAdd &&
+ oldAddEventListener.belongsToShim
+ ) {
+ oldAddEventListener = oldAddEventListener._rollbarOldAdd;
+ }
+ var addFn = function (event, callback, bubble) {
+ oldAddEventListener.call(this, event, handler.wrap(callback), bubble);
+ };
+ addFn._rollbarOldAdd = oldAddEventListener;
+ addFn.belongsToShim = shim;
+ prototype.addEventListener = addFn;
- var proxy = options.proxy;
- if (options.endpoint) {
- var opts = url.parse(options.endpoint);
- hostname = opts.hostname;
- protocol = opts.protocol;
- port = opts.port;
- path = opts.pathname;
- search = opts.search;
+ var oldRemoveEventListener = prototype.removeEventListener;
+ while (
+ oldRemoveEventListener._rollbarOldRemove &&
+ oldRemoveEventListener.belongsToShim
+ ) {
+ oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;
+ }
+ var removeFn = function (event, callback, bubble) {
+ oldRemoveEventListener.call(
+ this,
+ event,
+ (callback && callback._rollbar_wrapped) || callback,
+ bubble,
+ );
+ };
+ removeFn._rollbarOldRemove = oldRemoveEventListener;
+ removeFn.belongsToShim = shim;
+ prototype.removeEventListener = removeFn;
}
- return {
- timeout: timeout,
- hostname: hostname,
- protocol: protocol,
- port: port,
- path: path,
- search: search,
- proxy: proxy
- };
}
-function transportOptions(transport, method) {
- var protocol = transport.protocol || 'https:';
- var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);
- var hostname = transport.hostname;
- var path = transport.path;
- var timeout = transport.timeout;
- if (transport.search) {
- path = path + transport.search;
- }
- if (transport.proxy) {
- path = protocol + '//' + hostname + path;
- hostname = transport.proxy.host || transport.proxy.hostname;
- port = transport.proxy.port;
- protocol = transport.proxy.protocol || protocol;
- }
- return {
- timeout: timeout,
- protocol: protocol,
- hostname: hostname,
- path: path,
- port: port,
- method: method
- };
-}
+module.exports = wrapGlobals;
-function appendPathToPath(base, path) {
- var baseTrailingSlash = /\/$/.test(base);
- var pathBeginningSlash = /^\//.test(path);
- if (baseTrailingSlash && pathBeginningSlash) {
- path = path.substring(1);
- } else if (!baseTrailingSlash && !pathBeginningSlash) {
- path = '/' + path;
- }
+/***/ }),
+
+/***/ 948:
+/***/ ((module) => {
+
+"use strict";
- return base + path;
-}
module.exports = {
- buildPayload: buildPayload,
- getTransportFromOptions: getTransportFromOptions,
- transportOptions: transportOptions,
- appendPathToPath: appendPathToPath
+ version: '2.26.4',
+ endpoint: 'api.rollbar.com/api/1/item/',
+ logLevel: 'debug',
+ reportLevel: 'debug',
+ uncaughtErrorLevel: 'error',
+ maxItems: 0,
+ itemsPerMin: 60,
};
/***/ }),
-/* 17 */
-/***/ (function(module, exports) {
-// Console-polyfill. MIT license.
-// https://github.com/paulmillr/console-polyfill
-// Make it safe to do console.log() always.
-(function(global) {
- 'use strict';
- if (!global.console) {
- global.console = {};
- }
- var con = global.console;
- var prop, method;
- var dummy = function() {};
- var properties = ['memory'];
- var methods = ('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(',');
- while (prop = properties.pop()) if (!con[prop]) con[prop] = {};
- while (method = methods.pop()) if (!con[method]) con[method] = dummy;
- // Using `this` for web workers & supports Browserify / Webpack.
-})(typeof window === 'undefined' ? this : window);
+/***/ 303:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+"use strict";
-/***/ }),
-/* 18 */
-/***/ (function(module, exports, __webpack_require__) {
-"use strict";
+var ErrorStackParser = __webpack_require__(180);
+var UNKNOWN_FUNCTION = '?';
+var ERR_CLASS_REGEXP = new RegExp(
+ '^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ',
+);
-// This detection.js module is used to encapsulate any ugly browser/feature
-// detection we may need to do.
+function guessFunctionName() {
+ return UNKNOWN_FUNCTION;
+}
-// Figure out which version of IE we're using, if any.
-// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library
-// Will return an integer on IE (i.e. 8)
-// Will return undefined otherwise
-function getIEVersion() {
- var undef;
- if (typeof document === 'undefined') {
- return undef;
- }
+function gatherContext() {
+ return null;
+}
- var v = 3,
- div = document.createElement('div'),
- all = div.getElementsByTagName('i');
+function Frame(stackFrame) {
+ var data = {};
- while (
- div.innerHTML = '',
- all[0]
+ data._stackFrame = stackFrame;
+
+ data.url = stackFrame.fileName;
+ data.line = stackFrame.lineNumber;
+ data.func = stackFrame.functionName;
+ data.column = stackFrame.columnNumber;
+ data.args = stackFrame.args;
+
+ data.context = gatherContext();
+
+ return data;
+}
+
+function Stack(exception, skip) {
+ function getStack() {
+ var parserStack = [];
+
+ skip = skip || 0;
+
+ try {
+ parserStack = ErrorStackParser.parse(exception);
+ } catch (e) {
+ parserStack = [];
+ }
+
+ var stack = [];
+
+ for (var i = skip; i < parserStack.length; i++) {
+ stack.push(new Frame(parserStack[i]));
+ }
+
+ return stack;
+ }
+
+ return {
+ stack: getStack(),
+ message: exception.message,
+ name: _mostSpecificErrorName(exception),
+ rawStack: exception.stack,
+ rawException: exception,
+ };
+}
+
+function parse(e, skip) {
+ var err = e;
+
+ if (err.nested || err.cause) {
+ var traceChain = [];
+ while (err) {
+ traceChain.push(new Stack(err, skip));
+ err = err.nested || err.cause;
+
+ skip = 0; // Only apply skip value to primary error
+ }
+
+ // Return primary error with full trace chain attached.
+ traceChain[0].traceChain = traceChain;
+ return traceChain[0];
+ } else {
+ return new Stack(err, skip);
+ }
+}
+
+function guessErrorClass(errMsg) {
+ if (!errMsg || !errMsg.match) {
+ return ['Unknown error. There was no error message to display.', ''];
+ }
+ var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);
+ var errClass = '(unknown)';
+
+ if (errClassMatch) {
+ errClass = errClassMatch[errClassMatch.length - 1];
+ errMsg = errMsg.replace(
+ (errClassMatch[errClassMatch.length - 2] || '') + errClass + ':',
+ '',
);
+ errMsg = errMsg.replace(/(^[\s]+|[\s]+$)/g, '');
+ }
+ return [errClass, errMsg];
+}
- return v > 4 ? v : undef;
+// * Prefers any value over an empty string
+// * Prefers any value over 'Error' where possible
+// * Prefers name over constructor.name when both are more specific than 'Error'
+function _mostSpecificErrorName(error) {
+ var name = error.name && error.name.length && error.name;
+ var constructorName =
+ error.constructor.name &&
+ error.constructor.name.length &&
+ error.constructor.name;
+
+ if (!name || !constructorName) {
+ return name || constructorName;
+ }
+
+ if (name === 'Error') {
+ return constructorName;
+ }
+ return name;
}
-var Detection = {
- ieVersion: getIEVersion
+module.exports = {
+ guessFunctionName: guessFunctionName,
+ guessErrorClass: guessErrorClass,
+ gatherContext: gatherContext,
+ parse: parse,
+ Stack: Stack,
+ Frame: Frame,
};
-module.exports = Detection;
-
/***/ }),
-/* 19 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 420:
+/***/ ((module) => {
"use strict";
-function captureUncaughtExceptions(window, handler, shim) {
- if (!window) { return; }
- var oldOnError;
+'use strict';
- if (typeof handler._rollbarOldOnError === 'function') {
- oldOnError = handler._rollbarOldOnError;
- } else if (window.onerror) {
- oldOnError = window.onerror;
- while (oldOnError._rollbarOldOnError) {
- oldOnError = oldOnError._rollbarOldOnError;
- }
- handler._rollbarOldOnError = oldOnError;
+var hasOwn = Object.prototype.hasOwnProperty;
+var toStr = Object.prototype.toString;
+
+var isPlainObject = function isPlainObject(obj) {
+ if (!obj || toStr.call(obj) !== '[object Object]') {
+ return false;
}
- handler.handleAnonymousErrors();
+ var hasOwnConstructor = hasOwn.call(obj, 'constructor');
+ var hasIsPrototypeOf =
+ obj.constructor &&
+ obj.constructor.prototype &&
+ hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
+ // Not own constructor property must be Object
+ if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
+ return false;
+ }
- var fn = function() {
- var args = Array.prototype.slice.call(arguments, 0);
- _rollbarWindowOnError(window, handler, oldOnError, args);
- };
- if (shim) {
- fn._rollbarOldOnError = oldOnError;
+ // Own properties are enumerated firstly, so to speed up,
+ // if last one is own, then all properties are own.
+ var key;
+ for (key in obj) {
+ /**/
}
- window.onerror = fn;
-}
-function _rollbarWindowOnError(window, r, old, args) {
- if (window._rollbarWrappedError) {
- if (!args[4]) {
- args[4] = window._rollbarWrappedError;
+ return typeof key === 'undefined' || hasOwn.call(obj, key);
+};
+
+function merge() {
+ var i,
+ src,
+ copy,
+ clone,
+ name,
+ result = {},
+ current = null,
+ length = arguments.length;
+
+ for (i = 0; i < length; i++) {
+ current = arguments[i];
+ if (current == null) {
+ continue;
}
- if (!args[5]) {
- args[5] = window._rollbarWrappedError._rollbarContext;
+
+ for (name in current) {
+ src = result[name];
+ copy = current[name];
+ if (result !== copy) {
+ if (copy && isPlainObject(copy)) {
+ clone = src && isPlainObject(src) ? src : {};
+ result[name] = merge(clone, copy);
+ } else if (typeof copy !== 'undefined') {
+ result[name] = copy;
+ }
+ }
}
- window._rollbarWrappedError = null;
}
+ return result;
+}
- var ret = r.handleUncaughtException.apply(r, args);
+module.exports = merge;
- if (old) {
- old.apply(window, args);
- }
- // Let other chained onerror handlers above run before setting this.
- // If an error is thrown and caught within a chained onerror handler,
- // Error.prepareStackTrace() will see that one before the one we want.
- if (ret === 'anonymous') {
- r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()
- }
+/***/ }),
+
+/***/ 314:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+var _ = __webpack_require__(702);
+
+/*
+ * Notifier - the internal object responsible for delegating between the client exposed API, the
+ * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the
+ * queue which handles the communcation with the Rollbar API servers.
+ *
+ * @param queue - an object that conforms to the interface: addItem(item, callback)
+ * @param options - an object representing the options to be set for this notifier, this should have
+ * any defaults already set by the caller
+ */
+function Notifier(queue, options) {
+ this.queue = queue;
+ this.options = options;
+ this.transforms = [];
+ this.diagnostic = {};
}
-function captureUnhandledRejections(window, handler, shim) {
- if (!window) { return; }
+/*
+ * configure - updates the options for this notifier with the passed in object
+ *
+ * @param options - an object which gets merged with the current options set on this notifier
+ * @returns this
+ */
+Notifier.prototype.configure = function (options) {
+ this.queue && this.queue.configure(options);
+ var oldOptions = this.options;
+ this.options = _.merge(oldOptions, options);
+ return this;
+};
- if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {
- window.removeEventListener('unhandledrejection', window._rollbarURH);
+/*
+ * addTransform - adds a transform onto the end of the queue of transforms for this notifier
+ *
+ * @param transform - a function which takes three arguments:
+ * * item: An Object representing the data to eventually be sent to Rollbar
+ * * options: The current value of the options for this notifier
+ * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this
+ * callback with a null value for error if it wants the processing chain to continue, otherwise
+ * with an error to terminate the processing. The item should be the updated item after this
+ * transform is finished modifying it.
+ */
+Notifier.prototype.addTransform = function (transform) {
+ if (_.isFunction(transform)) {
+ this.transforms.push(transform);
}
+ return this;
+};
- var rejectionHandler = function (evt) {
- var reason, promise, detail;
- try {
- reason = evt.reason;
- } catch (e) {
- reason = undefined;
- }
- try {
- promise = evt.promise;
- } catch (e) {
- promise = '[unhandledrejection] error getting `promise` from event';
- }
- try {
- detail = evt.detail;
- if (!reason && detail) {
- reason = detail.reason;
- promise = detail.promise;
+/*
+ * log - the internal log function which applies the configured transforms and then pushes onto the
+ * queue to be sent to the backend.
+ *
+ * @param item - An object with the following structure:
+ * message [String] - An optional string to be sent to rollbar
+ * error [Error] - An optional error
+ *
+ * @param callback - A function of type function(err, resp) which will be called with exactly one
+ * null argument and one non-null argument. The callback will be called once, either during the
+ * transform stage if an error occurs inside a transform, or in response to the communication with
+ * the backend. The second argument will be the response from the backend in case of success.
+ */
+Notifier.prototype.log = function (item, callback) {
+ if (!callback || !_.isFunction(callback)) {
+ callback = function () {};
+ }
+
+ if (!this.options.enabled) {
+ return callback(new Error('Rollbar is not enabled'));
+ }
+
+ this.queue.addPendingItem(item);
+ var originalError = item.err;
+ this._applyTransforms(
+ item,
+ function (err, i) {
+ if (err) {
+ this.queue.removePendingItem(item);
+ return callback(err, null);
}
- } catch (e) {
- // Ignore
- }
- if (!reason) {
- reason = '[unhandledrejection] error getting `reason` from event';
+ this.queue.addItem(i, callback, originalError, item);
+ }.bind(this),
+ );
+};
+
+/* Internal */
+
+/*
+ * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See
+ * `addTransform` for more information.
+ *
+ * @param item - An item to be transformed
+ * @param callback - A function of type function(err, item) which will be called with a non-null
+ * error and a null item in the case of a transform failure, or a null error and non-null item after
+ * all transforms have been applied.
+ */
+Notifier.prototype._applyTransforms = function (item, callback) {
+ var transformIndex = -1;
+ var transformsLength = this.transforms.length;
+ var transforms = this.transforms;
+ var options = this.options;
+
+ var cb = function (err, i) {
+ if (err) {
+ callback(err, null);
+ return;
}
- if (handler && handler.handleUnhandledRejection) {
- handler.handleUnhandledRejection(reason, promise);
+ transformIndex++;
+
+ if (transformIndex === transformsLength) {
+ callback(null, i);
+ return;
}
- };
- rejectionHandler.belongsToShim = shim;
- window._rollbarURH = rejectionHandler;
- window.addEventListener('unhandledrejection', rejectionHandler);
-}
+ transforms[transformIndex](i, options, cb);
+ };
-module.exports = {
- captureUncaughtExceptions: captureUncaughtExceptions,
- captureUnhandledRejections: captureUnhandledRejections
+ cb(null, item);
};
+module.exports = Notifier;
+
/***/ }),
-/* 20 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 61:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-/*global XDomainRequest*/
+var _ = __webpack_require__(702);
-var _ = __webpack_require__(0);
-var logger = __webpack_require__(1);
+function checkLevel(item, settings) {
+ var level = item.level;
+ var levelVal = _.LEVELS[level] || 0;
+ var reportLevel = settings.reportLevel;
+ var reportLevelVal = _.LEVELS[reportLevel] || 0;
-/*
- * accessToken may be embedded in payload but that should not
- * be assumed
- *
- * options: {
- * hostname
- * protocol
- * path
- * port
- * method
- * }
- *
- * params is an object containing key/value pairs. These
- * will be appended to the path as 'key=value&key=value'
- *
- * payload is an unserialized object
- */
-function Transport(truncation) {
- this.truncation = truncation;
+ if (levelVal < reportLevelVal) {
+ return false;
+ }
+ return true;
+}
+
+function userCheckIgnore(logger) {
+ return function (item, settings) {
+ var isUncaught = !!item._isUncaught;
+ delete item._isUncaught;
+ var args = item._originalArgs;
+ delete item._originalArgs;
+ try {
+ if (_.isFunction(settings.onSendCallback)) {
+ settings.onSendCallback(isUncaught, args, item);
+ }
+ } catch (e) {
+ settings.onSendCallback = null;
+ logger.error('Error while calling onSendCallback, removing', e);
+ }
+ try {
+ if (
+ _.isFunction(settings.checkIgnore) &&
+ settings.checkIgnore(isUncaught, args, item)
+ ) {
+ return false;
+ }
+ } catch (e) {
+ settings.checkIgnore = null;
+ logger.error('Error while calling custom checkIgnore(), removing', e);
+ }
+ return true;
+ };
}
-Transport.prototype.get = function(accessToken, options, params, callback, requestFactory) {
- if (!callback || !_.isFunction(callback)) {
- callback = function() {};
- }
- _.addParamsAndAccessTokenToPath(accessToken, options, params);
+function urlIsNotBlockListed(logger) {
+ return function (item, settings) {
+ return !urlIsOnAList(item, settings, 'blocklist', logger);
+ };
+}
- var method = 'GET';
- var url = _.formatUrl(options);
- _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);
+function urlIsSafeListed(logger) {
+ return function (item, settings) {
+ return urlIsOnAList(item, settings, 'safelist', logger);
+ };
}
-Transport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {
- if (!callback || !_.isFunction(callback)) {
- callback = function() {};
+function matchFrames(trace, list, block) {
+ if (!trace) {
+ return !block;
}
- if (!payload) {
- return callback(new Error('Cannot send empty request'));
- }
+ var frames = trace.frames;
- var stringifyResult;
- if (this.truncation) {
- stringifyResult = this.truncation.truncate(payload);
- } else {
- stringifyResult = _.stringify(payload)
- }
- if (stringifyResult.error) {
- return callback(stringifyResult.error);
+ if (!frames || frames.length === 0) {
+ return !block;
}
- var writeData = stringifyResult.value;
- var method = 'POST';
- var url = _.formatUrl(options);
- _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);
-}
+ var frame, filename, url, urlRegex;
+ var listLength = list.length;
+ var frameLength = frames.length;
+ for (var i = 0; i < frameLength; i++) {
+ frame = frames[i];
+ filename = frame.filename;
-Transport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {
- if (!callback || !_.isFunction(callback)) {
- callback = function() {};
- }
+ if (!_.isType(filename, 'string')) {
+ return !block;
+ }
- var method = 'POST';
- var url = _.formatUrl(options);
- _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);
+ for (var j = 0; j < listLength; j++) {
+ url = list[j];
+ urlRegex = new RegExp(url);
+
+ if (urlRegex.test(filename)) {
+ return true;
+ }
+ }
+ }
+ return false;
}
+function urlIsOnAList(item, settings, safeOrBlock, logger) {
+ // safelist is the default
+ var block = false;
+ if (safeOrBlock === 'blocklist') {
+ block = true;
+ }
-// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope
-// so Angular change detection isn't triggered on each API call.
-// This is the equivalent of runOutsideAngular().
-//
-function _makeZoneRequest() {
- var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);
- var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;
- var args = Array.prototype.slice.call(arguments);
+ var list, traces;
+ try {
+ list = block ? settings.hostBlockList : settings.hostSafeList;
+ traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];
- if (currentZone && currentZone._name === 'angular') {
- var rootZone = currentZone._parent;
- rootZone.run(function () {
- _makeRequest.apply(undefined, args);
- });
- } else {
- _makeRequest.apply(undefined, args);
- }
-}
+ // These two checks are important to come first as they are defaults
+ // in case the list is missing or the trace is missing or not well-formed
+ if (!list || list.length === 0) {
+ return !block;
+ }
+ if (traces.length === 0 || !traces[0]) {
+ return !block;
+ }
-/* global RollbarProxy */
-function _proxyRequest(json, callback) {
- var rollbarProxy = new RollbarProxy();
- rollbarProxy.sendJsonPayload(
- json,
- function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars
- function(err) {
- callback(new Error(err));
+ var tracesLength = traces.length;
+ for (var i = 0; i < tracesLength; i++) {
+ if (matchFrames(traces[i], list, block)) {
+ return true;
+ }
}
- );
+ } catch (
+ e
+ /* istanbul ignore next */
+ ) {
+ if (block) {
+ settings.hostBlockList = null;
+ } else {
+ settings.hostSafeList = null;
+ }
+ var listName = block ? 'hostBlockList' : 'hostSafeList';
+ logger.error(
+ "Error while reading your configuration's " +
+ listName +
+ ' option. Removing custom ' +
+ listName +
+ '.',
+ e,
+ );
+ return !block;
+ }
+ return false;
}
-function _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {
- if (typeof RollbarProxy !== 'undefined') {
- return _proxyRequest(data, callback);
- }
+function messageIsIgnored(logger) {
+ return function (item, settings) {
+ var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;
- var request;
- if (requestFactory) {
- request = requestFactory();
- } else {
- request = _createXMLHTTPObject();
- }
- if (!request) {
- // Give up, no way to send requests
- return callback(new Error('No way to send a request'));
- }
- try {
try {
- var onreadystatechange = function() {
- try {
- if (onreadystatechange && request.readyState === 4) {
- onreadystatechange = undefined;
-
- var parseResponse = _.jsonParse(request.responseText);
- if (_isSuccess(request)) {
- callback(parseResponse.error, parseResponse.value);
- return;
- } else if (_isNormalFailure(request)) {
- if (request.status === 403) {
- // likely caused by using a server access token
- var message = parseResponse.value && parseResponse.value.message;
- logger.error(message);
- }
- // return valid http status codes
- callback(new Error(String(request.status)));
- } else {
- // IE will return a status 12000+ on some sort of connection failure,
- // so we return a blank error
- // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx
- var msg = 'XHR response had no status code (likely connection failure)';
- callback(_newRetriableError(msg));
- }
- }
- } catch (ex) {
- //jquery source mentions firefox may error out while accessing the
- //request members if there is a network error
- //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111
- var exc;
- if (ex && ex.stack) {
- exc = ex;
- } else {
- exc = new Error(ex);
- }
- callback(exc);
- }
- };
+ messageIsIgnored = false;
+ ignoredMessages = settings.ignoredMessages;
- request.open(method, url, true);
- if (request.setRequestHeader) {
- request.setRequestHeader('Content-Type', 'application/json');
- request.setRequestHeader('X-Rollbar-Access-Token', accessToken);
+ if (!ignoredMessages || ignoredMessages.length === 0) {
+ return true;
}
- if(_.isFiniteNumber(timeout)) {
- request.timeout = timeout;
- }
+ messages = messagesFromItem(item);
- request.onreadystatechange = onreadystatechange;
- request.send(data);
- } catch (e1) {
- // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest
- if (typeof XDomainRequest !== 'undefined') {
+ if (messages.length === 0) {
+ return true;
+ }
- // Assume we are in a really old browser which has a bunch of limitations:
- // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx
+ len = ignoredMessages.length;
+ for (i = 0; i < len; i++) {
+ rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');
- // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case
- if (!window || !window.location) {
- return callback(new Error('No window available during request, unknown environment'));
- }
+ for (j = 0; j < messages.length; j++) {
+ messageIsIgnored = rIgnoredMessage.test(messages[j]);
- // If the current page is http, try and send over http
- if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {
- url = 'http' + url.substring(5);
+ if (messageIsIgnored) {
+ return false;
+ }
}
-
- var xdomainrequest = new XDomainRequest();
- xdomainrequest.onprogress = function() {};
- xdomainrequest.ontimeout = function() {
- var msg = 'Request timed out';
- var code = 'ETIMEDOUT';
- callback(_newRetriableError(msg, code));
- };
- xdomainrequest.onerror = function() {
- callback(new Error('Error during request'));
- };
- xdomainrequest.onload = function() {
- var parseResponse = _.jsonParse(xdomainrequest.responseText);
- callback(parseResponse.error, parseResponse.value);
- };
- xdomainrequest.open(method, url, true);
- xdomainrequest.send(data);
- } else {
- callback(new Error('Cannot find a method to transport a request'));
}
+ } catch (
+ e
+ /* istanbul ignore next */
+ ) {
+ settings.ignoredMessages = null;
+ logger.error(
+ "Error while reading your configuration's ignoredMessages option. Removing custom ignoredMessages.",
+ );
}
- } catch (e2) {
- callback(e2);
- }
+
+ return true;
+ };
}
-function _createXMLHTTPObject() {
- /* global ActiveXObject:false */
+function messagesFromItem(item) {
+ var body = item.body;
+ var messages = [];
- var factories = [
- function () {
- return new XMLHttpRequest();
- },
- function () {
- return new ActiveXObject('Msxml2.XMLHTTP');
- },
- function () {
- return new ActiveXObject('Msxml3.XMLHTTP');
- },
- function () {
- return new ActiveXObject('Microsoft.XMLHTTP');
- }
- ];
- var xmlhttp;
- var i;
- var numFactories = factories.length;
- for (i = 0; i < numFactories; i++) {
- /* eslint-disable no-empty */
- try {
- xmlhttp = factories[i]();
- break;
- } catch (e) {
- // pass
+ // The payload schema only allows one of trace_chain, message, or trace.
+ // However, existing test cases are based on having both trace and message present.
+ // So here we preserve the ability to collect strings from any combination of these keys.
+ if (body.trace_chain) {
+ var traceChain = body.trace_chain;
+ for (var i = 0; i < traceChain.length; i++) {
+ var trace = traceChain[i];
+ messages.push(_.get(trace, 'exception.message'));
}
- /* eslint-enable no-empty */
}
- return xmlhttp;
-}
-
-function _isSuccess(r) {
- return r && r.status && r.status === 200;
-}
-
-function _isNormalFailure(r) {
- return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;
-}
-
-function _newRetriableError(message, code) {
- var err = new Error(message);
- err.code = code || 'ENOTFOUND';
- return err;
+ if (body.trace) {
+ messages.push(_.get(body, 'trace.exception.message'));
+ }
+ if (body.message) {
+ messages.push(_.get(body, 'message.body'));
+ }
+ return messages;
}
-module.exports = Transport;
+module.exports = {
+ checkLevel: checkLevel,
+ userCheckIgnore: userCheckIgnore,
+ urlIsNotBlockListed: urlIsNotBlockListed,
+ urlIsSafeListed: urlIsSafeListed,
+ messageIsIgnored: messageIsIgnored,
+};
/***/ }),
-/* 21 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 358:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var _ = __webpack_require__(0);
-var errorParser = __webpack_require__(3);
-var logger = __webpack_require__(1);
+var _ = __webpack_require__(702);
-function handleDomException(item, options, callback) {
- if(item.err && errorParser.Stack(item.err).name === 'DOMException') {
- var originalError = new Error();
- originalError.name = item.err.name;
- originalError.message = item.err.message;
- originalError.stack = item.err.stack;
- originalError.nested = item.err;
- item.err = originalError;
- }
- callback(null, item);
+/*
+ * Queue - an object which handles which handles a queue of items to be sent to Rollbar.
+ * This object handles rate limiting via a passed in rate limiter, retries based on connection
+ * errors, and filtering of items based on a set of configurable predicates. The communication to
+ * the backend is performed via a given API object.
+ *
+ * @param rateLimiter - An object which conforms to the interface
+ * rateLimiter.shouldSend(item) -> bool
+ * @param api - An object which conforms to the interface
+ * api.postItem(payload, function(err, response))
+ * @param logger - An object used to log verbose messages if desired
+ * @param options - see Queue.prototype.configure
+ */
+function Queue(rateLimiter, api, logger, options) {
+ this.rateLimiter = rateLimiter;
+ this.api = api;
+ this.logger = logger;
+ this.options = options;
+ this.predicates = [];
+ this.pendingItems = [];
+ this.pendingRequests = [];
+ this.retryQueue = [];
+ this.retryHandle = null;
+ this.waitCallback = null;
+ this.waitIntervalID = null;
}
-function handleItemWithError(item, options, callback) {
- item.data = item.data || {};
- if (item.err) {
- try {
- item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);
+/*
+ * configure - updates the options this queue uses
+ *
+ * @param options
+ */
+Queue.prototype.configure = function (options) {
+ this.api && this.api.configure(options);
+ var oldOptions = this.options;
+ this.options = _.merge(oldOptions, options);
+ return this;
+};
- if (options.addErrorContext) {
- addErrorContext(item);
- }
- } catch (e) {
- logger.error('Error while parsing the error object.', e);
- try {
- item.message = item.err.message || item.err.description || item.message || String(item.err);
- } catch (e2) {
- item.message = String(item.err) || String(e2);
- }
- delete item.err;
- }
+/*
+ * addPredicate - adds a predicate to the end of the list of predicates for this queue
+ *
+ * @param predicate - function(item, options) -> (bool|{err: Error})
+ * Returning true means that this predicate passes and the item is okay to go on the queue
+ * Returning false means do not add the item to the queue, but it is not an error
+ * Returning {err: Error} means do not add the item to the queue, and the given error explains why
+ * Returning {err: undefined} is equivalent to returning true but don't do that
+ */
+Queue.prototype.addPredicate = function (predicate) {
+ if (_.isFunction(predicate)) {
+ this.predicates.push(predicate);
}
- callback(null, item);
-}
-
-function addErrorContext(item) {
- var chain = [];
- var err = item.err;
+ return this;
+};
- chain.push(err);
+Queue.prototype.addPendingItem = function (item) {
+ this.pendingItems.push(item);
+};
- while (err.nested) {
- err = err.nested;
- chain.push(err);
+Queue.prototype.removePendingItem = function (item) {
+ var idx = this.pendingItems.indexOf(item);
+ if (idx !== -1) {
+ this.pendingItems.splice(idx, 1);
}
+};
- _.addErrorContext(item, chain);
-}
-
-function ensureItemHasSomethingToSay(item, options, callback) {
- if (!item.message && !item.stackInfo && !item.custom) {
- callback(new Error('No message, stack info, or custom data'), null);
+/*
+ * addItem - Send an item to the Rollbar API if all of the predicates are satisfied
+ *
+ * @param item - The payload to send to the backend
+ * @param callback - function(error, repsonse) which will be called with the response from the API
+ * in the case of a success, otherwise response will be null and error will have a value. If both
+ * error and response are null then the item was stopped by a predicate which did not consider this
+ * to be an error condition, but nonetheless did not send the item to the API.
+ * @param originalError - The original error before any transformations that is to be logged if any
+ */
+Queue.prototype.addItem = function (
+ item,
+ callback,
+ originalError,
+ originalItem,
+) {
+ if (!callback || !_.isFunction(callback)) {
+ callback = function () {
+ return;
+ };
}
- callback(null, item);
-}
-
-function addBaseInfo(item, options, callback) {
- var environment = (options.payload && options.payload.environment) || options.environment;
- item.data = _.merge(item.data, {
- environment: environment,
- level: item.level,
- endpoint: options.endpoint,
- platform: 'browser',
- framework: 'browser-js',
- language: 'javascript',
- server: {},
- uuid: item.uuid,
- notifier: {
- name: 'rollbar-browser-js',
- version: options.version
- },
- custom: item.custom
- });
- callback(null, item);
-}
-
-function addRequestInfo(window) {
- return function(item, options, callback) {
- if (!window || !window.location) {
- return callback(null, item);
- }
- var remoteString = '$remote_ip';
- if (!options.captureIp) {
- remoteString = null;
- } else if (options.captureIp !== true) {
- remoteString += '_anonymize';
- }
- _.set(item, 'data.request', {
- url: window.location.href,
- query_string: window.location.search,
- user_ip: remoteString
- });
- callback(null, item);
- };
-}
-
-function addClientInfo(window) {
- return function(item, options, callback) {
- if (!window) {
- return callback(null, item);
- }
- var nav = window.navigator || {};
- var scr = window.screen || {};
- _.set(item, 'data.client', {
- runtime_ms: item.timestamp - window._rollbarStartTime,
- timestamp: Math.round(item.timestamp / 1000),
- javascript: {
- browser: nav.userAgent,
- language: nav.language,
- cookie_enabled: nav.cookieEnabled,
- screen: {
- width: scr.width,
- height: scr.height
- }
- }
- });
- callback(null, item);
- };
-}
+ var predicateResult = this._applyPredicates(item);
+ if (predicateResult.stop) {
+ this.removePendingItem(originalItem);
+ callback(predicateResult.err);
+ return;
+ }
+ this._maybeLog(item, originalError);
+ this.removePendingItem(originalItem);
+ if (!this.options.transmit) {
+ callback(new Error('Transmit disabled'));
+ return;
+ }
+ this.pendingRequests.push(item);
+ try {
+ this._makeApiRequest(
+ item,
+ function (err, resp) {
+ this._dequeuePendingRequest(item);
+ callback(err, resp);
+ }.bind(this),
+ );
+ } catch (e) {
+ this._dequeuePendingRequest(item);
+ callback(e);
+ }
+};
-function addPluginInfo(window) {
- return function(item, options, callback) {
- if (!window || !window.navigator) {
- return callback(null, item);
- }
- var plugins = [];
- var navPlugins = window.navigator.plugins || [];
- var cur;
- for (var i=0, l=navPlugins.length; i < l; ++i) {
- cur = navPlugins[i];
- plugins.push({name: cur.name, description: cur.description});
- }
- _.set(item, 'data.client.javascript.plugins', plugins);
- callback(null, item);
- };
-}
+/*
+ * wait - Stop any further errors from being added to the queue, and get called back when all items
+ * currently processing have finished sending to the backend.
+ *
+ * @param callback - function() called when all pending items have been sent
+ */
+Queue.prototype.wait = function (callback) {
+ if (!_.isFunction(callback)) {
+ return;
+ }
+ this.waitCallback = callback;
+ if (this._maybeCallWait()) {
+ return;
+ }
+ if (this.waitIntervalID) {
+ this.waitIntervalID = clearInterval(this.waitIntervalID);
+ }
+ this.waitIntervalID = setInterval(
+ function () {
+ this._maybeCallWait();
+ }.bind(this),
+ 500,
+ );
+};
-function addBody(item, options, callback) {
- if (item.stackInfo) {
- if (item.stackInfo.traceChain) {
- addBodyTraceChain(item, options, callback);
- } else {
- addBodyTrace(item, options, callback);
+/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the
+ * given item with the currently configured options.
+ *
+ * @param item - An item in the queue
+ * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,
+ * the error value should be passed up to a callbak if we are stopping.
+ */
+Queue.prototype._applyPredicates = function (item) {
+ var p = null;
+ for (var i = 0, len = this.predicates.length; i < len; i++) {
+ p = this.predicates[i](item, this.options);
+ if (!p || p.err !== undefined) {
+ return { stop: true, err: p.err };
}
+ }
+ return { stop: false, err: null };
+};
+
+/*
+ * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an
+ * effort to retry if we are configured to do so.
+ *
+ * @param item - an item ready to send to the backend
+ * @param callback - function(err, response)
+ */
+Queue.prototype._makeApiRequest = function (item, callback) {
+ var rateLimitResponse = this.rateLimiter.shouldSend(item);
+ if (rateLimitResponse.shouldSend) {
+ this.api.postItem(
+ item,
+ function (err, resp) {
+ if (err) {
+ this._maybeRetry(err, item, callback);
+ } else {
+ callback(err, resp);
+ }
+ }.bind(this),
+ );
+ } else if (rateLimitResponse.error) {
+ callback(rateLimitResponse.error);
} else {
- addBodyMessage(item, options, callback);
+ this.api.postItem(rateLimitResponse.payload, callback);
}
-}
+};
-function addBodyMessage(item, options, callback) {
- var message = item.message;
- var custom = item.custom;
+// These are errors basically mean there is no internet connection
+var RETRIABLE_ERRORS = [
+ 'ECONNRESET',
+ 'ENOTFOUND',
+ 'ESOCKETTIMEDOUT',
+ 'ETIMEDOUT',
+ 'ECONNREFUSED',
+ 'EHOSTUNREACH',
+ 'EPIPE',
+ 'EAI_AGAIN',
+];
- if (!message) {
- message = 'Item sent with null or missing arguments.';
+/*
+ * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback
+ * with the error.
+ *
+ * @param err - an error returned by the API transport
+ * @param item - the item that was trying to be sent when this error occured
+ * @param callback - function(err, response)
+ */
+Queue.prototype._maybeRetry = function (err, item, callback) {
+ var shouldRetry = false;
+ if (this.options.retryInterval) {
+ for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {
+ if (err.code === RETRIABLE_ERRORS[i]) {
+ shouldRetry = true;
+ break;
+ }
+ }
+ if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {
+ item.retries = item.retries ? item.retries + 1 : 1;
+ if (item.retries > this.options.maxRetries) {
+ shouldRetry = false;
+ }
+ }
}
- var result = {
- body: message
- };
-
- if (custom) {
- result.extra = _.merge(custom);
+ if (shouldRetry) {
+ this._retryApiRequest(item, callback);
+ } else {
+ callback(err);
}
+};
- _.set(item, 'data.body', {message: result});
- callback(null, item);
-}
+/*
+ * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process
+ * that queue based on the retryInterval in the options for this queue.
+ *
+ * @param item - an item that failed to send due to an error we deem retriable
+ * @param callback - function(err, response)
+ */
+Queue.prototype._retryApiRequest = function (item, callback) {
+ this.retryQueue.push({ item: item, callback: callback });
-function stackFromItem(item) {
- // Transform a TraceKit stackInfo object into a Rollbar trace
- var stack = item.stackInfo.stack;
- if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {
- stack = item._unhandledStackInfo.stack;
+ if (!this.retryHandle) {
+ this.retryHandle = setInterval(
+ function () {
+ while (this.retryQueue.length) {
+ var retryObject = this.retryQueue.shift();
+ this._makeApiRequest(retryObject.item, retryObject.callback);
+ }
+ }.bind(this),
+ this.options.retryInterval,
+ );
}
- return stack;
-}
+};
-function addBodyTraceChain(item, options, callback) {
- var traceChain = item.stackInfo.traceChain;
- var traces = [];
+/*
+ * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to
+ * enable to functionality of providing a callback that clients can pass to `wait` to be notified
+ * when the pending request queue has been emptied. This must be called when the API finishes
+ * processing this item. If a `wait` callback is configured, it is called by this function.
+ *
+ * @param item - the item previously added to the pending request queue
+ */
+Queue.prototype._dequeuePendingRequest = function (item) {
+ var idx = this.pendingRequests.indexOf(item);
+ if (idx !== -1) {
+ this.pendingRequests.splice(idx, 1);
+ this._maybeCallWait();
+ }
+};
- var traceChainLength = traceChain.length;
- for (var i = 0; i < traceChainLength; i++) {
- var trace = buildTrace(item, traceChain[i], options);
- traces.push(trace);
+Queue.prototype._maybeLog = function (data, originalError) {
+ if (this.logger && this.options.verbose) {
+ var message = originalError;
+ message = message || _.get(data, 'body.trace.exception.message');
+ message = message || _.get(data, 'body.trace_chain.0.exception.message');
+ if (message) {
+ this.logger.error(message);
+ return;
+ }
+ message = _.get(data, 'body.message.body');
+ if (message) {
+ this.logger.log(message);
+ }
}
+};
- _.set(item, 'data.body', {trace_chain: traces});
- callback(null, item);
-}
+Queue.prototype._maybeCallWait = function () {
+ if (
+ _.isFunction(this.waitCallback) &&
+ this.pendingItems.length === 0 &&
+ this.pendingRequests.length === 0
+ ) {
+ if (this.waitIntervalID) {
+ this.waitIntervalID = clearInterval(this.waitIntervalID);
+ }
+ this.waitCallback();
+ return true;
+ }
+ return false;
+};
-function addBodyTrace(item, options, callback) {
- var stack = stackFromItem(item);
+module.exports = Queue;
- if (stack) {
- var trace = buildTrace(item, item.stackInfo, options);
- _.set(item, 'data.body', {trace: trace});
- callback(null, item);
- } else {
- var stackInfo = item.stackInfo;
- var guess = errorParser.guessErrorClass(stackInfo.message);
- var className = errorClass(stackInfo, guess[0], options);
- var message = guess[1];
- item.message = className + ': ' + message;
- addBodyMessage(item, options, callback);
- }
-}
+/***/ }),
-function buildTrace(item, stackInfo, options) {
- var description = item && item.data.description;
- var custom = item && item.custom;
- var stack = stackFromItem(item);
+/***/ 790:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- var guess = errorParser.guessErrorClass(stackInfo.message);
- var className = errorClass(stackInfo, guess[0], options);
- var message = guess[1];
- var trace = {
- exception: {
- 'class': className,
- message: message
- }
- };
+"use strict";
- if (description) {
- trace.exception.description = description;
- }
- if (stack) {
- if (stack.length === 0) {
- trace.exception.stack = stackInfo.rawStack;
- trace.exception.raw = String(stackInfo.rawException);
- }
- var stackFrame;
- var frame;
- var code;
- var pre;
- var post;
- var contextLength;
- var i, mid;
+var _ = __webpack_require__(702);
- trace.frames = [];
- for (i = 0; i < stack.length; ++i) {
- stackFrame = stack[i];
- frame = {
- filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',
- lineno: stackFrame.line || null,
- method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,
- colno: stackFrame.column
- };
- if (options.sendFrameUrl) {
- frame.url = stackFrame.url;
- }
- if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {
- continue;
- }
+/*
+ * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar
+ *
+ * @param options - the same options that are accepted by configureGlobal offered as a convenience
+ */
+function RateLimiter(options) {
+ this.startTime = _.now();
+ this.counter = 0;
+ this.perMinCounter = 0;
+ this.platform = null;
+ this.platformOptions = {};
+ this.configureGlobal(options);
+}
- code = pre = post = null;
- contextLength = stackFrame.context ? stackFrame.context.length : 0;
- if (contextLength) {
- mid = Math.floor(contextLength / 2);
- pre = stackFrame.context.slice(0, mid);
- code = stackFrame.context[mid];
- post = stackFrame.context.slice(mid);
- }
+RateLimiter.globalSettings = {
+ startTime: _.now(),
+ maxItems: undefined,
+ itemsPerMinute: undefined,
+};
- if (code) {
- frame.code = code;
- }
+/*
+ * configureGlobal - set the global rate limiter options
+ *
+ * @param options - Only the following values are recognized:
+ * startTime: a timestamp of the form returned by (new Date()).getTime()
+ * maxItems: the maximum items
+ * itemsPerMinute: the max number of items to send in a given minute
+ */
+RateLimiter.prototype.configureGlobal = function (options) {
+ if (options.startTime !== undefined) {
+ RateLimiter.globalSettings.startTime = options.startTime;
+ }
+ if (options.maxItems !== undefined) {
+ RateLimiter.globalSettings.maxItems = options.maxItems;
+ }
+ if (options.itemsPerMinute !== undefined) {
+ RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;
+ }
+};
- if (pre || post) {
- frame.context = {};
- if (pre && pre.length) {
- frame.context.pre = pre;
- }
- if (post && post.length) {
- frame.context.post = post;
- }
- }
+/*
+ * shouldSend - determine if we should send a given item based on rate limit settings
+ *
+ * @param item - the item we are about to send
+ * @returns An object with the following structure:
+ * error: (Error|null)
+ * shouldSend: bool
+ * payload: (Object|null)
+ * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and
+ * exactly one of error or payload will be non-null. If error is non-null, the returned Error will
+ * describe the situation, but it means that we were already over a rate limit (either globally or
+ * per minute) when this item was checked. If error is null, and therefore payload is non-null, it
+ * means this item put us over the global rate limit and the payload should be sent to Rollbar in
+ * place of the passed in item.
+ */
+RateLimiter.prototype.shouldSend = function (item, now) {
+ now = now || _.now();
+ var elapsedTime = now - this.startTime;
+ if (elapsedTime < 0 || elapsedTime >= 60000) {
+ this.startTime = now;
+ this.perMinCounter = 0;
+ }
- if (stackFrame.args) {
- frame.args = stackFrame.args;
- }
+ var globalRateLimit = RateLimiter.globalSettings.maxItems;
+ var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;
- trace.frames.push(frame);
- }
+ if (checkRate(item, globalRateLimit, this.counter)) {
+ return shouldSendValue(
+ this.platform,
+ this.platformOptions,
+ globalRateLimit + ' max items reached',
+ false,
+ );
+ } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {
+ return shouldSendValue(
+ this.platform,
+ this.platformOptions,
+ globalRateLimitPerMin + ' items per minute reached',
+ false,
+ );
+ }
+ this.counter++;
+ this.perMinCounter++;
- // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last
- trace.frames.reverse();
+ var shouldSend = !checkRate(item, globalRateLimit, this.counter);
+ var perMinute = shouldSend;
+ shouldSend =
+ shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);
+ return shouldSendValue(
+ this.platform,
+ this.platformOptions,
+ null,
+ shouldSend,
+ globalRateLimit,
+ globalRateLimitPerMin,
+ perMinute,
+ );
+};
- if (custom) {
- trace.extra = _.merge(custom);
- }
- }
+RateLimiter.prototype.setPlatformOptions = function (platform, options) {
+ this.platform = platform;
+ this.platformOptions = options;
+};
- return trace;
+/* Helpers */
+
+function checkRate(item, limit, counter) {
+ return !item.ignoreRateLimit && limit >= 1 && counter > limit;
}
-function errorClass(stackInfo, guess, options) {
- if (stackInfo.name) {
- return stackInfo.name;
- } else if (options.guessErrorClass) {
- return guess;
- } else {
- return '(unknown)';
+function shouldSendValue(
+ platform,
+ options,
+ error,
+ shouldSend,
+ globalRateLimit,
+ limitPerMin,
+ perMinute,
+) {
+ var payload = null;
+ if (error) {
+ error = new Error(error);
}
+ if (!error && !shouldSend) {
+ payload = rateLimitPayload(
+ platform,
+ options,
+ globalRateLimit,
+ limitPerMin,
+ perMinute,
+ );
+ }
+ return { error: error, shouldSend: shouldSend, payload: payload };
}
-function addScrubber(scrubFn) {
- return function (item, options, callback) {
- if (scrubFn) {
- var scrubFields = options.scrubFields || [];
- var scrubPaths = options.scrubPaths || [];
- item.data = scrubFn(item.data, scrubFields, scrubPaths);
- }
- callback(null, item);
+function rateLimitPayload(
+ platform,
+ options,
+ globalRateLimit,
+ limitPerMin,
+ perMinute,
+) {
+ var environment =
+ options.environment || (options.payload && options.payload.environment);
+ var msg;
+ if (perMinute) {
+ msg = 'item per minute limit reached, ignoring errors until timeout';
+ } else {
+ msg = 'maxItems has been hit, ignoring errors until reset.';
+ }
+ var item = {
+ body: {
+ message: {
+ body: msg,
+ extra: {
+ maxItems: globalRateLimit,
+ itemsPerMinute: limitPerMin,
+ },
+ },
+ },
+ language: 'javascript',
+ environment: environment,
+ notifier: {
+ version:
+ (options.notifier && options.notifier.version) || options.version,
+ },
+ };
+ if (platform === 'browser') {
+ item.platform = 'browser';
+ item.framework = 'browser-js';
+ item.notifier.name = 'rollbar-browser-js';
+ } else if (platform === 'server') {
+ item.framework = options.framework || 'node-js';
+ item.notifier.name = options.notifier.name;
+ } else if (platform === 'react-native') {
+ item.framework = options.framework || 'react-native';
+ item.notifier.name = options.notifier.name;
}
+ return item;
}
-module.exports = {
- handleDomException: handleDomException,
- handleItemWithError: handleItemWithError,
- ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,
- addBaseInfo: addBaseInfo,
- addRequestInfo: addRequestInfo,
- addClientInfo: addClientInfo,
- addPluginInfo: addPluginInfo,
- addBody: addBody,
- addScrubber: addScrubber
-};
+module.exports = RateLimiter;
/***/ }),
-/* 22 */
-/***/ (function(module, exports, __webpack_require__) {
-
-var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {
- 'use strict';
- // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
-
- /* istanbul ignore next */
- if (true) {
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(23)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- } else {}
-}(this, function ErrorStackParser(StackFrame) {
- 'use strict';
-
- var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\S+:\d+/;
- var CHROME_IE_STACK_REGEXP = /^\s*at .*(\S+:\d+|\(native\))/m;
- var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\[native code])?$/;
-
- return {
- /**
- * Given an Error object, extract the most information from it.
- *
- * @param {Error} error object
- * @return {Array} of StackFrames
- */
- parse: function ErrorStackParser$$parse(error) {
- if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {
- return this.parseOpera(error);
- } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {
- return this.parseV8OrIE(error);
- } else if (error.stack) {
- return this.parseFFOrSafari(error);
- } else {
- throw new Error('Cannot parse given Error object');
- }
- },
-
- // Separate line and column numbers from a string of the form: (URI:Line:Column)
- extractLocation: function ErrorStackParser$$extractLocation(urlLike) {
- // Fail-fast but return locations like "(native)"
- if (urlLike.indexOf(':') === -1) {
- return [urlLike];
- }
-
- var regExp = /(.+?)(?::(\d+))?(?::(\d+))?$/;
- var parts = regExp.exec(urlLike.replace(/[()]/g, ''));
- return [parts[1], parts[2] || undefined, parts[3] || undefined];
- },
-
- parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {
- var filtered = error.stack.split('\n').filter(function(line) {
- return !!line.match(CHROME_IE_STACK_REGEXP);
- }, this);
-
- return filtered.map(function(line) {
- if (line.indexOf('(eval ') > -1) {
- // Throw away eval information until we implement stacktrace.js/stackframe#8
- line = line.replace(/eval code/g, 'eval').replace(/(\(eval at [^()]*)|(\),.*$)/g, '');
- }
- var sanitizedLine = line.replace(/^\s+/, '').replace(/\(eval code/g, '(');
-
- // capture and preseve the parenthesized location "(/foo/my bar.js:12:87)" in
- // case it has spaces in it, as the string is split on \s+ later on
- var location = sanitizedLine.match(/ (\((.+):(\d+):(\d+)\)$)/);
-
- // remove the parenthesized location from the line, if it was matched
- sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;
-
- var tokens = sanitizedLine.split(/\s+/).slice(1);
- // if a location was matched, pass it to extractLocation() otherwise pop the last token
- var locationParts = this.extractLocation(location ? location[1] : tokens.pop());
- var functionName = tokens.join(' ') || undefined;
- var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];
-
- return new StackFrame({
- functionName: functionName,
- fileName: fileName,
- lineNumber: locationParts[1],
- columnNumber: locationParts[2],
- source: line
- });
- }, this);
- },
-
- parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {
- var filtered = error.stack.split('\n').filter(function(line) {
- return !line.match(SAFARI_NATIVE_CODE_REGEXP);
- }, this);
- return filtered.map(function(line) {
- // Throw away eval information until we implement stacktrace.js/stackframe#8
- if (line.indexOf(' > eval') > -1) {
- line = line.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ':$1');
- }
+/***/ 562:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {
- // Safari eval frames only have function names and nothing else
- return new StackFrame({
- functionName: line
- });
- } else {
- var functionNameRegex = /((.*".+"[^@]*)?[^@]*)(?:@)/;
- var matches = line.match(functionNameRegex);
- var functionName = matches && matches[1] ? matches[1] : undefined;
- var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));
+"use strict";
- return new StackFrame({
- functionName: functionName,
- fileName: locationParts[0],
- lineNumber: locationParts[1],
- columnNumber: locationParts[2],
- source: line
- });
- }
- }, this);
- },
- parseOpera: function ErrorStackParser$$parseOpera(e) {
- if (!e.stacktrace || (e.message.indexOf('\n') > -1 &&
- e.message.split('\n').length > e.stacktrace.split('\n').length)) {
- return this.parseOpera9(e);
- } else if (!e.stack) {
- return this.parseOpera10(e);
- } else {
- return this.parseOpera11(e);
- }
- },
+var RateLimiter = __webpack_require__(790);
+var Queue = __webpack_require__(358);
+var Notifier = __webpack_require__(314);
+var _ = __webpack_require__(702);
- parseOpera9: function ErrorStackParser$$parseOpera9(e) {
- var lineRE = /Line (\d+).*script (?:in )?(\S+)/i;
- var lines = e.message.split('\n');
- var result = [];
+/*
+ * Rollbar - the interface to Rollbar
+ *
+ * @param options
+ * @param api
+ * @param logger
+ */
+function Rollbar(options, api, logger, telemeter, platform) {
+ this.options = _.merge(options);
+ this.logger = logger;
+ Rollbar.rateLimiter.configureGlobal(this.options);
+ Rollbar.rateLimiter.setPlatformOptions(platform, this.options);
+ this.api = api;
+ this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);
- for (var i = 2, len = lines.length; i < len; i += 2) {
- var match = lineRE.exec(lines[i]);
- if (match) {
- result.push(new StackFrame({
- fileName: match[2],
- lineNumber: match[1],
- source: lines[i]
- }));
- }
- }
+ // This must happen before the Notifier is created
+ var tracer = this.options.tracer || null;
+ if (validateTracer(tracer)) {
+ this.tracer = tracer;
+ // set to a string for api response serialization
+ this.options.tracer = 'opentracing-tracer-enabled';
+ this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';
+ } else {
+ this.tracer = null;
+ }
- return result;
- },
+ this.notifier = new Notifier(this.queue, this.options);
+ this.telemeter = telemeter;
+ setStackTraceLimit(options);
+ this.lastError = null;
+ this.lastErrorHash = 'none';
+}
- parseOpera10: function ErrorStackParser$$parseOpera10(e) {
- var lineRE = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i;
- var lines = e.stacktrace.split('\n');
- var result = [];
+var defaultOptions = {
+ maxItems: 0,
+ itemsPerMinute: 60,
+};
- for (var i = 0, len = lines.length; i < len; i += 2) {
- var match = lineRE.exec(lines[i]);
- if (match) {
- result.push(
- new StackFrame({
- functionName: match[3] || undefined,
- fileName: match[2],
- lineNumber: match[1],
- source: lines[i]
- })
- );
- }
- }
+Rollbar.rateLimiter = new RateLimiter(defaultOptions);
- return result;
- },
+Rollbar.prototype.global = function (options) {
+ Rollbar.rateLimiter.configureGlobal(options);
+ return this;
+};
- // Opera 10.65+ Error.stack very similar to FF/Safari
- parseOpera11: function ErrorStackParser$$parseOpera11(error) {
- var filtered = error.stack.split('\n').filter(function(line) {
- return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);
- }, this);
+Rollbar.prototype.configure = function (options, payloadData) {
+ var oldOptions = this.options;
+ var payload = {};
+ if (payloadData) {
+ payload = { payload: payloadData };
+ }
- return filtered.map(function(line) {
- var tokens = line.split('@');
- var locationParts = this.extractLocation(tokens.pop());
- var functionCall = (tokens.shift() || '');
- var functionName = functionCall
- .replace(//, '$2')
- .replace(/\([^)]*\)/g, '') || undefined;
- var argsRaw;
- if (functionCall.match(/\(([^)]*)\)/)) {
- argsRaw = functionCall.replace(/^[^(]+\(([^)]*)\)$/, '$1');
- }
- var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?
- undefined : argsRaw.split(',');
+ this.options = _.merge(oldOptions, options, payload);
- return new StackFrame({
- functionName: functionName,
- args: args,
- fileName: locationParts[0],
- lineNumber: locationParts[1],
- columnNumber: locationParts[2],
- source: line
- });
- }, this);
- }
- };
-}));
+ // This must happen before the Notifier is configured
+ var tracer = this.options.tracer || null;
+ if (validateTracer(tracer)) {
+ this.tracer = tracer;
+ // set to a string for api response serialization
+ this.options.tracer = 'opentracing-tracer-enabled';
+ this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';
+ } else {
+ this.tracer = null;
+ }
+ this.notifier && this.notifier.configure(this.options);
+ this.telemeter && this.telemeter.configure(this.options);
+ setStackTraceLimit(options);
+ this.global(this.options);
-/***/ }),
-/* 23 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (validateTracer(options.tracer)) {
+ this.tracer = options.tracer;
+ }
-var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(root, factory) {
- 'use strict';
- // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.
+ return this;
+};
- /* istanbul ignore next */
- if (true) {
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- } else {}
-}(this, function() {
- 'use strict';
- function _isNumber(n) {
- return !isNaN(parseFloat(n)) && isFinite(n);
- }
+Rollbar.prototype.log = function (item) {
+ var level = this._defaultLogLevel();
+ return this._log(level, item);
+};
- function _capitalize(str) {
- return str.charAt(0).toUpperCase() + str.substring(1);
- }
+Rollbar.prototype.debug = function (item) {
+ this._log('debug', item);
+};
- function _getter(p) {
- return function() {
- return this[p];
- };
- }
+Rollbar.prototype.info = function (item) {
+ this._log('info', item);
+};
- var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];
- var numericProps = ['columnNumber', 'lineNumber'];
- var stringProps = ['fileName', 'functionName', 'source'];
- var arrayProps = ['args'];
- var objectProps = ['evalOrigin'];
+Rollbar.prototype.warn = function (item) {
+ this._log('warning', item);
+};
- var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);
+Rollbar.prototype.warning = function (item) {
+ this._log('warning', item);
+};
- function StackFrame(obj) {
- if (!obj) return;
- for (var i = 0; i < props.length; i++) {
- if (obj[props[i]] !== undefined) {
- this['set' + _capitalize(props[i])](obj[props[i]]);
- }
- }
- }
+Rollbar.prototype.error = function (item) {
+ this._log('error', item);
+};
- StackFrame.prototype = {
- getArgs: function() {
- return this.args;
- },
- setArgs: function(v) {
- if (Object.prototype.toString.call(v) !== '[object Array]') {
- throw new TypeError('Args must be an Array');
- }
- this.args = v;
- },
+Rollbar.prototype.critical = function (item) {
+ this._log('critical', item);
+};
- getEvalOrigin: function() {
- return this.evalOrigin;
- },
- setEvalOrigin: function(v) {
- if (v instanceof StackFrame) {
- this.evalOrigin = v;
- } else if (v instanceof Object) {
- this.evalOrigin = new StackFrame(v);
- } else {
- throw new TypeError('Eval Origin must be an Object or StackFrame');
- }
- },
+Rollbar.prototype.wait = function (callback) {
+ this.queue.wait(callback);
+};
- toString: function() {
- var fileName = this.getFileName() || '';
- var lineNumber = this.getLineNumber() || '';
- var columnNumber = this.getColumnNumber() || '';
- var functionName = this.getFunctionName() || '';
- if (this.getIsEval()) {
- if (fileName) {
- return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';
- }
- return '[eval]:' + lineNumber + ':' + columnNumber;
- }
- if (functionName) {
- return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';
- }
- return fileName + ':' + lineNumber + ':' + columnNumber;
- }
- };
+Rollbar.prototype.captureEvent = function (type, metadata, level) {
+ return this.telemeter && this.telemeter.captureEvent(type, metadata, level);
+};
- StackFrame.fromString = function StackFrame$$fromString(str) {
- var argsStartIndex = str.indexOf('(');
- var argsEndIndex = str.lastIndexOf(')');
+Rollbar.prototype.captureDomContentLoaded = function (ts) {
+ return this.telemeter && this.telemeter.captureDomContentLoaded(ts);
+};
- var functionName = str.substring(0, argsStartIndex);
- var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');
- var locationString = str.substring(argsEndIndex + 1);
+Rollbar.prototype.captureLoad = function (ts) {
+ return this.telemeter && this.telemeter.captureLoad(ts);
+};
- if (locationString.indexOf('@') === 0) {
- var parts = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(locationString, '');
- var fileName = parts[1];
- var lineNumber = parts[2];
- var columnNumber = parts[3];
- }
+Rollbar.prototype.buildJsonPayload = function (item) {
+ return this.api.buildJsonPayload(item);
+};
- return new StackFrame({
- functionName: functionName,
- args: args || undefined,
- fileName: fileName,
- lineNumber: lineNumber || undefined,
- columnNumber: columnNumber || undefined
- });
- };
+Rollbar.prototype.sendJsonPayload = function (jsonPayload) {
+ this.api.postJsonPayload(jsonPayload);
+};
- for (var i = 0; i < booleanProps.length; i++) {
- StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);
- StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {
- return function(v) {
- this[p] = Boolean(v);
- };
- })(booleanProps[i]);
- }
+/* Internal */
- for (var j = 0; j < numericProps.length; j++) {
- StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);
- StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {
- return function(v) {
- if (!_isNumber(v)) {
- throw new TypeError(p + ' must be a Number');
- }
- this[p] = Number(v);
- };
- })(numericProps[j]);
+Rollbar.prototype._log = function (defaultLevel, item) {
+ var callback;
+ if (item.callback) {
+ callback = item.callback;
+ delete item.callback;
+ }
+ if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {
+ if (callback) {
+ var error = new Error('ignored identical item');
+ error.item = item;
+ callback(error);
}
-
- for (var k = 0; k < stringProps.length; k++) {
- StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);
- StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {
- return function(v) {
- this[p] = String(v);
- };
- })(stringProps[k]);
+ return;
+ }
+ try {
+ this._addTracingInfo(item);
+ item.level = item.level || defaultLevel;
+ this.telemeter && this.telemeter._captureRollbarItem(item);
+ item.telemetryEvents =
+ (this.telemeter && this.telemeter.copyEvents()) || [];
+ this.notifier.log(item, callback);
+ } catch (e) {
+ if (callback) {
+ callback(e);
}
+ this.logger.error(e);
+ }
+};
- return StackFrame;
-}));
-
+Rollbar.prototype._defaultLogLevel = function () {
+ return this.options.logLevel || 'debug';
+};
-/***/ }),
-/* 24 */
-/***/ (function(module, exports, __webpack_require__) {
+Rollbar.prototype._sameAsLastError = function (item) {
+ if (!item._isUncaught) {
+ return false;
+ }
+ var itemHash = generateItemHash(item);
+ if (this.lastErrorHash === itemHash) {
+ return true;
+ }
+ this.lastError = item.err;
+ this.lastErrorHash = itemHash;
+ return false;
+};
-"use strict";
+Rollbar.prototype._addTracingInfo = function (item) {
+ // Tracer validation occurs in the constructor
+ // or in the Rollbar.prototype.configure methods
+ if (this.tracer) {
+ // add rollbar occurrence uuid to span
+ var span = this.tracer.scope().active();
+ if (validateSpan(span)) {
+ span.setTag('rollbar.error_uuid', item.uuid);
+ span.setTag('rollbar.has_error', true);
+ span.setTag('error', true);
+ span.setTag(
+ 'rollbar.item_url',
+ `https://rollbar.com/item/uuid/?uuid=${item.uuid}`,
+ );
+ span.setTag(
+ 'rollbar.occurrence_url',
+ `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`,
+ );
-var _ = __webpack_require__(0);
+ // add span ID & trace ID to occurrence
+ var opentracingSpanId = span.context().toSpanId();
+ var opentracingTraceId = span.context().toTraceId();
-function itemToPayload(item, options, callback) {
- var payloadOptions = options.payload || {};
- if (payloadOptions.body) {
- delete payloadOptions.body;
+ if (item.custom) {
+ item.custom.opentracing_span_id = opentracingSpanId;
+ item.custom.opentracing_trace_id = opentracingTraceId;
+ } else {
+ item.custom = {
+ opentracing_span_id: opentracingSpanId,
+ opentracing_trace_id: opentracingTraceId,
+ };
+ }
+ }
}
+};
- var data = _.merge(item.data, payloadOptions);
- if (item._isUncaught) {
- data._isUncaught = true;
- }
- if (item._originalArgs) {
- data._originalArgs = item._originalArgs;
- }
- callback(null, data);
+function generateItemHash(item) {
+ var message = item.message || '';
+ var stack = (item.err || {}).stack || String(item.err);
+ return message + '::' + stack;
}
-function addTelemetryData(item, options, callback) {
- if (item.telemetryEvents) {
- _.set(item, 'data.body.telemetry', item.telemetryEvents);
+// Node.js, Chrome, Safari, and some other browsers support this property
+// which globally sets the number of stack frames returned in an Error object.
+// If a browser can't use it, no harm done.
+function setStackTraceLimit(options) {
+ if (options.stackTraceLimit) {
+ Error.stackTraceLimit = options.stackTraceLimit;
}
- callback(null, item);
}
-function addMessageWithError(item, options, callback) {
- if (!item.message) {
- callback(null, item);
- return;
- }
- var tracePath = 'data.body.trace_chain.0';
- var trace = _.get(item, tracePath);
- if (!trace) {
- tracePath = 'data.body.trace';
- trace = _.get(item, tracePath);
+/**
+ * Validate the Tracer object provided to the Client
+ * is valid for our Opentracing use case.
+ * @param {opentracer.Tracer} tracer
+ */
+function validateTracer(tracer) {
+ if (!tracer) {
+ return false;
}
- if (trace) {
- if (!(trace.exception && trace.exception.description)) {
- _.set(item, tracePath+'.exception.description', item.message);
- callback(null, item);
- return;
- }
- var extra = _.get(item, tracePath+'.extra') || {};
- var newExtra = _.merge(extra, {message: item.message});
- _.set(item, tracePath+'.extra', newExtra);
+
+ if (!tracer.scope || typeof tracer.scope !== 'function') {
+ return false;
}
- callback(null, item);
-}
-function userTransform(logger) {
- return function(item, options, callback) {
- var newItem = _.merge(item);
- var response = null;
- try {
- if (_.isFunction(options.transform)) {
- response = options.transform(newItem.data, item);
- }
- } catch (e) {
- options.transform = null;
- logger.error('Error while calling custom transform() function. Removing custom transform().', e);
- callback(null, item);
- return;
- }
- if(_.isPromise(response)) {
- response.then(function (promisedItem) {
- if(promisedItem) {
- newItem.data = promisedItem;
- }
- callback(null, newItem);
- }, function (error) {
- callback(error, item);
- });
- } else {
- callback(null, newItem);
- }
+ var scope = tracer.scope();
+
+ if (!scope || !scope.active || typeof scope.active !== 'function') {
+ return false;
}
+
+ return true;
}
-function addConfigToPayload(item, options, callback) {
- if (!options.sendConfig) {
- return callback(null, item);
+/**
+ * Validate the Span object provided
+ * @param {opentracer.Span} span
+ */
+function validateSpan(span) {
+ if (!span || !span.context || typeof span.context !== 'function') {
+ return false;
}
- var configKey = '_rollbarConfig';
- var custom = _.get(item, 'data.custom') || {};
- custom[configKey] = options;
- item.data.custom = custom;
- callback(null, item);
-}
-function addFunctionOption(options, name) {
- if(_.isFunction(options[name])) {
- options[name] = options[name].toString();
+ var spanContext = span.context();
+
+ if (
+ !spanContext ||
+ !spanContext.toSpanId ||
+ !spanContext.toTraceId ||
+ typeof spanContext.toSpanId !== 'function' ||
+ typeof spanContext.toTraceId !== 'function'
+ ) {
+ return false;
}
+
+ return true;
}
-function addConfiguredOptions(item, options, callback) {
- var configuredOptions = options._configuredOptions;
+module.exports = Rollbar;
- // These must be stringified or they'll get dropped during serialization.
- addFunctionOption(configuredOptions, 'transform');
- addFunctionOption(configuredOptions, 'checkIgnore');
- addFunctionOption(configuredOptions, 'onSendCallback');
- delete configuredOptions.accessToken;
- item.data.notifier.configured_options = configuredOptions;
- callback(null, item);
-}
+/***/ }),
-function addDiagnosticKeys(item, options, callback) {
- var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);
+/***/ 369:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- if (_.get(item, 'err._isAnonymous')) {
- diagnostic.is_anonymous = true;
- }
+"use strict";
- if (item._isUncaught) {
- diagnostic.is_uncaught = item._isUncaught;
- }
- if (item.err) {
- try {
- diagnostic.raw_error = {
- message: item.err.message,
- name: item.err.name,
- constructor_name: item.err.constructor && item.err.constructor.name,
- filename: item.err.fileName,
- line: item.err.lineNumber,
- column: item.err.columnNumber,
- stack: item.err.stack
- };
- } catch (e) {
- diagnostic.raw_error = { failed: String(e) };
+var _ = __webpack_require__(702);
+var traverse = __webpack_require__(267);
+
+function scrub(data, scrubFields, scrubPaths) {
+ scrubFields = scrubFields || [];
+
+ if (scrubPaths) {
+ for (var i = 0; i < scrubPaths.length; ++i) {
+ scrubPath(data, scrubPaths[i]);
}
}
- item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);
- callback(null, item);
-}
+ var paramRes = _getScrubFieldRegexs(scrubFields);
+ var queryRes = _getScrubQueryParamRegexs(scrubFields);
-module.exports = {
- itemToPayload: itemToPayload,
- addTelemetryData: addTelemetryData,
- addMessageWithError: addMessageWithError,
- userTransform: userTransform,
- addConfigToPayload: addConfigToPayload,
- addConfiguredOptions: addConfiguredOptions,
- addDiagnosticKeys: addDiagnosticKeys
-};
+ function redactQueryParam(dummy0, paramPart) {
+ return paramPart + _.redact();
+ }
+
+ function paramScrubber(v) {
+ var i;
+ if (_.isType(v, 'string')) {
+ for (i = 0; i < queryRes.length; ++i) {
+ v = v.replace(queryRes[i], redactQueryParam);
+ }
+ }
+ return v;
+ }
+ function valScrubber(k, v) {
+ var i;
+ for (i = 0; i < paramRes.length; ++i) {
+ if (paramRes[i].test(k)) {
+ v = _.redact();
+ break;
+ }
+ }
+ return v;
+ }
-/***/ }),
-/* 25 */
-/***/ (function(module, exports, __webpack_require__) {
+ function scrubber(k, v, seen) {
+ var tmpV = valScrubber(k, v);
+ if (tmpV === v) {
+ if (_.isType(v, 'object') || _.isType(v, 'array')) {
+ return traverse(v, scrubber, seen);
+ }
+ return paramScrubber(tmpV);
+ } else {
+ return tmpV;
+ }
+ }
-"use strict";
+ return traverse(data, scrubber);
+}
+function scrubPath(obj, path) {
+ var keys = path.split('.');
+ var last = keys.length - 1;
+ try {
+ for (var i = 0; i <= last; ++i) {
+ if (i < last) {
+ obj = obj[keys[i]];
+ } else {
+ obj[keys[i]] = _.redact();
+ }
+ }
+ } catch (e) {
+ // Missing key is OK;
+ }
+}
-var _ = __webpack_require__(0);
+function _getScrubFieldRegexs(scrubFields) {
+ var ret = [];
+ var pat;
+ for (var i = 0; i < scrubFields.length; ++i) {
+ pat = '^\\[?(%5[bB])?' + scrubFields[i] + '\\[?(%5[bB])?\\]?(%5[dD])?$';
+ ret.push(new RegExp(pat, 'i'));
+ }
+ return ret;
+}
-function checkIgnore(item, settings) {
- if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {
- return !_.get(item, 'body.message.extra.isAjax');
+function _getScrubQueryParamRegexs(scrubFields) {
+ var ret = [];
+ var pat;
+ for (var i = 0; i < scrubFields.length; ++i) {
+ pat = '\\[?(%5[bB])?' + scrubFields[i] + '\\[?(%5[bB])?\\]?(%5[dD])?';
+ ret.push(new RegExp('(' + pat + '=)([^&\\n]+)', 'igm'));
}
- return true;
+ return ret;
}
-module.exports = {
- checkIgnore: checkIgnore
-};
+module.exports = scrub;
/***/ }),
-/* 26 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 773:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var _ = __webpack_require__(0);
+var _ = __webpack_require__(702);
-function checkLevel(item, settings) {
- var level = item.level;
- var levelVal = _.LEVELS[level] || 0;
- var reportLevel = settings.reportLevel;
- var reportLevelVal = _.LEVELS[reportLevel] || 0;
+var MAX_EVENTS = 100;
- if (levelVal < reportLevelVal) {
- return false;
- }
- return true;
+function Telemeter(options) {
+ this.queue = [];
+ this.options = _.merge(options);
+ var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;
+ this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));
}
-function userCheckIgnore(logger) {
- return function(item, settings) {
- var isUncaught = !!item._isUncaught;
- delete item._isUncaught;
- var args = item._originalArgs;
- delete item._originalArgs;
- try {
- if (_.isFunction(settings.onSendCallback)) {
- settings.onSendCallback(isUncaught, args, item);
- }
- } catch (e) {
- settings.onSendCallback = null;
- logger.error('Error while calling onSendCallback, removing', e);
- }
+Telemeter.prototype.configure = function (options) {
+ var oldOptions = this.options;
+ this.options = _.merge(oldOptions, options);
+ var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;
+ var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));
+ var deleteCount = 0;
+ if (this.queue.length > newMaxEvents) {
+ deleteCount = this.queue.length - newMaxEvents;
+ }
+ this.maxQueueSize = newMaxEvents;
+ this.queue.splice(0, deleteCount);
+};
+
+Telemeter.prototype.copyEvents = function () {
+ var events = Array.prototype.slice.call(this.queue, 0);
+ if (_.isFunction(this.options.filterTelemetry)) {
try {
- if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {
- return false;
+ var i = events.length;
+ while (i--) {
+ if (this.options.filterTelemetry(events[i])) {
+ events.splice(i, 1);
+ }
}
} catch (e) {
- settings.checkIgnore = null;
- logger.error('Error while calling custom checkIgnore(), removing', e);
+ this.options.filterTelemetry = null;
}
- return true;
}
-}
+ return events;
+};
-function urlIsNotBlockListed(logger) {
- return function(item, settings) {
- return !urlIsOnAList(item, settings, 'blocklist', logger);
+Telemeter.prototype.capture = function (
+ type,
+ metadata,
+ level,
+ rollbarUUID,
+ timestamp,
+) {
+ var e = {
+ level: getLevel(type, level),
+ type: type,
+ timestamp_ms: timestamp || _.now(),
+ body: metadata,
+ source: 'client',
+ };
+ if (rollbarUUID) {
+ e.uuid = rollbarUUID;
}
-}
-function urlIsSafeListed(logger) {
- return function(item, settings) {
- return urlIsOnAList(item, settings, 'safelist', logger);
+ try {
+ if (
+ _.isFunction(this.options.filterTelemetry) &&
+ this.options.filterTelemetry(e)
+ ) {
+ return false;
+ }
+ } catch (exc) {
+ this.options.filterTelemetry = null;
}
-}
-
-function matchFrames(trace, list, block) {
- if (!trace) { return !block }
- var frames = trace.frames;
+ this.push(e);
+ return e;
+};
- if (!frames || frames.length === 0) { return !block; }
+Telemeter.prototype.captureEvent = function (
+ type,
+ metadata,
+ level,
+ rollbarUUID,
+) {
+ return this.capture(type, metadata, level, rollbarUUID);
+};
- var frame, filename, url, urlRegex;
- var listLength = list.length;
- var frameLength = frames.length;
- for (var i = 0; i < frameLength; i++) {
- frame = frames[i];
- filename = frame.filename;
+Telemeter.prototype.captureError = function (
+ err,
+ level,
+ rollbarUUID,
+ timestamp,
+) {
+ var metadata = {
+ message: err.message || String(err),
+ };
+ if (err.stack) {
+ metadata.stack = err.stack;
+ }
+ return this.capture('error', metadata, level, rollbarUUID, timestamp);
+};
- if (!_.isType(filename, 'string')) { return !block; }
+Telemeter.prototype.captureLog = function (
+ message,
+ level,
+ rollbarUUID,
+ timestamp,
+) {
+ return this.capture(
+ 'log',
+ {
+ message: message,
+ },
+ level,
+ rollbarUUID,
+ timestamp,
+ );
+};
- for (var j = 0; j < listLength; j++) {
- url = list[j];
- urlRegex = new RegExp(url);
+Telemeter.prototype.captureNetwork = function (
+ metadata,
+ subtype,
+ rollbarUUID,
+ requestData,
+) {
+ subtype = subtype || 'xhr';
+ metadata.subtype = metadata.subtype || subtype;
+ if (requestData) {
+ metadata.request = requestData;
+ }
+ var level = this.levelFromStatus(metadata.status_code);
+ return this.capture('network', metadata, level, rollbarUUID);
+};
- if (urlRegex.test(filename)) {
- return true;
- }
- }
+Telemeter.prototype.levelFromStatus = function (statusCode) {
+ if (statusCode >= 200 && statusCode < 400) {
+ return 'info';
}
- return false;
-}
+ if (statusCode === 0 || statusCode >= 400) {
+ return 'error';
+ }
+ return 'info';
+};
-function urlIsOnAList(item, settings, safeOrBlock, logger) {
- // safelist is the default
- var block = false;
- if (safeOrBlock === 'blocklist') {
- block = true;
+Telemeter.prototype.captureDom = function (
+ subtype,
+ element,
+ value,
+ checked,
+ rollbarUUID,
+) {
+ var metadata = {
+ subtype: subtype,
+ element: element,
+ };
+ if (value !== undefined) {
+ metadata.value = value;
}
+ if (checked !== undefined) {
+ metadata.checked = checked;
+ }
+ return this.capture('dom', metadata, 'info', rollbarUUID);
+};
- var list, traces;
- try {
- list = block ? settings.hostBlockList : settings.hostSafeList;
- traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];
+Telemeter.prototype.captureNavigation = function (from, to, rollbarUUID) {
+ return this.capture(
+ 'navigation',
+ { from: from, to: to },
+ 'info',
+ rollbarUUID,
+ );
+};
- // These two checks are important to come first as they are defaults
- // in case the list is missing or the trace is missing or not well-formed
- if (!list || list.length === 0) {
- return !block;
- }
- if (traces.length === 0 || !traces[0]) {
- return !block;
- }
+Telemeter.prototype.captureDomContentLoaded = function (ts) {
+ return this.capture(
+ 'navigation',
+ { subtype: 'DOMContentLoaded' },
+ 'info',
+ undefined,
+ ts && ts.getTime(),
+ );
+ /**
+ * If we decide to make this a dom event instead, then use the line below:
+ return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());
+ */
+};
+Telemeter.prototype.captureLoad = function (ts) {
+ return this.capture(
+ 'navigation',
+ { subtype: 'load' },
+ 'info',
+ undefined,
+ ts && ts.getTime(),
+ );
+ /**
+ * If we decide to make this a dom event instead, then use the line below:
+ return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());
+ */
+};
- var tracesLength = traces.length;
- for (var i = 0; i < tracesLength; i++) {
- if(matchFrames(traces[i], list, block)) {
- return true;
- }
- }
- } catch (e)
- /* istanbul ignore next */
- {
- if (block) {
- settings.hostBlockList = null;
- } else {
- settings.hostSafeList = null;
- }
- var listName = block ? 'hostBlockList' : 'hostSafeList';
- logger.error('Error while reading your configuration\'s ' + listName + ' option. Removing custom ' + listName + '.', e);
- return !block;
+Telemeter.prototype.captureConnectivityChange = function (type, rollbarUUID) {
+ return this.captureNetwork({ change: type }, 'connectivity', rollbarUUID);
+};
+
+// Only intended to be used internally by the notifier
+Telemeter.prototype._captureRollbarItem = function (item) {
+ if (!this.options.includeItemsInTelemetry) {
+ return;
}
- return false;
+ if (item.err) {
+ return this.captureError(item.err, item.level, item.uuid, item.timestamp);
+ }
+ if (item.message) {
+ return this.captureLog(item.message, item.level, item.uuid, item.timestamp);
+ }
+ if (item.custom) {
+ return this.capture(
+ 'log',
+ item.custom,
+ item.level,
+ item.uuid,
+ item.timestamp,
+ );
+ }
+};
+
+Telemeter.prototype.push = function (e) {
+ this.queue.push(e);
+ if (this.queue.length > this.maxQueueSize) {
+ this.queue.shift();
+ }
+};
+
+function getLevel(type, level) {
+ if (level) {
+ return level;
+ }
+ var defaultLevel = {
+ error: 'error',
+ manual: 'info',
+ };
+ return defaultLevel[type] || 'info';
}
-function messageIsIgnored(logger) {
- return function(item, settings) {
- var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;
+module.exports = Telemeter;
+
- try {
- messageIsIgnored = false;
- ignoredMessages = settings.ignoredMessages;
+/***/ }),
- if (!ignoredMessages || ignoredMessages.length === 0) {
- return true;
- }
+/***/ 417:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
- messages = messagesFromItem(item);
+"use strict";
- if (messages.length === 0){
- return true;
- }
- len = ignoredMessages.length;
- for (i = 0; i < len; i++) {
- rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');
+var _ = __webpack_require__(702);
- for (j = 0; j < messages.length; j++) {
- messageIsIgnored = rIgnoredMessage.test(messages[j]);
+function itemToPayload(item, options, callback) {
+ var data = item.data;
- if (messageIsIgnored) {
- return false;
- }
- }
- }
- } catch(e)
- /* istanbul ignore next */
- {
- settings.ignoredMessages = null;
- logger.error('Error while reading your configuration\'s ignoredMessages option. Removing custom ignoredMessages.');
- }
+ if (item._isUncaught) {
+ data._isUncaught = true;
+ }
+ if (item._originalArgs) {
+ data._originalArgs = item._originalArgs;
+ }
+ callback(null, data);
+}
- return true;
+function addPayloadOptions(item, options, callback) {
+ var payloadOptions = options.payload || {};
+ if (payloadOptions.body) {
+ delete payloadOptions.body;
}
+
+ item.data = _.merge(item.data, payloadOptions);
+ callback(null, item);
}
-function messagesFromItem(item) {
- var body = item.body;
- var messages = [];
+function addTelemetryData(item, options, callback) {
+ if (item.telemetryEvents) {
+ _.set(item, 'data.body.telemetry', item.telemetryEvents);
+ }
+ callback(null, item);
+}
- // The payload schema only allows one of trace_chain, message, or trace.
- // However, existing test cases are based on having both trace and message present.
- // So here we preserve the ability to collect strings from any combination of these keys.
- if (body.trace_chain) {
- var traceChain = body.trace_chain;
- for (var i = 0; i < traceChain.length; i++) {
- var trace = traceChain[i];
- messages.push(_.get(trace, 'exception.message'));
- }
+function addMessageWithError(item, options, callback) {
+ if (!item.message) {
+ callback(null, item);
+ return;
}
- if (body.trace) {
- messages.push(_.get(body, 'trace.exception.message'));
+ var tracePath = 'data.body.trace_chain.0';
+ var trace = _.get(item, tracePath);
+ if (!trace) {
+ tracePath = 'data.body.trace';
+ trace = _.get(item, tracePath);
}
- if (body.message) {
- messages.push(_.get(body, 'message.body'));
+ if (trace) {
+ if (!(trace.exception && trace.exception.description)) {
+ _.set(item, tracePath + '.exception.description', item.message);
+ callback(null, item);
+ return;
+ }
+ var extra = _.get(item, tracePath + '.extra') || {};
+ var newExtra = _.merge(extra, { message: item.message });
+ _.set(item, tracePath + '.extra', newExtra);
}
- return messages;
+ callback(null, item);
}
-module.exports = {
- checkLevel: checkLevel,
- userCheckIgnore: userCheckIgnore,
- urlIsNotBlockListed: urlIsNotBlockListed,
- urlIsSafeListed: urlIsSafeListed,
- messageIsIgnored: messageIsIgnored
-};
+function userTransform(logger) {
+ return function (item, options, callback) {
+ var newItem = _.merge(item);
+ var response = null;
+ try {
+ if (_.isFunction(options.transform)) {
+ response = options.transform(newItem.data, item);
+ }
+ } catch (e) {
+ options.transform = null;
+ logger.error(
+ 'Error while calling custom transform() function. Removing custom transform().',
+ e,
+ );
+ callback(null, item);
+ return;
+ }
+ if (_.isPromise(response)) {
+ response.then(
+ function (promisedItem) {
+ if (promisedItem) {
+ newItem.data = promisedItem;
+ }
+ callback(null, newItem);
+ },
+ function (error) {
+ callback(error, item);
+ },
+ );
+ } else {
+ callback(null, newItem);
+ }
+ };
+}
+function addConfigToPayload(item, options, callback) {
+ if (!options.sendConfig) {
+ return callback(null, item);
+ }
+ var configKey = '_rollbarConfig';
+ var custom = _.get(item, 'data.custom') || {};
+ custom[configKey] = options;
+ item.data.custom = custom;
+ callback(null, item);
+}
-/***/ }),
-/* 27 */
-/***/ (function(module, exports, __webpack_require__) {
+function addFunctionOption(options, name) {
+ if (_.isFunction(options[name])) {
+ options[name] = options[name].toString();
+ }
+}
-"use strict";
+function addConfiguredOptions(item, options, callback) {
+ var configuredOptions = options._configuredOptions;
+ // These must be stringified or they'll get dropped during serialization.
+ addFunctionOption(configuredOptions, 'transform');
+ addFunctionOption(configuredOptions, 'checkIgnore');
+ addFunctionOption(configuredOptions, 'onSendCallback');
-module.exports = {
- version: '2.24.0',
- endpoint: 'api.rollbar.com/api/1/item/',
- logLevel: 'debug',
- reportLevel: 'debug',
- uncaughtErrorLevel: 'error',
- maxItems: 0,
- itemsPerMin: 60
+ delete configuredOptions.accessToken;
+ item.data.notifier.configured_options = configuredOptions;
+ callback(null, item);
}
+function addDiagnosticKeys(item, options, callback) {
+ var diagnostic = _.merge(
+ item.notifier.client.notifier.diagnostic,
+ item.diagnostic,
+ );
-/***/ }),
-/* 28 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (_.get(item, 'err._isAnonymous')) {
+ diagnostic.is_anonymous = true;
+ }
-"use strict";
+ if (item._isUncaught) {
+ diagnostic.is_uncaught = item._isUncaught;
+ }
+ if (item.err) {
+ try {
+ diagnostic.raw_error = {
+ message: item.err.message,
+ name: item.err.name,
+ constructor_name: item.err.constructor && item.err.constructor.name,
+ filename: item.err.fileName,
+ line: item.err.lineNumber,
+ column: item.err.columnNumber,
+ stack: item.err.stack,
+ };
+ } catch (e) {
+ diagnostic.raw_error = { failed: String(e) };
+ }
+ }
-module.exports = {
- scrubFields: [
- 'pw',
- 'pass',
- 'passwd',
- 'password',
- 'secret',
- 'confirm_password',
- 'confirmPassword',
- 'password_confirmation',
- 'passwordConfirmation',
- 'access_token',
- 'accessToken',
- 'X-Rollbar-Access-Token',
- 'secret_key',
- 'secretKey',
- 'secretToken',
- 'cc-number',
- 'card number',
- 'cardnumber',
- 'cardnum',
- 'ccnum',
- 'ccnumber',
- 'cc num',
- 'creditcardnumber',
- 'credit card number',
- 'newcreditcardnumber',
- 'new credit card',
- 'creditcardno',
- 'credit card no',
- 'card#',
- 'card #',
- 'cc-csc',
- 'cvc',
- 'cvc2',
- 'cvv2',
- 'ccv2',
- 'security code',
- 'card verification',
- 'name on credit card',
- 'name on card',
- 'nameoncard',
- 'cardholder',
- 'card holder',
- 'name des karteninhabers',
- 'ccname',
- 'card type',
- 'cardtype',
- 'cc type',
- 'cctype',
- 'payment type',
- 'expiration date',
- 'expirationdate',
- 'expdate',
- 'cc-exp',
- 'ccmonth',
- 'ccyear'
- ]
+ item.data.notifier.diagnostic = _.merge(
+ item.data.notifier.diagnostic,
+ diagnostic,
+ );
+ callback(null, item);
}
+module.exports = {
+ itemToPayload: itemToPayload,
+ addPayloadOptions: addPayloadOptions,
+ addTelemetryData: addTelemetryData,
+ addMessageWithError: addMessageWithError,
+ userTransform: userTransform,
+ addConfigToPayload: addConfigToPayload,
+ addConfiguredOptions: addConfiguredOptions,
+ addDiagnosticKeys: addDiagnosticKeys,
+};
+
/***/ }),
-/* 29 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 473:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var _ = __webpack_require__(0);
+var _ = __webpack_require__(702);
+var traverse = __webpack_require__(267);
-var MAX_EVENTS = 100;
+function raw(payload, jsonBackup) {
+ return [payload, _.stringify(payload, jsonBackup)];
+}
-function Telemeter(options) {
- this.queue = [];
- this.options = _.merge(options);
- var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;
- this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));
+function selectFrames(frames, range) {
+ var len = frames.length;
+ if (len > range * 2) {
+ return frames.slice(0, range).concat(frames.slice(len - range));
+ }
+ return frames;
+}
+
+function truncateFrames(payload, jsonBackup, range) {
+ range = typeof range === 'undefined' ? 30 : range;
+ var body = payload.data.body;
+ var frames;
+ if (body.trace_chain) {
+ var chain = body.trace_chain;
+ for (var i = 0; i < chain.length; i++) {
+ frames = chain[i].frames;
+ frames = selectFrames(frames, range);
+ chain[i].frames = frames;
+ }
+ } else if (body.trace) {
+ frames = body.trace.frames;
+ frames = selectFrames(frames, range);
+ body.trace.frames = frames;
+ }
+ return [payload, _.stringify(payload, jsonBackup)];
}
-Telemeter.prototype.configure = function(options) {
- var oldOptions = this.options;
- this.options = _.merge(oldOptions, options);
- var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;
- var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));
- var deleteCount = 0;
- if (this.maxQueueSize > newMaxEvents) {
- deleteCount = this.maxQueueSize - newMaxEvents;
+function maybeTruncateValue(len, val) {
+ if (!val) {
+ return val;
}
- this.maxQueueSize = newMaxEvents;
- this.queue.splice(0, deleteCount);
-};
+ if (val.length > len) {
+ return val.slice(0, len - 3).concat('...');
+ }
+ return val;
+}
-Telemeter.prototype.copyEvents = function() {
- var events = Array.prototype.slice.call(this.queue, 0);
- if (_.isFunction(this.options.filterTelemetry)) {
- try {
- var i = events.length;
- while (i--) {
- if (this.options.filterTelemetry(events[i])) {
- events.splice(i, 1);
- }
- }
- } catch (e) {
- this.options.filterTelemetry = null;
+function truncateStrings(len, payload, jsonBackup) {
+ function truncator(k, v, seen) {
+ switch (_.typeName(v)) {
+ case 'string':
+ return maybeTruncateValue(len, v);
+ case 'object':
+ case 'array':
+ return traverse(v, truncator, seen);
+ default:
+ return v;
}
}
- return events;
-};
+ payload = traverse(payload, truncator);
+ return [payload, _.stringify(payload, jsonBackup)];
+}
-Telemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {
- var e = {
- level: getLevel(type, level),
- type: type,
- timestamp_ms: timestamp || _.now(),
- body: metadata,
- source: 'client'
- };
- if (rollbarUUID) {
- e.uuid = rollbarUUID;
+function truncateTraceData(traceData) {
+ if (traceData.exception) {
+ delete traceData.exception.description;
+ traceData.exception.message = maybeTruncateValue(
+ 255,
+ traceData.exception.message,
+ );
}
+ traceData.frames = selectFrames(traceData.frames, 1);
+ return traceData;
+}
- try {
- if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {
- return false;
+function minBody(payload, jsonBackup) {
+ var body = payload.data.body;
+ if (body.trace_chain) {
+ var chain = body.trace_chain;
+ for (var i = 0; i < chain.length; i++) {
+ chain[i] = truncateTraceData(chain[i]);
}
- } catch (exc) {
- this.options.filterTelemetry = null;
+ } else if (body.trace) {
+ body.trace = truncateTraceData(body.trace);
}
+ return [payload, _.stringify(payload, jsonBackup)];
+}
- this.push(e);
- return e;
-};
+function needsTruncation(payload, maxSize) {
+ return _.maxByteSize(payload) > maxSize;
+}
-Telemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {
- return this.capture(type, metadata, level, rollbarUUID);
-};
+function truncate(payload, jsonBackup, maxSize) {
+ maxSize = typeof maxSize === 'undefined' ? 512 * 1024 : maxSize;
+ var strategies = [
+ raw,
+ truncateFrames,
+ truncateStrings.bind(null, 1024),
+ truncateStrings.bind(null, 512),
+ truncateStrings.bind(null, 256),
+ minBody,
+ ];
+ var strategy, results, result;
-Telemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {
- var metadata = {
- message: err.message || String(err)
- };
- if (err.stack) {
- metadata.stack = err.stack;
+ while ((strategy = strategies.shift())) {
+ results = strategy(payload, jsonBackup);
+ payload = results[0];
+ result = results[1];
+ if (result.error || !needsTruncation(result.value, maxSize)) {
+ return result;
+ }
}
- return this.capture('error', metadata, level, rollbarUUID, timestamp);
-};
+ return result;
+}
-Telemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {
- return this.capture('log', {
- message: message
- }, level, rollbarUUID, timestamp);
-};
+module.exports = {
+ truncate: truncate,
-Telemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {
- subtype = subtype || 'xhr';
- metadata.subtype = metadata.subtype || subtype;
- if (requestData) {
- metadata.request = requestData;
- }
- var level = this.levelFromStatus(metadata.status_code);
- return this.capture('network', metadata, level, rollbarUUID);
+ /* for testing */
+ raw: raw,
+ truncateFrames: truncateFrames,
+ truncateStrings: truncateStrings,
+ maybeTruncateValue: maybeTruncateValue,
};
-Telemeter.prototype.levelFromStatus = function(statusCode) {
- if (statusCode >= 200 && statusCode < 400) {
- return 'info';
- }
- if (statusCode === 0 || statusCode >= 400) {
- return 'error';
- }
- return 'info';
-};
-Telemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {
- var metadata = {
- subtype: subtype,
- element: element
- };
- if (value !== undefined) {
- metadata.value = value;
- }
- if (checked !== undefined) {
- metadata.checked = checked;
- }
- return this.capture('dom', metadata, 'info', rollbarUUID);
-};
+/***/ }),
-Telemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {
- return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);
-};
+/***/ 702:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
-Telemeter.prototype.captureDomContentLoaded = function(ts) {
- return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());
- /**
- * If we decide to make this a dom event instead, then use the line below:
- return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());
- */
-};
-Telemeter.prototype.captureLoad = function(ts) {
- return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());
- /**
- * If we decide to make this a dom event instead, then use the line below:
- return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());
- */
-};
+"use strict";
-Telemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {
- return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);
-};
-// Only intended to be used internally by the notifier
-Telemeter.prototype._captureRollbarItem = function(item) {
- if (!this.options.includeItemsInTelemetry) {
+var merge = __webpack_require__(420);
+
+var RollbarJSON = {};
+function setupJSON(polyfillJSON) {
+ if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {
return;
}
- if (item.err) {
- return this.captureError(item.err, item.level, item.uuid, item.timestamp);
+
+ if (isDefined(JSON)) {
+ // If polyfill is provided, prefer it over existing non-native shims.
+ if (polyfillJSON) {
+ if (isNativeFunction(JSON.stringify)) {
+ RollbarJSON.stringify = JSON.stringify;
+ }
+ if (isNativeFunction(JSON.parse)) {
+ RollbarJSON.parse = JSON.parse;
+ }
+ } else {
+ // else accept any interface that is present.
+ if (isFunction(JSON.stringify)) {
+ RollbarJSON.stringify = JSON.stringify;
+ }
+ if (isFunction(JSON.parse)) {
+ RollbarJSON.parse = JSON.parse;
+ }
+ }
}
- if (item.message) {
- return this.captureLog(item.message, item.level, item.uuid, item.timestamp);
+ if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {
+ polyfillJSON && polyfillJSON(RollbarJSON);
}
- if (item.custom) {
- return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);
+}
+
+/*
+ * isType - Given a Javascript value and a string, returns true if the type of the value matches the
+ * given string.
+ *
+ * @param x - any value
+ * @param t - a lowercase string containing one of the following type names:
+ * - undefined
+ * - null
+ * - error
+ * - number
+ * - boolean
+ * - string
+ * - symbol
+ * - function
+ * - object
+ * - array
+ * @returns true if x is of type t, otherwise false
+ */
+function isType(x, t) {
+ return t === typeName(x);
+}
+
+/*
+ * typeName - Given a Javascript value, returns the type of the object as a string
+ */
+function typeName(x) {
+ var name = typeof x;
+ if (name !== 'object') {
+ return name;
}
-};
+ if (!x) {
+ return 'null';
+ }
+ if (x instanceof Error) {
+ return 'error';
+ }
+ return {}.toString
+ .call(x)
+ .match(/\s([a-zA-Z]+)/)[1]
+ .toLowerCase();
+}
+
+/* isFunction - a convenience function for checking if a value is a function
+ *
+ * @param f - any value
+ * @returns true if f is a function, otherwise false
+ */
+function isFunction(f) {
+ 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');
+}
-Telemeter.prototype.push = function(e) {
- this.queue.push(e);
- if (this.queue.length > this.maxQueueSize) {
- this.queue.shift();
- }
-};
+/* isString - Checks if the argument is a string
+ *
+ * @param value - any value
+ * @returns true if value is a string
+ */
+function isString(value) {
+ return typeof value === 'string' || value instanceof String;
+}
-function getLevel(type, level) {
- if (level) {
- return level;
- }
- var defaultLevel = {
- error: 'error',
- manual: 'info'
- };
- return defaultLevel[type] || 'info';
+/**
+ * isFiniteNumber - determines whether the passed value is a finite number
+ *
+ * @param {*} n - any value
+ * @returns true if value is a finite number
+ */
+function isFiniteNumber(n) {
+ return Number.isFinite(n);
}
-module.exports = Telemeter;
+/*
+ * isDefined - a convenience function for checking if a value is not equal to undefined
+ *
+ * @param u - any value
+ * @returns true if u is anything other than undefined
+ */
+function isDefined(u) {
+ return !isType(u, 'undefined');
+}
+/*
+ * isIterable - convenience function for checking if a value can be iterated, essentially
+ * whether it is an object or an array.
+ *
+ * @param i - any value
+ * @returns true if i is an object or an array as determined by `typeName`
+ */
+function isIterable(i) {
+ var type = typeName(i);
+ return type === 'object' || type === 'array';
+}
-/***/ }),
-/* 30 */
-/***/ (function(module, exports, __webpack_require__) {
+/*
+ * isError - convenience function for checking if a value is of an error type
+ *
+ * @param e - any value
+ * @returns true if e is an error
+ */
+function isError(e) {
+ // Detect both Error and Firefox Exception type
+ return isType(e, 'error') || isType(e, 'exception');
+}
-"use strict";
+/* isPromise - a convenience function for checking if a value is a promise
+ *
+ * @param p - any value
+ * @returns true if f is a function, otherwise false
+ */
+function isPromise(p) {
+ return isObject(p) && isType(p.then, 'function');
+}
+function redact() {
+ return '********';
+}
-var _ = __webpack_require__(0);
-var scrub = __webpack_require__(4);
-var urlparser = __webpack_require__(2);
-var domUtil = __webpack_require__(31);
+// from http://stackoverflow.com/a/8809472/1138191
+function uuid4() {
+ var d = now();
+ var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(
+ /[xy]/g,
+ function (c) {
+ var r = (d + Math.random() * 16) % 16 | 0;
+ d = Math.floor(d / 16);
+ return (c === 'x' ? r : (r & 0x7) | 0x8).toString(16);
+ },
+ );
+ return uuid;
+}
-var defaults = {
- network: true,
- networkResponseHeaders: false,
- networkResponseBody: false,
- networkRequestHeaders: false,
- networkRequestBody: false,
- networkErrorOnHttp5xx: false,
- networkErrorOnHttp4xx: false,
- networkErrorOnHttp0: false,
- log: true,
- dom: true,
- navigation: true,
- connectivity: true,
- contentSecurityPolicy: true,
- errorOnContentSecurityPolicy: false
+var LEVELS = {
+ debug: 0,
+ info: 1,
+ warning: 2,
+ error: 3,
+ critical: 4,
};
-function replace(obj, name, replacement, replacements, type) {
- var orig = obj[name];
- obj[name] = replacement(orig);
- if (replacements) {
- replacements[type].push([obj, name, orig]);
+function sanitizeUrl(url) {
+ var baseUrlParts = parseUri(url);
+ if (!baseUrlParts) {
+ return '(unknown)';
}
-}
-function restore(replacements, type) {
- var b;
- while (replacements[type].length) {
- b = replacements[type].shift();
- b[0][b[1]] = b[2];
+ // remove a trailing # if there is no anchor
+ if (baseUrlParts.anchor === '') {
+ baseUrlParts.source = baseUrlParts.source.replace('#', '');
}
+
+ url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');
+ return url;
}
-function nameFromDescription(description) {
- if (!description || !description.attributes) { return null; }
- var attrs = description.attributes;
- for (var a = 0; a < attrs.length; ++a) {
- if (attrs[a].key === 'name') {
- return attrs[a].value;
- }
+var parseUriOptions = {
+ strictMode: false,
+ key: [
+ 'source',
+ 'protocol',
+ 'authority',
+ 'userInfo',
+ 'user',
+ 'password',
+ 'host',
+ 'port',
+ 'relative',
+ 'path',
+ 'directory',
+ 'file',
+ 'query',
+ 'anchor',
+ ],
+ q: {
+ name: 'queryKey',
+ parser: /(?:^|&)([^&=]*)=?([^&]*)/g,
+ },
+ parser: {
+ strict:
+ /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
+ loose:
+ /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,
+ },
+};
+
+function parseUri(str) {
+ if (!isType(str, 'string')) {
+ return undefined;
}
- return null;
-}
-function defaultValueScrubber(scrubFields) {
- var patterns = [];
- for (var i = 0; i < scrubFields.length; ++i) {
- patterns.push(new RegExp(scrubFields[i], 'i'));
+ var o = parseUriOptions;
+ var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);
+ var uri = {};
+
+ for (var i = 0, l = o.key.length; i < l; ++i) {
+ uri[o.key[i]] = m[i] || '';
}
- return function(description) {
- var name = nameFromDescription(description);
- if (!name) { return false; }
- for (var i = 0; i < patterns.length; ++i) {
- if (patterns[i].test(name)) {
- return true;
- }
+
+ uri[o.q.name] = {};
+ uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
+ if ($1) {
+ uri[o.q.name][$1] = $2;
}
- return false;
- };
+ });
+
+ return uri;
}
-function Instrumenter(options, telemeter, rollbar, _window, _document) {
- this.options = options;
- var autoInstrument = options.autoInstrument;
- if (options.enabled === false || autoInstrument === false) {
- this.autoInstrument = {};
- } else {
- if (!_.isType(autoInstrument, 'object')) {
- autoInstrument = defaults;
+function addParamsAndAccessTokenToPath(accessToken, options, params) {
+ params = params || {};
+ params.access_token = accessToken;
+ var paramsArray = [];
+ var k;
+ for (k in params) {
+ if (Object.prototype.hasOwnProperty.call(params, k)) {
+ paramsArray.push([k, params[k]].join('='));
}
- this.autoInstrument = _.merge(defaults, autoInstrument);
}
- this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;
- this.telemetryScrubber = options.telemetryScrubber;
- this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);
- this.telemeter = telemeter;
- this.rollbar = rollbar;
- this.diagnostic = rollbar.client.notifier.diagnostic;
- this._window = _window || {};
- this._document = _document || {};
- this.replacements = {
- network: [],
- log: [],
- navigation: [],
- connectivity: []
- };
- this.eventRemovers = {
- dom: [],
- connectivity: [],
- contentsecuritypolicy: []
- };
+ var query = '?' + paramsArray.sort().join('&');
- this._location = this._window.location;
- this._lastHref = this._location && this._location.href;
+ options = options || {};
+ options.path = options.path || '';
+ var qs = options.path.indexOf('?');
+ var h = options.path.indexOf('#');
+ var p;
+ if (qs !== -1 && (h === -1 || h > qs)) {
+ p = options.path;
+ options.path = p.substring(0, qs) + query + '&' + p.substring(qs + 1);
+ } else {
+ if (h !== -1) {
+ p = options.path;
+ options.path = p.substring(0, h) + query + p.substring(h);
+ } else {
+ options.path = options.path + query;
+ }
+ }
}
-Instrumenter.prototype.configure = function(options) {
- this.options = _.merge(this.options, options);
- var autoInstrument = options.autoInstrument;
- var oldSettings = _.merge(this.autoInstrument);
- if (options.enabled === false || autoInstrument === false) {
- this.autoInstrument = {};
- } else {
- if (!_.isType(autoInstrument, 'object')) {
- autoInstrument = defaults;
+function formatUrl(u, protocol) {
+ protocol = protocol || u.protocol;
+ if (!protocol && u.port) {
+ if (u.port === 80) {
+ protocol = 'http:';
+ } else if (u.port === 443) {
+ protocol = 'https:';
}
- this.autoInstrument = _.merge(defaults, autoInstrument);
}
- this.instrument(oldSettings);
- if (options.scrubTelemetryInputs !== undefined) {
- this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;
+ protocol = protocol || 'https:';
+
+ if (!u.hostname) {
+ return null;
}
- if (options.telemetryScrubber !== undefined) {
- this.telemetryScrubber = options.telemetryScrubber;
+ var result = protocol + '//' + u.hostname;
+ if (u.port) {
+ result = result + ':' + u.port;
}
-};
-
-// eslint-disable-next-line complexity
-Instrumenter.prototype.instrument = function(oldSettings) {
- if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {
- this.instrumentNetwork();
- } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {
- this.deinstrumentNetwork();
+ if (u.path) {
+ result = result + u.path;
}
+ return result;
+}
- if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {
- this.instrumentConsole();
- } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {
- this.deinstrumentConsole();
+function stringify(obj, backup) {
+ var value, error;
+ try {
+ value = RollbarJSON.stringify(obj);
+ } catch (jsonError) {
+ if (backup && isFunction(backup)) {
+ try {
+ value = backup(obj);
+ } catch (backupError) {
+ error = backupError;
+ }
+ } else {
+ error = jsonError;
+ }
}
+ return { error: error, value: value };
+}
- if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {
- this.instrumentDom();
- } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {
- this.deinstrumentDom();
- }
+function maxByteSize(string) {
+ // The transport will use utf-8, so assume utf-8 encoding.
+ //
+ // This minimal implementation will accurately count bytes for all UCS-2 and
+ // single code point UTF-16. If presented with multi code point UTF-16,
+ // which should be rare, it will safely overcount, not undercount.
+ //
+ // While robust utf-8 encoders exist, this is far smaller and far more performant.
+ // For quickly counting payload size for truncation, smaller is better.
- if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {
- this.instrumentNavigation();
- } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {
- this.deinstrumentNavigation();
- }
+ var count = 0;
+ var length = string.length;
- if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {
- this.instrumentConnectivity();
- } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {
- this.deinstrumentConnectivity();
+ for (var i = 0; i < length; i++) {
+ var code = string.charCodeAt(i);
+ if (code < 128) {
+ // up to 7 bits
+ count = count + 1;
+ } else if (code < 2048) {
+ // up to 11 bits
+ count = count + 2;
+ } else if (code < 65536) {
+ // up to 16 bits
+ count = count + 3;
+ }
}
- if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {
- this.instrumentContentSecurityPolicy();
- } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {
- this.deinstrumentContentSecurityPolicy();
- }
-};
+ return count;
+}
-Instrumenter.prototype.deinstrumentNetwork = function() {
- restore(this.replacements, 'network');
-};
+function jsonParse(s) {
+ var value, error;
+ try {
+ value = RollbarJSON.parse(s);
+ } catch (e) {
+ error = e;
+ }
+ return { error: error, value: value };
+}
-Instrumenter.prototype.instrumentNetwork = function() {
- var self = this;
+function makeUnhandledStackInfo(
+ message,
+ url,
+ lineno,
+ colno,
+ error,
+ mode,
+ backupMessage,
+ errorParser,
+) {
+ var location = {
+ url: url || '',
+ line: lineno,
+ column: colno,
+ };
+ location.func = errorParser.guessFunctionName(location.url, location.line);
+ location.context = errorParser.gatherContext(location.url, location.line);
+ var href =
+ typeof document !== 'undefined' &&
+ document &&
+ document.location &&
+ document.location.href;
+ var useragent =
+ typeof window !== 'undefined' &&
+ window &&
+ window.navigator &&
+ window.navigator.userAgent;
+ return {
+ mode: mode,
+ message: error ? String(error) : message || backupMessage,
+ url: href,
+ stack: [location],
+ useragent: useragent,
+ };
+}
- function wrapProp(prop, xhr) {
- if (prop in xhr && _.isFunction(xhr[prop])) {
- replace(xhr, prop, function(orig) {
- return self.rollbar.wrap(orig);
- });
+function wrapCallback(logger, f) {
+ return function (err, resp) {
+ try {
+ f(err, resp);
+ } catch (e) {
+ logger.error(e);
}
- }
+ };
+}
- if ('XMLHttpRequest' in this._window) {
- var xhrp = this._window.XMLHttpRequest.prototype;
- replace(xhrp, 'open', function(orig) {
- return function(method, url) {
- if (_.isType(url, 'string')) {
- if (this.__rollbar_xhr) {
- this.__rollbar_xhr.method = method;
- this.__rollbar_xhr.url = url;
- this.__rollbar_xhr.status_code = null;
- this.__rollbar_xhr.start_time_ms = _.now();
- this.__rollbar_xhr.end_time_ms = null;
+function nonCircularClone(obj) {
+ var seen = [obj];
+
+ function clone(obj, seen) {
+ var value,
+ name,
+ newSeen,
+ result = {};
+
+ try {
+ for (name in obj) {
+ value = obj[name];
+
+ if (value && (isType(value, 'object') || isType(value, 'array'))) {
+ if (seen.includes(value)) {
+ result[name] = 'Removed circular reference: ' + typeName(value);
} else {
- this.__rollbar_xhr = {
- method: method,
- url: url,
- status_code: null,
- start_time_ms: _.now(),
- end_time_ms: null
- };
+ newSeen = seen.slice();
+ newSeen.push(value);
+ result[name] = clone(value, newSeen);
}
+ continue;
}
- return orig.apply(this, arguments);
- };
- }, this.replacements, 'network');
- replace(xhrp, 'setRequestHeader', function(orig) {
- return function(header, value) {
- // If xhr.open is async, __rollbar_xhr may not be initialized yet.
- if (!this.__rollbar_xhr) {
- this.__rollbar_xhr = {};
+ result[name] = value;
+ }
+ } catch (e) {
+ result = 'Failed cloning custom data: ' + e.message;
+ }
+ return result;
+ }
+ return clone(obj, seen);
+}
+
+function createItem(args, logger, notifier, requestKeys, lambdaContext) {
+ var message, err, custom, callback, request;
+ var arg;
+ var extraArgs = [];
+ var diagnostic = {};
+ var argTypes = [];
+
+ for (var i = 0, l = args.length; i < l; ++i) {
+ arg = args[i];
+
+ var typ = typeName(arg);
+ argTypes.push(typ);
+ switch (typ) {
+ case 'undefined':
+ break;
+ case 'string':
+ message ? extraArgs.push(arg) : (message = arg);
+ break;
+ case 'function':
+ callback = wrapCallback(logger, arg);
+ break;
+ case 'date':
+ extraArgs.push(arg);
+ break;
+ case 'error':
+ case 'domexception':
+ case 'exception': // Firefox Exception type
+ err ? extraArgs.push(arg) : (err = arg);
+ break;
+ case 'object':
+ case 'array':
+ if (
+ arg instanceof Error ||
+ (typeof DOMException !== 'undefined' && arg instanceof DOMException)
+ ) {
+ err ? extraArgs.push(arg) : (err = arg);
+ break;
}
- if (_.isType(header, 'string') && _.isType(value, 'string')) {
- if (self.autoInstrument.networkRequestHeaders) {
- if (!this.__rollbar_xhr.request_headers) {
- this.__rollbar_xhr.request_headers = {};
+ if (requestKeys && typ === 'object' && !request) {
+ for (var j = 0, len = requestKeys.length; j < len; ++j) {
+ if (arg[requestKeys[j]] !== undefined) {
+ request = arg;
+ break;
}
- this.__rollbar_xhr.request_headers[header] = value;
}
- // We want the content type even if request header telemetry is off.
- if (header.toLowerCase() === 'content-type') {
- this.__rollbar_xhr.request_content_type = value;
+ if (request) {
+ break;
}
}
- return orig.apply(this, arguments);
- };
- }, this.replacements, 'network');
-
- replace(xhrp, 'send', function(orig) {
- /* eslint-disable no-unused-vars */
- return function(data) {
- /* eslint-enable no-unused-vars */
- var xhr = this;
-
- function onreadystatechangeHandler() {
- if (xhr.__rollbar_xhr) {
- if (xhr.__rollbar_xhr.status_code === null) {
- xhr.__rollbar_xhr.status_code = 0;
- if (self.autoInstrument.networkRequestBody) {
- xhr.__rollbar_xhr.request = data;
- }
- xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);
- }
- if (xhr.readyState < 2) {
- xhr.__rollbar_xhr.start_time_ms = _.now();
- }
- if (xhr.readyState > 3) {
- xhr.__rollbar_xhr.end_time_ms = _.now();
-
- var headers = null;
- xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');
- if (self.autoInstrument.networkResponseHeaders) {
- var headersConfig = self.autoInstrument.networkResponseHeaders;
- headers = {};
- try {
- var header, i;
- if (headersConfig === true) {
- var allHeaders = xhr.getAllResponseHeaders();
- if (allHeaders) {
- var arr = allHeaders.trim().split(/[\r\n]+/);
- var parts, value;
- for (i=0; i < arr.length; i++) {
- parts = arr[i].split(': ');
- header = parts.shift();
- value = parts.join(': ');
- headers[header] = value;
- }
- }
- } else {
- for (i=0; i < headersConfig.length; i++) {
- header = headersConfig[i];
- headers[header] = xhr.getResponseHeader(header);
- }
- }
- } catch (e) {
- /* we ignore the errors here that could come from different
- * browser issues with the xhr methods */
- }
- }
- var body = null;
- if (self.autoInstrument.networkResponseBody) {
- try {
- body = xhr.responseText;
- } catch (e) {
- /* ignore errors from reading responseText */
- }
- }
- var response = null;
- if (body || headers) {
- response = {};
- if (body) {
- if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {
- response.body = self.scrubJson(body);
- } else {
- response.body = body;
- }
- }
- if (headers) {
- response.headers = headers;
- }
- }
- if (response) {
- xhr.__rollbar_xhr.response = response;
- }
- try {
- var code = xhr.status;
- code = code === 1223 ? 204 : code;
- xhr.__rollbar_xhr.status_code = code;
- xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);
- self.errorOnHttpStatus(xhr.__rollbar_xhr);
- } catch (e) {
- /* ignore possible exception from xhr.status */
- }
- }
- }
+ custom ? extraArgs.push(arg) : (custom = arg);
+ break;
+ default:
+ if (
+ arg instanceof Error ||
+ (typeof DOMException !== 'undefined' && arg instanceof DOMException)
+ ) {
+ err ? extraArgs.push(arg) : (err = arg);
+ break;
}
+ extraArgs.push(arg);
+ }
+ }
- wrapProp('onload', xhr);
- wrapProp('onerror', xhr);
- wrapProp('onprogress', xhr);
+ // if custom is an array this turns it into an object with integer keys
+ if (custom) custom = nonCircularClone(custom);
- if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {
- replace(xhr, 'onreadystatechange', function(orig) {
- return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);
- });
- } else {
- xhr.onreadystatechange = onreadystatechangeHandler;
- }
- if (xhr.__rollbar_xhr && self.trackHttpErrors()) {
- xhr.__rollbar_xhr.stack = (new Error()).stack;
- }
- return orig.apply(this, arguments);
- }
- }, this.replacements, 'network');
+ if (extraArgs.length > 0) {
+ if (!custom) custom = nonCircularClone({});
+ custom.extraArgs = nonCircularClone(extraArgs);
}
- if ('fetch' in this._window) {
- replace(this._window, 'fetch', function(orig) {
- /* eslint-disable no-unused-vars */
- return function(fn, t) {
- /* eslint-enable no-unused-vars */
- var args = new Array(arguments.length);
- for (var i=0, len=args.length; i < len; i++) {
- args[i] = arguments[i];
- }
- var input = args[0];
- var method = 'GET';
- var url;
- if (_.isType(input, 'string')) {
- url = input;
- } else if (input) {
- url = input.url;
- if (input.method) {
- method = input.method;
- }
- }
- if (args[1] && args[1].method) {
- method = args[1].method;
- }
- var metadata = {
- method: method,
- url: url,
- status_code: null,
- start_time_ms: _.now(),
- end_time_ms: null
- };
- if (args[1] && args[1].headers) {
- // Argument may be a Headers object, or plain object. Ensure here that
- // we are working with a Headers object with case-insensitive keys.
- var reqHeaders = new Headers(args[1].headers);
-
- metadata.request_content_type = reqHeaders.get('Content-Type');
+ var item = {
+ message: message,
+ err: err,
+ custom: custom,
+ timestamp: now(),
+ callback: callback,
+ notifier: notifier,
+ diagnostic: diagnostic,
+ uuid: uuid4(),
+ };
- if (self.autoInstrument.networkRequestHeaders) {
- metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)
- }
- }
+ setCustomItemKeys(item, custom);
- if (self.autoInstrument.networkRequestBody) {
- if (args[1] && args[1].body) {
- metadata.request = args[1].body;
- } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {
- metadata.request = args[0].body;
- }
- }
- self.captureNetwork(metadata, 'fetch', undefined);
- if (self.trackHttpErrors()) {
- metadata.stack = (new Error()).stack;
- }
- return orig.apply(this, args).then(function (resp) {
- metadata.end_time_ms = _.now();
- metadata.status_code = resp.status;
- metadata.response_content_type = resp.headers.get('Content-Type');
- var headers = null;
- if (self.autoInstrument.networkResponseHeaders) {
- headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);
- }
- var body = null;
- if (self.autoInstrument.networkResponseBody) {
- if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms
- // The response must be cloned to prevent reading (and locking) the original stream.
- body = resp.clone().text(); //returns a Promise
- }
- }
- if (headers || body) {
- metadata.response = {};
- if (body) {
- // Test to ensure body is a Promise, which it should always be.
- if (typeof body.then === 'function') {
- body.then(function (text) {
- if (self.isJsonContentType(metadata.response_content_type)) {
- metadata.response.body = self.scrubJson(text);
- }
- });
- } else {
- metadata.response.body = body;
- }
- }
- if (headers) {
- metadata.response.headers = headers;
- }
- }
- self.errorOnHttpStatus(metadata);
- return resp;
- });
- };
- }, this.replacements, 'network');
+ if (requestKeys && request) {
+ item.request = request;
}
-};
-
-Instrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {
- if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {
- metadata.request = this.scrubJson(metadata.request);
+ if (lambdaContext) {
+ item.lambdaContext = lambdaContext;
}
- return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);
-};
+ item._originalArgs = args;
+ item.diagnostic.original_arg_types = argTypes;
+ return item;
+}
-Instrumenter.prototype.isJsonContentType = function(contentType) {
- return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;
+function setCustomItemKeys(item, custom) {
+ if (custom && custom.level !== undefined) {
+ item.level = custom.level;
+ delete custom.level;
+ }
+ if (custom && custom.skipFrames !== undefined) {
+ item.skipFrames = custom.skipFrames;
+ delete custom.skipFrames;
+ }
}
-Instrumenter.prototype.scrubJson = function(json) {
- return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));
-}
+function addErrorContext(item, errors) {
+ var custom = item.data.custom || {};
+ var contextAdded = false;
-Instrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {
- var outHeaders = {};
try {
- var i;
- if (headersConfig === true) {
- if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE
- var allHeaders = inHeaders.entries();
- var currentHeader = allHeaders.next();
- while (!currentHeader.done) {
- outHeaders[currentHeader.value[0]] = currentHeader.value[1];
- currentHeader = allHeaders.next();
- }
- }
- } else {
- for (i=0; i < headersConfig.length; i++) {
- var header = headersConfig[i];
- outHeaders[header] = inHeaders.get(header);
+ for (var i = 0; i < errors.length; ++i) {
+ if (errors[i].hasOwnProperty('rollbarContext')) {
+ custom = merge(custom, nonCircularClone(errors[i].rollbarContext));
+ contextAdded = true;
}
}
+
+ // Avoid adding an empty object to the data.
+ if (contextAdded) {
+ item.data.custom = custom;
+ }
} catch (e) {
- /* ignore probable IE errors */
+ item.diagnostic.error_context = 'Failed: ' + e.message;
}
- return outHeaders;
-}
-
-Instrumenter.prototype.trackHttpErrors = function() {
- return this.autoInstrument.networkErrorOnHttp5xx ||
- this.autoInstrument.networkErrorOnHttp4xx ||
- this.autoInstrument.networkErrorOnHttp0;
}
-Instrumenter.prototype.errorOnHttpStatus = function(metadata) {
- var status = metadata.status_code;
+var TELEMETRY_TYPES = [
+ 'log',
+ 'network',
+ 'dom',
+ 'navigation',
+ 'error',
+ 'manual',
+];
+var TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];
- if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||
- (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||
- (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {
- var error = new Error('HTTP request failed with Status ' + status);
- error.stack = metadata.stack;
- this.rollbar.error(error, { skipFrames: 1 });
+function arrayIncludes(arr, val) {
+ for (var k = 0; k < arr.length; ++k) {
+ if (arr[k] === val) {
+ return true;
+ }
}
+
+ return false;
}
-Instrumenter.prototype.deinstrumentConsole = function() {
- if (!('console' in this._window && this._window.console.log)) {
- return;
- }
- var b;
- while (this.replacements['log'].length) {
- b = this.replacements['log'].shift();
- this._window.console[b[0]] = b[1];
- }
-};
+function createTelemetryEvent(args) {
+ var type, metadata, level;
+ var arg;
-Instrumenter.prototype.instrumentConsole = function() {
- if (!('console' in this._window && this._window.console.log)) {
- return;
- }
+ for (var i = 0, l = args.length; i < l; ++i) {
+ arg = args[i];
- var self = this;
- var c = this._window.console;
+ var typ = typeName(arg);
+ switch (typ) {
+ case 'string':
+ if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {
+ type = arg;
+ } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {
+ level = arg;
+ }
+ break;
+ case 'object':
+ metadata = arg;
+ break;
+ default:
+ break;
+ }
+ }
+ var event = {
+ type: type || 'manual',
+ metadata: metadata || {},
+ level: level,
+ };
- function wrapConsole(method) {
- 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778
+ return event;
+}
- var orig = c[method];
- var origConsole = c;
- var level = method === 'warn' ? 'warning' : method;
- c[method] = function() {
- var args = Array.prototype.slice.call(arguments);
- var message = _.formatArgsAsString(args);
- self.telemeter.captureLog(message, level);
- if (orig) {
- Function.prototype.apply.call(orig, origConsole, args);
- }
- };
- self.replacements['log'].push([method, orig]);
+/*
+ * get - given an obj/array and a keypath, return the value at that keypath or
+ * undefined if not possible.
+ *
+ * @param obj - an object or array
+ * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'
+ * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`
+ */
+function get(obj, path) {
+ if (!obj) {
+ return undefined;
}
- var methods = ['debug','info','warn','error','log'];
+ var keys = path.split('.');
+ var result = obj;
try {
- for (var i=0, len=methods.length; i < len; i++) {
- wrapConsole(methods[i]);
+ for (var i = 0, len = keys.length; i < len; ++i) {
+ result = result[keys[i]];
}
} catch (e) {
- this.diagnostic.instrumentConsole = { error: e.message };
+ result = undefined;
}
-};
+ return result;
+}
-Instrumenter.prototype.deinstrumentDom = function() {
- if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {
+function set(obj, path, value) {
+ if (!obj) {
return;
}
- this.removeListeners('dom');
-};
-
-Instrumenter.prototype.instrumentDom = function() {
- if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {
+ var keys = path.split('.');
+ var len = keys.length;
+ if (len < 1) {
return;
}
- var clickHandler = this.handleClick.bind(this);
- var blurHandler = this.handleBlur.bind(this);
- this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);
- this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);
-};
-
-Instrumenter.prototype.handleClick = function(evt) {
- try {
- var e = domUtil.getElementFromEvent(evt, this._document);
- var hasTag = e && e.tagName;
- 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 (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {
- this.captureDomEvent('input', e, e.value, e.checked);
- }
- } catch (exc) {
- // TODO: Not sure what to do here
+ if (len === 1) {
+ obj[keys[0]] = value;
+ return;
}
-};
-
-Instrumenter.prototype.handleBlur = function(evt) {
try {
- var e = domUtil.getElementFromEvent(evt, this._document);
- if (e && e.tagName) {
- if (domUtil.isDescribedElement(e, 'textarea')) {
- this.captureDomEvent('input', e, e.value);
- } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {
- this.handleSelectInputChanged(e);
- } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {
- this.captureDomEvent('input', e, e.value);
- }
- }
- } catch (exc) {
- // TODO: Not sure what to do here
- }
-};
-
-Instrumenter.prototype.handleSelectInputChanged = function(elem) {
- if (elem.multiple) {
- for (var i = 0; i < elem.options.length; i++) {
- if (elem.options[i].selected) {
- this.captureDomEvent('input', elem, elem.options[i].value);
- }
+ var temp = obj[keys[0]] || {};
+ var replacement = temp;
+ for (var i = 1; i < len - 1; ++i) {
+ temp[keys[i]] = temp[keys[i]] || {};
+ temp = temp[keys[i]];
}
- } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {
- this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);
+ temp[keys[len - 1]] = value;
+ obj[keys[0]] = replacement;
+ } catch (e) {
+ return;
}
-};
+}
-Instrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {
- if (value !== undefined) {
- if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {
- value = '[scrubbed]';
- } else {
- var description = domUtil.describeElement(element);
- if (this.telemetryScrubber) {
- if (this.telemetryScrubber(description)) {
- value = '[scrubbed]';
+function formatArgsAsString(args) {
+ var i, len, arg;
+ var result = [];
+ for (i = 0, len = args.length; i < len; ++i) {
+ arg = args[i];
+ switch (typeName(arg)) {
+ case 'object':
+ arg = stringify(arg);
+ arg = arg.error || arg.value;
+ if (arg.length > 500) {
+ arg = arg.substr(0, 497) + '...';
}
- } else if (this.defaultValueScrubber(description)) {
- value = '[scrubbed]';
- }
+ break;
+ case 'null':
+ arg = 'null';
+ break;
+ case 'undefined':
+ arg = 'undefined';
+ break;
+ case 'symbol':
+ arg = arg.toString();
+ break;
}
+ result.push(arg);
}
- var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));
- this.telemeter.captureDom(subtype, elementString, value, isChecked);
-};
-
-Instrumenter.prototype.deinstrumentNavigation = function() {
- var chrome = this._window.chrome;
- var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;
- // See https://github.com/angular/angular.js/pull/13945/files
- var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;
- if (!hasPushState) {
- return;
- }
- restore(this.replacements, 'navigation');
-};
-
-Instrumenter.prototype.instrumentNavigation = function() {
- var chrome = this._window.chrome;
- var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;
- // See https://github.com/angular/angular.js/pull/13945/files
- var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;
- if (!hasPushState) {
- return;
- }
- var self = this;
- replace(this._window, 'onpopstate', function(orig) {
- return function() {
- var current = self._location.href;
- self.handleUrlChange(self._lastHref, current);
- if (orig) {
- orig.apply(this, arguments);
- }
- };
- }, this.replacements, 'navigation');
-
- replace(this._window.history, 'pushState', function(orig) {
- return function() {
- var url = arguments.length > 2 ? arguments[2] : undefined;
- if (url) {
- self.handleUrlChange(self._lastHref, url + '');
- }
- return orig.apply(this, arguments);
- };
- }, this.replacements, 'navigation');
-};
-
-Instrumenter.prototype.handleUrlChange = function(from, to) {
- var parsedHref = urlparser.parse(this._location.href);
- var parsedTo = urlparser.parse(to);
- var parsedFrom = urlparser.parse(from);
- this._lastHref = to;
- if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {
- to = parsedTo.path + (parsedTo.hash || '');
- }
- if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {
- from = parsedFrom.path + (parsedFrom.hash || '');
- }
- this.telemeter.captureNavigation(from, to);
-};
-
-Instrumenter.prototype.deinstrumentConnectivity = function() {
- if (!('addEventListener' in this._window || 'body' in this._document)) {
- return;
- }
- if (this._window.addEventListener) {
- this.removeListeners('connectivity');
- } else {
- restore(this.replacements, 'connectivity');
- }
-};
+ return result.join(' ');
+}
-Instrumenter.prototype.instrumentConnectivity = function() {
- if (!('addEventListener' in this._window || 'body' in this._document)) {
+function now() {
+ if (Date.now) {
+ return +Date.now();
+ }
+ return +new Date();
+}
+
+function filterIp(requestData, captureIp) {
+ if (!requestData || !requestData['user_ip'] || captureIp === true) {
return;
}
- if (this._window.addEventListener) {
- this.addListener('connectivity', this._window, 'online', undefined, function() {
- this.telemeter.captureConnectivityChange('online');
- }.bind(this), true);
- this.addListener('connectivity', this._window, 'offline', undefined, function() {
- this.telemeter.captureConnectivityChange('offline');
- }.bind(this), true);
+ var newIp = requestData['user_ip'];
+ if (!captureIp) {
+ newIp = null;
} else {
- var self = this;
- replace(this._document.body, 'ononline', function(orig) {
- return function() {
- self.telemeter.captureConnectivityChange('online');
- if (orig) {
- orig.apply(this, arguments);
- }
- }
- }, this.replacements, 'connectivity');
- replace(this._document.body, 'onoffline', function(orig) {
- return function() {
- self.telemeter.captureConnectivityChange('offline');
- if (orig) {
- orig.apply(this, arguments);
+ try {
+ var parts;
+ if (newIp.indexOf('.') !== -1) {
+ parts = newIp.split('.');
+ parts.pop();
+ parts.push('0');
+ newIp = parts.join('.');
+ } else if (newIp.indexOf(':') !== -1) {
+ parts = newIp.split(':');
+ if (parts.length > 2) {
+ var beginning = parts.slice(0, 3);
+ var slashIdx = beginning[2].indexOf('/');
+ if (slashIdx !== -1) {
+ beginning[2] = beginning[2].substring(0, slashIdx);
+ }
+ var terminal = '0000:0000:0000:0000:0000';
+ newIp = beginning.concat(terminal).join(':');
}
+ } else {
+ newIp = null;
}
- }, this.replacements, 'connectivity');
- }
-};
-
-Instrumenter.prototype.handleCspEvent = function(cspEvent) {
- var message = 'Security Policy Violation: ' +
- 'blockedURI: ' + cspEvent.blockedURI + ', ' +
- 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +
- 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';
-
- if (cspEvent.sourceFile) {
- message += 'location: ' + cspEvent.sourceFile + ', ' +
- 'line: ' + cspEvent.lineNumber + ', ' +
- 'col: ' + cspEvent.columnNumber + ', ';
+ } catch (e) {
+ newIp = null;
+ }
}
-
- message += 'originalPolicy: ' + cspEvent.originalPolicy;
-
- this.telemeter.captureLog(message, 'error');
- this.handleCspError(message);
+ requestData['user_ip'] = newIp;
}
-Instrumenter.prototype.handleCspError = function(message) {
- if (this.autoInstrument.errorOnContentSecurityPolicy) {
- this.rollbar.error(message);
+function handleOptions(current, input, payload, logger) {
+ var result = merge(current, input, payload);
+ result = updateDeprecatedOptions(result, logger);
+ if (!input || input.overwriteScrubFields) {
+ return result;
+ }
+ if (input.scrubFields) {
+ result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);
}
+ return result;
}
-Instrumenter.prototype.deinstrumentContentSecurityPolicy = function() {
- if (!('addEventListener' in this._window)) { return; }
-
- this.removeListeners('contentsecuritypolicy');
-};
-
-Instrumenter.prototype.instrumentContentSecurityPolicy = function() {
- if (!('addEventListener' in this._window)) { return; }
-
- var cspHandler = this.handleCspEvent.bind(this);
- this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);
-};
-
-Instrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {
- if (obj.addEventListener) {
- obj.addEventListener(type, handler, capture);
- this.eventRemovers[section].push(function() {
- obj.removeEventListener(type, handler, capture);
- });
- } else if (altType) {
- obj.attachEvent(altType, handler);
- this.eventRemovers[section].push(function() {
- obj.detachEvent(altType, handler);
- });
+function updateDeprecatedOptions(options, logger) {
+ if (options.hostWhiteList && !options.hostSafeList) {
+ options.hostSafeList = options.hostWhiteList;
+ options.hostWhiteList = undefined;
+ logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');
}
-};
-
-Instrumenter.prototype.removeListeners = function(section) {
- var r;
- while (this.eventRemovers[section].length) {
- r = this.eventRemovers[section].shift();
- r();
+ if (options.hostBlackList && !options.hostBlockList) {
+ options.hostBlockList = options.hostBlackList;
+ options.hostBlackList = undefined;
+ logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');
}
-};
+ return options;
+}
-module.exports = Instrumenter;
+module.exports = {
+ addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,
+ createItem: createItem,
+ addErrorContext: addErrorContext,
+ createTelemetryEvent: createTelemetryEvent,
+ filterIp: filterIp,
+ formatArgsAsString: formatArgsAsString,
+ formatUrl: formatUrl,
+ get: get,
+ handleOptions: handleOptions,
+ isError: isError,
+ isFiniteNumber: isFiniteNumber,
+ isFunction: isFunction,
+ isIterable: isIterable,
+ isNativeFunction: isNativeFunction,
+ isObject: isObject,
+ isString: isString,
+ isType: isType,
+ isPromise: isPromise,
+ jsonParse: jsonParse,
+ LEVELS: LEVELS,
+ makeUnhandledStackInfo: makeUnhandledStackInfo,
+ merge: merge,
+ now: now,
+ redact: redact,
+ RollbarJSON: RollbarJSON,
+ sanitizeUrl: sanitizeUrl,
+ set: set,
+ setupJSON: setupJSON,
+ stringify: stringify,
+ maxByteSize: maxByteSize,
+ typeName: typeName,
+ uuid4: uuid4,
+};
/***/ }),
-/* 31 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 650:
+/***/ ((module) => {
"use strict";
-function getElementType(e) {
- return (e.getAttribute('type') || '').toLowerCase();
+/*
+ * headers - Detect when fetch Headers are undefined and use a partial polyfill.
+ *
+ * A full polyfill is not used in order to keep package size as small as possible.
+ * Since this is only used internally and is not added to the window object,
+ * the full interface doesn't need to be supported.
+ *
+ * This implementation is modified from whatwg-fetch:
+ * https://github.com/github/fetch
+ */
+function headers(headers) {
+ if (typeof Headers === 'undefined') {
+ return new FetchHeaders(headers);
+ }
+
+ return new Headers(headers);
}
-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;
- }
+function normalizeName(name) {
+ if (typeof name !== 'string') {
+ name = String(name);
}
- return false;
+ return name.toLowerCase();
}
-function getElementFromEvent(evt, doc) {
- if (evt.target) {
- return evt.target;
- }
- if (doc && doc.elementFromPoint) {
- return doc.elementFromPoint(evt.clientX, evt.clientY);
+function normalizeValue(value) {
+ if (typeof value !== 'string') {
+ value = String(value);
}
- return undefined;
+ return value;
}
-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 iteratorFor(items) {
+ var iterator = {
+ next: function () {
+ var value = items.shift();
+ return { done: value === undefined, value: value };
+ },
+ };
+
+ return iterator;
}
-function elementArrayToString(a) {
- var MAX_LENGTH = 80;
- var separator = ' > ', separatorLength = separator.length;
- var out = [], len = 0, nextStr, totalLength;
+function FetchHeaders(headers) {
+ this.map = {};
- 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;
+ if (headers instanceof FetchHeaders) {
+ headers.forEach(function (value, name) {
+ this.append(name, value);
+ }, this);
+ } else if (Array.isArray(headers)) {
+ headers.forEach(function (header) {
+ this.append(header[0], header[1]);
+ }, this);
+ } else if (headers) {
+ Object.getOwnPropertyNames(headers).forEach(function (name) {
+ this.append(name, headers[name]);
+ }, this);
}
- 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 + '"]');
- }
+FetchHeaders.prototype.append = function (name, value) {
+ name = normalizeName(name);
+ value = normalizeValue(value);
+ var oldValue = this.map[name];
+ this.map[name] = oldValue ? oldValue + ', ' + value : value;
+};
- return out.join('');
-}
+FetchHeaders.prototype.get = function (name) {
+ name = normalizeName(name);
+ return this.has(name) ? this.map[name] : null;
+};
-/**
- * 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});
+FetchHeaders.prototype.has = function (name) {
+ return this.map.hasOwnProperty(normalizeName(name));
+};
+
+FetchHeaders.prototype.forEach = function (callback, thisArg) {
+ for (var name in this.map) {
+ if (this.map.hasOwnProperty(name)) {
+ callback.call(thisArg, this.map[name], name, this);
}
}
- return out;
+};
+
+FetchHeaders.prototype.entries = function () {
+ var items = [];
+ this.forEach(function (value, name) {
+ items.push([name, value]);
+ });
+ return iteratorFor(items);
+};
+
+module.exports = headers;
+
+
+/***/ }),
+
+/***/ 876:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
+
+"use strict";
+
+
+var polyfillJSON = __webpack_require__(708);
+
+module.exports = polyfillJSON;
+
+
+/***/ }),
+
+/***/ 297:
+/***/ ((module) => {
+
+"use strict";
+
+
+function replace(obj, name, replacement, replacements, type) {
+ var orig = obj[name];
+ obj[name] = replacement(orig);
+ if (replacements) {
+ replacements[type].push([obj, name, orig]);
+ }
}
-module.exports = {
- describeElement: describeElement,
- descriptionToString: descriptionToString,
- elementArrayToString: elementArrayToString,
- treeToArray: treeToArray,
- getElementFromEvent: getElementFromEvent,
- isDescribedElement: isDescribedElement,
- getElementType: getElementType
-};
+module.exports = replace;
/***/ }),
-/* 32 */
-/***/ (function(module, exports, __webpack_require__) {
+
+/***/ 267:
+/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
-var polyfillJSON = __webpack_require__(33);
+var _ = __webpack_require__(702);
-module.exports = polyfillJSON;
+function traverse(obj, func, seen) {
+ var k, v, i;
+ var isObj = _.isType(obj, 'object');
+ var isArray = _.isType(obj, 'array');
+ var keys = [];
+ var seenIndex;
+
+ // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.
+ seen = seen || { obj: [], mapped: [] };
+
+ if (isObj) {
+ seenIndex = seen.obj.indexOf(obj);
+
+ if (isObj && seenIndex !== -1) {
+ // Prefer the mapped object if there is one.
+ return seen.mapped[seenIndex] || seen.obj[seenIndex];
+ }
+
+ seen.obj.push(obj);
+ seenIndex = seen.obj.length - 1;
+ }
+
+ if (isObj) {
+ for (k in obj) {
+ if (Object.prototype.hasOwnProperty.call(obj, k)) {
+ keys.push(k);
+ }
+ }
+ } else if (isArray) {
+ for (i = 0; i < obj.length; ++i) {
+ keys.push(i);
+ }
+ }
+
+ var result = isObj ? {} : [];
+ var same = true;
+ for (i = 0; i < keys.length; ++i) {
+ k = keys[i];
+ v = obj[k];
+ result[k] = func(k, v, seen);
+ same = same && result[k] === obj[k];
+ }
+
+ if (isObj && !same) {
+ seen.mapped[seenIndex] = result;
+ }
+
+ return !same ? result : obj;
+}
+
+module.exports = traverse;
/***/ }),
-/* 33 */
-/***/ (function(module, exports) {
+
+/***/ 708:
+/***/ ((module) => {
// json3.js
// 2017-02-21
@@ -6522,184 +7556,43 @@ var setupCustomJSON = function(JSON) {
module.exports = setupCustomJSON;
-/***/ }),
-/* 34 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-function wrapGlobals(window, handler, shim) {
- if (!window) { return; }
- // Adapted from https://github.com/bugsnag/bugsnag-js
- 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(',');
- var i, global;
- for (i = 0; i < globals.length; ++i) {
- global = globals[i];
-
- if (window[global] && window[global].prototype) {
- _extendListenerPrototype(handler, window[global].prototype, shim);
- }
- }
-}
-
-function _extendListenerPrototype(handler, prototype, shim) {
- if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {
- var oldAddEventListener = prototype.addEventListener;
- while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {
- oldAddEventListener = oldAddEventListener._rollbarOldAdd;
- }
- var addFn = function(event, callback, bubble) {
- oldAddEventListener.call(this, event, handler.wrap(callback), bubble);
- };
- addFn._rollbarOldAdd = oldAddEventListener;
- addFn.belongsToShim = shim;
- prototype.addEventListener = addFn;
-
- var oldRemoveEventListener = prototype.removeEventListener;
- while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {
- oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;
- }
- var removeFn = function(event, callback, bubble) {
- oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);
- };
- removeFn._rollbarOldRemove = oldRemoveEventListener;
- removeFn.belongsToShim = shim;
- prototype.removeEventListener = removeFn;
- }
-}
-
-module.exports = wrapGlobals;
-
-
-/***/ }),
-/* 35 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-var _ = __webpack_require__(0);
-var traverse = __webpack_require__(5);
-
-function raw(payload, jsonBackup) {
- return [payload, _.stringify(payload, jsonBackup)];
-}
-
-function selectFrames(frames, range) {
- var len = frames.length;
- if (len > range * 2) {
- return frames.slice(0, range).concat(frames.slice(len - range));
- }
- return frames;
-}
-
-function truncateFrames(payload, jsonBackup, range) {
- range = (typeof range === 'undefined') ? 30 : range;
- var body = payload.data.body;
- var frames;
- if (body.trace_chain) {
- var chain = body.trace_chain;
- for (var i = 0; i < chain.length; i++) {
- frames = chain[i].frames;
- frames = selectFrames(frames, range);
- chain[i].frames = frames;
- }
- } else if (body.trace) {
- frames = body.trace.frames;
- frames = selectFrames(frames, range);
- body.trace.frames = frames;
- }
- return [payload, _.stringify(payload, jsonBackup)];
-}
-
-function maybeTruncateValue(len, val) {
- if (!val) {
- return val;
- }
- if (val.length > len) {
- return val.slice(0, len - 3).concat('...');
- }
- return val;
-}
-
-function truncateStrings(len, payload, jsonBackup) {
- function truncator(k, v, seen) {
- switch (_.typeName(v)) {
- case 'string':
- return maybeTruncateValue(len, v);
- case 'object':
- case 'array':
- return traverse(v, truncator, seen);
- default:
- return v;
- }
- }
- payload = traverse(payload, truncator);
- return [payload, _.stringify(payload, jsonBackup)];
-}
-
-function truncateTraceData(traceData) {
- if (traceData.exception) {
- delete traceData.exception.description;
- traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);
- }
- traceData.frames = selectFrames(traceData.frames, 1);
- return traceData;
-}
-
-function minBody(payload, jsonBackup) {
- var body = payload.data.body;
- if (body.trace_chain) {
- var chain = body.trace_chain;
- for (var i = 0; i < chain.length; i++) {
- chain[i] = truncateTraceData(chain[i]);
- }
- } else if (body.trace) {
- body.trace = truncateTraceData(body.trace);
- }
- return [payload, _.stringify(payload, jsonBackup)];
-}
-
-function needsTruncation(payload, maxSize) {
- return _.maxByteSize(payload) > maxSize;
-}
-
-function truncate(payload, jsonBackup, maxSize) {
- maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;
- var strategies = [
- raw,
- truncateFrames,
- truncateStrings.bind(null, 1024),
- truncateStrings.bind(null, 512),
- truncateStrings.bind(null, 256),
- minBody
- ];
- var strategy, results, result;
-
- while ((strategy = strategies.shift())) {
- results = strategy(payload, jsonBackup);
- payload = results[0];
- result = results[1];
- if (result.error || !needsTruncation(result.value, maxSize)) {
- return result;
- }
- }
- return result;
-}
-
-module.exports = {
- truncate: truncate,
-
- /* for testing */
- raw: raw,
- truncateFrames: truncateFrames,
- truncateStrings: truncateStrings,
- maybeTruncateValue: maybeTruncateValue
-};
-
-
/***/ })
-/******/ ]);
+
+/******/ });
+/************************************************************************/
+/******/ // The module cache
+/******/ var __webpack_module_cache__ = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/ // Check if module is in cache
+/******/ var cachedModule = __webpack_module_cache__[moduleId];
+/******/ if (cachedModule !== undefined) {
+/******/ return cachedModule.exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = __webpack_module_cache__[moduleId] = {
+/******/ // no module.id needed
+/******/ // no module.loaded needed
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/************************************************************************/
+/******/
+/******/ // startup
+/******/ // Load entry module and return exports
+/******/ // This entry module is referenced by other modules so it can't be inlined
+/******/ var __webpack_exports__ = __webpack_require__(409);
+/******/
+/******/ return __webpack_exports__;
+/******/ })()
+;
});
//# sourceMappingURL=rollbar.umd.js.map
\ No newline at end of file
diff --git a/dist/rollbar.umd.js.map b/dist/rollbar.umd.js.map
index b995a6a4d..4c93be59c 100644
--- a/dist/rollbar.umd.js.map
+++ b/dist/rollbar.umd.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/webpack/bootstrap","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/truncation.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;AClFa;;AAEb,YAAY,mBAAO,CAAC,EAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,OAAO;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iBAAiB,YAAY;AAC7B;AACA,qBAAqB;AACrB;AACA,KAAK,wBAAwB;AAC7B;AACA,KAAK,yBAAyB;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,OAAO;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,gCAAgC,SAAS;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3uBa;;AAEb;AACA,mBAAO,CAAC,EAAkB;AAC1B,gBAAgB,mBAAO,CAAC,EAAa;AACrC,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;AC3Ca;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;AChFa;;AAEb,uBAAuB,mBAAO,CAAC,EAAoB;;AAEnD;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;AAEA,sBAAsB,wBAAwB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7Ha;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;;AAEA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,WAAW;AAC9B;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;A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,CAAC,CAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,0BAA0B,sBAAsB;AAChD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oCAAoC,SAAS;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,EAAa;AACpC,kBAAkB,mBAAO,CAAC,EAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACpjBa;;AAEb,kBAAkB,mBAAO,CAAC,EAAe;AACzC,YAAY,mBAAO,CAAC,EAAS;AAC7B,eAAe,mBAAO,CAAC,EAAY;AACnC,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,6EAA6E,UAAU;AACvF,yFAAyF,UAAU;;AAEnG;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,kBAAkB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACnRa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AChJa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA,iBAAiB;AACjB;AACA;;AAEA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvDa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,WAAW;AAC1B,eAAe,eAAe;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;AACA,+CAA+C,SAAS;AACxD;AACA;AACA,cAAc;AACd;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,SAAS;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,+BAA+B;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7Qa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACxHa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;ACvGa;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBY;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;AC/Ba;;AAEb;AACA,gBAAgB,QAAQ;AACxB;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;;AAEA;AACA,gBAAgB,QAAQ;;AAExB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;;;;;;;AClGa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,CAAY;AAC5B,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACvQa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,kBAAkB,mBAAO,CAAC,CAAgB;AAC1C,aAAa,mBAAO,CAAC,CAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C;AACA,oBAAoB,6CAA6C;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,4BAA4B,gBAAgB;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,sBAAsB;AACvC;AACA;AACA;;AAEA,4BAA4B,oBAAoB;AAChD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,8BAA8B,aAAa;AAC3C;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC9UA;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,uBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AAC7D,KAAK,MAAM,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,iBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,+CAA+C,SAAS;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,oGAAC;AACzC,KAAK,MAAM,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,sBAAsB;AAC1D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,8BAA8B;AAC9B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrJa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;ACba;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe;;AAEf;;AAEA,uCAAuC,eAAe;;AAEtD;AACA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;;AAEA,wCAAwC,eAAe;;AAEvD,mBAAmB,gBAAgB;AACnC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB,SAAS;AAC1B;;AAEA,mBAAmB,qBAAqB;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClMa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5Da;;AAEb,QAAQ,mBAAO,CAAC,CAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;;AAEA;AACA,qCAAqC,4BAA4B;AACjE;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA,qCAAqC,gBAAgB;AACrD;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,8BAA8B,aAAa;AAC3C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AClLa;;AAEb,QAAQ,mBAAO,CAAC,CAAY;AAC5B,YAAY,mBAAO,CAAC,CAAU;AAC9B,gBAAgB,mBAAO,CAAC,CAAO;AAC/B,cAAc,mBAAO,CAAC,EAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gDAAgD,aAAa;AAC7D;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,wBAAwB;AACzC;AACA;AACA;AACA;AACA,gBAAgB,cAAc;AAC9B,mBAAmB,qBAAqB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,6BAA6B,0BAA0B;AACvD;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,eAAe,0BAA0B;AACzC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gBAAgB;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA,GAAG;AACH,yCAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;;AAEA;AACA,8CAA8C,QAAQ;;AAEtD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC/vBa;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,6BAA6B;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,4BAA4B;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA,2BAA2B,sBAAsB;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnIa;;AAEb,mBAAmB,mBAAO,CAAC,EAA4B;;AAEvD;;;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB;AACpB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,UAAU;AACV,UAAU;AACV,UAAU;AACV;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA,qBAAqB,YAAY;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,qBAAqB,YAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mBAAmB,WAAW;AAC9B;AACA;;AAEA;;AAEA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,oBAAoB;AACpB,cAAc;AACd,gBAAgB;AAChB,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;AC1vBa;;AAEb;AACA,gBAAgB,QAAQ;AACxB;AACA;AACA;AACA,aAAa,oBAAoB;AACjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1Ca;;AAEb,QAAQ,mBAAO,CAAC,CAAW;AAC3B,eAAe,mBAAO,CAAC,CAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,kBAAkB;AACrC;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA","file":"rollbar.umd.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"rollbar\"] = factory();\n\telse\n\t\troot[\"rollbar\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if(polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else { // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return ({}).toString.call(x).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\n\n/* isFunction - a convenience function for checking if a value is a function\n *\n * @param f - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isFunction(f) {\n return isType(f, 'function');\n}\n\n/* isNativeFunction - a convenience function for checking if a value is a native JS function\n *\n * @param f - any value\n * @returns true if f is a native JS function, otherwise false\n */\nfunction isNativeFunction(f) {\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n var funcMatchString = Function.prototype.toString.call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n*/\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n*/\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\n function isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return (type === 'object' || type === 'array');\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === 'x' ? r : (r & 0x7 | 0x8)).toString(16);\n });\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor'\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser: {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose: /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n if (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = merge(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 notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, errors[i].rollbarContext);\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"rollbar.umd.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;AClBD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAA6B,CAAC,wBAAY,CAAC,oCAAE,OAAO;AAAA;AAAA;AAAA,kGAAC;AAC7D,MAAM,KAAK,EAIN;AACL,CAAC;AACD;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,aAAa;AACb,SAAS;;AAET;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;;AAEA,gDAAgD,SAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;;AAEA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA,CAAC;;;;;;;;ACzMD;AACA;AACA;;AAEA;AACA,QAAQ,IAA0C;AAClD,QAAQ,iCAAqB,EAAE,oCAAE,OAAO;AAAA;AAAA;AAAA,kGAAC;AACzC,MAAM,KAAK,EAIN;AACL,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,cAAc;AACd;AACA,cAAc;AACd;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA,oBAAoB,wBAAwB;AAC5C;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,CAAC;;;;;;;;;AC9IY;;AAEb,QAAQ,mBAAO,CAAC,GAAW;AAC3B,cAAc,mBAAO,CAAC,GAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;;AAEA;;;;;;;;;ACvHa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7Ga;;AAEb,cAAc,mBAAO,CAAC,GAAY;;AAElC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;;;;;;;;;ACvBa;;AAEb,aAAa,mBAAO,CAAC,GAAY;AACjC,QAAQ,mBAAO,CAAC,GAAY;AAC5B,UAAU,mBAAO,CAAC,GAAQ;AAC1B,aAAa,mBAAO,CAAC,GAAU;AAC/B,cAAc,mBAAO,CAAC,GAAe;;AAErC,gBAAgB,mBAAO,CAAC,GAAa;AACrC,aAAa,mBAAO,CAAC,GAAO;;AAE5B,iBAAiB,mBAAO,CAAC,GAAc;AACvC,uBAAuB,mBAAO,CAAC,GAAe;AAC9C,iBAAiB,mBAAO,CAAC,GAAc;AACvC,uBAAuB,mBAAO,CAAC,EAAe;AAC9C,kBAAkB,mBAAO,CAAC,GAAgB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;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;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qCAAqC,SAAS;AAC9C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,mBAAO,CAAC,GAAa;AACpC,kBAAkB,mBAAO,CAAC,GAAwB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AC9lBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5Da;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;AC9Ba;;AAEb;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,6BAA6B;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAA6B,QAAQ;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,4BAA4B;AAC9C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,uBAAuB;AACrC;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7Ia;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;ACxGa;;AAEb;AACA,mBAAO,CAAC,GAAkB;AAC1B,gBAAgB,mBAAO,CAAC,GAAa;AACrC,QAAQ,mBAAO,CAAC,GAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;AC3Ca;;AAEb,QAAQ,mBAAO,CAAC,GAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;ACba;;AAEb,cAAc,mBAAO,CAAC,GAAQ;AAC9B,gBAAgB,mBAAO,CAAC,GAAc;AACtC,mBAAmB,mBAAO,CAAC,GAAa;AACxC,mBAAmB,mBAAO,CAAC,GAAyB;AACpD,kBAAkB,mBAAO,CAAC,GAAe;AACzC,YAAY,mBAAO,CAAC,GAAU;AAC9B,iBAAiB,mBAAO,CAAC,GAAe;;AAExC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;;;;;;;;;ACnBa;;AAEb,QAAQ,mBAAO,CAAC,GAAY;AAC5B,cAAc,mBAAO,CAAC,GAAoB;AAC1C,cAAc,mBAAO,CAAC,GAAoB;AAC1C,YAAY,mBAAO,CAAC,GAAU;AAC9B,gBAAgB,mBAAO,CAAC,GAAO;AAC/B,cAAc,mBAAO,CAAC,GAAc;;AAEpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,kBAAkB;AACpC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,gBAAgB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,kCAAkC,0BAA0B;AAC5D;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,SAAS;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;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,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,mBAAmB;AACnB,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,kBAAkB,0BAA0B;AAC5C;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,eAAe;AAC/C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,SAAS;AACnD;AACA;AACA,IAAI;AACJ,0CAA0C;AAC1C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;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,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;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,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;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,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;ACj+Ba;;AAEb,QAAQ,mBAAO,CAAC,GAAY;AAC5B,kBAAkB,mBAAO,CAAC,GAAgB;AAC1C,aAAa,mBAAO,CAAC,GAAU;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA,qBAAqB,8CAA8C;AACnE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAA6B,iBAAiB;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAkB,sBAAsB;AACxC;AACA;AACA;;AAEA,6BAA6B,qBAAqB;AAClD;AACA;;AAEA;AACA;;AAEA;AACA;AACA,+BAA+B,cAAc;AAC7C;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,kBAAkB;AAClC;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;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtWa;;AAEb,QAAQ,mBAAO,CAAC,GAAY;AAC5B,uBAAuB,mBAAO,CAAC,GAAmB;AAClD,qBAAqB,mBAAO,CAAC,EAAiB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;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;;AAEA;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;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;;ACxLa;;AAEb,aAAa,mBAAO,CAAC,GAAW;AAChC,QAAQ,mBAAO,CAAC,GAAe;;AAE/B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;;AAEA;;;;;;;;;ACtCa;;AAEb;;AAEA,QAAQ,mBAAO,CAAC,GAAe;AAC/B,aAAa,mBAAO,CAAC,GAAW;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,cAAc,kBAAkB;AAChC;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AChLa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;ACxFa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,oBAAoB;AAClC;;AAEA;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;;AAEA;;;;;;;;;AC7Da;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACVa;;AAEb,uBAAuB,mBAAO,CAAC,GAAoB;;AAEnD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;;AAEA,uBAAuB,wBAAwB;AAC/C;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChIa;;AAEb;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;;AAEA,cAAc,YAAY;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AChEa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;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;;;;;;;;;AC3Ha;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;;AAEA;AACA;AACA;;AAEA,oBAAoB,gBAAgB;AACpC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAkB,SAAS;AAC3B;;AAEA,oBAAoB,qBAAqB;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtNa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA,eAAe,YAAY;AAC3B,eAAe,gBAAgB;AAC/B;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,+BAA+B;AAC5C;AACA;AACA;AACA;AACA,gDAAgD,SAAS;AACzD;AACA;AACA,eAAe;AACf;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,gCAAgC;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;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;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AC7Sa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;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;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACzLa;;AAEb,kBAAkB,mBAAO,CAAC,GAAe;AACzC,YAAY,mBAAO,CAAC,GAAS;AAC7B,eAAe,mBAAO,CAAC,GAAY;AACnC,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,UAAU;AACzD;AACA;AACA;AACA,qDAAqD,UAAU;AAC/D;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,mBAAmB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,iBAAiB;AAC5B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;AC5Ra;;AAEb,QAAQ,mBAAO,CAAC,GAAW;AAC3B,eAAe,mBAAO,CAAC,GAAoB;;AAE3C;AACA;;AAEA;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,qBAAqB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,qBAAqB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AC7Fa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;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,KAAK;AACL;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,oBAAoB;AAC1B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM,6BAA6B;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,4BAA4B;AAC1D;AACA;AACA;AACA;AACA;AACA,MAAM,iBAAiB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,gBAAgB;AAC9C;AACA;;AAEA;AACA,+BAA+B,cAAc;AAC7C;;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AClPa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;;AAE3B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;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;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,uBAAuB;AAC3D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN,+BAA+B;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxKa;;AAEb,QAAQ,mBAAO,CAAC,GAAW;AAC3B,eAAe,mBAAO,CAAC,GAAoB;;AAE3C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1Ha;;AAEb,YAAY,mBAAO,CAAC,GAAS;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;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,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,GAAG;AACd;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oCAAoC,OAAO;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,SAAS;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,gBAAgB;AAClC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,mCAAmC,OAAO;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,SAAS,UAAU,YAAY,GAAG;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,SAAS;AAChD;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,aAAa;AACjC;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,iCAAiC,SAAS;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjzBa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe;AACf,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;;;;;;;;AC/Fa;;AAEb,mBAAmB,mBAAO,CAAC,GAA4B;;AAEvD;;;;;;;;;ACJa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACVa;;AAEb,QAAQ,mBAAO,CAAC,GAAY;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB;;AAEnB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,gBAAgB,gBAAgB;AAChC;AACA;AACA;;AAEA,0BAA0B;AAC1B;AACA,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yCAAyC,iBAAiB;AAC1D,8BAA8B,kBAAkB;;AAEhD,yCAAyC,iBAAiB;AAC1D,sCAAsC,6BAA6B;;AAEnE;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;AACrD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB;AACxB,+CAA+C,EAAE;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;;AAGA;;AAEA;;AAEA,oBAAoB;AACpB,oBAAoB;AACpB,oBAAoB;AACpB;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,sBAAsB,YAAY;AAClC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,sBAAsB,YAAY;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;;AAEV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA,cAAc,wDAAwD;AACtE,cAAc,0BAA0B;AACxC;AACA;AACA;AACA;;AAEA;;AAEA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oBAAoB,WAAW;AAC/B;AACA;;AAEA;;AAEA,QAAQ;AACR;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,UAAU;AAChC;AACA;;;AAGA;;AAEA;AACA;;AAEA;AACA;;AAEA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,UAAU;AACV;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,wBAAwB,YAAY;AACpC;AACA;AACA,WAAW;AACX;AACA,wBAAwB,gDAAgD;AACxE;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA,WAAW;AACX;AACA,wBAAwB,sCAAsC;AAC9D;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA,sCAAsC,EAAE;AACxC;AACA;AACA;AACA,SAAS;AACT;;AAEA;;AAEA;AACA;;AAEA;AACA,+CAA+C,yGAAyG,EAAE;;AAE1J;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA,cAAc;;AAEd;AACA;;AAEA;AACA;AACA,cAAc;;AAEd;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,UAAU;AACV;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,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE,UAAU;AACvB;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;UC1vBA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;UEtBA;UACA;UACA;UACA","sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transport/fetch.js","webpack://rollbar/./src/browser/transport/xhr.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/truncation.js","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./src/utility/replace.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/webpack/bootstrap","webpack://rollbar/webpack/before-startup","webpack://rollbar/webpack/startup","webpack://rollbar/webpack/after-startup"],"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, () => {\nreturn ","// 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","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443,\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function (data, callback) {\n var transportOptions = helpers.transportOptions(\n this.transportOptions,\n 'POST',\n );\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function () {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function (data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload);\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function (jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(\n this.transportOptions,\n 'POST',\n );\n this.transport.postJsonPayload(\n this.accessToken,\n transportOptions,\n jsonPayload,\n callback,\n );\n};\n\nApi.prototype.configure = function (options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = \"Error: could not serialize 'context'\";\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data,\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options);\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport,\n };\n}\n\nfunction detectTransport(options) {\n var gWindow =\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port =\n transport.port ||\n (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI,\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath,\n};\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client =\n client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = typeof document != 'undefined' && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(\n this.options,\n this.client.telemeter,\n this,\n gWindow,\n gDocument,\n );\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n\n // Used with rollbar-react for rollbar-react-native compatibility.\n this.rollbar = this;\n}\n\nvar _instance = null;\nRollbar.init = function (options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function (components) {\n Rollbar.prototype.components = components;\n};\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function (options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function (options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(\n oldOptions._configuredOptions,\n options,\n payload,\n );\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function (options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function () {\n return this.client.lastError;\n};\nRollbar.lastError = function () {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return { uuid: uuid };\n};\nRollbar.log = function () {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return { uuid: uuid };\n};\nRollbar.debug = function () {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return { uuid: uuid };\n};\nRollbar.info = function () {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return { uuid: uuid };\n};\nRollbar.warn = function () {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return { uuid: uuid };\n};\nRollbar.warning = function () {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return { uuid: uuid };\n};\nRollbar.error = function () {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return { uuid: uuid };\n};\nRollbar.critical = function () {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function () {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function () {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function () {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (\n this.options.captureUnhandledRejections ||\n this.options.handleUnhandledRejections\n ) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function (\n message,\n url,\n lineno,\n colno,\n error,\n context,\n) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (\n this.options.inspectAnonymousErrors &&\n this.isChrome &&\n error === null &&\n url === ''\n ) {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser,\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function () {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) {\n // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n};\n\nRollbar.prototype.handleUnhandledRejection = function (reason, promise) {\n if (\n !this.options.captureUnhandledRejections &&\n !this.options.handleUnhandledRejections\n ) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context =\n (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 () {\n return context || {};\n };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch (exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function (f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function () {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function () {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function (e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.addPayloadOptions)\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function () {\n logger.info(\n 'Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.',\n );\n};\n\nRollbar.prototype._createItem = function (args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return (\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self)\n );\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false,\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear',\n ],\n};\n","'use strict';\n\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 var undef;\n if (typeof document === 'undefined') {\n return undef;\n }\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n ((div.innerHTML = ''), all[0])\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion,\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction 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 = ' > ',\n separatorLength = separator.length;\n var out = [],\n len = 0,\n nextStr,\n 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(\n '[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]',\n );\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 = {},\n className,\n key,\n attr,\n i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && typeof className === 'string') {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({ key: key, value: attr });\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType,\n};\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) {\n return;\n }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function () {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) {\n return;\n }\n\n if (\n typeof window._rollbarURH === 'function' &&\n window._rollbarURH.belongsToShim\n ) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections,\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log,\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore,\n};\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation,\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar replace = require('../utility/replace');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false,\n};\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) {\n return null;\n }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function (description) {\n var name = nameFromDescription(description);\n if (!name) {\n return false;\n }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: [],\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: [],\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function (options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function (oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (\n !this.autoInstrument.network &&\n oldSettings &&\n oldSettings.network\n ) {\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 (\n this.autoInstrument.navigation &&\n !(oldSettings && oldSettings.navigation)\n ) {\n this.instrumentNavigation();\n } else if (\n !this.autoInstrument.navigation &&\n oldSettings &&\n oldSettings.navigation\n ) {\n this.deinstrumentNavigation();\n }\n\n if (\n this.autoInstrument.connectivity &&\n !(oldSettings && oldSettings.connectivity)\n ) {\n this.instrumentConnectivity();\n } else if (\n !this.autoInstrument.connectivity &&\n oldSettings &&\n oldSettings.connectivity\n ) {\n this.deinstrumentConnectivity();\n }\n\n if (\n this.autoInstrument.contentSecurityPolicy &&\n !(oldSettings && oldSettings.contentSecurityPolicy)\n ) {\n this.instrumentContentSecurityPolicy();\n } else if (\n !this.autoInstrument.contentSecurityPolicy &&\n oldSettings &&\n oldSettings.contentSecurityPolicy\n ) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function () {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function () {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function (orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(\n xhrp,\n 'open',\n function (orig) {\n return function (method, url) {\n var isUrlObject = _isUrlObject(url);\n if (_.isType(url, 'string') || isUrlObject) {\n url = isUrlObject ? url.toString() : url;\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null,\n };\n }\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n\n replace(\n xhrp,\n 'setRequestHeader',\n function (orig) {\n return function (header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n\n replace(\n xhrp,\n 'send',\n function (orig) {\n /* eslint-disable no-unused-vars */\n return function (data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(\n xhr.__rollbar_xhr,\n 'xhr',\n undefined,\n );\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type =\n xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig =\n self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i = 0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i = 0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (\n self.isJsonContentType(\n xhr.__rollbar_xhr.response_content_type,\n )\n ) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level =\n self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if (\n 'onreadystatechange' in xhr &&\n _.isFunction(xhr.onreadystatechange)\n ) {\n replace(xhr, 'onreadystatechange', function (orig) {\n return self.rollbar.wrap(\n orig,\n undefined,\n onreadystatechangeHandler,\n );\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = new Error().stack;\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n }\n\n if ('fetch' in this._window) {\n replace(\n this._window,\n 'fetch',\n 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 var isUrlObject = _isUrlObject(input);\n if (_.isType(input, 'string') || isUrlObject) {\n url = isUrlObject ? input.toString() : input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null,\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(\n reqHeaders,\n self.autoInstrument.networkRequestHeaders,\n );\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (\n args[0] &&\n !_.isType(args[0], 'string') &&\n args[0].body\n ) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = new Error().stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(\n resp.headers,\n self.autoInstrument.networkResponseHeaders,\n );\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') {\n // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (\n text &&\n self.isJsonContentType(metadata.response_content_type)\n ) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n },\n this.replacements,\n 'network',\n );\n }\n};\n\nInstrumenter.prototype.captureNetwork = function (\n metadata,\n subtype,\n rollbarUUID,\n) {\n if (\n metadata.request &&\n this.isJsonContentType(metadata.request_content_type)\n ) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function (contentType) {\n return contentType &&\n _.isType(contentType, 'string') &&\n contentType.toLowerCase().includes('json')\n ? true\n : false;\n};\n\nInstrumenter.prototype.scrubJson = function (json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n};\n\nInstrumenter.prototype.fetchHeaders = function (inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') {\n // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i = 0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n};\n\nInstrumenter.prototype.trackHttpErrors = function () {\n return (\n this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0\n );\n};\n\nInstrumenter.prototype.errorOnHttpStatus = function (metadata) {\n var status = metadata.status_code;\n\n if (\n (status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)\n ) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n};\n\nInstrumenter.prototype.deinstrumentConsole = function () {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function () {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function () {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug', 'info', 'warn', 'error', 'log'];\n try {\n for (var i = 0, len = methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function () {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function () {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener(\n 'dom',\n this._window,\n 'blur',\n 'onfocusout',\n blurHandler,\n true,\n );\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 =\n domUtil.isDescribedElement(e, 'a') ||\n domUtil.isDescribedElement(e, 'button');\n if (\n hasTag &&\n (anchorOrButton ||\n domUtil.isDescribedElement(e, 'input', ['button', 'submit']))\n ) {\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 (\n domUtil.isDescribedElement(e, 'select') &&\n e.options &&\n e.options.length\n ) {\n this.handleSelectInputChanged(e);\n } else if (\n domUtil.isDescribedElement(e, 'input') &&\n !domUtil.isDescribedElement(e, 'input', [\n 'button',\n 'submit',\n 'hidden',\n 'checkbox',\n 'radio',\n ])\n ) {\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 (\n subtype,\n element,\n value,\n isChecked,\n) {\n if (value !== undefined) {\n if (\n this.scrubTelemetryInputs ||\n domUtil.getElementType(element) === 'password'\n ) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(\n domUtil.treeToArray(element),\n );\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 =\n !chromePackagedApp &&\n this._window.history &&\n 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 =\n !chromePackagedApp &&\n this._window.history &&\n this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(\n this._window,\n 'onpopstate',\n 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 },\n this.replacements,\n 'navigation',\n );\n\n replace(\n this._window.history,\n 'pushState',\n 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 },\n this.replacements,\n 'navigation',\n );\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 (\n parsedHref.protocol === parsedTo.protocol &&\n parsedHref.host === parsedTo.host\n ) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (\n parsedHref.protocol === parsedFrom.protocol &&\n parsedHref.host === parsedFrom.host\n ) {\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(\n 'connectivity',\n this._window,\n 'online',\n undefined,\n function () {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this),\n true,\n );\n this.addListener(\n 'connectivity',\n this._window,\n 'offline',\n undefined,\n function () {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this),\n true,\n );\n } else {\n var self = this;\n replace(\n this._document.body,\n 'ononline',\n function (orig) {\n return function () {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n },\n this.replacements,\n 'connectivity',\n );\n replace(\n this._document.body,\n 'onoffline',\n function (orig) {\n return function () {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n },\n this.replacements,\n 'connectivity',\n );\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function (cspEvent) {\n var message =\n 'Security Policy Violation: ' +\n 'blockedURI: ' +\n cspEvent.blockedURI +\n ', ' +\n 'violatedDirective: ' +\n cspEvent.violatedDirective +\n ', ' +\n 'effectiveDirective: ' +\n cspEvent.effectiveDirective +\n ', ';\n\n if (cspEvent.sourceFile) {\n message +=\n 'location: ' +\n cspEvent.sourceFile +\n ', ' +\n 'line: ' +\n cspEvent.lineNumber +\n ', ' +\n 'col: ' +\n cspEvent.columnNumber +\n ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n};\n\nInstrumenter.prototype.handleCspError = function (message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n};\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function () {\n if (!('addEventListener' in this._document)) {\n return;\n }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function () {\n if (!('addEventListener' in this._document)) {\n return;\n }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener(\n 'contentsecuritypolicy',\n this._document,\n 'securitypolicyviolation',\n null,\n cspHandler,\n false,\n );\n};\n\nInstrumenter.prototype.addListener = function (\n section,\n obj,\n type,\n altType,\n handler,\n capture,\n) {\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\nfunction _isUrlObject(input) {\n return typeof URL !== 'undefined' && input instanceof URL;\n}\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if (item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo =\n item.err._savedStackTrace ||\n errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message =\n item.err.message ||\n item.err.description ||\n item.message ||\n String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment =\n (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version,\n },\n custom: item.custom,\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function (item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function (item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height,\n },\n },\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function (item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i = 0, l = navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({ name: cur.name, description: cur.description });\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message,\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', { message: result });\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (\n stack &&\n stack.length === 0 &&\n item._unhandledStackInfo &&\n item._unhandledStackInfo.stack\n ) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', { trace_chain: traces });\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', { trace: trace });\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n class: className,\n message: message,\n },\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method:\n !stackFrame.func || stackFrame.func === '?'\n ? '[anonymous]'\n : stackFrame.func,\n colno: stackFrame.column,\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (\n frame.method &&\n frame.method.endsWith &&\n frame.method.endsWith('_rollbar_wrapped')\n ) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n };\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber,\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function (\n accessToken,\n options,\n params,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n null,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\nTransport.prototype.post = function (\n accessToken,\n options,\n payload,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload);\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n writeData,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\nTransport.prototype.postJsonPayload = function (\n accessToken,\n options,\n jsonPayload,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n jsonPayload,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow =\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n var self = this;\n rootZone.run(function () {\n self._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n};\n\nTransport.prototype._makeRequest = function (\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n transport,\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout);\n } else {\n makeXhrRequest(\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n );\n }\n};\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function (_msg) {\n /* do nothing */\n }, // eslint-disable-line no-unused-vars\n function (err) {\n callback(new Error(err));\n },\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if (_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(function () {\n controller.abort();\n }, timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal,\n },\n body: data,\n })\n .then(function (response) {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then(function (data) {\n callback(null, data);\n })\n .catch(function (error) {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function () {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message =\n 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 =\n 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if (_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n // 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(\n new Error(\n 'No window available during request, unknown environment',\n ),\n );\n }\n\n // If the current page is http, try and send over http\n if (\n window.location.href.substring(0, 5) === 'http:' &&\n url.substring(0, 5) === 'https'\n ) {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function () {};\n xdomainrequest.ontimeout = function () {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function () {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function () {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n },\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null,\n auth: null,\n host: null,\n path: null,\n hash: null,\n href: url,\n hostname: null,\n port: null,\n pathname: null,\n search: null,\n query: null,\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0, i);\n last = i + 2;\n } else {\n last = 0;\n }\n\n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i + 1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse,\n};\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) {\n return;\n }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals =\n '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 ',',\n );\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 (\n prototype.hasOwnProperty &&\n prototype.hasOwnProperty('addEventListener')\n ) {\n var oldAddEventListener = prototype.addEventListener;\n while (\n oldAddEventListener._rollbarOldAdd &&\n oldAddEventListener.belongsToShim\n ) {\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 (\n oldRemoveEventListener._rollbarOldRemove &&\n oldRemoveEventListener.belongsToShim\n ) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function (event, callback, bubble) {\n oldRemoveEventListener.call(\n this,\n event,\n (callback && callback._rollbar_wrapped) || callback,\n bubble,\n );\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nmodule.exports = {\n version: '2.26.4',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60,\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp(\n '^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ',\n);\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\nfunction gatherContext() {\n return null;\n}\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch (e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception,\n };\n}\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace(\n (errClassMatch[errClassMatch.length - 2] || '') + errClass + ':',\n '',\n );\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName =\n error.constructor.name &&\n error.constructor.name.length &&\n error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame,\n};\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n if (!obj || toStr.call(obj) !== '[object Object]') {\n return false;\n }\n\n var hasOwnConstructor = hasOwn.call(obj, 'constructor');\n var hasIsPrototypeOf =\n obj.constructor &&\n obj.constructor.prototype &&\n hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n // Not own constructor property must be Object\n if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n return false;\n }\n\n // Own properties are enumerated firstly, so to speed up,\n // if last one is own, then all properties are own.\n var key;\n for (key in obj) {\n /**/\n }\n\n return typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i,\n src,\n copy,\n clone,\n name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i = 0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function (options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function (transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function (item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(\n item,\n 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\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function (item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function (err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function (item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (\n _.isFunction(settings.checkIgnore) &&\n settings.checkIgnore(isUncaught, args, item)\n ) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n };\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function (item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n };\n}\n\nfunction urlIsSafeListed(logger) {\n return function (item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n };\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) {\n return !block;\n }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) {\n return !block;\n }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) {\n return !block;\n }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if (matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (\n e\n /* istanbul ignore next */\n ) {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error(\n \"Error while reading your configuration's \" +\n listName +\n ' option. Removing custom ' +\n listName +\n '.',\n e,\n );\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function (item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0) {\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch (\n e\n /* istanbul ignore next */\n ) {\n settings.ignoredMessages = null;\n logger.error(\n \"Error while reading your configuration's ignoredMessages option. Removing custom ignoredMessages.\",\n );\n }\n\n return true;\n };\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored,\n};\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function (options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function (predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function (item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function (item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function (\n item,\n callback,\n originalError,\n originalItem,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {\n return;\n };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(\n item,\n function (err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this),\n );\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(\n function () {\n this._maybeCallWait();\n }.bind(this),\n 500,\n );\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(\n item,\n function (err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this),\n );\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 = [\n 'ECONNRESET',\n 'ENOTFOUND',\n 'ESOCKETTIMEDOUT',\n 'ETIMEDOUT',\n 'ECONNREFUSED',\n 'EHOSTUNREACH',\n 'EPIPE',\n 'EAI_AGAIN',\n];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function (err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function (item, callback) {\n this.retryQueue.push({ item: item, callback: callback });\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(\n function () {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this),\n this.options.retryInterval,\n );\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 (\n _.isFunction(this.waitCallback) &&\n this.pendingItems.length === 0 &&\n this.pendingRequests.length === 0\n ) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined,\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function (options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function (item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n globalRateLimit + ' max items reached',\n false,\n );\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n globalRateLimitPerMin + ' items per minute reached',\n false,\n );\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend =\n shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n null,\n shouldSend,\n globalRateLimit,\n globalRateLimitPerMin,\n perMinute,\n );\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(\n platform,\n options,\n error,\n shouldSend,\n globalRateLimit,\n limitPerMin,\n perMinute,\n) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(\n platform,\n options,\n globalRateLimit,\n limitPerMin,\n perMinute,\n );\n }\n return { error: error, shouldSend: shouldSend, payload: payload };\n}\n\nfunction rateLimitPayload(\n platform,\n options,\n globalRateLimit,\n limitPerMin,\n perMinute,\n) {\n var environment =\n options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin,\n },\n },\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version:\n (options.notifier && options.notifier.version) || options.version,\n },\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60,\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer;\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents =\n (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag(\n 'rollbar.item_url',\n `https://rollbar.com/item/uuid/?uuid=${item.uuid}`,\n );\n span.setTag(\n 'rollbar.occurrence_url',\n `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`,\n );\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId,\n };\n }\n }\n }\n};\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (\n !spanContext ||\n !spanContext.toSpanId ||\n !spanContext.toTraceId ||\n typeof spanContext.toSpanId !== 'function' ||\n typeof spanContext.toTraceId !== 'function'\n ) {\n return false;\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function (options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.queue.length > newMaxEvents) {\n deleteCount = this.queue.length - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function () {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function (\n type,\n metadata,\n level,\n rollbarUUID,\n timestamp,\n) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client',\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (\n _.isFunction(this.options.filterTelemetry) &&\n this.options.filterTelemetry(e)\n ) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function (\n type,\n metadata,\n level,\n rollbarUUID,\n) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function (\n err,\n level,\n rollbarUUID,\n timestamp,\n) {\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 (\n message,\n level,\n rollbarUUID,\n timestamp,\n) {\n return this.capture(\n 'log',\n {\n message: message,\n },\n level,\n rollbarUUID,\n timestamp,\n );\n};\n\nTelemeter.prototype.captureNetwork = function (\n metadata,\n subtype,\n rollbarUUID,\n requestData,\n) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function (statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function (\n subtype,\n element,\n value,\n checked,\n rollbarUUID,\n) {\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(\n 'navigation',\n { from: from, to: to },\n 'info',\n rollbarUUID,\n );\n};\n\nTelemeter.prototype.captureDomContentLoaded = function (ts) {\n return this.capture(\n 'navigation',\n { subtype: 'DOMContentLoaded' },\n 'info',\n undefined,\n ts && ts.getTime(),\n );\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(\n 'navigation',\n { subtype: 'load' },\n 'info',\n undefined,\n ts && ts.getTime(),\n );\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function (type, rollbarUUID) {\n return this.captureNetwork({ change: type }, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function (item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture(\n 'log',\n item.custom,\n item.level,\n item.uuid,\n item.timestamp,\n );\n }\n};\n\nTelemeter.prototype.push = function (e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info',\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var data = item.data;\n\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 addPayloadOptions(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n item.data = _.merge(item.data, payloadOptions);\n callback(null, item);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath + '.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath + '.extra') || {};\n var newExtra = _.merge(extra, { message: item.message });\n _.set(item, tracePath + '.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function (item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error(\n 'Error while calling custom transform() function. Removing custom transform().',\n e,\n );\n callback(null, item);\n return;\n }\n if (_.isPromise(response)) {\n response.then(\n function (promisedItem) {\n if (promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n },\n function (error) {\n callback(error, item);\n },\n );\n } else {\n callback(null, newItem);\n }\n };\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if (_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(\n item.notifier.client.notifier.diagnostic,\n item.diagnostic,\n );\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack,\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(\n item.data.notifier.diagnostic,\n diagnostic,\n );\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addPayloadOptions: addPayloadOptions,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys,\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = typeof range === 'undefined' ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(\n 255,\n traceData.exception.message,\n );\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = typeof maxSize === 'undefined' ? 512 * 1024 : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody,\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue,\n};\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if (polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else {\n // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return {}.toString\n .call(x)\n .match(/\\s([a-zA-Z]+)/)[1]\n .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\n .call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n */\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String;\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\nfunction isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return type === 'object' || type === 'array';\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(\n /[xy]/g,\n 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 );\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4,\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor',\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g,\n },\n parser: {\n strict:\n /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose:\n /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n },\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0, qs) + query + '&' + p.substring(qs + 1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0, h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return { error: error, value: value };\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) {\n // up to 7 bits\n count = count + 1;\n } else if (code < 2048) {\n // up to 11 bits\n count = count + 2;\n } else if (code < 65536) {\n // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return { error: error, value: value };\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser,\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno,\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href =\n typeof document !== 'undefined' &&\n document &&\n document.location &&\n document.location.href;\n var useragent =\n typeof window !== 'undefined' &&\n window &&\n window.navigator &&\n window.navigator.userAgent;\n return {\n mode: mode,\n message: error ? String(error) : message || backupMessage,\n url: href,\n stack: [location],\n useragent: useragent,\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function (err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value,\n name,\n newSeen,\n result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : (message = arg);\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : (err = arg);\n break;\n case 'object':\n case 'array':\n if (\n arg instanceof Error ||\n (typeof DOMException !== 'undefined' && arg instanceof DOMException)\n ) {\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 (\n arg instanceof Error ||\n (typeof DOMException !== 'undefined' && arg instanceof DOMException)\n ) {\n err ? extraArgs.push(arg) : (err = arg);\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4(),\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = [\n 'log',\n 'network',\n 'dom',\n 'navigation',\n 'error',\n 'manual',\n];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level,\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len - 1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if (options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if (options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4,\n};\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n return name.toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value;\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function () {\n var value = items.shift();\n return { done: value === undefined, value: value };\n },\n };\n\n return iterator;\n}\n\nfunction FetchHeaders(headers) {\n this.map = {};\n\n if (headers instanceof FetchHeaders) {\n headers.forEach(function (value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function (header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function (name) {\n this.append(name, headers[name]);\n }, this);\n }\n}\n\nFetchHeaders.prototype.append = function (name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n};\n\nFetchHeaders.prototype.get = function (name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null;\n};\n\nFetchHeaders.prototype.has = function (name) {\n return this.map.hasOwnProperty(normalizeName(name));\n};\n\nFetchHeaders.prototype.forEach = function (callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n};\n\nFetchHeaders.prototype.entries = function () {\n var items = [];\n this.forEach(function (value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items);\n};\n\nmodule.exports = headers;\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","'use strict';\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\nmodule.exports = replace;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: [] };\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","// 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","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(409);\n",""],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/dist/rollbar.umd.min.js b/dist/rollbar.umd.min.js
index ee5cad795..4fff411e9 100644
--- a/dist/rollbar.umd.min.js
+++ b/dist/rollbar.umd.min.js
@@ -1,2 +1,2 @@
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rollbar=e():t.rollbar=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(12),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=v();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}var d=["log","network","dom","navigation","error","manual"],m=["critical","error","warning","info","debug"];function g(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,o,i){for(var a,u,c,p,f,d,m=[],g=[],y=0,b=t.length;y0&&((c=n(c)).extraArgs=m);var k={message:a,err:u,custom:c,timestamp:v(),callback:p,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,c),o&&f&&(k.request=f),i&&(k.lambdaContext=i),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(16),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,r,n,e)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=t.proxy;if(t.endpoint){var l=r.parse(t.endpoint);n=l.hostname,o=l.protocol,i=l.port,s=l.pathname,a=l.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]> 4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t){this.truncation=t}function s(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){a.apply(void 0,r)}))}else a.apply(void 0,r)}function a(t,e,r,i,s,a,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(i,s);var l;if(!(l=a?a():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}s(new Error(String(l.status)))}else{s(u("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),s(r)}var i};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(i)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return s(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){s(u("Request timed out","ETIMEDOUT"))},f.onerror=function(){s(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);s(t.error,t.value)},f.open(r,e,!0),f.send(i)}else s(new Error("Cannot find a method to transport a request"))}}catch(t){s(t)}}function u(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}i.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);s(t,n.formatUrl(e),"GET",null,o,i,e.timeout)},i.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var a;if((a=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(a.error);var u=a.value;s(t,n.formatUrl(e),"POST",u,o,i,e.timeout)},i.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});s(t,n.formatUrl(e),"POST",r,o,i,e.timeout)},t.exports=i},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(" ")||void 0,a=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},function(t,e,r){var n,o,i;!function(r,s){"use strict";o=[],void 0===(i="function"==typeof(n=function(){function t(t){return t.charAt(0).toUpperCase()+t.substring(1)}function e(t){return function(){return this[t]}}var r=["isConstructor","isEval","isNative","isToplevel"],n=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=r.concat(n,o,["args"],["evalOrigin"]);function s(e){if(e)for(var r=0;ro&&(i=this.maxQueueSize-o),this.maxQueueSize=o,this.queue.splice(0,i)},o.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},o.prototype.capture=function(t,e,r,o,s){var a={level:i(t,r),type:t,timestamp_ms:s||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},o.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},o.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},o.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},o.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},o.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},o.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},o.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},o.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},o.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},o.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},o.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},o.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(4),i=r(2),s=r(31),a={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function u(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function c(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function l(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=a),this.autoInstrument=n.merge(a,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){i.__rollbar_xhr.end_time_ms=n.now();var e=null;if(i.__rollbar_xhr.response_content_type=i.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var s,a;if(!0===r){var u=i.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},l.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},l.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},l.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===s.getElementType(e))r="[scrubbed]";else{var o=s.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=s.elementArrayToString(s.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},l.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&c(this.replacements,"navigation")},l.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;u(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),u(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},l.prototype.handleUrlChange=function(t,e){var r=i.parse(this._location.href),n=i.parse(e),o=i.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},l.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):c(this.replacements,"connectivity"))},l.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;u(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),u(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},l.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},l.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},l.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._window&&this.removeListeners("contentsecuritypolicy")},l.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._window){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._window,"securitypolicyviolation",null,t,!1)}},l.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},l.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=l},function(t,e,r){"use strict";function n(t){return(t.getAttribute("type")||"").toLowerCase()}function o(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r ".length,i=[],s=0,a=t.length-1;a>=0;a--){if(e=o(t[a]),r=s+i.length*n+e.length,a=83){i.unshift("...");break}i.unshift(e),s+=e.length}return i.join(" > ")},treeToArray:function(t){for(var e,r=[],n=0;t&&n<5&&"html"!==(e=i(t)).tagName;n++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,e,r){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!r)return!0;t=n(t);for(var o=0;o2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return[e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!f(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}}])}));
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rollbar=e():t.rollbar=e()}(this,(()=>{return t={276:function(){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},180:function(t,e,r){var n,o,i;!function(s,a){"use strict";o=[r(124)],void 0===(i="function"==typeof(n=function(t){var e=/(^|@)\S+:\d+/,r=/^\s*at .*(\S+:\d+|\(native\))/m,n=/^(eval@)?(\[native code])?$/;return{parse:function(t){if(void 0!==t.stacktrace||void 0!==t["opera#sourceloc"])return this.parseOpera(t);if(t.stack&&t.stack.match(r))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")},extractLocation:function(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));return[e[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(t){return!!t.match(r)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=r.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(r=n?r.replace(n[0],""):r).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:o.pop()),s=o.join(" ")||void 0,a=["eval",""].indexOf(i[0])>-1?void 0:i[0];return new t({functionName:s,fileName:a,lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(t){return!t.match(n)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new t({functionName:e});var r=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(r),o=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(r,""));return new t({functionName:o,fileName:i[0],lineNumber:i[1],columnNumber:i[2],source:e})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,s=n.length;i/,"$2").replace(/\([^)]*\)/g,"")||void 0;i.match(/\(([^)]*)\)/)&&(r=i.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var a=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t({functionName:s,args:a,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})}),this)}}})?n.apply(e,o):n)||(t.exports=i)}()},124:function(t,e){var r,n,o;!function(i,s){"use strict";n=[],void 0===(o="function"==typeof(r=function(){function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t){return t.charAt(0).toUpperCase()+t.substring(1)}function r(t){return function(){return this[t]}}var n=["isConstructor","isEval","isNative","isToplevel"],o=["columnNumber","lineNumber"],i=["fileName","functionName","source"],s=["args"],a=["evalOrigin"],u=n.concat(o,i,s,a);function c(t){if(t)for(var r=0;r{"use strict";var n=r(702),o=r(817),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup),i=this;setTimeout((function(){i.transport.post(i.accessToken,r,n,e)}),0)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},817:(t,e,r)=>{"use strict";var n=r(702);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=function(t){var e="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,r=t.defaultTransport||"xhr";return void 0===e.fetch&&(r="xhr"),void 0===e.XMLHttpRequest&&(r="fetch"),r}(t),l=t.proxy;if(t.endpoint){var p=r.parse(t.endpoint);n=p.hostname,o=p.protocol,i=p.port,s=p.pathname,a=p.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:l,transport:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout,a=t.transport;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e,transport:a}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},409:(t,e,r)=>{"use strict";var n=r(343),o="undefined"!=typeof window&&window._rollbarConfig,i=o&&o.globalAlias||"Rollbar",s="undefined"!=typeof window&&window[i]&&"function"==typeof window[i].shimId&&void 0!==window[i].shimId();if("undefined"==typeof window||window._rollbarStartTime||(window._rollbarStartTime=(new Date).getTime()),!s&&o){var a=new n(o);window[i]=a}else"undefined"!=typeof window?(window.rollbar=n,window._rollbarDidLoad=!0):"undefined"!=typeof self&&(self.rollbar=n,self._rollbarDidLoad=!0);t.exports=n},403:(t,e,r)=>{"use strict";var n=r(562),o=r(702),i=r(815),s=r(802),a=r(349),u=r(477),c=r(509),l=r(860),p=r(417),h=r(172),f=r(61),d=r(303);function m(t,e){this.options=o.handleOptions(x,t,null,s),this.options._configuredOptions=t;var r=this.components.telemeter,a=this.components.instrumenter,d=this.components.polyfillJSON;this.wrapGlobals=this.components.wrapGlobals,this.scrub=this.components.scrub;var m=this.components.truncation,g=new u(m),v=new i(this.options,g,c,m);r&&(this.telemeter=new r(this.options)),this.client=e||new n(this.options,v,s,this.telemeter,"browser");var y=b(),w="undefined"!=typeof document&&document;this.isChrome=y.chrome&&y.chrome.runtime,this.anonymousErrorsPending=0,function(t,e,r){t.addTransform(l.handleDomException).addTransform(l.handleItemWithError).addTransform(l.ensureItemHasSomethingToSay).addTransform(l.addBaseInfo).addTransform(l.addRequestInfo(r)).addTransform(l.addClientInfo(r)).addTransform(l.addPluginInfo(r)).addTransform(l.addBody).addTransform(p.addMessageWithError).addTransform(p.addTelemetryData).addTransform(p.addConfigToPayload).addTransform(l.addScrubber(e.scrub)).addTransform(p.addPayloadOptions).addTransform(p.userTransform(s)).addTransform(p.addConfiguredOptions).addTransform(p.addDiagnosticKeys).addTransform(p.itemToPayload)}(this.client.notifier,this,y),this.client.queue.addPredicate(f.checkLevel).addPredicate(h.checkIgnore).addPredicate(f.userCheckIgnore(s)).addPredicate(f.urlIsNotBlockListed(s)).addPredicate(f.urlIsSafeListed(s)).addPredicate(f.messageIsIgnored(s)),this.setupUnhandledCapture(),a&&(this.instrumenter=new a(this.options,this.client.telemeter,this,y,w),this.instrumenter.instrument()),o.setupJSON(d),this.rollbar=this}var g=null;function v(t){var e="Rollbar is not initialized";s.error(e),t&&t(new Error(e))}function y(t){for(var e=0,r=t.length;e{"use strict";t.exports={scrubFields:["pw","pass","passwd","password","secret","confirm_password","confirmPassword","password_confirmation","passwordConfirmation","access_token","accessToken","X-Rollbar-Access-Token","secret_key","secretKey","secretToken","cc-number","card number","cardnumber","cardnum","ccnum","ccnumber","cc num","creditcardnumber","credit card number","newcreditcardnumber","new credit card","creditcardno","credit card no","card#","card #","cc-csc","cvc","cvc2","cvv2","ccv2","security code","card verification","name on credit card","name on card","nameoncard","cardholder","card holder","name des karteninhabers","ccname","card type","cardtype","cc type","cctype","payment type","expiration date","expirationdate","expdate","cc-exp","ccmonth","ccyear"]}},616:t=>{"use strict";var e={ieVersion:function(){var t;if("undefined"==typeof document)return t;for(var e=3,r=document.createElement("div"),n=r.getElementsByTagName("i");r.innerHTML="\x3c!--[if gt IE "+ ++e+"]> 4?e:t}};t.exports=e},300:t=>{"use strict";function e(t){return(t.getAttribute("type")||"").toLowerCase()}function r(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r=0;s--){if(e=r(t[s]),n=i+3*o.length+e.length,s=83){o.unshift("...");break}o.unshift(e),i+=e.length}return o.join(" > ")},treeToArray:function(t){for(var e,r=[],o=0;t&&o<5&&"html"!==(e=n(t)).tagName;o++)r.unshift(e),t=t.parentNode;return r},getElementFromEvent:function(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0},isDescribedElement:function(t,r,n){if(t.tagName.toLowerCase()!==r.toLowerCase())return!1;if(!n)return!0;t=e(t);for(var o=0;o{"use strict";t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var n;if("function"==typeof e._rollbarOldOnError)n=e._rollbarOldOnError;else if(t.onerror){for(n=t.onerror;n._rollbarOldOnError;)n=n._rollbarOldOnError;e._rollbarOldOnError=n}e.handleAnonymousErrors();var o=function(){var r=Array.prototype.slice.call(arguments,0);!function(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}(t,e,n,r)};r&&(o._rollbarOldOnError=n),t.onerror=o}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},802:(t,e,r)=>{"use strict";r(276);var n=r(616),o=r(702);t.exports={error:function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),n.ieVersion()<=8?console.error(o.formatArgsAsString(t)):console.error.apply(console,t)},info:function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),n.ieVersion()<=8?console.info(o.formatArgsAsString(t)):console.info.apply(console,t)},log:function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),n.ieVersion()<=8?console.log(o.formatArgsAsString(t)):console.log.apply(console,t)}}},172:(t,e,r)=>{"use strict";var n=r(702);t.exports={checkIgnore:function(t,e){return!n.get(e,"plugins.jquery.ignoreAjaxErrors")||!n.get(t,"body.message.extra.isAjax")}}},343:(t,e,r)=>{"use strict";var n=r(403),o=r(773),i=r(568),s=r(876),a=r(965),u=r(369),c=r(473);n.setComponents({telemeter:o,instrumenter:i,polyfillJSON:s,wrapGlobals:a,scrub:u,truncation:c}),t.exports=n},568:(t,e,r)=>{"use strict";var n=r(702),o=r(650),i=r(297),s=r(369),a=r(509),u=r(300),c={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestHeaders:!1,networkRequestBody:!1,networkErrorOnHttp5xx:!1,networkErrorOnHttp4xx:!1,networkErrorOnHttp0:!1,log:!0,dom:!0,navigation:!0,connectivity:!0,contentSecurityPolicy:!0,errorOnContentSecurityPolicy:!1};function l(t,e){for(var r;t[e].length;)(r=t[e].shift())[0][r[1]]=r[2]}function p(t,e,r,o,i){this.options=t;var s=t.autoInstrument;!1===t.enabled||!1===s?this.autoInstrument={}:(n.isType(s,"object")||(s=c),this.autoInstrument=n.merge(c,s)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=function(t){for(var e=[],r=0;r3)){s.__rollbar_xhr.end_time_ms=n.now();var e=null;if(s.__rollbar_xhr.response_content_type=s.getResponseHeader("Content-Type"),t.autoInstrument.networkResponseHeaders){var r=t.autoInstrument.networkResponseHeaders;e={};try{var i,a;if(!0===r){var u=s.getAllResponseHeaders();if(u){var c,l,p=u.trim().split(/[\r\n]+/);for(a=0;a=500&&this.autoInstrument.networkErrorOnHttp5xx||e>=400&&this.autoInstrument.networkErrorOnHttp4xx||0===e&&this.autoInstrument.networkErrorOnHttp0){var r=new Error("HTTP request failed with Status "+e);r.stack=t.stack,this.rollbar.error(r,{skipFrames:1})}},p.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},p.prototype.instrumentConsole=function(){if("console"in this._window&&this._window.console.log){var t=this,e=this._window.console,r=["debug","info","warn","error","log"];try{for(var o=0,i=r.length;o=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},p.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===u.getElementType(e))r="[scrubbed]";else{var o=u.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=u.elementArrayToString(u.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},p.prototype.deinstrumentNavigation=function(){var t=this._window.chrome;!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState&&l(this.replacements,"navigation")},p.prototype.instrumentNavigation=function(){var t=this._window.chrome;if(!(t&&t.app&&t.app.runtime)&&this._window.history&&this._window.history.pushState){var e=this;i(this._window,"onpopstate",(function(t){return function(){var r=e._location.href;e.handleUrlChange(e._lastHref,r),t&&t.apply(this,arguments)}}),this.replacements,"navigation"),i(this._window.history,"pushState",(function(t){return function(){var r=arguments.length>2?arguments[2]:void 0;return r&&e.handleUrlChange(e._lastHref,r+""),t.apply(this,arguments)}}),this.replacements,"navigation")}},p.prototype.handleUrlChange=function(t,e){var r=a.parse(this._location.href),n=a.parse(e),o=a.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},p.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):l(this.replacements,"connectivity"))},p.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;i(this._document.body,"ononline",(function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity"),i(this._document.body,"onoffline",(function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}}),this.replacements,"connectivity")}},p.prototype.handleCspEvent=function(t){var e="Security Policy Violation: blockedURI: "+t.blockedURI+", violatedDirective: "+t.violatedDirective+", effectiveDirective: "+t.effectiveDirective+", ";t.sourceFile&&(e+="location: "+t.sourceFile+", line: "+t.lineNumber+", col: "+t.columnNumber+", "),e+="originalPolicy: "+t.originalPolicy,this.telemeter.captureLog(e,"error"),this.handleCspError(e)},p.prototype.handleCspError=function(t){this.autoInstrument.errorOnContentSecurityPolicy&&this.rollbar.error(t)},p.prototype.deinstrumentContentSecurityPolicy=function(){"addEventListener"in this._document&&this.removeListeners("contentsecuritypolicy")},p.prototype.instrumentContentSecurityPolicy=function(){if("addEventListener"in this._document){var t=this.handleCspEvent.bind(this);this.addListener("contentsecuritypolicy",this._document,"securitypolicyviolation",null,t,!1)}},p.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push((function(){e.removeEventListener(r,o,i)}))):n&&(e.attachEvent(n,o),this.eventRemovers[t].push((function(){e.detachEvent(n,o)})))},p.prototype.removeListeners=function(t){for(;this.eventRemovers[t].length;)this.eventRemovers[t].shift()()},t.exports=p},860:(t,e,r)=>{"use strict";var n=r(702),o=r(303),i=r(802);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var h,f,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y0&&n.set(e,"data.request",i),o(null,e)}},addClientInfo:function(t){return function(e,r,o){if(!t)return o(null,e);var i=t.navigator||{},s=t.screen||{};n.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:i.userAgent,language:i.language,cookie_enabled:i.cookieEnabled,screen:{width:s.width,height:s.height}}}),o(null,e)}},addPluginInfo:function(t){return function(e,r,o){if(!t||!t.navigator)return o(null,e);for(var i,s=[],a=t.navigator.plugins||[],u=0,c=a.length;u{"use strict";var n=r(702),o=r(656),i=r(86);function s(t){this.truncation=t}s.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);var s=n.formatUrl(e);this._makeZoneRequest(t,s,"GET",null,o,i,e.timeout,e.transport)},s.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var s;if((s=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(s.error);var a=s.value,u=n.formatUrl(e);this._makeZoneRequest(t,u,"POST",a,o,i,e.timeout,e.transport)},s.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});var s=n.formatUrl(e);this._makeZoneRequest(t,s,"POST",r,o,i,e.timeout,e.transport)},s.prototype._makeZoneRequest=function(){var t="undefined"!=typeof window&&window||void 0!==o&&o,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent,o=this;n.run((function(){o._makeRequest.apply(void 0,r)}))}else this._makeRequest.apply(void 0,r)},s.prototype._makeRequest=function(t,e,r,n,s,a,u,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(n,s);"fetch"===c?o(t,e,r,n,s,u):i(t,e,r,n,s,a,u)},t.exports=s},656:(t,e,r)=>{"use strict";var n=r(802),o=r(702);t.exports=function(t,e,r,i,s,a){var u,c;o.isFiniteNumber(a)&&(u=new AbortController,c=setTimeout((function(){u.abort()}),a)),fetch(e,{method:r,headers:{"Content-Type":"application/json","X-Rollbar-Access-Token":t,signal:u&&u.signal},body:i}).then((function(t){return c&&clearTimeout(c),t.json()})).then((function(t){s(null,t)})).catch((function(t){n.error(t.message),s(t)}))}},86:(t,e,r)=>{"use strict";var n=r(702),o=r(802);function i(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}t.exports=function(t,e,r,s,a,u,c){var l;if(!(l=u?u():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}a(new Error(String(l.status)))}else a(i("XHR response had no status code (likely connection failure)"))}}catch(t){var r;r=t&&t.stack?t:new Error(t),a(r)}var s};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(s)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return a(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var h=new XDomainRequest;h.onprogress=function(){},h.ontimeout=function(){a(i("Request timed out","ETIMEDOUT"))},h.onerror=function(){a(new Error("Error during request"))},h.onload=function(){var t=n.jsonParse(h.responseText);a(t.error,t.value)},h.open(r,e,!0),h.send(s)}else a(new Error("Cannot find a method to transport a request"))}}catch(t){a(t)}}},509:t=>{"use strict";t.exports={parse:function(t){var e,r,n={protocol:null,auth:null,host:null,path:null,hash:null,href:t,hostname:null,port:null,pathname:null,search:null,query:null};if(-1!==(e=t.indexOf("//"))?(n.protocol=t.substring(0,e),r=e+2):r=0,-1!==(e=t.indexOf("@",r))&&(n.auth=t.substring(r,e),r=e+1),-1===(e=t.indexOf("/",r))){if(-1===(e=t.indexOf("?",r)))return-1===(e=t.indexOf("#",r))?n.host=t.substring(r):(n.host=t.substring(r,e),n.hash=t.substring(e)),n.hostname=n.host.split(":")[0],n.port=n.host.split(":")[1],n.port&&(n.port=parseInt(n.port,10)),n;n.host=t.substring(r,e),n.hostname=n.host.split(":")[0],n.port=n.host.split(":")[1],n.port&&(n.port=parseInt(n.port,10)),r=e}else n.host=t.substring(r,e),n.hostname=n.host.split(":")[0],n.port=n.host.split(":")[1],n.port&&(n.port=parseInt(n.port,10)),r=e;if(-1===(e=t.indexOf("#",r))?n.path=t.substring(r):(n.path=t.substring(r,e),n.hash=t.substring(e)),n.path){var o=n.path.split("?");n.pathname=o[0],n.query=o[1],n.search=n.query?"?"+n.query:null}return n}}},965:t=>{"use strict";function e(t,e,r){if(e.hasOwnProperty&&e.hasOwnProperty("addEventListener")){for(var n=e.addEventListener;n._rollbarOldAdd&&n.belongsToShim;)n=n._rollbarOldAdd;var o=function(e,r,o){n.call(this,e,t.wrap(r),o)};o._rollbarOldAdd=n,o.belongsToShim=r,e.addEventListener=o;for(var i=e.removeEventListener;i._rollbarOldRemove&&i.belongsToShim;)i=i._rollbarOldRemove;var s=function(t,e,r){i.call(this,t,e&&e._rollbar_wrapped||e,r)};s._rollbarOldRemove=i,s.belongsToShim=r,e.removeEventListener=s}}t.exports=function(t,r,n){if(t){var o,i,s="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(o=0;o{"use strict";t.exports={version:"2.26.4",endpoint:"api.rollbar.com/api/1/item/",logLevel:"debug",reportLevel:"debug",uncaughtErrorLevel:"error",maxItems:0,itemsPerMin:60}},303:(t,e,r)=>{"use strict";var n=r(180),o=new RegExp("^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ");function i(){return null}function s(t){var e={};return e._stackFrame=t,e.url=t.fileName,e.line=t.lineNumber,e.func=t.functionName,e.column=t.columnNumber,e.args=t.args,e.context=null,e}function a(t,e){return{stack:function(){var r=[];e=e||0;try{r=n.parse(t)}catch(t){r=[]}for(var o=[],i=e;i{"use strict";var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var n,o=e.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&e.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!o&&!i)return!1;for(n in t);return void 0===n||e.call(t,n)};t.exports=function t(){var e,r,o,i,s,a={},u=null,c=arguments.length;for(e=0;e{"use strict";var n=r(702);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},61:(t,e,r)=>{"use strict";var n=r(702);function o(t,e,r){if(!t)return!r;var o,i,s=t.frames;if(!s||0===s.length)return!r;for(var a=e.length,u=s.length,c=0;c{"use strict";var n=r(702);function o(t,e,r,n){this.rateLimiter=t,this.api=e,this.logger=r,this.options=n,this.predicates=[],this.pendingItems=[],this.pendingRequests=[],this.retryQueue=[],this.retryHandle=null,this.waitCallback=null,this.waitIntervalID=null}o.prototype.configure=function(t){this.api&&this.api.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addPredicate=function(t){return n.isFunction(t)&&this.predicates.push(t),this},o.prototype.addPendingItem=function(t){this.pendingItems.push(t)},o.prototype.removePendingItem=function(t){var e=this.pendingItems.indexOf(t);-1!==e&&this.pendingItems.splice(e,1)},o.prototype.addItem=function(t,e,r,o){e&&n.isFunction(e)||(e=function(){});var i=this._applyPredicates(t);if(i.stop)return this.removePendingItem(o),void e(i.err);if(this._maybeLog(t,r),this.removePendingItem(o),this.options.transmit){this.pendingRequests.push(t);try{this._makeApiRequest(t,function(r,n){this._dequeuePendingRequest(t),e(r,n)}.bind(this))}catch(r){this._dequeuePendingRequest(t),e(r)}}else e(new Error("Transmit disabled"))},o.prototype.wait=function(t){n.isFunction(t)&&(this.waitCallback=t,this._maybeCallWait()||(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitIntervalID=setInterval(function(){this._maybeCallWait()}.bind(this),500)))},o.prototype._applyPredicates=function(t){for(var e=null,r=0,n=this.predicates.length;rthis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length||(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),0))},t.exports=o},790:(t,e,r)=>{"use strict";var n=r(702);function o(t){this.startTime=n.now(),this.counter=0,this.perMinCounter=0,this.platform=null,this.platformOptions={},this.configureGlobal(t)}function i(t,e,r){return!t.ignoreRateLimit&&e>=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i=e.environment||e.payload&&e.payload.environment,s={body:{message:{body:o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.",extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:i,notifier:{version:e.notifier&&e.notifier.version||e.version}};return"browser"===t?(s.platform="browser",s.framework="browser-js",s.notifier.name="rollbar-browser-js"):"server"===t?(s.framework=e.framework||"node-js",s.notifier.name=e.notifier.name):"react-native"===t&&(s.framework=e.framework||"react-native",s.notifier.name=e.notifier.name),s}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},562:(t,e,r)=>{"use strict";var n=r(790),o=r(358),i=r(314),s=r(702);function a(t,e,r,n,l){this.options=s.merge(t),this.logger=r,a.rateLimiter.configureGlobal(this.options),a.rateLimiter.setPlatformOptions(l,this.options),this.api=e,this.queue=new o(a.rateLimiter,e,r,this.options);var p=this.options.tracer||null;c(p)?(this.tracer=p,this.options.tracer="opentracing-tracer-enabled",this.options._configuredOptions.tracer="opentracing-tracer-enabled"):this.tracer=null,this.notifier=new i(this.queue,this.options),this.telemeter=n,u(t),this.lastError=null,this.lastErrorHash="none"}function u(t){t.stackTraceLimit&&(Error.stackTraceLimit=t.stackTraceLimit)}function c(t){if(!t)return!1;if(!t.scope||"function"!=typeof t.scope)return!1;var e=t.scope();return!(!e||!e.active||"function"!=typeof e.active)}a.rateLimiter=new n({maxItems:0,itemsPerMinute:60}),a.prototype.global=function(t){return a.rateLimiter.configureGlobal(t),this},a.prototype.configure=function(t,e){var r=this.options,n={};e&&(n={payload:e}),this.options=s.merge(r,t,n);var o=this.options.tracer||null;return c(o)?(this.tracer=o,this.options.tracer="opentracing-tracer-enabled",this.options._configuredOptions.tracer="opentracing-tracer-enabled"):this.tracer=null,this.notifier&&this.notifier.configure(this.options),this.telemeter&&this.telemeter.configure(this.options),u(t),this.global(this.options),c(t.tracer)&&(this.tracer=t.tracer),this},a.prototype.log=function(t){var e=this._defaultLogLevel();return this._log(e,t)},a.prototype.debug=function(t){this._log("debug",t)},a.prototype.info=function(t){this._log("info",t)},a.prototype.warn=function(t){this._log("warning",t)},a.prototype.warning=function(t){this._log("warning",t)},a.prototype.error=function(t){this._log("error",t)},a.prototype.critical=function(t){this._log("critical",t)},a.prototype.wait=function(t){this.queue.wait(t)},a.prototype.captureEvent=function(t,e,r){return this.telemeter&&this.telemeter.captureEvent(t,e,r)},a.prototype.captureDomContentLoaded=function(t){return this.telemeter&&this.telemeter.captureDomContentLoaded(t)},a.prototype.captureLoad=function(t){return this.telemeter&&this.telemeter.captureLoad(t)},a.prototype.buildJsonPayload=function(t){return this.api.buildJsonPayload(t)},a.prototype.sendJsonPayload=function(t){this.api.postJsonPayload(t)},a.prototype._log=function(t,e){var r;if(e.callback&&(r=e.callback,delete e.callback),this.options.ignoreDuplicateErrors&&this._sameAsLastError(e)){if(r){var n=new Error("ignored identical item");n.item=e,r(n)}}else try{this._addTracingInfo(e),e.level=e.level||t,this.telemeter&&this.telemeter._captureRollbarItem(e),e.telemetryEvents=this.telemeter&&this.telemeter.copyEvents()||[],this.notifier.log(e,r)}catch(t){r&&r(t),this.logger.error(t)}},a.prototype._defaultLogLevel=function(){return this.options.logLevel||"debug"},a.prototype._sameAsLastError=function(t){if(!t._isUncaught)return!1;var e=function(t){var e=t.message||"",r=(t.err||{}).stack||String(t.err);return e+"::"+r}(t);return this.lastErrorHash===e||(this.lastError=t.err,this.lastErrorHash=e,!1)},a.prototype._addTracingInfo=function(t){if(this.tracer){var e=this.tracer.scope().active();if(function(t){if(!t||!t.context||"function"!=typeof t.context)return!1;var e=t.context();return!!(e&&e.toSpanId&&e.toTraceId&&"function"==typeof e.toSpanId&&"function"==typeof e.toTraceId)}(e)){e.setTag("rollbar.error_uuid",t.uuid),e.setTag("rollbar.has_error",!0),e.setTag("error",!0),e.setTag("rollbar.item_url",`https://rollbar.com/item/uuid/?uuid=${t.uuid}`),e.setTag("rollbar.occurrence_url",`https://rollbar.com/occurrence/uuid/?uuid=${t.uuid}`);var r=e.context().toSpanId(),n=e.context().toTraceId();t.custom?(t.custom.opentracing_span_id=r,t.custom.opentracing_trace_id=n):t.custom={opentracing_span_id:r,opentracing_trace_id:n}}}},t.exports=a},369:(t,e,r)=>{"use strict";var n=r(702),o=r(267);function i(t,e){var r=e.split("."),o=r.length-1;try{for(var i=0;i<=o;++i)i{"use strict";var n=r(702),o=100;function i(t){this.queue=[],this.options=n.merge(t);var e=this.options.maxTelemetryEvents||o;this.maxQueueSize=Math.max(0,Math.min(e,o))}function s(t,e){return e||({error:"error",manual:"info"}[t]||"info")}i.prototype.configure=function(t){var e=this.options;this.options=n.merge(e,t);var r=this.options.maxTelemetryEvents||o,i=Math.max(0,Math.min(r,o)),s=0;this.queue.length>i&&(s=this.queue.length-i),this.maxQueueSize=i,this.queue.splice(0,s)},i.prototype.copyEvents=function(){var t=Array.prototype.slice.call(this.queue,0);if(n.isFunction(this.options.filterTelemetry))try{for(var e=t.length;e--;)this.options.filterTelemetry(t[e])&&t.splice(e,1)}catch(t){this.options.filterTelemetry=null}return t},i.prototype.capture=function(t,e,r,o,i){var a={level:s(t,r),type:t,timestamp_ms:i||n.now(),body:e,source:"client"};o&&(a.uuid=o);try{if(n.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(a))return!1}catch(t){this.options.filterTelemetry=null}return this.push(a),a},i.prototype.captureEvent=function(t,e,r,n){return this.capture(t,e,r,n)},i.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},i.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},i.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},i.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},i.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},i.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},i.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},i.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},i.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},i.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},i.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=i},417:(t,e,r)=>{"use strict";var n=r(702);function o(t,e){n.isFunction(t[e])&&(t[e]=t[e].toString())}t.exports={itemToPayload:function(t,e,r){var n=t.data;t._isUncaught&&(n._isUncaught=!0),t._originalArgs&&(n._originalArgs=t._originalArgs),r(null,n)},addPayloadOptions:function(t,e,r){var o=e.payload||{};o.body&&delete o.body,t.data=n.merge(t.data,o),r(null,t)},addTelemetryData:function(t,e,r){t.telemetryEvents&&n.set(t,"data.body.telemetry",t.telemetryEvents),r(null,t)},addMessageWithError:function(t,e,r){if(t.message){var o="data.body.trace_chain.0",i=n.get(t,o);if(i||(o="data.body.trace",i=n.get(t,o)),i){if(!i.exception||!i.exception.description)return n.set(t,o+".exception.description",t.message),void r(null,t);var s=n.get(t,o+".extra")||{},a=n.merge(s,{message:t.message});n.set(t,o+".extra",a)}r(null,t)}else r(null,t)},userTransform:function(t){return function(e,r,o){var i=n.merge(e),s=null;try{n.isFunction(r.transform)&&(s=r.transform(i.data,e))}catch(n){return r.transform=null,t.error("Error while calling custom transform() function. Removing custom transform().",n),void o(null,e)}n.isPromise(s)?s.then((function(t){t&&(i.data=t),o(null,i)}),(function(t){o(t,e)})):o(null,i)}},addConfigToPayload:function(t,e,r){if(!e.sendConfig)return r(null,t);var o=n.get(t,"data.custom")||{};o._rollbarConfig=e,t.data.custom=o,r(null,t)},addConfiguredOptions:function(t,e,r){var n=e._configuredOptions;o(n,"transform"),o(n,"checkIgnore"),o(n,"onSendCallback"),delete n.accessToken,t.data.notifier.configured_options=n,r(null,t)},addDiagnosticKeys:function(t,e,r){var o=n.merge(t.notifier.client.notifier.diagnostic,t.diagnostic);if(n.get(t,"err._isAnonymous")&&(o.is_anonymous=!0),t._isUncaught&&(o.is_uncaught=t._isUncaught),t.err)try{o.raw_error={message:t.err.message,name:t.err.name,constructor_name:t.err.constructor&&t.err.constructor.name,filename:t.err.fileName,line:t.err.lineNumber,column:t.err.columnNumber,stack:t.err.stack}}catch(t){o.raw_error={failed:String(t)}}t.data.notifier.diagnostic=n.merge(t.data.notifier.diagnostic,o),r(null,t)}}},473:(t,e,r)=>{"use strict";var n=r(702),o=r(267);function i(t,e){return[t,n.stringify(t,e)]}function s(t,e){var r=t.length;return r>2*e?t.slice(0,e).concat(t.slice(r-e)):t}function a(t,e,r){r=void 0===r?30:r;var o,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,u=0;ut?e.slice(0,t-3).concat("..."):e}function c(t,e,r){return e=o(e,(function e(r,i,s){switch(n.typeName(i)){case"string":return u(t,i);case"object":case"array":return o(i,e,s);default:return i}})),[e,n.stringify(e,r)]}function l(t){return t.exception&&(delete t.exception.description,t.exception.message=u(255,t.exception.message)),t.frames=s(t.frames,1),t}function p(t,e){var r=t.data.body;if(r.trace_chain)for(var o=r.trace_chain,i=0;ie}t.exports={truncate:function(t,e,r){r=void 0===r?524288:r;for(var n,o,s,u=[i,a,c.bind(null,1024),c.bind(null,512),c.bind(null,256),p];n=u.shift();)if(t=(o=n(t,e))[0],(s=o[1]).error||!h(s.value,r))return s;return s},raw:i,truncateFrames:a,truncateStrings:c,maybeTruncateValue:u}},702:(t,e,r)=>{"use strict";var n=r(420),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function h(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function f(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,h,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level),e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i)),r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o{"use strict";function e(t){return"string"!=typeof t&&(t=String(t)),t.toLowerCase()}function r(t){this.map={},t instanceof r?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}r.prototype.append=function(t,r){t=e(t),r=function(t){return"string"!=typeof t&&(t=String(t)),t}(r);var n=this.map[t];this.map[t]=n?n+", "+r:r},r.prototype.get=function(t){return t=e(t),this.has(t)?this.map[t]:null},r.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},r.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},r.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),function(t){return{next:function(){var e=t.shift();return{done:void 0===e,value:e}}}}(t)},t.exports=function(t){return"undefined"==typeof Headers?new r(t):new Headers(t)}},876:(t,e,r)=>{"use strict";var n=r(708);t.exports=n},297:t=>{"use strict";t.exports=function(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}},267:(t,e,r)=>{"use strict";var n=r(702);t.exports=function(t,e,r){var o,i,s,a,u=n.isType(t,"object"),c=n.isType(t,"array"),l=[];if(r=r||{obj:[],mapped:[]},u){if(a=r.obj.indexOf(t),u&&-1!==a)return r.mapped[a]||r.obj[a];r.obj.push(t),a=r.obj.length-1}if(u)for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&l.push(o);else if(c)for(s=0;s{t.exports=function(t){var e,r,n,o,i,s,a,u,c,l,p,h,f,d=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function m(t){return t<10?"0"+t:t}function g(){return this.valueOf()}function v(t){return d.lastIndex=0,d.test(t)?'"'+t.replace(d,(function(t){var e=n[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'}function y(t,n){var i,s,a,u,c,l=e,p=n[t];switch(p&&"object"==typeof p&&"function"==typeof p.toJSON&&(p=p.toJSON(t)),"function"==typeof o&&(p=o.call(n,t,p)),typeof p){case"string":return v(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(e+=r,c=[],"[object Array]"===Object.prototype.toString.apply(p)){for(u=p.length,i=0;i qs)) {\n p = options.path;\n options.path = p.substring(0,qs) + query + '&' + p.substring(qs+1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0,h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return {error: error, value: value};\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) { // up to 7 bits\n count = count + 1;\n } else if (code < 2048) { // up to 11 bits\n count = count + 2;\n } else if (code < 65536) { // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return {error: error, value: value};\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href = typeof document !== 'undefined' && document && document.location && document.location.href;\n var useragent = typeof window !== 'undefined' && window && window.navigator && window.navigator.userAgent;\n return {\n 'mode': mode,\n 'message': error ? String(error) : (message || backupMessage),\n 'url': href,\n 'stack': [location],\n 'useragent': useragent\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function(err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : message = arg;\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : err = arg;\n break;\n case 'object':\n case 'array':\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n if (requestKeys && typ === 'object' && !request) {\n for (var j = 0, len = requestKeys.length; j < len; ++j) {\n if (arg[requestKeys[j]] !== undefined) {\n request = arg;\n break;\n }\n }\n if (request) {\n break;\n }\n }\n custom ? extraArgs.push(arg) : custom = arg;\n break;\n default:\n if (arg instanceof Error || (typeof DOMException !== 'undefined' && arg instanceof DOMException)) {\n err ? extraArgs.push(arg) : err = arg;\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n if (extraArgs.length > 0) {\n // if custom is an array this turns it into an object with integer keys\n custom = merge(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 notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4()\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, errors[i].rollbarContext);\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = ['log', 'network', 'dom', 'navigation', 'error', 'manual'];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len-1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if(options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if(options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log\n};\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null, auth: null, host: null, path: null,\n hash: null, href: url, hostname: null, port: null,\n pathname: null, search: null, query: null\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0,i);\n last = i+2;\n } else {\n last = 0;\n }\n \n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i+1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp('^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ');\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\n\nfunction gatherContext() {\n return null;\n}\n\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch(e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception\n };\n}\n\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace((errClassMatch[errClassMatch.length - 2] || '') + errClass + ':', '');\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName = error.constructor.name && error.constructor.name.length && error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: []};\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client = client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = (typeof document != 'undefined') && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(this.options, this.client.telemeter, this, gWindow, gDocument);\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n}\n\nvar _instance = null;\nRollbar.init = function(options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function(components) {\n Rollbar.prototype.components = components;\n}\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function(options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function(options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function(options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = {payload: payloadData};\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(oldOptions._configuredOptions, options, payload);\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function(options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function() {\n return this.client.lastError;\n};\nRollbar.lastError = function() {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return {uuid: uuid};\n};\nRollbar.log = function() {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return {uuid: uuid};\n};\nRollbar.debug = function() {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return {uuid: uuid};\n};\nRollbar.info = function() {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return {uuid: uuid};\n};\nRollbar.warn = function() {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return {uuid: uuid};\n};\nRollbar.warning = function() {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return {uuid: uuid};\n};\nRollbar.error = function() {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function() {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return {uuid: uuid};\n};\nRollbar.critical = function() {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function(item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function() {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function(jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function() {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function() {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (this.options.captureUnhandledRejections || this.options.handleUnhandledRejections) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function(message, url, lineno, colno, error, context) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (this.options.inspectAnonymousErrors && this.isChrome && error === null && url === '') {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function() {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) { // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n}\n\nRollbar.prototype.handleUnhandledRejection = function(reason, promise) {\n if (!this.options.captureUnhandledRejections && !this.options.handleUnhandledRejections) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context = (reason && reason._rollbarContext) || (promise && promise._rollbarContext);\n\n var item;\n if (_.isError(reason)) {\n item = this._createItem([message, reason, context]);\n } else {\n item = this._createItem([message, reason, context]);\n item.stackInfo = _.makeUnhandledStackInfo(\n message,\n '',\n 0,\n 0,\n null,\n 'unhandledrejection',\n '',\n errorParser\n );\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n item._originalArgs = item._originalArgs || [];\n item._originalArgs.push(promise);\n this.client.log(item);\n};\n\nRollbar.prototype.wrap = function(f, context, _before) {\n try {\n var ctxFn;\n if(_.isFunction(context)) {\n ctxFn = context;\n } else {\n ctxFn = function() { return context || {}; };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch(exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function(f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function() {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function() {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function(e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function() {\n logger.info('Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.');\n};\n\nRollbar.prototype._createItem = function(args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents = (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag('rollbar.item_url', `https://rollbar.com/item/uuid/?uuid=${item.uuid}`);\n span.setTag('rollbar.occurrence_url', `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`);\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId\n };\n }\n }\n }\n}\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (!spanContext\n || !spanContext.toSpanId\n || !spanContext.toTraceId\n || typeof spanContext.toSpanId !== 'function'\n || typeof spanContext.toTraceId !== 'function') {\n return false\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function(options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function(item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimit + ' max items reached', false);\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(this.platform, this.platformOptions, globalRateLimitPerMin + ' items per minute reached', false);\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend = shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(this.platform, this.platformOptions, null, shouldSend, globalRateLimit, globalRateLimitPerMin, perMinute);\n};\n\nRateLimiter.prototype.setPlatformOptions = function(platform, options) {\n this.platform = platform;\n this.platformOptions = options;\n};\n\n/* Helpers */\n\nfunction checkRate(item, limit, counter) {\n return !item.ignoreRateLimit && limit >= 1 && counter > limit;\n}\n\nfunction shouldSendValue(platform, options, error, shouldSend, globalRateLimit, limitPerMin, perMinute) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute);\n }\n return {error: error, shouldSend: shouldSend, payload: payload};\n}\n\nfunction rateLimitPayload(platform, options, globalRateLimit, limitPerMin, perMinute) {\n var environment = options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin\n }\n }\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version: (options.notifier && options.notifier.version) || options.version\n }\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n\tif (!obj || toStr.call(obj) !== '[object Object]') {\n\t\treturn false;\n\t}\n\n\tvar hasOwnConstructor = hasOwn.call(obj, 'constructor');\n\tvar hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n\t// Not own constructor property must be Object\n\tif (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n\t\treturn false;\n\t}\n\n\t// Own properties are enumerated firstly, so to speed up,\n\t// if last one is own, then all properties are own.\n\tvar key;\n\tfor (key in obj) {/**/}\n\n\treturn typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i, src, copy, clone, name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i=0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function(options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function(predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function(item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function(item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function(item, callback, originalError, originalItem) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() { return; };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(item, function(err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this));\n } catch (e) {\n this._dequeuePendingRequest(item);\n callback(e);\n }\n};\n\n/*\n * wait - Stop any further errors from being added to the queue, and get called back when all items\n * currently processing have finished sending to the backend.\n *\n * @param callback - function() called when all pending items have been sent\n */\nQueue.prototype.wait = function(callback) {\n if (!_.isFunction(callback)) {\n return;\n }\n this.waitCallback = callback;\n if (this._maybeCallWait()) {\n return;\n }\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitIntervalID = setInterval(function() {\n this._maybeCallWait();\n }.bind(this), 500);\n};\n\n/* _applyPredicates - Sequentially applies the predicates that have been added to the queue to the\n * given item with the currently configured options.\n *\n * @param item - An item in the queue\n * @returns {stop: bool, err: (Error|null)} - stop being true means do not add item to the queue,\n * the error value should be passed up to a callbak if we are stopping.\n */\nQueue.prototype._applyPredicates = function(item) {\n var p = null;\n for (var i = 0, len = this.predicates.length; i < len; i++) {\n p = this.predicates[i](item, this.options);\n if (!p || p.err !== undefined) {\n return {stop: true, err: p.err};\n }\n }\n return {stop: false, err: null};\n};\n\n/*\n * _makeApiRequest - Send an item to Rollbar, callback when done, if there is an error make an\n * effort to retry if we are configured to do so.\n *\n * @param item - an item ready to send to the backend\n * @param callback - function(err, response)\n */\nQueue.prototype._makeApiRequest = function(item, callback) {\n var rateLimitResponse = this.rateLimiter.shouldSend(item);\n if (rateLimitResponse.shouldSend) {\n this.api.postItem(item, function(err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this));\n } else if (rateLimitResponse.error) {\n callback(rateLimitResponse.error);\n } else {\n this.api.postItem(rateLimitResponse.payload, callback);\n }\n};\n\n// These are errors basically mean there is no internet connection\nvar RETRIABLE_ERRORS = ['ECONNRESET', 'ENOTFOUND', 'ESOCKETTIMEDOUT', 'ETIMEDOUT', 'ECONNREFUSED', 'EHOSTUNREACH', 'EPIPE', 'EAI_AGAIN'];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function(err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function(item, callback) {\n this.retryQueue.push({item: item, callback: callback});\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(function() {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this), this.options.retryInterval);\n }\n};\n\n/*\n * _dequeuePendingRequest - Removes the item from the pending request queue, this queue is used to\n * enable to functionality of providing a callback that clients can pass to `wait` to be notified\n * when the pending request queue has been emptied. This must be called when the API finishes\n * processing this item. If a `wait` callback is configured, it is called by this function.\n *\n * @param item - the item previously added to the pending request queue\n */\nQueue.prototype._dequeuePendingRequest = function(item) {\n var idx = this.pendingRequests.indexOf(item);\n if (idx !== -1) {\n this.pendingRequests.splice(idx, 1);\n this._maybeCallWait();\n }\n};\n\nQueue.prototype._maybeLog = function(data, originalError) {\n if (this.logger && this.options.verbose) {\n var message = originalError;\n message = message || _.get(data, 'body.trace.exception.message');\n message = message || _.get(data, 'body.trace_chain.0.exception.message');\n if (message) {\n this.logger.error(message);\n return;\n }\n message = _.get(data, 'body.message.body');\n if (message) {\n this.logger.log(message);\n }\n }\n};\n\nQueue.prototype._maybeCallWait = function() {\n if (_.isFunction(this.waitCallback) && this.pendingItems.length === 0 && this.pendingRequests.length === 0) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function(options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function(transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function(item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(item, function(err, i) {\n if (err) {\n this.queue.removePendingItem(item);\n return callback(err, null);\n }\n this.queue.addItem(i, callback, originalError, item);\n }.bind(this));\n};\n\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function(item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function(err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function(data, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n this.transport.post(this.accessToken, transportOptions, payload, callback);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function(data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function(jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(this.transportOptions, 'POST');\n this.transport.postJsonPayload(this.accessToken, transportOptions, jsonPayload, callback);\n};\n\nApi.prototype.configure = function(options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = 'Error: could not serialize \\'context\\'';\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy\n };\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port = transport.port || (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath\n};\n","// Console-polyfill. MIT license.\n// https://github.com/paulmillr/console-polyfill\n// Make it safe to do console.log() always.\n(function(global) {\n 'use strict';\n if (!global.console) {\n global.console = {};\n }\n var con = global.console;\n var prop, method;\n var dummy = function() {};\n var properties = ['memory'];\n var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +\n 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +\n 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');\n while (prop = properties.pop()) if (!con[prop]) con[prop] = {};\n while (method = methods.pop()) if (!con[method]) con[method] = dummy;\n // Using `this` for web workers & supports Browserify / Webpack.\n})(typeof window === 'undefined' ? this : window);\n","'use strict';\n\n// This detection.js module is used to encapsulate any ugly browser/feature\n// detection we may need to do.\n\n// Figure out which version of IE we're using, if any.\n// This is gleaned from http://stackoverflow.com/questions/5574842/best-way-to-check-for-ie-less-than-9-in-javascript-without-library\n// Will return an integer on IE (i.e. 8)\n// Will return undefined otherwise\nfunction getIEVersion() {\n\tvar undef;\n\tif (typeof document === 'undefined') {\n\t\treturn undef;\n\t}\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n div.innerHTML = '',\n all[0]\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) { return; }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function() {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) { return; }\n\n if (typeof window._rollbarURH === 'function' && window._rollbarURH.belongsToShim) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections\n};\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../utility');\nvar logger = require('./logger');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function(accessToken, options, params, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, null, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.post = function(accessToken, options, payload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload)\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, writeData, callback, requestFactory, options.timeout);\n}\n\nTransport.prototype.postJsonPayload = function (accessToken, options, jsonPayload, callback, requestFactory) {\n if (!callback || !_.isFunction(callback)) {\n callback = function() {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n _makeZoneRequest(accessToken, url, method, jsonPayload, callback, requestFactory, options.timeout);\n}\n\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nfunction _makeZoneRequest() {\n var gWindow = ((typeof window != 'undefined') && window) || ((typeof self != 'undefined') && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n rootZone.run(function () {\n _makeRequest.apply(undefined, args);\n });\n } else {\n _makeRequest.apply(undefined, args);\n }\n}\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function(_msg) { /* do nothing */ }, // eslint-disable-line no-unused-vars\n function(err) {\n callback(new Error(err));\n }\n );\n}\n\nfunction _makeRequest(accessToken, url, method, data, callback, requestFactory, timeout) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function() {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message = parseResponse.value && parseResponse.value.message;\n logger.error(message);\n }\n // return valid http status codes\n callback(new Error(String(request.status)));\n } else {\n // IE will return a status 12000+ on some sort of connection failure,\n // so we return a blank error\n // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx\n var msg = 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if(_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n\n // Assume we are in a really old browser which has a bunch of limitations:\n // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx\n\n // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case\n if (!window || !window.location) {\n return callback(new Error('No window available during request, unknown environment'));\n }\n\n // If the current page is http, try and send over http\n if (window.location.href.substring(0, 5) === 'http:' && url.substring(0, 5) === 'https') {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function() {};\n xdomainrequest.ontimeout = function() {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function() {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function() {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n }\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if(item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo = item.err._savedStackTrace || errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message = item.err.message || item.err.description || item.message || String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested) {\n err = err.nested;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment = (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version\n },\n custom: item.custom\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.location) {\n return callback(null, item);\n }\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n _.set(item, 'data.request', {\n url: window.location.href,\n query_string: window.location.search,\n user_ip: remoteString\n });\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function(item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height\n }\n }\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function(item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i=0, l=navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({name: cur.name, description: cur.description});\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', {message: result});\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (stack && stack.length === 0 && item._unhandledStackInfo && item._unhandledStackInfo.stack) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', {trace_chain: traces});\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', {trace: trace});\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n 'class': className,\n message: message\n }\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method: (!stackFrame.func || stackFrame.func === '?') ? '[anonymous]' : stackFrame.func,\n colno: stackFrame.column\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (frame.method && frame.method.endsWith && frame.method.endsWith('_rollbar_wrapped')) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n }\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber\n};\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n var data = _.merge(item.data, payloadOptions);\n if (item._isUncaught) {\n data._isUncaught = true;\n }\n if (item._originalArgs) {\n data._originalArgs = item._originalArgs;\n }\n callback(null, data);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath+'.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath+'.extra') || {};\n var newExtra = _.merge(extra, {message: item.message});\n _.set(item, tracePath+'.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function(item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error('Error while calling custom transform() function. Removing custom transform().', e);\n callback(null, item);\n return;\n }\n if(_.isPromise(response)) {\n response.then(function (promisedItem) {\n if(promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n }, function (error) {\n callback(error, item);\n });\n } else {\n callback(null, newItem);\n }\n }\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if(_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(item.notifier.client.notifier.diagnostic, item.diagnostic);\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(item.data.notifier.diagnostic, diagnostic);\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore\n};\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function(item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (_.isFunction(settings.checkIgnore) && settings.checkIgnore(isUncaught, args, item)) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n }\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function(item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n }\n}\n\nfunction urlIsSafeListed(logger) {\n return function(item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n }\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) { return !block }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) { return !block; }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) { return !block; }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if(matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (e)\n /* istanbul ignore next */\n {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error('Error while reading your configuration\\'s ' + listName + ' option. Removing custom ' + listName + '.', e);\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function(item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0){\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch(e)\n /* istanbul ignore next */\n {\n settings.ignoredMessages = null;\n logger.error('Error while reading your configuration\\'s ignoredMessages option. Removing custom ignoredMessages.');\n }\n\n return true;\n }\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored\n};\n","'use strict';\n\nmodule.exports = {\n version: '2.24.0',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60\n}\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear'\n ]\n}\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function(options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.maxQueueSize > newMaxEvents) {\n deleteCount = this.maxQueueSize - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function() {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function(type, metadata, level, rollbarUUID, timestamp) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client'\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (_.isFunction(this.options.filterTelemetry) && this.options.filterTelemetry(e)) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function(type, metadata, level, rollbarUUID) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function(err, level, rollbarUUID, timestamp) {\n var metadata = {\n message: err.message || String(err)\n };\n if (err.stack) {\n metadata.stack = err.stack;\n }\n return this.capture('error', metadata, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureLog = function(message, level, rollbarUUID, timestamp) {\n return this.capture('log', {\n message: message\n }, level, rollbarUUID, timestamp);\n};\n\nTelemeter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID, requestData) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function(statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function(subtype, element, value, checked, rollbarUUID) {\n var metadata = {\n subtype: subtype,\n element: element\n };\n if (value !== undefined) {\n metadata.value = value;\n }\n if (checked !== undefined) {\n metadata.checked = checked;\n }\n return this.capture('dom', metadata, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureNavigation = function(from, to, rollbarUUID) {\n return this.capture('navigation', {from: from, to: to}, 'info', rollbarUUID);\n};\n\nTelemeter.prototype.captureDomContentLoaded = function(ts) {\n return this.capture('navigation', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'DOMContentLoaded'}, 'info', undefined, ts && ts.getTime());\n */\n};\nTelemeter.prototype.captureLoad = function(ts) {\n return this.capture('navigation', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function(type, rollbarUUID) {\n return this.captureNetwork({change: type}, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function(item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture('log', item.custom, item.level, item.uuid, item.timestamp);\n }\n};\n\nTelemeter.prototype.push = function(e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info'\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('../utility');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false\n};\n\nfunction replace(obj, name, replacement, replacements, type) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (replacements) {\n replacements[type].push([obj, name, orig]);\n }\n}\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) { return null; }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function(description) {\n var name = nameFromDescription(description);\n if (!name) { return false; }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: []\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: []\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function(options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function(oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (!this.autoInstrument.network && oldSettings && oldSettings.network) {\n this.deinstrumentNetwork();\n }\n\n if (this.autoInstrument.log && !(oldSettings && oldSettings.log)) {\n this.instrumentConsole();\n } else if (!this.autoInstrument.log && oldSettings && oldSettings.log) {\n this.deinstrumentConsole();\n }\n\n if (this.autoInstrument.dom && !(oldSettings && oldSettings.dom)) {\n this.instrumentDom();\n } else if (!this.autoInstrument.dom && oldSettings && oldSettings.dom) {\n this.deinstrumentDom();\n }\n\n if (this.autoInstrument.navigation && !(oldSettings && oldSettings.navigation)) {\n this.instrumentNavigation();\n } else if (!this.autoInstrument.navigation && oldSettings && oldSettings.navigation) {\n this.deinstrumentNavigation();\n }\n\n if (this.autoInstrument.connectivity && !(oldSettings && oldSettings.connectivity)) {\n this.instrumentConnectivity();\n } else if (!this.autoInstrument.connectivity && oldSettings && oldSettings.connectivity) {\n this.deinstrumentConnectivity();\n }\n\n if (this.autoInstrument.contentSecurityPolicy && !(oldSettings && oldSettings.contentSecurityPolicy)) {\n this.instrumentContentSecurityPolicy();\n } else if (!this.autoInstrument.contentSecurityPolicy && oldSettings && oldSettings.contentSecurityPolicy) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function() {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function() {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function(orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(xhrp, 'open', function(orig) {\n return function(method, url) {\n if (_.isType(url, 'string')) {\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'setRequestHeader', function(orig) {\n return function(header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'network');\n\n replace(xhrp, 'send', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(xhr.__rollbar_xhr, 'xhr', undefined);\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type = xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig = self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i=0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (self.isJsonContentType(xhr.__rollbar_xhr.response_content_type)) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level = self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if ('onreadystatechange' in xhr && _.isFunction(xhr.onreadystatechange)) {\n replace(xhr, 'onreadystatechange', function(orig) {\n return self.rollbar.wrap(orig, undefined, onreadystatechangeHandler);\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = (new Error()).stack;\n }\n return orig.apply(this, arguments);\n }\n }, this.replacements, 'network');\n }\n\n if ('fetch' in this._window) {\n replace(this._window, 'fetch', function(orig) {\n /* eslint-disable no-unused-vars */\n return function(fn, t) {\n /* eslint-enable no-unused-vars */\n var args = new Array(arguments.length);\n for (var i=0, len=args.length; i < len; i++) {\n args[i] = arguments[i];\n }\n var input = args[0];\n var method = 'GET';\n var url;\n if (_.isType(input, 'string')) {\n url = input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = new Headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(reqHeaders, self.autoInstrument.networkRequestHeaders)\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (args[0] && !_.isType(args[0], 'string') && args[0].body) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = (new Error()).stack;\n }\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(resp.headers, self.autoInstrument.networkResponseHeaders);\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') { // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (self.isJsonContentType(metadata.response_content_type)) {\n metadata.response.body = self.scrubJson(text);\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n }, this.replacements, 'network');\n }\n};\n\nInstrumenter.prototype.captureNetwork = function(metadata, subtype, rollbarUUID) {\n if (metadata.request && this.isJsonContentType(metadata.request_content_type)) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function(contentType) {\n return (contentType && _.isType(contentType, 'string') && contentType.toLowerCase().includes('json')) ? true : false;\n}\n\nInstrumenter.prototype.scrubJson = function(json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n}\n\nInstrumenter.prototype.fetchHeaders = function(inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') { // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i=0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n}\n\nInstrumenter.prototype.trackHttpErrors = function() {\n return this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0;\n}\n\nInstrumenter.prototype.errorOnHttpStatus = function(metadata) {\n var status = metadata.status_code;\n\n if ((status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n}\n\nInstrumenter.prototype.deinstrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function() {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function() {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug','info','warn','error','log'];\n try {\n for (var i=0, len=methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function() {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener('dom', this._window, 'blur', 'onfocusout', blurHandler, true);\n};\n\nInstrumenter.prototype.handleClick = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n var hasTag = e && e.tagName;\n var anchorOrButton = domUtil.isDescribedElement(e, 'a') || domUtil.isDescribedElement(e, 'button');\n if (hasTag && (anchorOrButton || domUtil.isDescribedElement(e, 'input', ['button', 'submit']))) {\n this.captureDomEvent('click', e);\n } else if (domUtil.isDescribedElement(e, 'input', ['checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value, e.checked);\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleBlur = function(evt) {\n try {\n var e = domUtil.getElementFromEvent(evt, this._document);\n if (e && e.tagName) {\n if (domUtil.isDescribedElement(e, 'textarea')) {\n this.captureDomEvent('input', e, e.value);\n } else if (domUtil.isDescribedElement(e, 'select') && e.options && e.options.length) {\n this.handleSelectInputChanged(e);\n } else if (domUtil.isDescribedElement(e, 'input') && !domUtil.isDescribedElement(e, 'input', ['button', 'submit', 'hidden', 'checkbox', 'radio'])) {\n this.captureDomEvent('input', e, e.value);\n }\n }\n } catch (exc) {\n // TODO: Not sure what to do here\n }\n};\n\nInstrumenter.prototype.handleSelectInputChanged = function(elem) {\n if (elem.multiple) {\n for (var i = 0; i < elem.options.length; i++) {\n if (elem.options[i].selected) {\n this.captureDomEvent('input', elem, elem.options[i].value);\n }\n }\n } else if (elem.selectedIndex >= 0 && elem.options[elem.selectedIndex]) {\n this.captureDomEvent('input', elem, elem.options[elem.selectedIndex].value);\n }\n};\n\nInstrumenter.prototype.captureDomEvent = function(subtype, element, value, isChecked) {\n if (value !== undefined) {\n if (this.scrubTelemetryInputs || (domUtil.getElementType(element) === 'password')) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(domUtil.treeToArray(element));\n this.telemeter.captureDom(subtype, elementString, value, isChecked);\n};\n\nInstrumenter.prototype.deinstrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n restore(this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.instrumentNavigation = function() {\n var chrome = this._window.chrome;\n var chromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n // See https://github.com/angular/angular.js/pull/13945/files\n var hasPushState = !chromePackagedApp && this._window.history && this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(this._window, 'onpopstate', function(orig) {\n return function() {\n var current = self._location.href;\n self.handleUrlChange(self._lastHref, current);\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n }, this.replacements, 'navigation');\n\n replace(this._window.history, 'pushState', function(orig) {\n return function() {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n self.handleUrlChange(self._lastHref, url + '');\n }\n return orig.apply(this, arguments);\n };\n }, this.replacements, 'navigation');\n};\n\nInstrumenter.prototype.handleUrlChange = function(from, to) {\n var parsedHref = urlparser.parse(this._location.href);\n var parsedTo = urlparser.parse(to);\n var parsedFrom = urlparser.parse(from);\n this._lastHref = to;\n if (parsedHref.protocol === parsedTo.protocol && parsedHref.host === parsedTo.host) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (parsedHref.protocol === parsedFrom.protocol && parsedHref.host === parsedFrom.host) {\n from = parsedFrom.path + (parsedFrom.hash || '');\n }\n this.telemeter.captureNavigation(from, to);\n};\n\nInstrumenter.prototype.deinstrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.removeListeners('connectivity');\n } else {\n restore(this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.instrumentConnectivity = function() {\n if (!('addEventListener' in this._window || 'body' in this._document)) {\n return;\n }\n if (this._window.addEventListener) {\n this.addListener('connectivity', this._window, 'online', undefined, function() {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this), true);\n this.addListener('connectivity', this._window, 'offline', undefined, function() {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this), true);\n } else {\n var self = this;\n replace(this._document.body, 'ononline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n replace(this._document.body, 'onoffline', function(orig) {\n return function() {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n }\n }, this.replacements, 'connectivity');\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function(cspEvent) {\n var message = 'Security Policy Violation: ' +\n 'blockedURI: ' + cspEvent.blockedURI + ', ' +\n 'violatedDirective: ' + cspEvent.violatedDirective + ', ' +\n 'effectiveDirective: ' + cspEvent.effectiveDirective + ', ';\n\n if (cspEvent.sourceFile) {\n message += 'location: ' + cspEvent.sourceFile + ', ' +\n 'line: ' + cspEvent.lineNumber + ', ' +\n 'col: ' + cspEvent.columnNumber + ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n}\n\nInstrumenter.prototype.handleCspError = function(message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n}\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function() {\n if (!('addEventListener' in this._window)) { return; }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener('contentsecuritypolicy', this._window, 'securitypolicyviolation', null, cspHandler, false);\n};\n\nInstrumenter.prototype.addListener = function(section, obj, type, altType, handler, capture) {\n if (obj.addEventListener) {\n obj.addEventListener(type, handler, capture);\n this.eventRemovers[section].push(function() {\n obj.removeEventListener(type, handler, capture);\n });\n } else if (altType) {\n obj.attachEvent(altType, handler);\n this.eventRemovers[section].push(function() {\n obj.detachEvent(altType, handler);\n });\n }\n};\n\nInstrumenter.prototype.removeListeners = function(section) {\n var r;\n while (this.eventRemovers[section].length) {\n r = this.eventRemovers[section].shift();\n r();\n }\n};\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nfunction getElementType(e) {\n return (e.getAttribute('type') || '').toLowerCase();\n}\n\nfunction isDescribedElement(element, type, subtypes) {\n if (element.tagName.toLowerCase() !== type.toLowerCase()) {\n return false;\n }\n if (!subtypes) {\n return true;\n }\n element = getElementType(element);\n for (var i = 0; i < subtypes.length; i++) {\n if (subtypes[i] === element) {\n return true;\n }\n }\n return false;\n}\n\nfunction getElementFromEvent(evt, doc) {\n if (evt.target) {\n return evt.target;\n }\n if (doc && doc.elementFromPoint) {\n return doc.elementFromPoint(evt.clientX, evt.clientY);\n }\n return undefined;\n}\n\nfunction treeToArray(elem) {\n var MAX_HEIGHT = 5;\n var out = [];\n var nextDescription;\n for (var height = 0; elem && height < MAX_HEIGHT; height++) {\n nextDescription = describeElement(elem);\n if (nextDescription.tagName === 'html') {\n break;\n }\n out.unshift(nextDescription);\n elem = elem.parentNode;\n }\n return out;\n}\n\nfunction elementArrayToString(a) {\n var MAX_LENGTH = 80;\n var separator = ' > ', separatorLength = separator.length;\n var out = [], len = 0, nextStr, totalLength;\n\n for (var i = a.length - 1; i >= 0; i--) {\n nextStr = descriptionToString(a[i]);\n totalLength = len + (out.length * separatorLength) + nextStr.length;\n if (i < a.length - 1 && totalLength >= MAX_LENGTH + 3) {\n out.unshift('...');\n break;\n }\n out.unshift(nextStr);\n len += nextStr.length;\n }\n return out.join(separator);\n}\n\nfunction descriptionToString(desc) {\n if (!desc || !desc.tagName) {\n return '';\n }\n var out = [desc.tagName];\n if (desc.id) {\n out.push('#' + desc.id);\n }\n if (desc.classes) {\n out.push('.' + desc.classes.join('.'));\n }\n for (var i = 0; i < desc.attributes.length; i++) {\n out.push('[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]');\n }\n\n return out.join('');\n}\n\n/**\n * Input: a dom element\n * Output: null if tagName is falsey or input is falsey, else\n * {\n * tagName: String,\n * id: String | undefined,\n * classes: [String] | undefined,\n * attributes: [\n * {\n * key: OneOf(type, name, title, alt),\n * value: String\n * }\n * ]\n * }\n */\nfunction describeElement(elem) {\n if (!elem || !elem.tagName) {\n return null;\n }\n var out = {}, className, key, attr, i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && (typeof className === 'string')) {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({key: key, value: attr});\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType\n};\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","// json3.js\n// 2017-02-21\n// Public Domain.\n// NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n// See http://www.JSON.org/js.html\n// This code should be minified before deployment.\n// See http://javascript.crockford.com/jsmin.html\n\n// USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO\n// NOT CONTROL.\n\n// This file creates a global JSON object containing two methods: stringify\n// and parse. This file provides the ES5 JSON capability to ES3 systems.\n// If a project might run on IE8 or earlier, then this file should be included.\n// This file does nothing on ES5 systems.\n\n// JSON.stringify(value, replacer, space)\n// value any JavaScript value, usually an object or array.\n// replacer an optional parameter that determines how object\n// values are stringified for objects. It can be a\n// function or an array of strings.\n// space an optional parameter that specifies the indentation\n// of nested structures. If it is omitted, the text will\n// be packed without extra whitespace. If it is a number,\n// it will specify the number of spaces to indent at each\n// level. If it is a string (such as \"\\t\" or \" \"),\n// it contains the characters used to indent at each level.\n// This method produces a JSON text from a JavaScript value.\n// When an object value is found, if the object contains a toJSON\n// method, its toJSON method will be called and the result will be\n// stringified. A toJSON method does not serialize: it returns the\n// value represented by the name/value pair that should be serialized,\n// or undefined if nothing should be serialized. The toJSON method\n// will be passed the key associated with the value, and this will be\n// bound to the value.\n\n// For example, this would serialize Dates as ISO strings.\n\n// Date.prototype.toJSON = function (key) {\n// function f(n) {\n// // Format integers to have at least two digits.\n// return (n < 10)\n// ? \"0\" + n\n// : n;\n// }\n// return this.getUTCFullYear() + \"-\" +\n// f(this.getUTCMonth() + 1) + \"-\" +\n// f(this.getUTCDate()) + \"T\" +\n// f(this.getUTCHours()) + \":\" +\n// f(this.getUTCMinutes()) + \":\" +\n// f(this.getUTCSeconds()) + \"Z\";\n// };\n\n// You can provide an optional replacer method. It will be passed the\n// key and value of each member, with this bound to the containing\n// object. The value that is returned from your method will be\n// serialized. If your method returns undefined, then the member will\n// be excluded from the serialization.\n\n// If the replacer parameter is an array of strings, then it will be\n// used to select the members to be serialized. It filters the results\n// such that only members with keys listed in the replacer array are\n// stringified.\n\n// Values that do not have JSON representations, such as undefined or\n// functions, will not be serialized. Such values in objects will be\n// dropped; in arrays they will be replaced with null. You can use\n// a replacer function to replace those with JSON values.\n\n// JSON.stringify(undefined) returns undefined.\n\n// The optional space parameter produces a stringification of the\n// value that is filled with line breaks and indentation to make it\n// easier to read.\n\n// If the space parameter is a non-empty string, then that string will\n// be used for indentation. If the space parameter is a number, then\n// the indentation will be that many spaces.\n\n// Example:\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}]);\n// // text is '[\"e\",{\"pluribus\":\"unum\"}]'\n\n// text = JSON.stringify([\"e\", {pluribus: \"unum\"}], null, \"\\t\");\n// // text is '[\\n\\t\"e\",\\n\\t{\\n\\t\\t\"pluribus\": \"unum\"\\n\\t}\\n]'\n\n// text = JSON.stringify([new Date()], function (key, value) {\n// return this[key] instanceof Date\n// ? \"Date(\" + this[key] + \")\"\n// : value;\n// });\n// // text is '[\"Date(---current time---)\"]'\n\n// JSON.parse(text, reviver)\n// This method parses a JSON text to produce an object or array.\n// It can throw a SyntaxError exception.\n// This has been modified to use JSON-js/json_parse_state.js as the\n// parser instead of the one built around eval found in JSON-js/json2.js\n\n// The optional reviver parameter is a function that can filter and\n// transform the results. It receives each of the keys and values,\n// and its return value is used instead of the original value.\n// If it returns what it received, then the structure is not modified.\n// If it returns undefined then the member is deleted.\n\n// Example:\n\n// // Parse the text. Values that look like ISO date strings will\n// // be converted to Date objects.\n\n// myData = JSON.parse(text, function (key, value) {\n// var a;\n// if (typeof value === \"string\") {\n// a =\n// /^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2}(?:\\.\\d*)?)Z$/.exec(value);\n// if (a) {\n// return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],\n// +a[5], +a[6]));\n// }\n// }\n// return value;\n// });\n\n// myData = JSON.parse('[\"Date(09/09/2001)\"]', function (key, value) {\n// var d;\n// if (typeof value === \"string\" &&\n// value.slice(0, 5) === \"Date(\" &&\n// value.slice(-1) === \")\") {\n// d = new Date(value.slice(5, -1));\n// if (d) {\n// return d;\n// }\n// }\n// return value;\n// });\n\n// This is a reference implementation. You are free to copy, modify, or\n// redistribute.\n\n/*jslint\n for, this\n */\n\n/*property\n JSON, apply, call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,\n getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,\n lastIndex, length, parse, prototype, push, replace, slice, stringify,\n test, toJSON, toString, valueOf\n */\n\nvar setupCustomJSON = function(JSON) {\n\n var rx_one = /^[\\],:{}\\s]*$/;\n var rx_two = /\\\\(?:[\"\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g;\n var rx_three = /\"[^\"\\\\\\n\\r]*\"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\n var rx_four = /(?:^|:|,)(?:\\s*\\[)+/g;\n var rx_escapable = /[\\\\\"\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n var rx_dangerous = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n\n function f(n) {\n // Format integers to have at least two digits.\n return n < 10\n ? \"0\" + n\n : n;\n }\n\n function this_value() {\n return this.valueOf();\n }\n\n if (typeof Date.prototype.toJSON !== \"function\") {\n\n Date.prototype.toJSON = function () {\n\n return isFinite(this.valueOf())\n ? this.getUTCFullYear() + \"-\" +\n f(this.getUTCMonth() + 1) + \"-\" +\n f(this.getUTCDate()) + \"T\" +\n f(this.getUTCHours()) + \":\" +\n f(this.getUTCMinutes()) + \":\" +\n f(this.getUTCSeconds()) + \"Z\"\n : null;\n };\n\n Boolean.prototype.toJSON = this_value;\n Number.prototype.toJSON = this_value;\n String.prototype.toJSON = this_value;\n }\n\n var gap;\n var indent;\n var meta;\n var rep;\n\n\n function quote(string) {\n\n // If the string contains no control characters, no quote characters, and no\n // backslash characters, then we can safely slap some quotes around it.\n // Otherwise we must also replace the offending characters with safe escape\n // sequences.\n\n rx_escapable.lastIndex = 0;\n return rx_escapable.test(string)\n ? \"\\\"\" + string.replace(rx_escapable, function (a) {\n var c = meta[a];\n return typeof c === \"string\"\n ? c\n : \"\\\\u\" + (\"0000\" + a.charCodeAt(0).toString(16)).slice(-4);\n }) + \"\\\"\"\n : \"\\\"\" + string + \"\\\"\";\n }\n\n\n function str(key, holder) {\n\n // Produce a string from holder[key].\n\n var i; // The loop counter.\n var k; // The member key.\n var v; // The member value.\n var length;\n var mind = gap;\n var partial;\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n\n if (value && typeof value === \"object\" &&\n typeof value.toJSON === \"function\") {\n value = value.toJSON(key);\n }\n\n // If we were called with a replacer function, then call the replacer to\n // obtain a replacement value.\n\n if (typeof rep === \"function\") {\n value = rep.call(holder, key, value);\n }\n\n // What happens next depends on the value's type.\n\n switch (typeof value) {\n case \"string\":\n return quote(value);\n\n case \"number\":\n\n // JSON numbers must be finite. Encode non-finite numbers as null.\n\n return isFinite(value)\n ? String(value)\n : \"null\";\n\n case \"boolean\":\n case \"null\":\n\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce \"null\". The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n // If the type is \"object\", we might be dealing with an object or an array or\n // null.\n\n case \"object\":\n\n // Due to a specification blunder in ECMAScript, typeof null is \"object\",\n // so watch out for that case.\n\n if (!value) {\n return \"null\";\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n\n gap += indent;\n partial = [];\n\n // Is the value an array?\n\n if (Object.prototype.toString.apply(value) === \"[object Array]\") {\n\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || \"null\";\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n\n v = partial.length === 0\n ? \"[]\"\n : gap\n ? \"[\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"]\"\n : \"[\" + partial.join(\",\") + \"]\";\n gap = mind;\n return v;\n }\n\n // If the replacer is an array, use it to select the members to be stringified.\n\n if (rep && typeof rep === \"object\") {\n length = rep.length;\n for (i = 0; i < length; i += 1) {\n if (typeof rep[i] === \"string\") {\n k = rep[i];\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n } else {\n\n // Otherwise, iterate through all of the keys in the object.\n\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (\n gap\n ? \": \"\n : \":\"\n ) + v);\n }\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n\n v = partial.length === 0\n ? \"{}\"\n : gap\n ? \"{\\n\" + gap + partial.join(\",\\n\" + gap) + \"\\n\" + mind + \"}\"\n : \"{\" + partial.join(\",\") + \"}\";\n gap = mind;\n return v;\n }\n }\n\n // If the JSON object does not yet have a stringify method, give it one.\n\n if (typeof JSON.stringify !== \"function\") {\n meta = { // table of character substitutions\n \"\\b\": \"\\\\b\",\n \"\\t\": \"\\\\t\",\n \"\\n\": \"\\\\n\",\n \"\\f\": \"\\\\f\",\n \"\\r\": \"\\\\r\",\n \"\\\"\": \"\\\\\\\"\",\n \"\\\\\": \"\\\\\\\\\"\n };\n JSON.stringify = function (value, replacer, space) {\n\n // The stringify method takes a value and an optional replacer, and an optional\n // space parameter, and returns a JSON text. The replacer can be a function\n // that can replace values, or an array of strings that will select the keys.\n // A default replacer method can be provided. Use of the space parameter can\n // produce text that is more easily readable.\n\n var i;\n gap = \"\";\n indent = \"\";\n\n // If the space parameter is a number, make an indent string containing that\n // many spaces.\n\n if (typeof space === \"number\") {\n for (i = 0; i < space; i += 1) {\n indent += \" \";\n }\n\n // If the space parameter is a string, it will be used as the indent string.\n\n } else if (typeof space === \"string\") {\n indent = space;\n }\n\n // If there is a replacer, it must be a function or an array.\n // Otherwise, throw an error.\n\n rep = replacer;\n if (replacer && typeof replacer !== \"function\" &&\n (typeof replacer !== \"object\" ||\n typeof replacer.length !== \"number\")) {\n throw new Error(\"JSON.stringify\");\n }\n\n // Make a fake root object containing our value under the key of \"\".\n // Return the result of stringifying the value.\n\n return str(\"\", {\"\": value});\n };\n }\n\n\n // If the JSON object does not yet have a parse method, give it one.\n\n if (typeof JSON.parse !== \"function\") {\n JSON.parse = (function () {\n\n // This function creates a JSON parse function that uses a state machine rather\n // than the dangerous eval function to parse a JSON text.\n\n var state; // The state of the parser, one of\n // 'go' The starting state\n // 'ok' The final, accepting state\n // 'firstokey' Ready for the first key of the object or\n // the closing of an empty object\n // 'okey' Ready for the next key of the object\n // 'colon' Ready for the colon\n // 'ovalue' Ready for the value half of a key/value pair\n // 'ocomma' Ready for a comma or closing }\n // 'firstavalue' Ready for the first value of an array or\n // an empty array\n // 'avalue' Ready for the next value of an array\n // 'acomma' Ready for a comma or closing ]\n var stack; // The stack, for controlling nesting.\n var container; // The current container object or array\n var key; // The current key\n var value; // The current value\n var escapes = { // Escapement translation table\n \"\\\\\": \"\\\\\",\n \"\\\"\": \"\\\"\",\n \"/\": \"/\",\n \"t\": \"\\t\",\n \"n\": \"\\n\",\n \"r\": \"\\r\",\n \"f\": \"\\f\",\n \"b\": \"\\b\"\n };\n var string = { // The actions for string tokens\n go: function () {\n state = \"ok\";\n },\n firstokey: function () {\n key = value;\n state = \"colon\";\n },\n okey: function () {\n key = value;\n state = \"colon\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var number = { // The actions for number tokens\n go: function () {\n state = \"ok\";\n },\n ovalue: function () {\n state = \"ocomma\";\n },\n firstavalue: function () {\n state = \"acomma\";\n },\n avalue: function () {\n state = \"acomma\";\n }\n };\n var action = {\n\n // The action table describes the behavior of the machine. It contains an\n // object for each token. Each object contains a method that is called when\n // a token is matched in a state. An object will lack a method for illegal\n // states.\n\n \"{\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = {};\n state = \"firstokey\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = {};\n state = \"firstokey\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = {};\n state = \"firstokey\";\n }\n },\n \"}\": {\n firstokey: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n ocomma: function () {\n var pop = stack.pop();\n container[key] = value;\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \"[\": {\n go: function () {\n stack.push({state: \"ok\"});\n container = [];\n state = \"firstavalue\";\n },\n ovalue: function () {\n stack.push({container: container, state: \"ocomma\", key: key});\n container = [];\n state = \"firstavalue\";\n },\n firstavalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n },\n avalue: function () {\n stack.push({container: container, state: \"acomma\"});\n container = [];\n state = \"firstavalue\";\n }\n },\n \"]\": {\n firstavalue: function () {\n var pop = stack.pop();\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n },\n acomma: function () {\n var pop = stack.pop();\n container.push(value);\n value = container;\n container = pop.container;\n key = pop.key;\n state = pop.state;\n }\n },\n \":\": {\n colon: function () {\n if (Object.hasOwnProperty.call(container, key)) {\n throw new SyntaxError(\"Duplicate key '\" + key + \"\\\"\");\n }\n state = \"ovalue\";\n }\n },\n \",\": {\n ocomma: function () {\n container[key] = value;\n state = \"okey\";\n },\n acomma: function () {\n container.push(value);\n state = \"avalue\";\n }\n },\n \"true\": {\n go: function () {\n value = true;\n state = \"ok\";\n },\n ovalue: function () {\n value = true;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = true;\n state = \"acomma\";\n },\n avalue: function () {\n value = true;\n state = \"acomma\";\n }\n },\n \"false\": {\n go: function () {\n value = false;\n state = \"ok\";\n },\n ovalue: function () {\n value = false;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = false;\n state = \"acomma\";\n },\n avalue: function () {\n value = false;\n state = \"acomma\";\n }\n },\n \"null\": {\n go: function () {\n value = null;\n state = \"ok\";\n },\n ovalue: function () {\n value = null;\n state = \"ocomma\";\n },\n firstavalue: function () {\n value = null;\n state = \"acomma\";\n },\n avalue: function () {\n value = null;\n state = \"acomma\";\n }\n }\n };\n\n function debackslashify(text) {\n\n // Remove and replace any backslash escapement.\n\n return text.replace(/\\\\(?:u(.{4})|([^u]))/g, function (ignore, b, c) {\n return b\n ? String.fromCharCode(parseInt(b, 16))\n : escapes[c];\n });\n }\n\n return function (source, reviver) {\n\n // A regular expression is used to extract tokens from the JSON text.\n // The extraction process is cautious.\n\n var result;\n var tx = /^[\\u0020\\t\\n\\r]*(?:([,:\\[\\]{}]|true|false|null)|(-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)|\"((?:[^\\r\\n\\t\\\\\\\"]|\\\\(?:[\"\\\\\\/trnfb]|u[0-9a-fA-F]{4}))*)\")/;\n\n // Set the starting state.\n\n state = \"go\";\n\n // The stack records the container, key, and state for each object or array\n // that contains another object or array while processing nested structures.\n\n stack = [];\n\n // If any error occurs, we will catch it and ultimately throw a syntax error.\n\n try {\n\n // For each token...\n\n while (true) {\n result = tx.exec(source);\n if (!result) {\n break;\n }\n\n // result is the result array from matching the tokenizing regular expression.\n // result[0] contains everything that matched, including any initial whitespace.\n // result[1] contains any punctuation that was matched, or true, false, or null.\n // result[2] contains a matched number, still in string form.\n // result[3] contains a matched string, without quotes but with escapement.\n\n if (result[1]) {\n\n // Token: Execute the action for this state and token.\n\n action[result[1]][state]();\n\n } else if (result[2]) {\n\n // Number token: Convert the number string into a number value and execute\n // the action for this state and number.\n\n value = +result[2];\n number[state]();\n } else {\n\n // String token: Replace the escapement sequences and execute the action for\n // this state and string.\n\n value = debackslashify(result[3]);\n string[state]();\n }\n\n // Remove the token from the string. The loop will continue as long as there\n // are tokens. This is a slow process, but it allows the use of ^ matching,\n // which assures that no illegal tokens slip through.\n\n source = source.slice(result[0].length);\n }\n\n // If we find a state/token combination that is illegal, then the action will\n // cause an error. We handle the error by simply changing the state.\n\n } catch (e) {\n state = e;\n }\n\n // The parsing is finished. If we are not in the final \"ok\" state, or if the\n // remaining source contains anything except whitespace, then we did not have\n //a well-formed JSON text.\n\n if (state !== \"ok\" || (/[^\\u0020\\t\\n\\r]/.test(source))) {\n throw (state instanceof SyntaxError)\n ? state\n : new SyntaxError(\"JSON\");\n }\n\n // If there is a reviver function, we recursively walk the new structure,\n // passing each name/value pair to the reviver function for possible\n // transformation, starting with a temporary root object that holds the current\n // value in an empty key. If there is not a reviver function, we simply return\n // that value.\n\n return (typeof reviver === \"function\")\n ? (function walk(holder, key) {\n var k;\n var v;\n var val = holder[key];\n if (val && typeof val === \"object\") {\n for (k in value) {\n if (Object.prototype.hasOwnProperty.call(val, k)) {\n v = walk(val, k);\n if (v !== undefined) {\n val[k] = v;\n } else {\n delete val[k];\n }\n }\n }\n }\n return reviver.call(holder, key, val);\n }({\"\": value}, \"\"))\n : value;\n };\n }());\n }\n}\n\nmodule.exports = setupCustomJSON;\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) { return; }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals = 'EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload'.split(',');\n var i, global;\n for (i = 0; i < globals.length; ++i) {\n global = globals[i];\n\n if (window[global] && window[global].prototype) {\n _extendListenerPrototype(handler, window[global].prototype, shim);\n }\n }\n}\n\nfunction _extendListenerPrototype(handler, prototype, shim) {\n if (prototype.hasOwnProperty && prototype.hasOwnProperty('addEventListener')) {\n var oldAddEventListener = prototype.addEventListener;\n while (oldAddEventListener._rollbarOldAdd && oldAddEventListener.belongsToShim) {\n oldAddEventListener = oldAddEventListener._rollbarOldAdd;\n }\n var addFn = function(event, callback, bubble) {\n oldAddEventListener.call(this, event, handler.wrap(callback), bubble);\n };\n addFn._rollbarOldAdd = oldAddEventListener;\n addFn.belongsToShim = shim;\n prototype.addEventListener = addFn;\n\n var oldRemoveEventListener = prototype.removeEventListener;\n while (oldRemoveEventListener._rollbarOldRemove && oldRemoveEventListener.belongsToShim) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function(event, callback, bubble) {\n oldRemoveEventListener.call(this, event, callback && callback._rollbar_wrapped || callback, bubble);\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = (typeof range === 'undefined') ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(255, traceData.exception.message);\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = (typeof maxSize === 'undefined') ? (512 * 1024) : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue\n};\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"rollbar.umd.min.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAiB,QAAID,IAErBD,EAAc,QAAIC,GACnB,CATD,CASGK,MAAM,KACT,O,mBCPA,SAAUC,GACR,aACKA,EAAOC,UACVD,EAAOC,QAAU,CAAC,GASpB,IAPA,IACIC,EAAMC,EADNC,EAAMJ,EAAOC,QAEbI,EAAQ,WAAY,EACpBC,EAAa,CAAC,UACdC,EAAU,wMAE0DC,MAAM,KACvEN,EAAOI,EAAWG,OAAYL,EAAIF,KAAOE,EAAIF,GAAQ,CAAC,GAC7D,KAAOC,EAASI,EAAQE,OAAYL,EAAID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CAAC,GAOX,OAHA8+B,EAAoBF,GAAU94B,KAAK7F,EAAOD,QAASC,EAAQA,EAAOD,QAAS2+B,GAGpE1+B,EAAOD,OACf,CCnB0B2+B,CAAoB,K,MDF1CD,C","sources":["webpack://rollbar/webpack/universalModuleDefinition","webpack://rollbar/./node_modules/console-polyfill/index.js","webpack://rollbar/./node_modules/error-stack-parser/error-stack-parser.js","webpack://rollbar/./node_modules/error-stack-parser/node_modules/stackframe/stackframe.js","webpack://rollbar/./src/api.js","webpack://rollbar/./src/apiUtility.js","webpack://rollbar/./src/browser/bundles/rollbar.js","webpack://rollbar/./src/browser/core.js","webpack://rollbar/./src/browser/defaults/scrubFields.js","webpack://rollbar/./src/browser/detection.js","webpack://rollbar/./src/browser/domUtility.js","webpack://rollbar/./src/browser/globalSetup.js","webpack://rollbar/./src/browser/logger.js","webpack://rollbar/./src/browser/predicates.js","webpack://rollbar/./src/browser/rollbar.js","webpack://rollbar/./src/browser/telemetry.js","webpack://rollbar/./src/browser/transforms.js","webpack://rollbar/./src/browser/transport.js","webpack://rollbar/./src/browser/transport/fetch.js","webpack://rollbar/./src/browser/transport/xhr.js","webpack://rollbar/./src/browser/url.js","webpack://rollbar/./src/browser/wrapGlobals.js","webpack://rollbar/./src/defaults.js","webpack://rollbar/./src/errorParser.js","webpack://rollbar/./src/merge.js","webpack://rollbar/./src/notifier.js","webpack://rollbar/./src/predicates.js","webpack://rollbar/./src/queue.js","webpack://rollbar/./src/rateLimiter.js","webpack://rollbar/./src/rollbar.js","webpack://rollbar/./src/scrub.js","webpack://rollbar/./src/telemetry.js","webpack://rollbar/./src/transforms.js","webpack://rollbar/./src/truncation.js","webpack://rollbar/./src/utility.js","webpack://rollbar/./src/utility/headers.js","webpack://rollbar/./src/utility/polyfillJSON.js","webpack://rollbar/./src/utility/replace.js","webpack://rollbar/./src/utility/traverse.js","webpack://rollbar/./vendor/JSON-js/json3.js","webpack://rollbar/webpack/bootstrap","webpack://rollbar/webpack/startup"],"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, () => {\nreturn ","// 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","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('error-stack-parser', ['stackframe'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('stackframe'));\n } else {\n root.ErrorStackParser = factory(root.StackFrame);\n }\n}(this, function ErrorStackParser(StackFrame) {\n 'use strict';\n\n var FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\n var CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\n var SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\n\n return {\n /**\n * Given an Error object, extract the most information from it.\n *\n * @param {Error} error object\n * @return {Array} of StackFrames\n */\n parse: function ErrorStackParser$$parse(error) {\n if (typeof error.stacktrace !== 'undefined' || typeof error['opera#sourceloc'] !== 'undefined') {\n return this.parseOpera(error);\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n throw new Error('Cannot parse given Error object');\n }\n },\n\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function ErrorStackParser$$extractLocation(urlLike) {\n // Fail-fast but return locations like \"(native)\"\n if (urlLike.indexOf(':') === -1) {\n return [urlLike];\n }\n\n var regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n var parts = regExp.exec(urlLike.replace(/[()]/g, ''));\n return [parts[1], parts[2] || undefined, parts[3] || undefined];\n },\n\n parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n if (line.indexOf('(eval ') > -1) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n line = line.replace(/eval code/g, 'eval').replace(/(\\(eval at [^()]*)|(\\),.*$)/g, '');\n }\n var sanitizedLine = line.replace(/^\\s+/, '').replace(/\\(eval code/g, '(');\n\n // capture and preseve the parenthesized location \"(/foo/my bar.js:12:87)\" in\n // case it has spaces in it, as the string is split on \\s+ later on\n var location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n\n // remove the parenthesized location from the line, if it was matched\n sanitizedLine = location ? sanitizedLine.replace(location[0], '') : sanitizedLine;\n\n var tokens = sanitizedLine.split(/\\s+/).slice(1);\n // if a location was matched, pass it to extractLocation() otherwise pop the last token\n var locationParts = this.extractLocation(location ? location[1] : tokens.pop());\n var functionName = tokens.join(' ') || undefined;\n var fileName = ['eval', ''].indexOf(locationParts[0]) > -1 ? undefined : locationParts[0];\n\n return new StackFrame({\n functionName: functionName,\n fileName: fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n },\n\n parseFFOrSafari: function ErrorStackParser$$parseFFOrSafari(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n\n return filtered.map(function(line) {\n // Throw away eval information until we implement stacktrace.js/stackframe#8\n if (line.indexOf(' > eval') > -1) {\n line = line.replace(/ line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g, ':$1');\n }\n\n if (line.indexOf('@') === -1 && line.indexOf(':') === -1) {\n // Safari eval frames only have function names and nothing else\n return new StackFrame({\n functionName: line\n });\n } else {\n var functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n var matches = line.match(functionNameRegex);\n var functionName = matches && matches[1] ? matches[1] : undefined;\n var locationParts = this.extractLocation(line.replace(functionNameRegex, ''));\n\n return new StackFrame({\n functionName: functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }\n }, this);\n },\n\n parseOpera: function ErrorStackParser$$parseOpera(e) {\n if (!e.stacktrace || (e.message.indexOf('\\n') > -1 &&\n e.message.split('\\n').length > e.stacktrace.split('\\n').length)) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n\n parseOpera9: function ErrorStackParser$$parseOpera9(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n var lines = e.message.split('\\n');\n var result = [];\n\n for (var i = 2, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(new StackFrame({\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n }));\n }\n }\n\n return result;\n },\n\n parseOpera10: function ErrorStackParser$$parseOpera10(e) {\n var lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n var lines = e.stacktrace.split('\\n');\n var result = [];\n\n for (var i = 0, len = lines.length; i < len; i += 2) {\n var match = lineRE.exec(lines[i]);\n if (match) {\n result.push(\n new StackFrame({\n functionName: match[3] || undefined,\n fileName: match[2],\n lineNumber: match[1],\n source: lines[i]\n })\n );\n }\n }\n\n return result;\n },\n\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function ErrorStackParser$$parseOpera11(error) {\n var filtered = error.stack.split('\\n').filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n\n return filtered.map(function(line) {\n var tokens = line.split('@');\n var locationParts = this.extractLocation(tokens.pop());\n var functionCall = (tokens.shift() || '');\n var functionName = functionCall\n .replace(//, '$2')\n .replace(/\\([^)]*\\)/g, '') || undefined;\n var argsRaw;\n if (functionCall.match(/\\(([^)]*)\\)/)) {\n argsRaw = functionCall.replace(/^[^(]+\\(([^)]*)\\)$/, '$1');\n }\n var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ?\n undefined : argsRaw.split(',');\n\n return new StackFrame({\n functionName: functionName,\n args: args,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2],\n source: line\n });\n }, this);\n }\n };\n}));\n","(function(root, factory) {\n 'use strict';\n // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, Rhino, and browsers.\n\n /* istanbul ignore next */\n if (typeof define === 'function' && define.amd) {\n define('stackframe', [], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory();\n } else {\n root.StackFrame = factory();\n }\n}(this, function() {\n 'use strict';\n function _isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n }\n\n function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.substring(1);\n }\n\n function _getter(p) {\n return function() {\n return this[p];\n };\n }\n\n var booleanProps = ['isConstructor', 'isEval', 'isNative', 'isToplevel'];\n var numericProps = ['columnNumber', 'lineNumber'];\n var stringProps = ['fileName', 'functionName', 'source'];\n var arrayProps = ['args'];\n var objectProps = ['evalOrigin'];\n\n var props = booleanProps.concat(numericProps, stringProps, arrayProps, objectProps);\n\n function StackFrame(obj) {\n if (!obj) return;\n for (var i = 0; i < props.length; i++) {\n if (obj[props[i]] !== undefined) {\n this['set' + _capitalize(props[i])](obj[props[i]]);\n }\n }\n }\n\n StackFrame.prototype = {\n getArgs: function() {\n return this.args;\n },\n setArgs: function(v) {\n if (Object.prototype.toString.call(v) !== '[object Array]') {\n throw new TypeError('Args must be an Array');\n }\n this.args = v;\n },\n\n getEvalOrigin: function() {\n return this.evalOrigin;\n },\n setEvalOrigin: function(v) {\n if (v instanceof StackFrame) {\n this.evalOrigin = v;\n } else if (v instanceof Object) {\n this.evalOrigin = new StackFrame(v);\n } else {\n throw new TypeError('Eval Origin must be an Object or StackFrame');\n }\n },\n\n toString: function() {\n var fileName = this.getFileName() || '';\n var lineNumber = this.getLineNumber() || '';\n var columnNumber = this.getColumnNumber() || '';\n var functionName = this.getFunctionName() || '';\n if (this.getIsEval()) {\n if (fileName) {\n return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return '[eval]:' + lineNumber + ':' + columnNumber;\n }\n if (functionName) {\n return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';\n }\n return fileName + ':' + lineNumber + ':' + columnNumber;\n }\n };\n\n StackFrame.fromString = function StackFrame$$fromString(str) {\n var argsStartIndex = str.indexOf('(');\n var argsEndIndex = str.lastIndexOf(')');\n\n var functionName = str.substring(0, argsStartIndex);\n var args = str.substring(argsStartIndex + 1, argsEndIndex).split(',');\n var locationString = str.substring(argsEndIndex + 1);\n\n if (locationString.indexOf('@') === 0) {\n var parts = /@(.+?)(?::(\\d+))?(?::(\\d+))?$/.exec(locationString, '');\n var fileName = parts[1];\n var lineNumber = parts[2];\n var columnNumber = parts[3];\n }\n\n return new StackFrame({\n functionName: functionName,\n args: args || undefined,\n fileName: fileName,\n lineNumber: lineNumber || undefined,\n columnNumber: columnNumber || undefined\n });\n };\n\n for (var i = 0; i < booleanProps.length; i++) {\n StackFrame.prototype['get' + _capitalize(booleanProps[i])] = _getter(booleanProps[i]);\n StackFrame.prototype['set' + _capitalize(booleanProps[i])] = (function(p) {\n return function(v) {\n this[p] = Boolean(v);\n };\n })(booleanProps[i]);\n }\n\n for (var j = 0; j < numericProps.length; j++) {\n StackFrame.prototype['get' + _capitalize(numericProps[j])] = _getter(numericProps[j]);\n StackFrame.prototype['set' + _capitalize(numericProps[j])] = (function(p) {\n return function(v) {\n if (!_isNumber(v)) {\n throw new TypeError(p + ' must be a Number');\n }\n this[p] = Number(v);\n };\n })(numericProps[j]);\n }\n\n for (var k = 0; k < stringProps.length; k++) {\n StackFrame.prototype['get' + _capitalize(stringProps[k])] = _getter(stringProps[k]);\n StackFrame.prototype['set' + _capitalize(stringProps[k])] = (function(p) {\n return function(v) {\n this[p] = String(v);\n };\n })(stringProps[k]);\n }\n\n return StackFrame;\n}));\n","'use strict';\n\nvar _ = require('./utility');\nvar helpers = require('./apiUtility');\n\nvar defaultOptions = {\n hostname: 'api.rollbar.com',\n path: '/api/1/item/',\n search: null,\n version: '1',\n protocol: 'https:',\n port: 443,\n};\n\n/**\n * Api is an object that encapsulates methods of communicating with\n * the Rollbar API. It is a standard interface with some parts implemented\n * differently for server or browser contexts. It is an object that should\n * be instantiated when used so it can contain non-global options that may\n * be different for another instance of RollbarApi.\n *\n * @param options {\n * accessToken: the accessToken to use for posting items to rollbar\n * endpoint: an alternative endpoint to send errors to\n * must be a valid, fully qualified URL.\n * The default is: https://api.rollbar.com/api/1/item\n * proxy: if you wish to proxy requests provide an object\n * with the following keys:\n * host or hostname (required): foo.example.com\n * port (optional): 123\n * protocol (optional): https\n * }\n */\nfunction Api(options, transport, urllib, truncation, jsonBackup) {\n this.options = options;\n this.transport = transport;\n this.url = urllib;\n this.truncation = truncation;\n this.jsonBackup = jsonBackup;\n this.accessToken = options.accessToken;\n this.transportOptions = _getTransport(options, urllib);\n}\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.postItem = function (data, callback) {\n var transportOptions = helpers.transportOptions(\n this.transportOptions,\n 'POST',\n );\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n var self = this;\n\n // ensure the network request is scheduled after the current tick.\n setTimeout(function () {\n self.transport.post(self.accessToken, transportOptions, payload, callback);\n }, 0);\n};\n\n/**\n *\n * @param data\n * @param callback\n */\nApi.prototype.buildJsonPayload = function (data, callback) {\n var payload = helpers.buildPayload(this.accessToken, data, this.jsonBackup);\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload);\n }\n\n if (stringifyResult.error) {\n if (callback) {\n callback(stringifyResult.error);\n }\n return null;\n }\n\n return stringifyResult.value;\n};\n\n/**\n *\n * @param jsonPayload\n * @param callback\n */\nApi.prototype.postJsonPayload = function (jsonPayload, callback) {\n var transportOptions = helpers.transportOptions(\n this.transportOptions,\n 'POST',\n );\n this.transport.postJsonPayload(\n this.accessToken,\n transportOptions,\n jsonPayload,\n callback,\n );\n};\n\nApi.prototype.configure = function (options) {\n var oldOptions = this.oldOptions;\n this.options = _.merge(oldOptions, options);\n this.transportOptions = _getTransport(this.options, this.url);\n if (this.options.accessToken !== undefined) {\n this.accessToken = this.options.accessToken;\n }\n return this;\n};\n\nfunction _getTransport(options, url) {\n return helpers.getTransportFromOptions(options, defaultOptions, url);\n}\n\nmodule.exports = Api;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction buildPayload(accessToken, data, jsonBackup) {\n if (!_.isType(data.context, 'string')) {\n var contextResult = _.stringify(data.context, jsonBackup);\n if (contextResult.error) {\n data.context = \"Error: could not serialize 'context'\";\n } else {\n data.context = contextResult.value || '';\n }\n if (data.context.length > 255) {\n data.context = data.context.substr(0, 255);\n }\n }\n return {\n access_token: accessToken,\n data: data,\n };\n}\n\nfunction getTransportFromOptions(options, defaults, url) {\n var hostname = defaults.hostname;\n var protocol = defaults.protocol;\n var port = defaults.port;\n var path = defaults.path;\n var search = defaults.search;\n var timeout = options.timeout;\n var transport = detectTransport(options);\n\n var proxy = options.proxy;\n if (options.endpoint) {\n var opts = url.parse(options.endpoint);\n hostname = opts.hostname;\n protocol = opts.protocol;\n port = opts.port;\n path = opts.pathname;\n search = opts.search;\n }\n return {\n timeout: timeout,\n hostname: hostname,\n protocol: protocol,\n port: port,\n path: path,\n search: search,\n proxy: proxy,\n transport: transport,\n };\n}\n\nfunction detectTransport(options) {\n var gWindow =\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self);\n var transport = options.defaultTransport || 'xhr';\n if (typeof gWindow.fetch === 'undefined') transport = 'xhr';\n if (typeof gWindow.XMLHttpRequest === 'undefined') transport = 'fetch';\n return transport;\n}\n\nfunction transportOptions(transport, method) {\n var protocol = transport.protocol || 'https:';\n var port =\n transport.port ||\n (protocol === 'http:' ? 80 : protocol === 'https:' ? 443 : undefined);\n var hostname = transport.hostname;\n var path = transport.path;\n var timeout = transport.timeout;\n var transportAPI = transport.transport;\n if (transport.search) {\n path = path + transport.search;\n }\n if (transport.proxy) {\n path = protocol + '//' + hostname + path;\n hostname = transport.proxy.host || transport.proxy.hostname;\n port = transport.proxy.port;\n protocol = transport.proxy.protocol || protocol;\n }\n return {\n timeout: timeout,\n protocol: protocol,\n hostname: hostname,\n path: path,\n port: port,\n method: method,\n transport: transportAPI,\n };\n}\n\nfunction appendPathToPath(base, path) {\n var baseTrailingSlash = /\\/$/.test(base);\n var pathBeginningSlash = /^\\//.test(path);\n\n if (baseTrailingSlash && pathBeginningSlash) {\n path = path.substring(1);\n } else if (!baseTrailingSlash && !pathBeginningSlash) {\n path = '/' + path;\n }\n\n return base + path;\n}\n\nmodule.exports = {\n buildPayload: buildPayload,\n getTransportFromOptions: getTransportFromOptions,\n transportOptions: transportOptions,\n appendPathToPath: appendPathToPath,\n};\n","'use strict';\n\nvar rollbar = require('../rollbar');\n\nvar options = (typeof window !== 'undefined') && window._rollbarConfig;\nvar alias = options && options.globalAlias || 'Rollbar';\nvar shimRunning = (typeof window !== 'undefined') && window[alias] && typeof window[alias].shimId === 'function' && window[alias].shimId() !== undefined;\n\nif ((typeof window !== 'undefined') && !window._rollbarStartTime) {\n window._rollbarStartTime = (new Date()).getTime();\n}\n\nif (!shimRunning && options) {\n var Rollbar = new rollbar(options);\n window[alias] = Rollbar;\n} else if (typeof window !== 'undefined') {\n window.rollbar = rollbar;\n window._rollbarDidLoad = true;\n} else if (typeof self !== 'undefined') {\n self.rollbar = rollbar;\n self._rollbarDidLoad = true;\n}\n\nmodule.exports = rollbar;\n","'use strict';\n\nvar Client = require('../rollbar');\nvar _ = require('../utility');\nvar API = require('../api');\nvar logger = require('./logger');\nvar globals = require('./globalSetup');\n\nvar Transport = require('./transport');\nvar urllib = require('./url');\n\nvar transforms = require('./transforms');\nvar sharedTransforms = require('../transforms');\nvar predicates = require('./predicates');\nvar sharedPredicates = require('../predicates');\nvar errorParser = require('../errorParser');\n\nfunction Rollbar(options, client) {\n this.options = _.handleOptions(defaultOptions, options, null, logger);\n this.options._configuredOptions = options;\n var Telemeter = this.components.telemeter;\n var Instrumenter = this.components.instrumenter;\n var polyfillJSON = this.components.polyfillJSON;\n this.wrapGlobals = this.components.wrapGlobals;\n this.scrub = this.components.scrub;\n var truncation = this.components.truncation;\n\n var transport = new Transport(truncation);\n var api = new API(this.options, transport, urllib, truncation);\n if (Telemeter) {\n this.telemeter = new Telemeter(this.options);\n }\n this.client =\n client || new Client(this.options, api, logger, this.telemeter, 'browser');\n var gWindow = _gWindow();\n var gDocument = typeof document != 'undefined' && document;\n this.isChrome = gWindow.chrome && gWindow.chrome.runtime; // check .runtime to avoid Edge browsers\n this.anonymousErrorsPending = 0;\n addTransformsToNotifier(this.client.notifier, this, gWindow);\n addPredicatesToQueue(this.client.queue);\n this.setupUnhandledCapture();\n if (Instrumenter) {\n this.instrumenter = new Instrumenter(\n this.options,\n this.client.telemeter,\n this,\n gWindow,\n gDocument,\n );\n this.instrumenter.instrument();\n }\n _.setupJSON(polyfillJSON);\n\n // Used with rollbar-react for rollbar-react-native compatibility.\n this.rollbar = this;\n}\n\nvar _instance = null;\nRollbar.init = function (options, client) {\n if (_instance) {\n return _instance.global(options).configure(options);\n }\n _instance = new Rollbar(options, client);\n return _instance;\n};\n\nRollbar.prototype.components = {};\n\nRollbar.setComponents = function (components) {\n Rollbar.prototype.components = components;\n};\n\nfunction handleUninitialized(maybeCallback) {\n var message = 'Rollbar is not initialized';\n logger.error(message);\n if (maybeCallback) {\n maybeCallback(new Error(message));\n }\n}\n\nRollbar.prototype.global = function (options) {\n this.client.global(options);\n return this;\n};\nRollbar.global = function (options) {\n if (_instance) {\n return _instance.global(options);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n this.options = _.handleOptions(oldOptions, options, payload, logger);\n this.options._configuredOptions = _.handleOptions(\n oldOptions._configuredOptions,\n options,\n payload,\n );\n this.client.configure(this.options, payloadData);\n this.instrumenter && this.instrumenter.configure(this.options);\n this.setupUnhandledCapture();\n return this;\n};\nRollbar.configure = function (options, payloadData) {\n if (_instance) {\n return _instance.configure(options, payloadData);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.lastError = function () {\n return this.client.lastError;\n};\nRollbar.lastError = function () {\n if (_instance) {\n return _instance.lastError();\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.log = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.log(item);\n return { uuid: uuid };\n};\nRollbar.log = function () {\n if (_instance) {\n return _instance.log.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.debug = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.debug(item);\n return { uuid: uuid };\n};\nRollbar.debug = function () {\n if (_instance) {\n return _instance.debug.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.info = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.info(item);\n return { uuid: uuid };\n};\nRollbar.info = function () {\n if (_instance) {\n return _instance.info.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warn = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warn(item);\n return { uuid: uuid };\n};\nRollbar.warn = function () {\n if (_instance) {\n return _instance.warn.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.warning = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.warning(item);\n return { uuid: uuid };\n};\nRollbar.warning = function () {\n if (_instance) {\n return _instance.warning.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.error = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.error(item);\n return { uuid: uuid };\n};\nRollbar.error = function () {\n if (_instance) {\n return _instance.error.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.critical = function () {\n var item = this._createItem(arguments);\n var uuid = item.uuid;\n this.client.critical(item);\n return { uuid: uuid };\n};\nRollbar.critical = function () {\n if (_instance) {\n return _instance.critical.apply(_instance, arguments);\n } else {\n var maybeCallback = _getFirstFunction(arguments);\n handleUninitialized(maybeCallback);\n }\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.client.buildJsonPayload(item);\n};\nRollbar.buildJsonPayload = function () {\n if (_instance) {\n return _instance.buildJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n return this.client.sendJsonPayload(jsonPayload);\n};\nRollbar.sendJsonPayload = function () {\n if (_instance) {\n return _instance.sendJsonPayload.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.setupUnhandledCapture = function () {\n var gWindow = _gWindow();\n\n if (!this.unhandledExceptionsInitialized) {\n if (this.options.captureUncaught || this.options.handleUncaughtExceptions) {\n globals.captureUncaughtExceptions(gWindow, this);\n if (this.wrapGlobals && this.options.wrapGlobalEventHandlers) {\n this.wrapGlobals(gWindow, this);\n }\n this.unhandledExceptionsInitialized = true;\n }\n }\n if (!this.unhandledRejectionsInitialized) {\n if (\n this.options.captureUnhandledRejections ||\n this.options.handleUnhandledRejections\n ) {\n globals.captureUnhandledRejections(gWindow, this);\n this.unhandledRejectionsInitialized = true;\n }\n }\n};\n\nRollbar.prototype.handleUncaughtException = function (\n message,\n url,\n lineno,\n colno,\n error,\n context,\n) {\n if (!this.options.captureUncaught && !this.options.handleUncaughtExceptions) {\n return;\n }\n\n // Chrome will always send 5+ arguments and error will be valid or null, not undefined.\n // If error is undefined, we have a different caller.\n // Chrome also sends errors from web workers with null error, but does not invoke\n // prepareStackTrace() for these. Test for empty url to skip them.\n if (\n this.options.inspectAnonymousErrors &&\n this.isChrome &&\n error === null &&\n url === ''\n ) {\n return 'anonymous';\n }\n\n var item;\n var stackInfo = _.makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n 'onerror',\n 'uncaught exception',\n errorParser,\n );\n if (_.isError(error)) {\n item = this._createItem([message, error, context]);\n item._unhandledStackInfo = stackInfo;\n } else if (_.isError(url)) {\n item = this._createItem([message, url, context]);\n item._unhandledStackInfo = stackInfo;\n } else {\n item = this._createItem([message, context]);\n item.stackInfo = stackInfo;\n }\n item.level = this.options.uncaughtErrorLevel;\n item._isUncaught = true;\n this.client.log(item);\n};\n\n/**\n * Chrome only. Other browsers will ignore.\n *\n * Use Error.prepareStackTrace to extract information about errors that\n * do not have a valid error object in onerror().\n *\n * In tested version of Chrome, onerror is called first but has no way\n * to communicate with prepareStackTrace. Use a counter to let this\n * handler know which errors to send to Rollbar.\n *\n * In config options, set inspectAnonymousErrors to enable.\n */\nRollbar.prototype.handleAnonymousErrors = function () {\n if (!this.options.inspectAnonymousErrors || !this.isChrome) {\n return;\n }\n\n var r = this;\n function prepareStackTrace(error, _stack) {\n // eslint-disable-line no-unused-vars\n if (r.options.inspectAnonymousErrors) {\n if (r.anonymousErrorsPending) {\n // This is the only known way to detect that onerror saw an anonymous error.\n // It depends on onerror reliably being called before Error.prepareStackTrace,\n // which so far holds true on tested versions of Chrome. If versions of Chrome\n // are tested that behave differently, this logic will need to be updated\n // accordingly.\n r.anonymousErrorsPending -= 1;\n\n if (!error) {\n // Not likely to get here, but calling handleUncaughtException from here\n // without an error object would throw off the anonymousErrorsPending counter,\n // so return now.\n return;\n }\n\n // Allow this to be tracked later.\n error._isAnonymous = true;\n\n // url, lineno, colno shouldn't be needed for these errors.\n // If that changes, update this accordingly, using the unused\n // _stack param as needed (rather than parse error.toString()).\n r.handleUncaughtException(error.message, null, null, null, error);\n }\n }\n\n // Workaround to ensure stack is preserved for normal errors.\n return error.stack;\n }\n\n // https://v8.dev/docs/stack-trace-api\n try {\n Error.prepareStackTrace = prepareStackTrace;\n } catch (e) {\n this.options.inspectAnonymousErrors = false;\n this.error('anonymous error handler failed', e);\n }\n};\n\nRollbar.prototype.handleUnhandledRejection = function (reason, promise) {\n if (\n !this.options.captureUnhandledRejections &&\n !this.options.handleUnhandledRejections\n ) {\n return;\n }\n\n var message = 'unhandled rejection was null or undefined!';\n if (reason) {\n if (reason.message) {\n message = reason.message;\n } else {\n var reasonResult = _.stringify(reason);\n if (reasonResult.value) {\n message = reasonResult.value;\n }\n }\n }\n var context =\n (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 () {\n return context || {};\n };\n }\n\n if (!_.isFunction(f)) {\n return f;\n }\n\n if (f._isWrap) {\n return f;\n }\n\n if (!f._rollbar_wrapped) {\n f._rollbar_wrapped = function () {\n if (_before && _.isFunction(_before)) {\n _before.apply(this, arguments);\n }\n try {\n return f.apply(this, arguments);\n } catch (exc) {\n var e = exc;\n if (e && window._rollbarWrappedError !== e) {\n if (_.isType(e, 'string')) {\n e = new String(e);\n }\n e._rollbarContext = ctxFn() || {};\n e._rollbarContext._wrappedSource = f.toString();\n\n window._rollbarWrappedError = e;\n }\n throw e;\n }\n };\n\n f._rollbar_wrapped._isWrap = true;\n\n if (f.hasOwnProperty) {\n for (var prop in f) {\n if (f.hasOwnProperty(prop) && prop !== '_rollbar_wrapped') {\n f._rollbar_wrapped[prop] = f[prop];\n }\n }\n }\n }\n\n return f._rollbar_wrapped;\n } catch (e) {\n // Return the original function if the wrap fails.\n return f;\n }\n};\nRollbar.wrap = function (f, context) {\n if (_instance) {\n return _instance.wrap(f, context);\n } else {\n handleUninitialized();\n }\n};\n\nRollbar.prototype.captureEvent = function () {\n var event = _.createTelemetryEvent(arguments);\n return this.client.captureEvent(event.type, event.metadata, event.level);\n};\nRollbar.captureEvent = function () {\n if (_instance) {\n return _instance.captureEvent.apply(_instance, arguments);\n } else {\n handleUninitialized();\n }\n};\n\n// The following two methods are used internally and are not meant for public use\nRollbar.prototype.captureDomContentLoaded = function (e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (e, ts) {\n if (!ts) {\n ts = new Date();\n }\n return this.client.captureLoad(ts);\n};\n\n/* Internal */\n\nfunction addTransformsToNotifier(notifier, rollbar, gWindow) {\n notifier\n .addTransform(transforms.handleDomException)\n .addTransform(transforms.handleItemWithError)\n .addTransform(transforms.ensureItemHasSomethingToSay)\n .addTransform(transforms.addBaseInfo)\n .addTransform(transforms.addRequestInfo(gWindow))\n .addTransform(transforms.addClientInfo(gWindow))\n .addTransform(transforms.addPluginInfo(gWindow))\n .addTransform(transforms.addBody)\n .addTransform(sharedTransforms.addMessageWithError)\n .addTransform(sharedTransforms.addTelemetryData)\n .addTransform(sharedTransforms.addConfigToPayload)\n .addTransform(transforms.addScrubber(rollbar.scrub))\n .addTransform(sharedTransforms.addPayloadOptions)\n .addTransform(sharedTransforms.userTransform(logger))\n .addTransform(sharedTransforms.addConfiguredOptions)\n .addTransform(sharedTransforms.addDiagnosticKeys)\n .addTransform(sharedTransforms.itemToPayload);\n}\n\nfunction addPredicatesToQueue(queue) {\n queue\n .addPredicate(sharedPredicates.checkLevel)\n .addPredicate(predicates.checkIgnore)\n .addPredicate(sharedPredicates.userCheckIgnore(logger))\n .addPredicate(sharedPredicates.urlIsNotBlockListed(logger))\n .addPredicate(sharedPredicates.urlIsSafeListed(logger))\n .addPredicate(sharedPredicates.messageIsIgnored(logger));\n}\n\nRollbar.prototype.loadFull = function () {\n logger.info(\n 'Unexpected Rollbar.loadFull() called on a Notifier instance. This can happen when Rollbar is loaded multiple times.',\n );\n};\n\nRollbar.prototype._createItem = function (args) {\n return _.createItem(args, logger, this);\n};\n\nfunction _getFirstFunction(args) {\n for (var i = 0, len = args.length; i < len; ++i) {\n if (_.isFunction(args[i])) {\n return args[i];\n }\n }\n return undefined;\n}\n\nfunction _gWindow() {\n return (\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self)\n );\n}\n\nvar defaults = require('../defaults');\nvar scrubFields = require('./defaults/scrubFields');\n\nvar defaultOptions = {\n version: defaults.version,\n scrubFields: scrubFields.scrubFields,\n logLevel: defaults.logLevel,\n reportLevel: defaults.reportLevel,\n uncaughtErrorLevel: defaults.uncaughtErrorLevel,\n endpoint: defaults.endpoint,\n verbose: false,\n enabled: true,\n transmit: true,\n sendConfig: false,\n includeItemsInTelemetry: true,\n captureIp: true,\n inspectAnonymousErrors: true,\n ignoreDuplicateErrors: true,\n wrapGlobalEventHandlers: false,\n};\n\nmodule.exports = Rollbar;\n","'use strict';\n\nmodule.exports = {\n scrubFields: [\n 'pw',\n 'pass',\n 'passwd',\n 'password',\n 'secret',\n 'confirm_password',\n 'confirmPassword',\n 'password_confirmation',\n 'passwordConfirmation',\n 'access_token',\n 'accessToken',\n 'X-Rollbar-Access-Token',\n 'secret_key',\n 'secretKey',\n 'secretToken',\n 'cc-number',\n 'card number',\n 'cardnumber',\n 'cardnum',\n 'ccnum',\n 'ccnumber',\n 'cc num',\n 'creditcardnumber',\n 'credit card number',\n 'newcreditcardnumber',\n 'new credit card',\n 'creditcardno',\n 'credit card no',\n 'card#',\n 'card #',\n 'cc-csc',\n 'cvc',\n 'cvc2',\n 'cvv2',\n 'ccv2',\n 'security code',\n 'card verification',\n 'name on credit card',\n 'name on card',\n 'nameoncard',\n 'cardholder',\n 'card holder',\n 'name des karteninhabers',\n 'ccname',\n 'card type',\n 'cardtype',\n 'cc type',\n 'cctype',\n 'payment type',\n 'expiration date',\n 'expirationdate',\n 'expdate',\n 'cc-exp',\n 'ccmonth',\n 'ccyear',\n ],\n};\n","'use strict';\n\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 var undef;\n if (typeof document === 'undefined') {\n return undef;\n }\n\n var v = 3,\n div = document.createElement('div'),\n all = div.getElementsByTagName('i');\n\n while (\n ((div.innerHTML = ''), all[0])\n );\n\n return v > 4 ? v : undef;\n}\n\nvar Detection = {\n ieVersion: getIEVersion,\n};\n\nmodule.exports = Detection;\n","'use strict';\n\nfunction 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 = ' > ',\n separatorLength = separator.length;\n var out = [],\n len = 0,\n nextStr,\n 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(\n '[' + desc.attributes[i].key + '=\"' + desc.attributes[i].value + '\"]',\n );\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 = {},\n className,\n key,\n attr,\n i;\n out.tagName = elem.tagName.toLowerCase();\n if (elem.id) {\n out.id = elem.id;\n }\n className = elem.className;\n if (className && typeof className === 'string') {\n out.classes = className.split(/\\s+/);\n }\n var attributes = ['type', 'name', 'title', 'alt'];\n out.attributes = [];\n for (i = 0; i < attributes.length; i++) {\n key = attributes[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.attributes.push({ key: key, value: attr });\n }\n }\n return out;\n}\n\nmodule.exports = {\n describeElement: describeElement,\n descriptionToString: descriptionToString,\n elementArrayToString: elementArrayToString,\n treeToArray: treeToArray,\n getElementFromEvent: getElementFromEvent,\n isDescribedElement: isDescribedElement,\n getElementType: getElementType,\n};\n","'use strict';\n\nfunction captureUncaughtExceptions(window, handler, shim) {\n if (!window) {\n return;\n }\n var oldOnError;\n\n if (typeof handler._rollbarOldOnError === 'function') {\n oldOnError = handler._rollbarOldOnError;\n } else if (window.onerror) {\n oldOnError = window.onerror;\n while (oldOnError._rollbarOldOnError) {\n oldOnError = oldOnError._rollbarOldOnError;\n }\n handler._rollbarOldOnError = oldOnError;\n }\n\n handler.handleAnonymousErrors();\n\n var fn = function () {\n var args = Array.prototype.slice.call(arguments, 0);\n _rollbarWindowOnError(window, handler, oldOnError, args);\n };\n if (shim) {\n fn._rollbarOldOnError = oldOnError;\n }\n window.onerror = fn;\n}\n\nfunction _rollbarWindowOnError(window, r, old, args) {\n if (window._rollbarWrappedError) {\n if (!args[4]) {\n args[4] = window._rollbarWrappedError;\n }\n if (!args[5]) {\n args[5] = window._rollbarWrappedError._rollbarContext;\n }\n window._rollbarWrappedError = null;\n }\n\n var ret = r.handleUncaughtException.apply(r, args);\n\n if (old) {\n old.apply(window, args);\n }\n\n // Let other chained onerror handlers above run before setting this.\n // If an error is thrown and caught within a chained onerror handler,\n // Error.prepareStackTrace() will see that one before the one we want.\n if (ret === 'anonymous') {\n r.anonymousErrorsPending += 1; // See Rollbar.prototype.handleAnonymousErrors()\n }\n}\n\nfunction captureUnhandledRejections(window, handler, shim) {\n if (!window) {\n return;\n }\n\n if (\n typeof window._rollbarURH === 'function' &&\n window._rollbarURH.belongsToShim\n ) {\n window.removeEventListener('unhandledrejection', window._rollbarURH);\n }\n\n var rejectionHandler = function (evt) {\n var reason, promise, detail;\n try {\n reason = evt.reason;\n } catch (e) {\n reason = undefined;\n }\n try {\n promise = evt.promise;\n } catch (e) {\n promise = '[unhandledrejection] error getting `promise` from event';\n }\n try {\n detail = evt.detail;\n if (!reason && detail) {\n reason = detail.reason;\n promise = detail.promise;\n }\n } catch (e) {\n // Ignore\n }\n if (!reason) {\n reason = '[unhandledrejection] error getting `reason` from event';\n }\n\n if (handler && handler.handleUnhandledRejection) {\n handler.handleUnhandledRejection(reason, promise);\n }\n };\n rejectionHandler.belongsToShim = shim;\n window._rollbarURH = rejectionHandler;\n window.addEventListener('unhandledrejection', rejectionHandler);\n}\n\nmodule.exports = {\n captureUncaughtExceptions: captureUncaughtExceptions,\n captureUnhandledRejections: captureUnhandledRejections,\n};\n","'use strict';\n\n/* eslint-disable no-console */\nrequire('console-polyfill');\nvar detection = require('./detection');\nvar _ = require('../utility');\n\nfunction error() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.error(_.formatArgsAsString(args));\n } else {\n console.error.apply(console, args);\n }\n}\n\nfunction info() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.info(_.formatArgsAsString(args));\n } else {\n console.info.apply(console, args);\n }\n}\n\nfunction log() {\n var args = Array.prototype.slice.call(arguments, 0);\n args.unshift('Rollbar:');\n if (detection.ieVersion() <= 8) {\n console.log(_.formatArgsAsString(args));\n } else {\n console.log.apply(console, args);\n }\n}\n\n/* eslint-enable no-console */\n\nmodule.exports = {\n error: error,\n info: info,\n log: log,\n};\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction checkIgnore(item, settings) {\n if (_.get(settings, 'plugins.jquery.ignoreAjaxErrors')) {\n return !_.get(item, 'body.message.extra.isAjax');\n }\n return true;\n}\n\nmodule.exports = {\n checkIgnore: checkIgnore,\n};\n","'use strict';\n\nvar Rollbar = require('./core');\nvar telemeter = require('../telemetry');\nvar instrumenter = require('./telemetry');\nvar polyfillJSON = require('../utility/polyfillJSON');\nvar wrapGlobals = require('./wrapGlobals');\nvar scrub = require('../scrub');\nvar truncation = require('../truncation');\n\nRollbar.setComponents({\n telemeter: telemeter,\n instrumenter: instrumenter,\n polyfillJSON: polyfillJSON,\n wrapGlobals: wrapGlobals,\n scrub: scrub,\n truncation: truncation,\n});\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('../utility');\nvar headers = require('../utility/headers');\nvar replace = require('../utility/replace');\nvar scrub = require('../scrub');\nvar urlparser = require('./url');\nvar domUtil = require('./domUtility');\n\nvar defaults = {\n network: true,\n networkResponseHeaders: false,\n networkResponseBody: false,\n networkRequestHeaders: false,\n networkRequestBody: false,\n networkErrorOnHttp5xx: false,\n networkErrorOnHttp4xx: false,\n networkErrorOnHttp0: false,\n log: true,\n dom: true,\n navigation: true,\n connectivity: true,\n contentSecurityPolicy: true,\n errorOnContentSecurityPolicy: false,\n};\n\nfunction restore(replacements, type) {\n var b;\n while (replacements[type].length) {\n b = replacements[type].shift();\n b[0][b[1]] = b[2];\n }\n}\n\nfunction nameFromDescription(description) {\n if (!description || !description.attributes) {\n return null;\n }\n var attrs = description.attributes;\n for (var a = 0; a < attrs.length; ++a) {\n if (attrs[a].key === 'name') {\n return attrs[a].value;\n }\n }\n return null;\n}\n\nfunction defaultValueScrubber(scrubFields) {\n var patterns = [];\n for (var i = 0; i < scrubFields.length; ++i) {\n patterns.push(new RegExp(scrubFields[i], 'i'));\n }\n return function (description) {\n var name = nameFromDescription(description);\n if (!name) {\n return false;\n }\n for (var i = 0; i < patterns.length; ++i) {\n if (patterns[i].test(name)) {\n return true;\n }\n }\n return false;\n };\n}\n\nfunction Instrumenter(options, telemeter, rollbar, _window, _document) {\n this.options = options;\n var autoInstrument = options.autoInstrument;\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n this.telemetryScrubber = options.telemetryScrubber;\n this.defaultValueScrubber = defaultValueScrubber(options.scrubFields);\n this.telemeter = telemeter;\n this.rollbar = rollbar;\n this.diagnostic = rollbar.client.notifier.diagnostic;\n this._window = _window || {};\n this._document = _document || {};\n this.replacements = {\n network: [],\n log: [],\n navigation: [],\n connectivity: [],\n };\n this.eventRemovers = {\n dom: [],\n connectivity: [],\n contentsecuritypolicy: [],\n };\n\n this._location = this._window.location;\n this._lastHref = this._location && this._location.href;\n}\n\nInstrumenter.prototype.configure = function (options) {\n this.options = _.merge(this.options, options);\n var autoInstrument = options.autoInstrument;\n var oldSettings = _.merge(this.autoInstrument);\n if (options.enabled === false || autoInstrument === false) {\n this.autoInstrument = {};\n } else {\n if (!_.isType(autoInstrument, 'object')) {\n autoInstrument = defaults;\n }\n this.autoInstrument = _.merge(defaults, autoInstrument);\n }\n this.instrument(oldSettings);\n if (options.scrubTelemetryInputs !== undefined) {\n this.scrubTelemetryInputs = !!options.scrubTelemetryInputs;\n }\n if (options.telemetryScrubber !== undefined) {\n this.telemetryScrubber = options.telemetryScrubber;\n }\n};\n\n// eslint-disable-next-line complexity\nInstrumenter.prototype.instrument = function (oldSettings) {\n if (this.autoInstrument.network && !(oldSettings && oldSettings.network)) {\n this.instrumentNetwork();\n } else if (\n !this.autoInstrument.network &&\n oldSettings &&\n oldSettings.network\n ) {\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 (\n this.autoInstrument.navigation &&\n !(oldSettings && oldSettings.navigation)\n ) {\n this.instrumentNavigation();\n } else if (\n !this.autoInstrument.navigation &&\n oldSettings &&\n oldSettings.navigation\n ) {\n this.deinstrumentNavigation();\n }\n\n if (\n this.autoInstrument.connectivity &&\n !(oldSettings && oldSettings.connectivity)\n ) {\n this.instrumentConnectivity();\n } else if (\n !this.autoInstrument.connectivity &&\n oldSettings &&\n oldSettings.connectivity\n ) {\n this.deinstrumentConnectivity();\n }\n\n if (\n this.autoInstrument.contentSecurityPolicy &&\n !(oldSettings && oldSettings.contentSecurityPolicy)\n ) {\n this.instrumentContentSecurityPolicy();\n } else if (\n !this.autoInstrument.contentSecurityPolicy &&\n oldSettings &&\n oldSettings.contentSecurityPolicy\n ) {\n this.deinstrumentContentSecurityPolicy();\n }\n};\n\nInstrumenter.prototype.deinstrumentNetwork = function () {\n restore(this.replacements, 'network');\n};\n\nInstrumenter.prototype.instrumentNetwork = function () {\n var self = this;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && _.isFunction(xhr[prop])) {\n replace(xhr, prop, function (orig) {\n return self.rollbar.wrap(orig);\n });\n }\n }\n\n if ('XMLHttpRequest' in this._window) {\n var xhrp = this._window.XMLHttpRequest.prototype;\n replace(\n xhrp,\n 'open',\n function (orig) {\n return function (method, url) {\n var isUrlObject = _isUrlObject(url);\n if (_.isType(url, 'string') || isUrlObject) {\n url = isUrlObject ? url.toString() : url;\n if (this.__rollbar_xhr) {\n this.__rollbar_xhr.method = method;\n this.__rollbar_xhr.url = url;\n this.__rollbar_xhr.status_code = null;\n this.__rollbar_xhr.start_time_ms = _.now();\n this.__rollbar_xhr.end_time_ms = null;\n } else {\n this.__rollbar_xhr = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null,\n };\n }\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n\n replace(\n xhrp,\n 'setRequestHeader',\n function (orig) {\n return function (header, value) {\n // If xhr.open is async, __rollbar_xhr may not be initialized yet.\n if (!this.__rollbar_xhr) {\n this.__rollbar_xhr = {};\n }\n if (_.isType(header, 'string') && _.isType(value, 'string')) {\n if (self.autoInstrument.networkRequestHeaders) {\n if (!this.__rollbar_xhr.request_headers) {\n this.__rollbar_xhr.request_headers = {};\n }\n this.__rollbar_xhr.request_headers[header] = value;\n }\n // We want the content type even if request header telemetry is off.\n if (header.toLowerCase() === 'content-type') {\n this.__rollbar_xhr.request_content_type = value;\n }\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n\n replace(\n xhrp,\n 'send',\n function (orig) {\n /* eslint-disable no-unused-vars */\n return function (data) {\n /* eslint-enable no-unused-vars */\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__rollbar_xhr) {\n if (xhr.__rollbar_xhr.status_code === null) {\n xhr.__rollbar_xhr.status_code = 0;\n if (self.autoInstrument.networkRequestBody) {\n xhr.__rollbar_xhr.request = data;\n }\n xhr.__rollbar_event = self.captureNetwork(\n xhr.__rollbar_xhr,\n 'xhr',\n undefined,\n );\n }\n if (xhr.readyState < 2) {\n xhr.__rollbar_xhr.start_time_ms = _.now();\n }\n if (xhr.readyState > 3) {\n xhr.__rollbar_xhr.end_time_ms = _.now();\n\n var headers = null;\n xhr.__rollbar_xhr.response_content_type =\n xhr.getResponseHeader('Content-Type');\n if (self.autoInstrument.networkResponseHeaders) {\n var headersConfig =\n self.autoInstrument.networkResponseHeaders;\n headers = {};\n try {\n var header, i;\n if (headersConfig === true) {\n var allHeaders = xhr.getAllResponseHeaders();\n if (allHeaders) {\n var arr = allHeaders.trim().split(/[\\r\\n]+/);\n var parts, value;\n for (i = 0; i < arr.length; i++) {\n parts = arr[i].split(': ');\n header = parts.shift();\n value = parts.join(': ');\n headers[header] = value;\n }\n }\n } else {\n for (i = 0; i < headersConfig.length; i++) {\n header = headersConfig[i];\n headers[header] = xhr.getResponseHeader(header);\n }\n }\n } catch (e) {\n /* we ignore the errors here that could come from different\n * browser issues with the xhr methods */\n }\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n try {\n body = xhr.responseText;\n } catch (e) {\n /* ignore errors from reading responseText */\n }\n }\n var response = null;\n if (body || headers) {\n response = {};\n if (body) {\n if (\n self.isJsonContentType(\n xhr.__rollbar_xhr.response_content_type,\n )\n ) {\n response.body = self.scrubJson(body);\n } else {\n response.body = body;\n }\n }\n if (headers) {\n response.headers = headers;\n }\n }\n if (response) {\n xhr.__rollbar_xhr.response = response;\n }\n try {\n var code = xhr.status;\n code = code === 1223 ? 204 : code;\n xhr.__rollbar_xhr.status_code = code;\n xhr.__rollbar_event.level =\n self.telemeter.levelFromStatus(code);\n self.errorOnHttpStatus(xhr.__rollbar_xhr);\n } catch (e) {\n /* ignore possible exception from xhr.status */\n }\n }\n }\n }\n\n wrapProp('onload', xhr);\n wrapProp('onerror', xhr);\n wrapProp('onprogress', xhr);\n\n if (\n 'onreadystatechange' in xhr &&\n _.isFunction(xhr.onreadystatechange)\n ) {\n replace(xhr, 'onreadystatechange', function (orig) {\n return self.rollbar.wrap(\n orig,\n undefined,\n onreadystatechangeHandler,\n );\n });\n } else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (xhr.__rollbar_xhr && self.trackHttpErrors()) {\n xhr.__rollbar_xhr.stack = new Error().stack;\n }\n return orig.apply(this, arguments);\n };\n },\n this.replacements,\n 'network',\n );\n }\n\n if ('fetch' in this._window) {\n replace(\n this._window,\n 'fetch',\n 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 var isUrlObject = _isUrlObject(input);\n if (_.isType(input, 'string') || isUrlObject) {\n url = isUrlObject ? input.toString() : input;\n } else if (input) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n var metadata = {\n method: method,\n url: url,\n status_code: null,\n start_time_ms: _.now(),\n end_time_ms: null,\n };\n if (args[1] && args[1].headers) {\n // Argument may be a Headers object, or plain object. Ensure here that\n // we are working with a Headers object with case-insensitive keys.\n var reqHeaders = headers(args[1].headers);\n\n metadata.request_content_type = reqHeaders.get('Content-Type');\n\n if (self.autoInstrument.networkRequestHeaders) {\n metadata.request_headers = self.fetchHeaders(\n reqHeaders,\n self.autoInstrument.networkRequestHeaders,\n );\n }\n }\n\n if (self.autoInstrument.networkRequestBody) {\n if (args[1] && args[1].body) {\n metadata.request = args[1].body;\n } else if (\n args[0] &&\n !_.isType(args[0], 'string') &&\n args[0].body\n ) {\n metadata.request = args[0].body;\n }\n }\n self.captureNetwork(metadata, 'fetch', undefined);\n if (self.trackHttpErrors()) {\n metadata.stack = new Error().stack;\n }\n\n // Start our handler before returning the promise. This allows resp.clone()\n // to execute before other handlers touch the response.\n return orig.apply(this, args).then(function (resp) {\n metadata.end_time_ms = _.now();\n metadata.status_code = resp.status;\n metadata.response_content_type = resp.headers.get('Content-Type');\n var headers = null;\n if (self.autoInstrument.networkResponseHeaders) {\n headers = self.fetchHeaders(\n resp.headers,\n self.autoInstrument.networkResponseHeaders,\n );\n }\n var body = null;\n if (self.autoInstrument.networkResponseBody) {\n if (typeof resp.text === 'function') {\n // Response.text() is not implemented on some platforms\n // The response must be cloned to prevent reading (and locking) the original stream.\n // This must be done before other handlers touch the response.\n body = resp.clone().text(); //returns a Promise\n }\n }\n if (headers || body) {\n metadata.response = {};\n if (body) {\n // Test to ensure body is a Promise, which it should always be.\n if (typeof body.then === 'function') {\n body.then(function (text) {\n if (\n text &&\n self.isJsonContentType(metadata.response_content_type)\n ) {\n metadata.response.body = self.scrubJson(text);\n } else {\n metadata.response.body = text;\n }\n });\n } else {\n metadata.response.body = body;\n }\n }\n if (headers) {\n metadata.response.headers = headers;\n }\n }\n self.errorOnHttpStatus(metadata);\n return resp;\n });\n };\n },\n this.replacements,\n 'network',\n );\n }\n};\n\nInstrumenter.prototype.captureNetwork = function (\n metadata,\n subtype,\n rollbarUUID,\n) {\n if (\n metadata.request &&\n this.isJsonContentType(metadata.request_content_type)\n ) {\n metadata.request = this.scrubJson(metadata.request);\n }\n return this.telemeter.captureNetwork(metadata, subtype, rollbarUUID);\n};\n\nInstrumenter.prototype.isJsonContentType = function (contentType) {\n return contentType &&\n _.isType(contentType, 'string') &&\n contentType.toLowerCase().includes('json')\n ? true\n : false;\n};\n\nInstrumenter.prototype.scrubJson = function (json) {\n return JSON.stringify(scrub(JSON.parse(json), this.options.scrubFields));\n};\n\nInstrumenter.prototype.fetchHeaders = function (inHeaders, headersConfig) {\n var outHeaders = {};\n try {\n var i;\n if (headersConfig === true) {\n if (typeof inHeaders.entries === 'function') {\n // Headers.entries() is not implemented in IE\n var allHeaders = inHeaders.entries();\n var currentHeader = allHeaders.next();\n while (!currentHeader.done) {\n outHeaders[currentHeader.value[0]] = currentHeader.value[1];\n currentHeader = allHeaders.next();\n }\n }\n } else {\n for (i = 0; i < headersConfig.length; i++) {\n var header = headersConfig[i];\n outHeaders[header] = inHeaders.get(header);\n }\n }\n } catch (e) {\n /* ignore probable IE errors */\n }\n return outHeaders;\n};\n\nInstrumenter.prototype.trackHttpErrors = function () {\n return (\n this.autoInstrument.networkErrorOnHttp5xx ||\n this.autoInstrument.networkErrorOnHttp4xx ||\n this.autoInstrument.networkErrorOnHttp0\n );\n};\n\nInstrumenter.prototype.errorOnHttpStatus = function (metadata) {\n var status = metadata.status_code;\n\n if (\n (status >= 500 && this.autoInstrument.networkErrorOnHttp5xx) ||\n (status >= 400 && this.autoInstrument.networkErrorOnHttp4xx) ||\n (status === 0 && this.autoInstrument.networkErrorOnHttp0)\n ) {\n var error = new Error('HTTP request failed with Status ' + status);\n error.stack = metadata.stack;\n this.rollbar.error(error, { skipFrames: 1 });\n }\n};\n\nInstrumenter.prototype.deinstrumentConsole = function () {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n var b;\n while (this.replacements['log'].length) {\n b = this.replacements['log'].shift();\n this._window.console[b[0]] = b[1];\n }\n};\n\nInstrumenter.prototype.instrumentConsole = function () {\n if (!('console' in this._window && this._window.console.log)) {\n return;\n }\n\n var self = this;\n var c = this._window.console;\n\n function wrapConsole(method) {\n 'use strict'; // See https://github.com/rollbar/rollbar.js/pull/778\n\n var orig = c[method];\n var origConsole = c;\n var level = method === 'warn' ? 'warning' : method;\n c[method] = function () {\n var args = Array.prototype.slice.call(arguments);\n var message = _.formatArgsAsString(args);\n self.telemeter.captureLog(message, level);\n if (orig) {\n Function.prototype.apply.call(orig, origConsole, args);\n }\n };\n self.replacements['log'].push([method, orig]);\n }\n var methods = ['debug', 'info', 'warn', 'error', 'log'];\n try {\n for (var i = 0, len = methods.length; i < len; i++) {\n wrapConsole(methods[i]);\n }\n } catch (e) {\n this.diagnostic.instrumentConsole = { error: e.message };\n }\n};\n\nInstrumenter.prototype.deinstrumentDom = function () {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n this.removeListeners('dom');\n};\n\nInstrumenter.prototype.instrumentDom = function () {\n if (!('addEventListener' in this._window || 'attachEvent' in this._window)) {\n return;\n }\n var clickHandler = this.handleClick.bind(this);\n var blurHandler = this.handleBlur.bind(this);\n this.addListener('dom', this._window, 'click', 'onclick', clickHandler, true);\n this.addListener(\n 'dom',\n this._window,\n 'blur',\n 'onfocusout',\n blurHandler,\n true,\n );\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 =\n domUtil.isDescribedElement(e, 'a') ||\n domUtil.isDescribedElement(e, 'button');\n if (\n hasTag &&\n (anchorOrButton ||\n domUtil.isDescribedElement(e, 'input', ['button', 'submit']))\n ) {\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 (\n domUtil.isDescribedElement(e, 'select') &&\n e.options &&\n e.options.length\n ) {\n this.handleSelectInputChanged(e);\n } else if (\n domUtil.isDescribedElement(e, 'input') &&\n !domUtil.isDescribedElement(e, 'input', [\n 'button',\n 'submit',\n 'hidden',\n 'checkbox',\n 'radio',\n ])\n ) {\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 (\n subtype,\n element,\n value,\n isChecked,\n) {\n if (value !== undefined) {\n if (\n this.scrubTelemetryInputs ||\n domUtil.getElementType(element) === 'password'\n ) {\n value = '[scrubbed]';\n } else {\n var description = domUtil.describeElement(element);\n if (this.telemetryScrubber) {\n if (this.telemetryScrubber(description)) {\n value = '[scrubbed]';\n }\n } else if (this.defaultValueScrubber(description)) {\n value = '[scrubbed]';\n }\n }\n }\n var elementString = domUtil.elementArrayToString(\n domUtil.treeToArray(element),\n );\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 =\n !chromePackagedApp &&\n this._window.history &&\n 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 =\n !chromePackagedApp &&\n this._window.history &&\n this._window.history.pushState;\n if (!hasPushState) {\n return;\n }\n var self = this;\n replace(\n this._window,\n 'onpopstate',\n 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 },\n this.replacements,\n 'navigation',\n );\n\n replace(\n this._window.history,\n 'pushState',\n 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 },\n this.replacements,\n 'navigation',\n );\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 (\n parsedHref.protocol === parsedTo.protocol &&\n parsedHref.host === parsedTo.host\n ) {\n to = parsedTo.path + (parsedTo.hash || '');\n }\n if (\n parsedHref.protocol === parsedFrom.protocol &&\n parsedHref.host === parsedFrom.host\n ) {\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(\n 'connectivity',\n this._window,\n 'online',\n undefined,\n function () {\n this.telemeter.captureConnectivityChange('online');\n }.bind(this),\n true,\n );\n this.addListener(\n 'connectivity',\n this._window,\n 'offline',\n undefined,\n function () {\n this.telemeter.captureConnectivityChange('offline');\n }.bind(this),\n true,\n );\n } else {\n var self = this;\n replace(\n this._document.body,\n 'ononline',\n function (orig) {\n return function () {\n self.telemeter.captureConnectivityChange('online');\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n },\n this.replacements,\n 'connectivity',\n );\n replace(\n this._document.body,\n 'onoffline',\n function (orig) {\n return function () {\n self.telemeter.captureConnectivityChange('offline');\n if (orig) {\n orig.apply(this, arguments);\n }\n };\n },\n this.replacements,\n 'connectivity',\n );\n }\n};\n\nInstrumenter.prototype.handleCspEvent = function (cspEvent) {\n var message =\n 'Security Policy Violation: ' +\n 'blockedURI: ' +\n cspEvent.blockedURI +\n ', ' +\n 'violatedDirective: ' +\n cspEvent.violatedDirective +\n ', ' +\n 'effectiveDirective: ' +\n cspEvent.effectiveDirective +\n ', ';\n\n if (cspEvent.sourceFile) {\n message +=\n 'location: ' +\n cspEvent.sourceFile +\n ', ' +\n 'line: ' +\n cspEvent.lineNumber +\n ', ' +\n 'col: ' +\n cspEvent.columnNumber +\n ', ';\n }\n\n message += 'originalPolicy: ' + cspEvent.originalPolicy;\n\n this.telemeter.captureLog(message, 'error');\n this.handleCspError(message);\n};\n\nInstrumenter.prototype.handleCspError = function (message) {\n if (this.autoInstrument.errorOnContentSecurityPolicy) {\n this.rollbar.error(message);\n }\n};\n\nInstrumenter.prototype.deinstrumentContentSecurityPolicy = function () {\n if (!('addEventListener' in this._document)) {\n return;\n }\n\n this.removeListeners('contentsecuritypolicy');\n};\n\nInstrumenter.prototype.instrumentContentSecurityPolicy = function () {\n if (!('addEventListener' in this._document)) {\n return;\n }\n\n var cspHandler = this.handleCspEvent.bind(this);\n this.addListener(\n 'contentsecuritypolicy',\n this._document,\n 'securitypolicyviolation',\n null,\n cspHandler,\n false,\n );\n};\n\nInstrumenter.prototype.addListener = function (\n section,\n obj,\n type,\n altType,\n handler,\n capture,\n) {\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\nfunction _isUrlObject(input) {\n return typeof URL !== 'undefined' && input instanceof URL;\n}\n\nmodule.exports = Instrumenter;\n","'use strict';\n\nvar _ = require('../utility');\nvar errorParser = require('../errorParser');\nvar logger = require('./logger');\n\nfunction handleDomException(item, options, callback) {\n if (item.err && errorParser.Stack(item.err).name === 'DOMException') {\n var originalError = new Error();\n originalError.name = item.err.name;\n originalError.message = item.err.message;\n originalError.stack = item.err.stack;\n originalError.nested = item.err;\n item.err = originalError;\n }\n callback(null, item);\n}\n\nfunction handleItemWithError(item, options, callback) {\n item.data = item.data || {};\n if (item.err) {\n try {\n item.stackInfo =\n item.err._savedStackTrace ||\n errorParser.parse(item.err, item.skipFrames);\n\n if (options.addErrorContext) {\n addErrorContext(item);\n }\n } catch (e) {\n logger.error('Error while parsing the error object.', e);\n try {\n item.message =\n item.err.message ||\n item.err.description ||\n item.message ||\n String(item.err);\n } catch (e2) {\n item.message = String(item.err) || String(e2);\n }\n delete item.err;\n }\n }\n callback(null, item);\n}\n\nfunction addErrorContext(item) {\n var chain = [];\n var err = item.err;\n\n chain.push(err);\n\n while (err.nested || err.cause) {\n err = err.nested || err.cause;\n chain.push(err);\n }\n\n _.addErrorContext(item, chain);\n}\n\nfunction ensureItemHasSomethingToSay(item, options, callback) {\n if (!item.message && !item.stackInfo && !item.custom) {\n callback(new Error('No message, stack info, or custom data'), null);\n }\n callback(null, item);\n}\n\nfunction addBaseInfo(item, options, callback) {\n var environment =\n (options.payload && options.payload.environment) || options.environment;\n item.data = _.merge(item.data, {\n environment: environment,\n level: item.level,\n endpoint: options.endpoint,\n platform: 'browser',\n framework: 'browser-js',\n language: 'javascript',\n server: {},\n uuid: item.uuid,\n notifier: {\n name: 'rollbar-browser-js',\n version: options.version,\n },\n custom: item.custom,\n });\n callback(null, item);\n}\n\nfunction addRequestInfo(window) {\n return function (item, options, callback) {\n var requestInfo = {};\n\n if (window && window.location) {\n requestInfo.url = window.location.href;\n requestInfo.query_string = window.location.search;\n }\n\n var remoteString = '$remote_ip';\n if (!options.captureIp) {\n remoteString = null;\n } else if (options.captureIp !== true) {\n remoteString += '_anonymize';\n }\n if (remoteString) requestInfo.user_ip = remoteString;\n\n if (Object.keys(requestInfo).length > 0) {\n _.set(item, 'data.request', requestInfo);\n }\n\n callback(null, item);\n };\n}\n\nfunction addClientInfo(window) {\n return function (item, options, callback) {\n if (!window) {\n return callback(null, item);\n }\n var nav = window.navigator || {};\n var scr = window.screen || {};\n _.set(item, 'data.client', {\n runtime_ms: item.timestamp - window._rollbarStartTime,\n timestamp: Math.round(item.timestamp / 1000),\n javascript: {\n browser: nav.userAgent,\n language: nav.language,\n cookie_enabled: nav.cookieEnabled,\n screen: {\n width: scr.width,\n height: scr.height,\n },\n },\n });\n callback(null, item);\n };\n}\n\nfunction addPluginInfo(window) {\n return function (item, options, callback) {\n if (!window || !window.navigator) {\n return callback(null, item);\n }\n var plugins = [];\n var navPlugins = window.navigator.plugins || [];\n var cur;\n for (var i = 0, l = navPlugins.length; i < l; ++i) {\n cur = navPlugins[i];\n plugins.push({ name: cur.name, description: cur.description });\n }\n _.set(item, 'data.client.javascript.plugins', plugins);\n callback(null, item);\n };\n}\n\nfunction addBody(item, options, callback) {\n if (item.stackInfo) {\n if (item.stackInfo.traceChain) {\n addBodyTraceChain(item, options, callback);\n } else {\n addBodyTrace(item, options, callback);\n }\n } else {\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction addBodyMessage(item, options, callback) {\n var message = item.message;\n var custom = item.custom;\n\n if (!message) {\n message = 'Item sent with null or missing arguments.';\n }\n var result = {\n body: message,\n };\n\n if (custom) {\n result.extra = _.merge(custom);\n }\n\n _.set(item, 'data.body', { message: result });\n callback(null, item);\n}\n\nfunction stackFromItem(item) {\n // Transform a TraceKit stackInfo object into a Rollbar trace\n var stack = item.stackInfo.stack;\n if (\n stack &&\n stack.length === 0 &&\n item._unhandledStackInfo &&\n item._unhandledStackInfo.stack\n ) {\n stack = item._unhandledStackInfo.stack;\n }\n return stack;\n}\n\nfunction addBodyTraceChain(item, options, callback) {\n var traceChain = item.stackInfo.traceChain;\n var traces = [];\n\n var traceChainLength = traceChain.length;\n for (var i = 0; i < traceChainLength; i++) {\n var trace = buildTrace(item, traceChain[i], options);\n traces.push(trace);\n }\n\n _.set(item, 'data.body', { trace_chain: traces });\n callback(null, item);\n}\n\nfunction addBodyTrace(item, options, callback) {\n var stack = stackFromItem(item);\n\n if (stack) {\n var trace = buildTrace(item, item.stackInfo, options);\n _.set(item, 'data.body', { trace: trace });\n callback(null, item);\n } else {\n var stackInfo = item.stackInfo;\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n\n item.message = className + ': ' + message;\n addBodyMessage(item, options, callback);\n }\n}\n\nfunction buildTrace(item, stackInfo, options) {\n var description = item && item.data.description;\n var custom = item && item.custom;\n var stack = stackFromItem(item);\n\n var guess = errorParser.guessErrorClass(stackInfo.message);\n var className = errorClass(stackInfo, guess[0], options);\n var message = guess[1];\n var trace = {\n exception: {\n class: className,\n message: message,\n },\n };\n\n if (description) {\n trace.exception.description = description;\n }\n\n if (stack) {\n if (stack.length === 0) {\n trace.exception.stack = stackInfo.rawStack;\n trace.exception.raw = String(stackInfo.rawException);\n }\n var stackFrame;\n var frame;\n var code;\n var pre;\n var post;\n var contextLength;\n var i, mid;\n\n trace.frames = [];\n for (i = 0; i < stack.length; ++i) {\n stackFrame = stack[i];\n frame = {\n filename: stackFrame.url ? _.sanitizeUrl(stackFrame.url) : '(unknown)',\n lineno: stackFrame.line || null,\n method:\n !stackFrame.func || stackFrame.func === '?'\n ? '[anonymous]'\n : stackFrame.func,\n colno: stackFrame.column,\n };\n if (options.sendFrameUrl) {\n frame.url = stackFrame.url;\n }\n if (\n frame.method &&\n frame.method.endsWith &&\n frame.method.endsWith('_rollbar_wrapped')\n ) {\n continue;\n }\n\n code = pre = post = null;\n contextLength = stackFrame.context ? stackFrame.context.length : 0;\n if (contextLength) {\n mid = Math.floor(contextLength / 2);\n pre = stackFrame.context.slice(0, mid);\n code = stackFrame.context[mid];\n post = stackFrame.context.slice(mid);\n }\n\n if (code) {\n frame.code = code;\n }\n\n if (pre || post) {\n frame.context = {};\n if (pre && pre.length) {\n frame.context.pre = pre;\n }\n if (post && post.length) {\n frame.context.post = post;\n }\n }\n\n if (stackFrame.args) {\n frame.args = stackFrame.args;\n }\n\n trace.frames.push(frame);\n }\n\n // NOTE(cory): reverse the frames since rollbar.com expects the most recent call last\n trace.frames.reverse();\n\n if (custom) {\n trace.extra = _.merge(custom);\n }\n }\n\n return trace;\n}\n\nfunction errorClass(stackInfo, guess, options) {\n if (stackInfo.name) {\n return stackInfo.name;\n } else if (options.guessErrorClass) {\n return guess;\n } else {\n return '(unknown)';\n }\n}\n\nfunction addScrubber(scrubFn) {\n return function (item, options, callback) {\n if (scrubFn) {\n var scrubFields = options.scrubFields || [];\n var scrubPaths = options.scrubPaths || [];\n item.data = scrubFn(item.data, scrubFields, scrubPaths);\n }\n callback(null, item);\n };\n}\n\nmodule.exports = {\n handleDomException: handleDomException,\n handleItemWithError: handleItemWithError,\n ensureItemHasSomethingToSay: ensureItemHasSomethingToSay,\n addBaseInfo: addBaseInfo,\n addRequestInfo: addRequestInfo,\n addClientInfo: addClientInfo,\n addPluginInfo: addPluginInfo,\n addBody: addBody,\n addScrubber: addScrubber,\n};\n","'use strict';\n\nvar _ = require('../utility');\nvar makeFetchRequest = require('./transport/fetch');\nvar makeXhrRequest = require('./transport/xhr');\n\n/*\n * accessToken may be embedded in payload but that should not\n * be assumed\n *\n * options: {\n * hostname\n * protocol\n * path\n * port\n * method\n * transport ('xhr' | 'fetch')\n * }\n *\n * params is an object containing key/value pairs. These\n * will be appended to the path as 'key=value&key=value'\n *\n * payload is an unserialized object\n */\nfunction Transport(truncation) {\n this.truncation = truncation;\n}\n\nTransport.prototype.get = function (\n accessToken,\n options,\n params,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n _.addParamsAndAccessTokenToPath(accessToken, options, params);\n\n var method = 'GET';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n null,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\nTransport.prototype.post = function (\n accessToken,\n options,\n payload,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n if (!payload) {\n return callback(new Error('Cannot send empty request'));\n }\n\n var stringifyResult;\n if (this.truncation) {\n stringifyResult = this.truncation.truncate(payload);\n } else {\n stringifyResult = _.stringify(payload);\n }\n if (stringifyResult.error) {\n return callback(stringifyResult.error);\n }\n\n var writeData = stringifyResult.value;\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n writeData,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\nTransport.prototype.postJsonPayload = function (\n accessToken,\n options,\n jsonPayload,\n callback,\n requestFactory,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n var method = 'POST';\n var url = _.formatUrl(options);\n this._makeZoneRequest(\n accessToken,\n url,\n method,\n jsonPayload,\n callback,\n requestFactory,\n options.timeout,\n options.transport,\n );\n};\n\n// Wraps _makeRequest and if Angular 2+ Zone.js is detected, changes scope\n// so Angular change detection isn't triggered on each API call.\n// This is the equivalent of runOutsideAngular().\n//\nTransport.prototype._makeZoneRequest = function () {\n var gWindow =\n (typeof window != 'undefined' && window) ||\n (typeof self != 'undefined' && self);\n var currentZone = gWindow && gWindow.Zone && gWindow.Zone.current;\n var args = Array.prototype.slice.call(arguments);\n\n if (currentZone && currentZone._name === 'angular') {\n var rootZone = currentZone._parent;\n var self = this;\n rootZone.run(function () {\n self._makeRequest.apply(undefined, args);\n });\n } else {\n this._makeRequest.apply(undefined, args);\n }\n};\n\nTransport.prototype._makeRequest = function (\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n transport,\n) {\n if (typeof RollbarProxy !== 'undefined') {\n return _proxyRequest(data, callback);\n }\n\n if (transport === 'fetch') {\n makeFetchRequest(accessToken, url, method, data, callback, timeout);\n } else {\n makeXhrRequest(\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n );\n }\n};\n\n/* global RollbarProxy */\nfunction _proxyRequest(json, callback) {\n var rollbarProxy = new RollbarProxy();\n rollbarProxy.sendJsonPayload(\n json,\n function (_msg) {\n /* do nothing */\n }, // eslint-disable-line no-unused-vars\n function (err) {\n callback(new Error(err));\n },\n );\n}\n\nmodule.exports = Transport;\n","'use strict';\n\nvar logger = require('../logger');\nvar _ = require('../../utility');\n\nfunction makeFetchRequest(accessToken, url, method, data, callback, timeout) {\n var controller;\n var timeoutId;\n\n if (_.isFiniteNumber(timeout)) {\n controller = new AbortController();\n timeoutId = setTimeout(function () {\n controller.abort();\n }, timeout);\n }\n\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-Rollbar-Access-Token': accessToken,\n signal: controller && controller.signal,\n },\n body: data,\n })\n .then(function (response) {\n if (timeoutId) clearTimeout(timeoutId);\n return response.json();\n })\n .then(function (data) {\n callback(null, data);\n })\n .catch(function (error) {\n logger.error(error.message);\n callback(error);\n });\n}\n\nmodule.exports = makeFetchRequest;\n","'use strict';\n\n/*global XDomainRequest*/\n\nvar _ = require('../../utility');\nvar logger = require('../logger');\n\nfunction makeXhrRequest(\n accessToken,\n url,\n method,\n data,\n callback,\n requestFactory,\n timeout,\n) {\n var request;\n if (requestFactory) {\n request = requestFactory();\n } else {\n request = _createXMLHTTPObject();\n }\n if (!request) {\n // Give up, no way to send requests\n return callback(new Error('No way to send a request'));\n }\n try {\n try {\n var onreadystatechange = function () {\n try {\n if (onreadystatechange && request.readyState === 4) {\n onreadystatechange = undefined;\n\n var parseResponse = _.jsonParse(request.responseText);\n if (_isSuccess(request)) {\n callback(parseResponse.error, parseResponse.value);\n return;\n } else if (_isNormalFailure(request)) {\n if (request.status === 403) {\n // likely caused by using a server access token\n var message =\n 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 =\n 'XHR response had no status code (likely connection failure)';\n callback(_newRetriableError(msg));\n }\n }\n } catch (ex) {\n //jquery source mentions firefox may error out while accessing the\n //request members if there is a network error\n //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111\n var exc;\n if (ex && ex.stack) {\n exc = ex;\n } else {\n exc = new Error(ex);\n }\n callback(exc);\n }\n };\n\n request.open(method, url, true);\n if (request.setRequestHeader) {\n request.setRequestHeader('Content-Type', 'application/json');\n request.setRequestHeader('X-Rollbar-Access-Token', accessToken);\n }\n\n if (_.isFiniteNumber(timeout)) {\n request.timeout = timeout;\n }\n\n request.onreadystatechange = onreadystatechange;\n request.send(data);\n } catch (e1) {\n // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest\n if (typeof XDomainRequest !== 'undefined') {\n // 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(\n new Error(\n 'No window available during request, unknown environment',\n ),\n );\n }\n\n // If the current page is http, try and send over http\n if (\n window.location.href.substring(0, 5) === 'http:' &&\n url.substring(0, 5) === 'https'\n ) {\n url = 'http' + url.substring(5);\n }\n\n var xdomainrequest = new XDomainRequest();\n xdomainrequest.onprogress = function () {};\n xdomainrequest.ontimeout = function () {\n var msg = 'Request timed out';\n var code = 'ETIMEDOUT';\n callback(_newRetriableError(msg, code));\n };\n xdomainrequest.onerror = function () {\n callback(new Error('Error during request'));\n };\n xdomainrequest.onload = function () {\n var parseResponse = _.jsonParse(xdomainrequest.responseText);\n callback(parseResponse.error, parseResponse.value);\n };\n xdomainrequest.open(method, url, true);\n xdomainrequest.send(data);\n } else {\n callback(new Error('Cannot find a method to transport a request'));\n }\n }\n } catch (e2) {\n callback(e2);\n }\n}\n\nfunction _createXMLHTTPObject() {\n /* global ActiveXObject:false */\n\n var factories = [\n function () {\n return new XMLHttpRequest();\n },\n function () {\n return new ActiveXObject('Msxml2.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Msxml3.XMLHTTP');\n },\n function () {\n return new ActiveXObject('Microsoft.XMLHTTP');\n },\n ];\n var xmlhttp;\n var i;\n var numFactories = factories.length;\n for (i = 0; i < numFactories; i++) {\n /* eslint-disable no-empty */\n try {\n xmlhttp = factories[i]();\n break;\n } catch (e) {\n // pass\n }\n /* eslint-enable no-empty */\n }\n return xmlhttp;\n}\n\nfunction _isSuccess(r) {\n return r && r.status && r.status === 200;\n}\n\nfunction _isNormalFailure(r) {\n return r && _.isType(r.status, 'number') && r.status >= 400 && r.status < 600;\n}\n\nfunction _newRetriableError(message, code) {\n var err = new Error(message);\n err.code = code || 'ENOTFOUND';\n return err;\n}\n\nmodule.exports = makeXhrRequest;\n","'use strict';\n\n// See https://nodejs.org/docs/latest/api/url.html\nfunction parse(url) {\n var result = {\n protocol: null,\n auth: null,\n host: null,\n path: null,\n hash: null,\n href: url,\n hostname: null,\n port: null,\n pathname: null,\n search: null,\n query: null,\n };\n\n var i, last;\n i = url.indexOf('//');\n if (i !== -1) {\n result.protocol = url.substring(0, i);\n last = i + 2;\n } else {\n last = 0;\n }\n\n i = url.indexOf('@', last);\n if (i !== -1) {\n result.auth = url.substring(last, i);\n last = i + 1;\n }\n\n i = url.indexOf('/', last);\n if (i === -1) {\n i = url.indexOf('?', last);\n if (i === -1) {\n i = url.indexOf('#', last);\n if (i === -1) {\n result.host = url.substring(last);\n } else {\n result.host = url.substring(last, i);\n result.hash = url.substring(i);\n }\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n return result;\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n } else {\n result.host = url.substring(last, i);\n result.hostname = result.host.split(':')[0];\n result.port = result.host.split(':')[1];\n if (result.port) {\n result.port = parseInt(result.port, 10);\n }\n last = i;\n }\n\n i = url.indexOf('#', last);\n if (i === -1) {\n result.path = url.substring(last);\n } else {\n result.path = url.substring(last, i);\n result.hash = url.substring(i);\n }\n\n if (result.path) {\n var pathParts = result.path.split('?');\n result.pathname = pathParts[0];\n result.query = pathParts[1];\n result.search = result.query ? '?' + result.query : null;\n }\n return result;\n}\n\nmodule.exports = {\n parse: parse,\n};\n","'use strict';\n\nfunction wrapGlobals(window, handler, shim) {\n if (!window) {\n return;\n }\n // Adapted from https://github.com/bugsnag/bugsnag-js\n var globals =\n '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 ',',\n );\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 (\n prototype.hasOwnProperty &&\n prototype.hasOwnProperty('addEventListener')\n ) {\n var oldAddEventListener = prototype.addEventListener;\n while (\n oldAddEventListener._rollbarOldAdd &&\n oldAddEventListener.belongsToShim\n ) {\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 (\n oldRemoveEventListener._rollbarOldRemove &&\n oldRemoveEventListener.belongsToShim\n ) {\n oldRemoveEventListener = oldRemoveEventListener._rollbarOldRemove;\n }\n var removeFn = function (event, callback, bubble) {\n oldRemoveEventListener.call(\n this,\n event,\n (callback && callback._rollbar_wrapped) || callback,\n bubble,\n );\n };\n removeFn._rollbarOldRemove = oldRemoveEventListener;\n removeFn.belongsToShim = shim;\n prototype.removeEventListener = removeFn;\n }\n}\n\nmodule.exports = wrapGlobals;\n","'use strict';\n\nmodule.exports = {\n version: '2.26.4',\n endpoint: 'api.rollbar.com/api/1/item/',\n logLevel: 'debug',\n reportLevel: 'debug',\n uncaughtErrorLevel: 'error',\n maxItems: 0,\n itemsPerMin: 60,\n};\n","'use strict';\n\nvar ErrorStackParser = require('error-stack-parser');\n\nvar UNKNOWN_FUNCTION = '?';\nvar ERR_CLASS_REGEXP = new RegExp(\n '^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ',\n);\n\nfunction guessFunctionName() {\n return UNKNOWN_FUNCTION;\n}\n\nfunction gatherContext() {\n return null;\n}\n\nfunction Frame(stackFrame) {\n var data = {};\n\n data._stackFrame = stackFrame;\n\n data.url = stackFrame.fileName;\n data.line = stackFrame.lineNumber;\n data.func = stackFrame.functionName;\n data.column = stackFrame.columnNumber;\n data.args = stackFrame.args;\n\n data.context = gatherContext();\n\n return data;\n}\n\nfunction Stack(exception, skip) {\n function getStack() {\n var parserStack = [];\n\n skip = skip || 0;\n\n try {\n parserStack = ErrorStackParser.parse(exception);\n } catch (e) {\n parserStack = [];\n }\n\n var stack = [];\n\n for (var i = skip; i < parserStack.length; i++) {\n stack.push(new Frame(parserStack[i]));\n }\n\n return stack;\n }\n\n return {\n stack: getStack(),\n message: exception.message,\n name: _mostSpecificErrorName(exception),\n rawStack: exception.stack,\n rawException: exception,\n };\n}\n\nfunction parse(e, skip) {\n var err = e;\n\n if (err.nested || err.cause) {\n var traceChain = [];\n while (err) {\n traceChain.push(new Stack(err, skip));\n err = err.nested || err.cause;\n\n skip = 0; // Only apply skip value to primary error\n }\n\n // Return primary error with full trace chain attached.\n traceChain[0].traceChain = traceChain;\n return traceChain[0];\n } else {\n return new Stack(err, skip);\n }\n}\n\nfunction guessErrorClass(errMsg) {\n if (!errMsg || !errMsg.match) {\n return ['Unknown error. There was no error message to display.', ''];\n }\n var errClassMatch = errMsg.match(ERR_CLASS_REGEXP);\n var errClass = '(unknown)';\n\n if (errClassMatch) {\n errClass = errClassMatch[errClassMatch.length - 1];\n errMsg = errMsg.replace(\n (errClassMatch[errClassMatch.length - 2] || '') + errClass + ':',\n '',\n );\n errMsg = errMsg.replace(/(^[\\s]+|[\\s]+$)/g, '');\n }\n return [errClass, errMsg];\n}\n\n// * Prefers any value over an empty string\n// * Prefers any value over 'Error' where possible\n// * Prefers name over constructor.name when both are more specific than 'Error'\nfunction _mostSpecificErrorName(error) {\n var name = error.name && error.name.length && error.name;\n var constructorName =\n error.constructor.name &&\n error.constructor.name.length &&\n error.constructor.name;\n\n if (!name || !constructorName) {\n return name || constructorName;\n }\n\n if (name === 'Error') {\n return constructorName;\n }\n return name;\n}\n\nmodule.exports = {\n guessFunctionName: guessFunctionName,\n guessErrorClass: guessErrorClass,\n gatherContext: gatherContext,\n parse: parse,\n Stack: Stack,\n Frame: Frame,\n};\n","'use strict';\n\n'use strict';\n\nvar hasOwn = Object.prototype.hasOwnProperty;\nvar toStr = Object.prototype.toString;\n\nvar isPlainObject = function isPlainObject(obj) {\n if (!obj || toStr.call(obj) !== '[object Object]') {\n return false;\n }\n\n var hasOwnConstructor = hasOwn.call(obj, 'constructor');\n var hasIsPrototypeOf =\n obj.constructor &&\n obj.constructor.prototype &&\n hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');\n // Not own constructor property must be Object\n if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\n return false;\n }\n\n // Own properties are enumerated firstly, so to speed up,\n // if last one is own, then all properties are own.\n var key;\n for (key in obj) {\n /**/\n }\n\n return typeof key === 'undefined' || hasOwn.call(obj, key);\n};\n\nfunction merge() {\n var i,\n src,\n copy,\n clone,\n name,\n result = {},\n current = null,\n length = arguments.length;\n\n for (i = 0; i < length; i++) {\n current = arguments[i];\n if (current == null) {\n continue;\n }\n\n for (name in current) {\n src = result[name];\n copy = current[name];\n if (result !== copy) {\n if (copy && isPlainObject(copy)) {\n clone = src && isPlainObject(src) ? src : {};\n result[name] = merge(clone, copy);\n } else if (typeof copy !== 'undefined') {\n result[name] = copy;\n }\n }\n }\n }\n return result;\n}\n\nmodule.exports = merge;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Notifier - the internal object responsible for delegating between the client exposed API, the\n * chain of transforms necessary to turn an item into something that can be sent to Rollbar, and the\n * queue which handles the communcation with the Rollbar API servers.\n *\n * @param queue - an object that conforms to the interface: addItem(item, callback)\n * @param options - an object representing the options to be set for this notifier, this should have\n * any defaults already set by the caller\n */\nfunction Notifier(queue, options) {\n this.queue = queue;\n this.options = options;\n this.transforms = [];\n this.diagnostic = {};\n}\n\n/*\n * configure - updates the options for this notifier with the passed in object\n *\n * @param options - an object which gets merged with the current options set on this notifier\n * @returns this\n */\nNotifier.prototype.configure = function (options) {\n this.queue && this.queue.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addTransform - adds a transform onto the end of the queue of transforms for this notifier\n *\n * @param transform - a function which takes three arguments:\n * * item: An Object representing the data to eventually be sent to Rollbar\n * * options: The current value of the options for this notifier\n * * callback: function(err: (Null|Error), item: (Null|Object)) the transform must call this\n * callback with a null value for error if it wants the processing chain to continue, otherwise\n * with an error to terminate the processing. The item should be the updated item after this\n * transform is finished modifying it.\n */\nNotifier.prototype.addTransform = function (transform) {\n if (_.isFunction(transform)) {\n this.transforms.push(transform);\n }\n return this;\n};\n\n/*\n * log - the internal log function which applies the configured transforms and then pushes onto the\n * queue to be sent to the backend.\n *\n * @param item - An object with the following structure:\n * message [String] - An optional string to be sent to rollbar\n * error [Error] - An optional error\n *\n * @param callback - A function of type function(err, resp) which will be called with exactly one\n * null argument and one non-null argument. The callback will be called once, either during the\n * transform stage if an error occurs inside a transform, or in response to the communication with\n * the backend. The second argument will be the response from the backend in case of success.\n */\nNotifier.prototype.log = function (item, callback) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {};\n }\n\n if (!this.options.enabled) {\n return callback(new Error('Rollbar is not enabled'));\n }\n\n this.queue.addPendingItem(item);\n var originalError = item.err;\n this._applyTransforms(\n item,\n 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\n/* Internal */\n\n/*\n * _applyTransforms - Applies the transforms that have been added to this notifier sequentially. See\n * `addTransform` for more information.\n *\n * @param item - An item to be transformed\n * @param callback - A function of type function(err, item) which will be called with a non-null\n * error and a null item in the case of a transform failure, or a null error and non-null item after\n * all transforms have been applied.\n */\nNotifier.prototype._applyTransforms = function (item, callback) {\n var transformIndex = -1;\n var transformsLength = this.transforms.length;\n var transforms = this.transforms;\n var options = this.options;\n\n var cb = function (err, i) {\n if (err) {\n callback(err, null);\n return;\n }\n\n transformIndex++;\n\n if (transformIndex === transformsLength) {\n callback(null, i);\n return;\n }\n\n transforms[transformIndex](i, options, cb);\n };\n\n cb(null, item);\n};\n\nmodule.exports = Notifier;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction checkLevel(item, settings) {\n var level = item.level;\n var levelVal = _.LEVELS[level] || 0;\n var reportLevel = settings.reportLevel;\n var reportLevelVal = _.LEVELS[reportLevel] || 0;\n\n if (levelVal < reportLevelVal) {\n return false;\n }\n return true;\n}\n\nfunction userCheckIgnore(logger) {\n return function (item, settings) {\n var isUncaught = !!item._isUncaught;\n delete item._isUncaught;\n var args = item._originalArgs;\n delete item._originalArgs;\n try {\n if (_.isFunction(settings.onSendCallback)) {\n settings.onSendCallback(isUncaught, args, item);\n }\n } catch (e) {\n settings.onSendCallback = null;\n logger.error('Error while calling onSendCallback, removing', e);\n }\n try {\n if (\n _.isFunction(settings.checkIgnore) &&\n settings.checkIgnore(isUncaught, args, item)\n ) {\n return false;\n }\n } catch (e) {\n settings.checkIgnore = null;\n logger.error('Error while calling custom checkIgnore(), removing', e);\n }\n return true;\n };\n}\n\nfunction urlIsNotBlockListed(logger) {\n return function (item, settings) {\n return !urlIsOnAList(item, settings, 'blocklist', logger);\n };\n}\n\nfunction urlIsSafeListed(logger) {\n return function (item, settings) {\n return urlIsOnAList(item, settings, 'safelist', logger);\n };\n}\n\nfunction matchFrames(trace, list, block) {\n if (!trace) {\n return !block;\n }\n\n var frames = trace.frames;\n\n if (!frames || frames.length === 0) {\n return !block;\n }\n\n var frame, filename, url, urlRegex;\n var listLength = list.length;\n var frameLength = frames.length;\n for (var i = 0; i < frameLength; i++) {\n frame = frames[i];\n filename = frame.filename;\n\n if (!_.isType(filename, 'string')) {\n return !block;\n }\n\n for (var j = 0; j < listLength; j++) {\n url = list[j];\n urlRegex = new RegExp(url);\n\n if (urlRegex.test(filename)) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction urlIsOnAList(item, settings, safeOrBlock, logger) {\n // safelist is the default\n var block = false;\n if (safeOrBlock === 'blocklist') {\n block = true;\n }\n\n var list, traces;\n try {\n list = block ? settings.hostBlockList : settings.hostSafeList;\n traces = _.get(item, 'body.trace_chain') || [_.get(item, 'body.trace')];\n\n // These two checks are important to come first as they are defaults\n // in case the list is missing or the trace is missing or not well-formed\n if (!list || list.length === 0) {\n return !block;\n }\n if (traces.length === 0 || !traces[0]) {\n return !block;\n }\n\n var tracesLength = traces.length;\n for (var i = 0; i < tracesLength; i++) {\n if (matchFrames(traces[i], list, block)) {\n return true;\n }\n }\n } catch (\n e\n /* istanbul ignore next */\n ) {\n if (block) {\n settings.hostBlockList = null;\n } else {\n settings.hostSafeList = null;\n }\n var listName = block ? 'hostBlockList' : 'hostSafeList';\n logger.error(\n \"Error while reading your configuration's \" +\n listName +\n ' option. Removing custom ' +\n listName +\n '.',\n e,\n );\n return !block;\n }\n return false;\n}\n\nfunction messageIsIgnored(logger) {\n return function (item, settings) {\n var i, j, ignoredMessages, len, messageIsIgnored, rIgnoredMessage, messages;\n\n try {\n messageIsIgnored = false;\n ignoredMessages = settings.ignoredMessages;\n\n if (!ignoredMessages || ignoredMessages.length === 0) {\n return true;\n }\n\n messages = messagesFromItem(item);\n\n if (messages.length === 0) {\n return true;\n }\n\n len = ignoredMessages.length;\n for (i = 0; i < len; i++) {\n rIgnoredMessage = new RegExp(ignoredMessages[i], 'gi');\n\n for (j = 0; j < messages.length; j++) {\n messageIsIgnored = rIgnoredMessage.test(messages[j]);\n\n if (messageIsIgnored) {\n return false;\n }\n }\n }\n } catch (\n e\n /* istanbul ignore next */\n ) {\n settings.ignoredMessages = null;\n logger.error(\n \"Error while reading your configuration's ignoredMessages option. Removing custom ignoredMessages.\",\n );\n }\n\n return true;\n };\n}\n\nfunction messagesFromItem(item) {\n var body = item.body;\n var messages = [];\n\n // The payload schema only allows one of trace_chain, message, or trace.\n // However, existing test cases are based on having both trace and message present.\n // So here we preserve the ability to collect strings from any combination of these keys.\n if (body.trace_chain) {\n var traceChain = body.trace_chain;\n for (var i = 0; i < traceChain.length; i++) {\n var trace = traceChain[i];\n messages.push(_.get(trace, 'exception.message'));\n }\n }\n if (body.trace) {\n messages.push(_.get(body, 'trace.exception.message'));\n }\n if (body.message) {\n messages.push(_.get(body, 'message.body'));\n }\n return messages;\n}\n\nmodule.exports = {\n checkLevel: checkLevel,\n userCheckIgnore: userCheckIgnore,\n urlIsNotBlockListed: urlIsNotBlockListed,\n urlIsSafeListed: urlIsSafeListed,\n messageIsIgnored: messageIsIgnored,\n};\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * Queue - an object which handles which handles a queue of items to be sent to Rollbar.\n * This object handles rate limiting via a passed in rate limiter, retries based on connection\n * errors, and filtering of items based on a set of configurable predicates. The communication to\n * the backend is performed via a given API object.\n *\n * @param rateLimiter - An object which conforms to the interface\n * rateLimiter.shouldSend(item) -> bool\n * @param api - An object which conforms to the interface\n * api.postItem(payload, function(err, response))\n * @param logger - An object used to log verbose messages if desired\n * @param options - see Queue.prototype.configure\n */\nfunction Queue(rateLimiter, api, logger, options) {\n this.rateLimiter = rateLimiter;\n this.api = api;\n this.logger = logger;\n this.options = options;\n this.predicates = [];\n this.pendingItems = [];\n this.pendingRequests = [];\n this.retryQueue = [];\n this.retryHandle = null;\n this.waitCallback = null;\n this.waitIntervalID = null;\n}\n\n/*\n * configure - updates the options this queue uses\n *\n * @param options\n */\nQueue.prototype.configure = function (options) {\n this.api && this.api.configure(options);\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n return this;\n};\n\n/*\n * addPredicate - adds a predicate to the end of the list of predicates for this queue\n *\n * @param predicate - function(item, options) -> (bool|{err: Error})\n * Returning true means that this predicate passes and the item is okay to go on the queue\n * Returning false means do not add the item to the queue, but it is not an error\n * Returning {err: Error} means do not add the item to the queue, and the given error explains why\n * Returning {err: undefined} is equivalent to returning true but don't do that\n */\nQueue.prototype.addPredicate = function (predicate) {\n if (_.isFunction(predicate)) {\n this.predicates.push(predicate);\n }\n return this;\n};\n\nQueue.prototype.addPendingItem = function (item) {\n this.pendingItems.push(item);\n};\n\nQueue.prototype.removePendingItem = function (item) {\n var idx = this.pendingItems.indexOf(item);\n if (idx !== -1) {\n this.pendingItems.splice(idx, 1);\n }\n};\n\n/*\n * addItem - Send an item to the Rollbar API if all of the predicates are satisfied\n *\n * @param item - The payload to send to the backend\n * @param callback - function(error, repsonse) which will be called with the response from the API\n * in the case of a success, otherwise response will be null and error will have a value. If both\n * error and response are null then the item was stopped by a predicate which did not consider this\n * to be an error condition, but nonetheless did not send the item to the API.\n * @param originalError - The original error before any transformations that is to be logged if any\n */\nQueue.prototype.addItem = function (\n item,\n callback,\n originalError,\n originalItem,\n) {\n if (!callback || !_.isFunction(callback)) {\n callback = function () {\n return;\n };\n }\n var predicateResult = this._applyPredicates(item);\n if (predicateResult.stop) {\n this.removePendingItem(originalItem);\n callback(predicateResult.err);\n return;\n }\n this._maybeLog(item, originalError);\n this.removePendingItem(originalItem);\n if (!this.options.transmit) {\n callback(new Error('Transmit disabled'));\n return;\n }\n this.pendingRequests.push(item);\n try {\n this._makeApiRequest(\n item,\n function (err, resp) {\n this._dequeuePendingRequest(item);\n callback(err, resp);\n }.bind(this),\n );\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(\n function () {\n this._maybeCallWait();\n }.bind(this),\n 500,\n );\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(\n item,\n function (err, resp) {\n if (err) {\n this._maybeRetry(err, item, callback);\n } else {\n callback(err, resp);\n }\n }.bind(this),\n );\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 = [\n 'ECONNRESET',\n 'ENOTFOUND',\n 'ESOCKETTIMEDOUT',\n 'ETIMEDOUT',\n 'ECONNREFUSED',\n 'EHOSTUNREACH',\n 'EPIPE',\n 'EAI_AGAIN',\n];\n\n/*\n * _maybeRetry - Given the error returned by the API, decide if we should retry or just callback\n * with the error.\n *\n * @param err - an error returned by the API transport\n * @param item - the item that was trying to be sent when this error occured\n * @param callback - function(err, response)\n */\nQueue.prototype._maybeRetry = function (err, item, callback) {\n var shouldRetry = false;\n if (this.options.retryInterval) {\n for (var i = 0, len = RETRIABLE_ERRORS.length; i < len; i++) {\n if (err.code === RETRIABLE_ERRORS[i]) {\n shouldRetry = true;\n break;\n }\n }\n if (shouldRetry && _.isFiniteNumber(this.options.maxRetries)) {\n item.retries = item.retries ? item.retries + 1 : 1;\n if (item.retries > this.options.maxRetries) {\n shouldRetry = false;\n }\n }\n }\n if (shouldRetry) {\n this._retryApiRequest(item, callback);\n } else {\n callback(err);\n }\n};\n\n/*\n * _retryApiRequest - Add an item and a callback to a queue and possibly start a timer to process\n * that queue based on the retryInterval in the options for this queue.\n *\n * @param item - an item that failed to send due to an error we deem retriable\n * @param callback - function(err, response)\n */\nQueue.prototype._retryApiRequest = function (item, callback) {\n this.retryQueue.push({ item: item, callback: callback });\n\n if (!this.retryHandle) {\n this.retryHandle = setInterval(\n function () {\n while (this.retryQueue.length) {\n var retryObject = this.retryQueue.shift();\n this._makeApiRequest(retryObject.item, retryObject.callback);\n }\n }.bind(this),\n this.options.retryInterval,\n );\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 (\n _.isFunction(this.waitCallback) &&\n this.pendingItems.length === 0 &&\n this.pendingRequests.length === 0\n ) {\n if (this.waitIntervalID) {\n this.waitIntervalID = clearInterval(this.waitIntervalID);\n }\n this.waitCallback();\n return true;\n }\n return false;\n};\n\nmodule.exports = Queue;\n","'use strict';\n\nvar _ = require('./utility');\n\n/*\n * RateLimiter - an object that encapsulates the logic for counting items sent to Rollbar\n *\n * @param options - the same options that are accepted by configureGlobal offered as a convenience\n */\nfunction RateLimiter(options) {\n this.startTime = _.now();\n this.counter = 0;\n this.perMinCounter = 0;\n this.platform = null;\n this.platformOptions = {};\n this.configureGlobal(options);\n}\n\nRateLimiter.globalSettings = {\n startTime: _.now(),\n maxItems: undefined,\n itemsPerMinute: undefined,\n};\n\n/*\n * configureGlobal - set the global rate limiter options\n *\n * @param options - Only the following values are recognized:\n * startTime: a timestamp of the form returned by (new Date()).getTime()\n * maxItems: the maximum items\n * itemsPerMinute: the max number of items to send in a given minute\n */\nRateLimiter.prototype.configureGlobal = function (options) {\n if (options.startTime !== undefined) {\n RateLimiter.globalSettings.startTime = options.startTime;\n }\n if (options.maxItems !== undefined) {\n RateLimiter.globalSettings.maxItems = options.maxItems;\n }\n if (options.itemsPerMinute !== undefined) {\n RateLimiter.globalSettings.itemsPerMinute = options.itemsPerMinute;\n }\n};\n\n/*\n * shouldSend - determine if we should send a given item based on rate limit settings\n *\n * @param item - the item we are about to send\n * @returns An object with the following structure:\n * error: (Error|null)\n * shouldSend: bool\n * payload: (Object|null)\n * If shouldSend is false, the item passed as a parameter should not be sent to Rollbar, and\n * exactly one of error or payload will be non-null. If error is non-null, the returned Error will\n * describe the situation, but it means that we were already over a rate limit (either globally or\n * per minute) when this item was checked. If error is null, and therefore payload is non-null, it\n * means this item put us over the global rate limit and the payload should be sent to Rollbar in\n * place of the passed in item.\n */\nRateLimiter.prototype.shouldSend = function (item, now) {\n now = now || _.now();\n var elapsedTime = now - this.startTime;\n if (elapsedTime < 0 || elapsedTime >= 60000) {\n this.startTime = now;\n this.perMinCounter = 0;\n }\n\n var globalRateLimit = RateLimiter.globalSettings.maxItems;\n var globalRateLimitPerMin = RateLimiter.globalSettings.itemsPerMinute;\n\n if (checkRate(item, globalRateLimit, this.counter)) {\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n globalRateLimit + ' max items reached',\n false,\n );\n } else if (checkRate(item, globalRateLimitPerMin, this.perMinCounter)) {\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n globalRateLimitPerMin + ' items per minute reached',\n false,\n );\n }\n this.counter++;\n this.perMinCounter++;\n\n var shouldSend = !checkRate(item, globalRateLimit, this.counter);\n var perMinute = shouldSend;\n shouldSend =\n shouldSend && !checkRate(item, globalRateLimitPerMin, this.perMinCounter);\n return shouldSendValue(\n this.platform,\n this.platformOptions,\n null,\n shouldSend,\n globalRateLimit,\n globalRateLimitPerMin,\n perMinute,\n );\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(\n platform,\n options,\n error,\n shouldSend,\n globalRateLimit,\n limitPerMin,\n perMinute,\n) {\n var payload = null;\n if (error) {\n error = new Error(error);\n }\n if (!error && !shouldSend) {\n payload = rateLimitPayload(\n platform,\n options,\n globalRateLimit,\n limitPerMin,\n perMinute,\n );\n }\n return { error: error, shouldSend: shouldSend, payload: payload };\n}\n\nfunction rateLimitPayload(\n platform,\n options,\n globalRateLimit,\n limitPerMin,\n perMinute,\n) {\n var environment =\n options.environment || (options.payload && options.payload.environment);\n var msg;\n if (perMinute) {\n msg = 'item per minute limit reached, ignoring errors until timeout';\n } else {\n msg = 'maxItems has been hit, ignoring errors until reset.';\n }\n var item = {\n body: {\n message: {\n body: msg,\n extra: {\n maxItems: globalRateLimit,\n itemsPerMinute: limitPerMin,\n },\n },\n },\n language: 'javascript',\n environment: environment,\n notifier: {\n version:\n (options.notifier && options.notifier.version) || options.version,\n },\n };\n if (platform === 'browser') {\n item.platform = 'browser';\n item.framework = 'browser-js';\n item.notifier.name = 'rollbar-browser-js';\n } else if (platform === 'server') {\n item.framework = options.framework || 'node-js';\n item.notifier.name = options.notifier.name;\n } else if (platform === 'react-native') {\n item.framework = options.framework || 'react-native';\n item.notifier.name = options.notifier.name;\n }\n return item;\n}\n\nmodule.exports = RateLimiter;\n","'use strict';\n\nvar RateLimiter = require('./rateLimiter');\nvar Queue = require('./queue');\nvar Notifier = require('./notifier');\nvar _ = require('./utility');\n\n/*\n * Rollbar - the interface to Rollbar\n *\n * @param options\n * @param api\n * @param logger\n */\nfunction Rollbar(options, api, logger, telemeter, platform) {\n this.options = _.merge(options);\n this.logger = logger;\n Rollbar.rateLimiter.configureGlobal(this.options);\n Rollbar.rateLimiter.setPlatformOptions(platform, this.options);\n this.api = api;\n this.queue = new Queue(Rollbar.rateLimiter, api, logger, this.options);\n\n // This must happen before the Notifier is created\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier = new Notifier(this.queue, this.options);\n this.telemeter = telemeter;\n setStackTraceLimit(options);\n this.lastError = null;\n this.lastErrorHash = 'none';\n}\n\nvar defaultOptions = {\n maxItems: 0,\n itemsPerMinute: 60,\n};\n\nRollbar.rateLimiter = new RateLimiter(defaultOptions);\n\nRollbar.prototype.global = function (options) {\n Rollbar.rateLimiter.configureGlobal(options);\n return this;\n};\n\nRollbar.prototype.configure = function (options, payloadData) {\n var oldOptions = this.options;\n var payload = {};\n if (payloadData) {\n payload = { payload: payloadData };\n }\n\n this.options = _.merge(oldOptions, options, payload);\n\n // This must happen before the Notifier is configured\n var tracer = this.options.tracer || null;\n if (validateTracer(tracer)) {\n this.tracer = tracer;\n // set to a string for api response serialization\n this.options.tracer = 'opentracing-tracer-enabled';\n this.options._configuredOptions.tracer = 'opentracing-tracer-enabled';\n } else {\n this.tracer = null;\n }\n\n this.notifier && this.notifier.configure(this.options);\n this.telemeter && this.telemeter.configure(this.options);\n setStackTraceLimit(options);\n this.global(this.options);\n\n if (validateTracer(options.tracer)) {\n this.tracer = options.tracer;\n }\n\n return this;\n};\n\nRollbar.prototype.log = function (item) {\n var level = this._defaultLogLevel();\n return this._log(level, item);\n};\n\nRollbar.prototype.debug = function (item) {\n this._log('debug', item);\n};\n\nRollbar.prototype.info = function (item) {\n this._log('info', item);\n};\n\nRollbar.prototype.warn = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.warning = function (item) {\n this._log('warning', item);\n};\n\nRollbar.prototype.error = function (item) {\n this._log('error', item);\n};\n\nRollbar.prototype.critical = function (item) {\n this._log('critical', item);\n};\n\nRollbar.prototype.wait = function (callback) {\n this.queue.wait(callback);\n};\n\nRollbar.prototype.captureEvent = function (type, metadata, level) {\n return this.telemeter && this.telemeter.captureEvent(type, metadata, level);\n};\n\nRollbar.prototype.captureDomContentLoaded = function (ts) {\n return this.telemeter && this.telemeter.captureDomContentLoaded(ts);\n};\n\nRollbar.prototype.captureLoad = function (ts) {\n return this.telemeter && this.telemeter.captureLoad(ts);\n};\n\nRollbar.prototype.buildJsonPayload = function (item) {\n return this.api.buildJsonPayload(item);\n};\n\nRollbar.prototype.sendJsonPayload = function (jsonPayload) {\n this.api.postJsonPayload(jsonPayload);\n};\n\n/* Internal */\n\nRollbar.prototype._log = function (defaultLevel, item) {\n var callback;\n if (item.callback) {\n callback = item.callback;\n delete item.callback;\n }\n if (this.options.ignoreDuplicateErrors && this._sameAsLastError(item)) {\n if (callback) {\n var error = new Error('ignored identical item');\n error.item = item;\n callback(error);\n }\n return;\n }\n try {\n this._addTracingInfo(item);\n item.level = item.level || defaultLevel;\n this.telemeter && this.telemeter._captureRollbarItem(item);\n item.telemetryEvents =\n (this.telemeter && this.telemeter.copyEvents()) || [];\n this.notifier.log(item, callback);\n } catch (e) {\n if (callback) {\n callback(e);\n }\n this.logger.error(e);\n }\n};\n\nRollbar.prototype._defaultLogLevel = function () {\n return this.options.logLevel || 'debug';\n};\n\nRollbar.prototype._sameAsLastError = function (item) {\n if (!item._isUncaught) {\n return false;\n }\n var itemHash = generateItemHash(item);\n if (this.lastErrorHash === itemHash) {\n return true;\n }\n this.lastError = item.err;\n this.lastErrorHash = itemHash;\n return false;\n};\n\nRollbar.prototype._addTracingInfo = function (item) {\n // Tracer validation occurs in the constructor\n // or in the Rollbar.prototype.configure methods\n if (this.tracer) {\n // add rollbar occurrence uuid to span\n var span = this.tracer.scope().active();\n\n if (validateSpan(span)) {\n span.setTag('rollbar.error_uuid', item.uuid);\n span.setTag('rollbar.has_error', true);\n span.setTag('error', true);\n span.setTag(\n 'rollbar.item_url',\n `https://rollbar.com/item/uuid/?uuid=${item.uuid}`,\n );\n span.setTag(\n 'rollbar.occurrence_url',\n `https://rollbar.com/occurrence/uuid/?uuid=${item.uuid}`,\n );\n\n // add span ID & trace ID to occurrence\n var opentracingSpanId = span.context().toSpanId();\n var opentracingTraceId = span.context().toTraceId();\n\n if (item.custom) {\n item.custom.opentracing_span_id = opentracingSpanId;\n item.custom.opentracing_trace_id = opentracingTraceId;\n } else {\n item.custom = {\n opentracing_span_id: opentracingSpanId,\n opentracing_trace_id: opentracingTraceId,\n };\n }\n }\n }\n};\n\nfunction generateItemHash(item) {\n var message = item.message || '';\n var stack = (item.err || {}).stack || String(item.err);\n return message + '::' + stack;\n}\n\n// Node.js, Chrome, Safari, and some other browsers support this property\n// which globally sets the number of stack frames returned in an Error object.\n// If a browser can't use it, no harm done.\nfunction setStackTraceLimit(options) {\n if (options.stackTraceLimit) {\n Error.stackTraceLimit = options.stackTraceLimit;\n }\n}\n\n/**\n * Validate the Tracer object provided to the Client\n * is valid for our Opentracing use case.\n * @param {opentracer.Tracer} tracer\n */\nfunction validateTracer(tracer) {\n if (!tracer) {\n return false;\n }\n\n if (!tracer.scope || typeof tracer.scope !== 'function') {\n return false;\n }\n\n var scope = tracer.scope();\n\n if (!scope || !scope.active || typeof scope.active !== 'function') {\n return false;\n }\n\n return true;\n}\n\n/**\n * Validate the Span object provided\n * @param {opentracer.Span} span\n */\nfunction validateSpan(span) {\n if (!span || !span.context || typeof span.context !== 'function') {\n return false;\n }\n\n var spanContext = span.context();\n\n if (\n !spanContext ||\n !spanContext.toSpanId ||\n !spanContext.toTraceId ||\n typeof spanContext.toSpanId !== 'function' ||\n typeof spanContext.toTraceId !== 'function'\n ) {\n return false;\n }\n\n return true;\n}\n\nmodule.exports = Rollbar;\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction scrub(data, scrubFields, scrubPaths) {\n scrubFields = scrubFields || [];\n\n if (scrubPaths) {\n for (var i = 0; i < scrubPaths.length; ++i) {\n scrubPath(data, scrubPaths[i]);\n }\n }\n\n var paramRes = _getScrubFieldRegexs(scrubFields);\n var queryRes = _getScrubQueryParamRegexs(scrubFields);\n\n function redactQueryParam(dummy0, paramPart) {\n return paramPart + _.redact();\n }\n\n function paramScrubber(v) {\n var i;\n if (_.isType(v, 'string')) {\n for (i = 0; i < queryRes.length; ++i) {\n v = v.replace(queryRes[i], redactQueryParam);\n }\n }\n return v;\n }\n\n function valScrubber(k, v) {\n var i;\n for (i = 0; i < paramRes.length; ++i) {\n if (paramRes[i].test(k)) {\n v = _.redact();\n break;\n }\n }\n return v;\n }\n\n function scrubber(k, v, seen) {\n var tmpV = valScrubber(k, v);\n if (tmpV === v) {\n if (_.isType(v, 'object') || _.isType(v, 'array')) {\n return traverse(v, scrubber, seen);\n }\n return paramScrubber(tmpV);\n } else {\n return tmpV;\n }\n }\n\n return traverse(data, scrubber);\n}\n\nfunction scrubPath(obj, path) {\n var keys = path.split('.');\n var last = keys.length - 1;\n try {\n for (var i = 0; i <= last; ++i) {\n if (i < last) {\n obj = obj[keys[i]];\n } else {\n obj[keys[i]] = _.redact();\n }\n }\n } catch (e) {\n // Missing key is OK;\n }\n}\n\nfunction _getScrubFieldRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '^\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?$';\n ret.push(new RegExp(pat, 'i'));\n }\n return ret;\n}\n\nfunction _getScrubQueryParamRegexs(scrubFields) {\n var ret = [];\n var pat;\n for (var i = 0; i < scrubFields.length; ++i) {\n pat = '\\\\[?(%5[bB])?' + scrubFields[i] + '\\\\[?(%5[bB])?\\\\]?(%5[dD])?';\n ret.push(new RegExp('(' + pat + '=)([^&\\\\n]+)', 'igm'));\n }\n return ret;\n}\n\nmodule.exports = scrub;\n","'use strict';\n\nvar _ = require('./utility');\n\nvar MAX_EVENTS = 100;\n\nfunction Telemeter(options) {\n this.queue = [];\n this.options = _.merge(options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n this.maxQueueSize = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n}\n\nTelemeter.prototype.configure = function (options) {\n var oldOptions = this.options;\n this.options = _.merge(oldOptions, options);\n var maxTelemetryEvents = this.options.maxTelemetryEvents || MAX_EVENTS;\n var newMaxEvents = Math.max(0, Math.min(maxTelemetryEvents, MAX_EVENTS));\n var deleteCount = 0;\n if (this.queue.length > newMaxEvents) {\n deleteCount = this.queue.length - newMaxEvents;\n }\n this.maxQueueSize = newMaxEvents;\n this.queue.splice(0, deleteCount);\n};\n\nTelemeter.prototype.copyEvents = function () {\n var events = Array.prototype.slice.call(this.queue, 0);\n if (_.isFunction(this.options.filterTelemetry)) {\n try {\n var i = events.length;\n while (i--) {\n if (this.options.filterTelemetry(events[i])) {\n events.splice(i, 1);\n }\n }\n } catch (e) {\n this.options.filterTelemetry = null;\n }\n }\n return events;\n};\n\nTelemeter.prototype.capture = function (\n type,\n metadata,\n level,\n rollbarUUID,\n timestamp,\n) {\n var e = {\n level: getLevel(type, level),\n type: type,\n timestamp_ms: timestamp || _.now(),\n body: metadata,\n source: 'client',\n };\n if (rollbarUUID) {\n e.uuid = rollbarUUID;\n }\n\n try {\n if (\n _.isFunction(this.options.filterTelemetry) &&\n this.options.filterTelemetry(e)\n ) {\n return false;\n }\n } catch (exc) {\n this.options.filterTelemetry = null;\n }\n\n this.push(e);\n return e;\n};\n\nTelemeter.prototype.captureEvent = function (\n type,\n metadata,\n level,\n rollbarUUID,\n) {\n return this.capture(type, metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.captureError = function (\n err,\n level,\n rollbarUUID,\n timestamp,\n) {\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 (\n message,\n level,\n rollbarUUID,\n timestamp,\n) {\n return this.capture(\n 'log',\n {\n message: message,\n },\n level,\n rollbarUUID,\n timestamp,\n );\n};\n\nTelemeter.prototype.captureNetwork = function (\n metadata,\n subtype,\n rollbarUUID,\n requestData,\n) {\n subtype = subtype || 'xhr';\n metadata.subtype = metadata.subtype || subtype;\n if (requestData) {\n metadata.request = requestData;\n }\n var level = this.levelFromStatus(metadata.status_code);\n return this.capture('network', metadata, level, rollbarUUID);\n};\n\nTelemeter.prototype.levelFromStatus = function (statusCode) {\n if (statusCode >= 200 && statusCode < 400) {\n return 'info';\n }\n if (statusCode === 0 || statusCode >= 400) {\n return 'error';\n }\n return 'info';\n};\n\nTelemeter.prototype.captureDom = function (\n subtype,\n element,\n value,\n checked,\n rollbarUUID,\n) {\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(\n 'navigation',\n { from: from, to: to },\n 'info',\n rollbarUUID,\n );\n};\n\nTelemeter.prototype.captureDomContentLoaded = function (ts) {\n return this.capture(\n 'navigation',\n { subtype: 'DOMContentLoaded' },\n 'info',\n undefined,\n ts && ts.getTime(),\n );\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(\n 'navigation',\n { subtype: 'load' },\n 'info',\n undefined,\n ts && ts.getTime(),\n );\n /**\n * If we decide to make this a dom event instead, then use the line below:\n return this.capture('dom', {subtype: 'load'}, 'info', undefined, ts && ts.getTime());\n */\n};\n\nTelemeter.prototype.captureConnectivityChange = function (type, rollbarUUID) {\n return this.captureNetwork({ change: type }, 'connectivity', rollbarUUID);\n};\n\n// Only intended to be used internally by the notifier\nTelemeter.prototype._captureRollbarItem = function (item) {\n if (!this.options.includeItemsInTelemetry) {\n return;\n }\n if (item.err) {\n return this.captureError(item.err, item.level, item.uuid, item.timestamp);\n }\n if (item.message) {\n return this.captureLog(item.message, item.level, item.uuid, item.timestamp);\n }\n if (item.custom) {\n return this.capture(\n 'log',\n item.custom,\n item.level,\n item.uuid,\n item.timestamp,\n );\n }\n};\n\nTelemeter.prototype.push = function (e) {\n this.queue.push(e);\n if (this.queue.length > this.maxQueueSize) {\n this.queue.shift();\n }\n};\n\nfunction getLevel(type, level) {\n if (level) {\n return level;\n }\n var defaultLevel = {\n error: 'error',\n manual: 'info',\n };\n return defaultLevel[type] || 'info';\n}\n\nmodule.exports = Telemeter;\n","'use strict';\n\nvar _ = require('./utility');\n\nfunction itemToPayload(item, options, callback) {\n var data = item.data;\n\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 addPayloadOptions(item, options, callback) {\n var payloadOptions = options.payload || {};\n if (payloadOptions.body) {\n delete payloadOptions.body;\n }\n\n item.data = _.merge(item.data, payloadOptions);\n callback(null, item);\n}\n\nfunction addTelemetryData(item, options, callback) {\n if (item.telemetryEvents) {\n _.set(item, 'data.body.telemetry', item.telemetryEvents);\n }\n callback(null, item);\n}\n\nfunction addMessageWithError(item, options, callback) {\n if (!item.message) {\n callback(null, item);\n return;\n }\n var tracePath = 'data.body.trace_chain.0';\n var trace = _.get(item, tracePath);\n if (!trace) {\n tracePath = 'data.body.trace';\n trace = _.get(item, tracePath);\n }\n if (trace) {\n if (!(trace.exception && trace.exception.description)) {\n _.set(item, tracePath + '.exception.description', item.message);\n callback(null, item);\n return;\n }\n var extra = _.get(item, tracePath + '.extra') || {};\n var newExtra = _.merge(extra, { message: item.message });\n _.set(item, tracePath + '.extra', newExtra);\n }\n callback(null, item);\n}\n\nfunction userTransform(logger) {\n return function (item, options, callback) {\n var newItem = _.merge(item);\n var response = null;\n try {\n if (_.isFunction(options.transform)) {\n response = options.transform(newItem.data, item);\n }\n } catch (e) {\n options.transform = null;\n logger.error(\n 'Error while calling custom transform() function. Removing custom transform().',\n e,\n );\n callback(null, item);\n return;\n }\n if (_.isPromise(response)) {\n response.then(\n function (promisedItem) {\n if (promisedItem) {\n newItem.data = promisedItem;\n }\n callback(null, newItem);\n },\n function (error) {\n callback(error, item);\n },\n );\n } else {\n callback(null, newItem);\n }\n };\n}\n\nfunction addConfigToPayload(item, options, callback) {\n if (!options.sendConfig) {\n return callback(null, item);\n }\n var configKey = '_rollbarConfig';\n var custom = _.get(item, 'data.custom') || {};\n custom[configKey] = options;\n item.data.custom = custom;\n callback(null, item);\n}\n\nfunction addFunctionOption(options, name) {\n if (_.isFunction(options[name])) {\n options[name] = options[name].toString();\n }\n}\n\nfunction addConfiguredOptions(item, options, callback) {\n var configuredOptions = options._configuredOptions;\n\n // These must be stringified or they'll get dropped during serialization.\n addFunctionOption(configuredOptions, 'transform');\n addFunctionOption(configuredOptions, 'checkIgnore');\n addFunctionOption(configuredOptions, 'onSendCallback');\n\n delete configuredOptions.accessToken;\n item.data.notifier.configured_options = configuredOptions;\n callback(null, item);\n}\n\nfunction addDiagnosticKeys(item, options, callback) {\n var diagnostic = _.merge(\n item.notifier.client.notifier.diagnostic,\n item.diagnostic,\n );\n\n if (_.get(item, 'err._isAnonymous')) {\n diagnostic.is_anonymous = true;\n }\n\n if (item._isUncaught) {\n diagnostic.is_uncaught = item._isUncaught;\n }\n\n if (item.err) {\n try {\n diagnostic.raw_error = {\n message: item.err.message,\n name: item.err.name,\n constructor_name: item.err.constructor && item.err.constructor.name,\n filename: item.err.fileName,\n line: item.err.lineNumber,\n column: item.err.columnNumber,\n stack: item.err.stack,\n };\n } catch (e) {\n diagnostic.raw_error = { failed: String(e) };\n }\n }\n\n item.data.notifier.diagnostic = _.merge(\n item.data.notifier.diagnostic,\n diagnostic,\n );\n callback(null, item);\n}\n\nmodule.exports = {\n itemToPayload: itemToPayload,\n addPayloadOptions: addPayloadOptions,\n addTelemetryData: addTelemetryData,\n addMessageWithError: addMessageWithError,\n userTransform: userTransform,\n addConfigToPayload: addConfigToPayload,\n addConfiguredOptions: addConfiguredOptions,\n addDiagnosticKeys: addDiagnosticKeys,\n};\n","'use strict';\n\nvar _ = require('./utility');\nvar traverse = require('./utility/traverse');\n\nfunction raw(payload, jsonBackup) {\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction selectFrames(frames, range) {\n var len = frames.length;\n if (len > range * 2) {\n return frames.slice(0, range).concat(frames.slice(len - range));\n }\n return frames;\n}\n\nfunction truncateFrames(payload, jsonBackup, range) {\n range = typeof range === 'undefined' ? 30 : range;\n var body = payload.data.body;\n var frames;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n frames = chain[i].frames;\n frames = selectFrames(frames, range);\n chain[i].frames = frames;\n }\n } else if (body.trace) {\n frames = body.trace.frames;\n frames = selectFrames(frames, range);\n body.trace.frames = frames;\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction maybeTruncateValue(len, val) {\n if (!val) {\n return val;\n }\n if (val.length > len) {\n return val.slice(0, len - 3).concat('...');\n }\n return val;\n}\n\nfunction truncateStrings(len, payload, jsonBackup) {\n function truncator(k, v, seen) {\n switch (_.typeName(v)) {\n case 'string':\n return maybeTruncateValue(len, v);\n case 'object':\n case 'array':\n return traverse(v, truncator, seen);\n default:\n return v;\n }\n }\n payload = traverse(payload, truncator);\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction truncateTraceData(traceData) {\n if (traceData.exception) {\n delete traceData.exception.description;\n traceData.exception.message = maybeTruncateValue(\n 255,\n traceData.exception.message,\n );\n }\n traceData.frames = selectFrames(traceData.frames, 1);\n return traceData;\n}\n\nfunction minBody(payload, jsonBackup) {\n var body = payload.data.body;\n if (body.trace_chain) {\n var chain = body.trace_chain;\n for (var i = 0; i < chain.length; i++) {\n chain[i] = truncateTraceData(chain[i]);\n }\n } else if (body.trace) {\n body.trace = truncateTraceData(body.trace);\n }\n return [payload, _.stringify(payload, jsonBackup)];\n}\n\nfunction needsTruncation(payload, maxSize) {\n return _.maxByteSize(payload) > maxSize;\n}\n\nfunction truncate(payload, jsonBackup, maxSize) {\n maxSize = typeof maxSize === 'undefined' ? 512 * 1024 : maxSize;\n var strategies = [\n raw,\n truncateFrames,\n truncateStrings.bind(null, 1024),\n truncateStrings.bind(null, 512),\n truncateStrings.bind(null, 256),\n minBody,\n ];\n var strategy, results, result;\n\n while ((strategy = strategies.shift())) {\n results = strategy(payload, jsonBackup);\n payload = results[0];\n result = results[1];\n if (result.error || !needsTruncation(result.value, maxSize)) {\n return result;\n }\n }\n return result;\n}\n\nmodule.exports = {\n truncate: truncate,\n\n /* for testing */\n raw: raw,\n truncateFrames: truncateFrames,\n truncateStrings: truncateStrings,\n maybeTruncateValue: maybeTruncateValue,\n};\n","'use strict';\n\nvar merge = require('./merge');\n\nvar RollbarJSON = {};\nfunction setupJSON(polyfillJSON) {\n if (isFunction(RollbarJSON.stringify) && isFunction(RollbarJSON.parse)) {\n return;\n }\n\n if (isDefined(JSON)) {\n // If polyfill is provided, prefer it over existing non-native shims.\n if (polyfillJSON) {\n if (isNativeFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isNativeFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n } else {\n // else accept any interface that is present.\n if (isFunction(JSON.stringify)) {\n RollbarJSON.stringify = JSON.stringify;\n }\n if (isFunction(JSON.parse)) {\n RollbarJSON.parse = JSON.parse;\n }\n }\n }\n if (!isFunction(RollbarJSON.stringify) || !isFunction(RollbarJSON.parse)) {\n polyfillJSON && polyfillJSON(RollbarJSON);\n }\n}\n\n/*\n * isType - Given a Javascript value and a string, returns true if the type of the value matches the\n * given string.\n *\n * @param x - any value\n * @param t - a lowercase string containing one of the following type names:\n * - undefined\n * - null\n * - error\n * - number\n * - boolean\n * - string\n * - symbol\n * - function\n * - object\n * - array\n * @returns true if x is of type t, otherwise false\n */\nfunction isType(x, t) {\n return t === typeName(x);\n}\n\n/*\n * typeName - Given a Javascript value, returns the type of the object as a string\n */\nfunction typeName(x) {\n var name = typeof x;\n if (name !== 'object') {\n return name;\n }\n if (!x) {\n return 'null';\n }\n if (x instanceof Error) {\n return 'error';\n }\n return {}.toString\n .call(x)\n .match(/\\s([a-zA-Z]+)/)[1]\n .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\n .call(Object.prototype.hasOwnProperty)\n .replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?');\n var reIsNative = RegExp('^' + funcMatchString + '$');\n return isObject(f) && reIsNative.test(f);\n}\n\n/* isObject - Checks if the argument is an object\n *\n * @param value - any value\n * @returns true is value is an object function is an object)\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/* isString - Checks if the argument is a string\n *\n * @param value - any value\n * @returns true if value is a string\n */\nfunction isString(value) {\n return typeof value === 'string' || value instanceof String;\n}\n\n/**\n * isFiniteNumber - determines whether the passed value is a finite number\n *\n * @param {*} n - any value\n * @returns true if value is a finite number\n */\nfunction isFiniteNumber(n) {\n return Number.isFinite(n);\n}\n\n/*\n * isDefined - a convenience function for checking if a value is not equal to undefined\n *\n * @param u - any value\n * @returns true if u is anything other than undefined\n */\nfunction isDefined(u) {\n return !isType(u, 'undefined');\n}\n\n/*\n * isIterable - convenience function for checking if a value can be iterated, essentially\n * whether it is an object or an array.\n *\n * @param i - any value\n * @returns true if i is an object or an array as determined by `typeName`\n */\nfunction isIterable(i) {\n var type = typeName(i);\n return type === 'object' || type === 'array';\n}\n\n/*\n * isError - convenience function for checking if a value is of an error type\n *\n * @param e - any value\n * @returns true if e is an error\n */\nfunction isError(e) {\n // Detect both Error and Firefox Exception type\n return isType(e, 'error') || isType(e, 'exception');\n}\n\n/* isPromise - a convenience function for checking if a value is a promise\n *\n * @param p - any value\n * @returns true if f is a function, otherwise false\n */\nfunction isPromise(p) {\n return isObject(p) && isType(p.then, 'function');\n}\n\nfunction redact() {\n return '********';\n}\n\n// from http://stackoverflow.com/a/8809472/1138191\nfunction uuid4() {\n var d = now();\n var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(\n /[xy]/g,\n 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 );\n return uuid;\n}\n\nvar LEVELS = {\n debug: 0,\n info: 1,\n warning: 2,\n error: 3,\n critical: 4,\n};\n\nfunction sanitizeUrl(url) {\n var baseUrlParts = parseUri(url);\n if (!baseUrlParts) {\n return '(unknown)';\n }\n\n // remove a trailing # if there is no anchor\n if (baseUrlParts.anchor === '') {\n baseUrlParts.source = baseUrlParts.source.replace('#', '');\n }\n\n url = baseUrlParts.source.replace('?' + baseUrlParts.query, '');\n return url;\n}\n\nvar parseUriOptions = {\n strictMode: false,\n key: [\n 'source',\n 'protocol',\n 'authority',\n 'userInfo',\n 'user',\n 'password',\n 'host',\n 'port',\n 'relative',\n 'path',\n 'directory',\n 'file',\n 'query',\n 'anchor',\n ],\n q: {\n name: 'queryKey',\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g,\n },\n parser: {\n strict:\n /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose:\n /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n },\n};\n\nfunction parseUri(str) {\n if (!isType(str, 'string')) {\n return undefined;\n }\n\n var o = parseUriOptions;\n var m = o.parser[o.strictMode ? 'strict' : 'loose'].exec(str);\n var uri = {};\n\n for (var i = 0, l = o.key.length; i < l; ++i) {\n uri[o.key[i]] = m[i] || '';\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}\n\nfunction addParamsAndAccessTokenToPath(accessToken, options, params) {\n params = params || {};\n params.access_token = accessToken;\n var paramsArray = [];\n var k;\n for (k in params) {\n if (Object.prototype.hasOwnProperty.call(params, k)) {\n paramsArray.push([k, params[k]].join('='));\n }\n }\n var query = '?' + paramsArray.sort().join('&');\n\n options = options || {};\n options.path = options.path || '';\n var qs = options.path.indexOf('?');\n var h = options.path.indexOf('#');\n var p;\n if (qs !== -1 && (h === -1 || h > qs)) {\n p = options.path;\n options.path = p.substring(0, qs) + query + '&' + p.substring(qs + 1);\n } else {\n if (h !== -1) {\n p = options.path;\n options.path = p.substring(0, h) + query + p.substring(h);\n } else {\n options.path = options.path + query;\n }\n }\n}\n\nfunction formatUrl(u, protocol) {\n protocol = protocol || u.protocol;\n if (!protocol && u.port) {\n if (u.port === 80) {\n protocol = 'http:';\n } else if (u.port === 443) {\n protocol = 'https:';\n }\n }\n protocol = protocol || 'https:';\n\n if (!u.hostname) {\n return null;\n }\n var result = protocol + '//' + u.hostname;\n if (u.port) {\n result = result + ':' + u.port;\n }\n if (u.path) {\n result = result + u.path;\n }\n return result;\n}\n\nfunction stringify(obj, backup) {\n var value, error;\n try {\n value = RollbarJSON.stringify(obj);\n } catch (jsonError) {\n if (backup && isFunction(backup)) {\n try {\n value = backup(obj);\n } catch (backupError) {\n error = backupError;\n }\n } else {\n error = jsonError;\n }\n }\n return { error: error, value: value };\n}\n\nfunction maxByteSize(string) {\n // The transport will use utf-8, so assume utf-8 encoding.\n //\n // This minimal implementation will accurately count bytes for all UCS-2 and\n // single code point UTF-16. If presented with multi code point UTF-16,\n // which should be rare, it will safely overcount, not undercount.\n //\n // While robust utf-8 encoders exist, this is far smaller and far more performant.\n // For quickly counting payload size for truncation, smaller is better.\n\n var count = 0;\n var length = string.length;\n\n for (var i = 0; i < length; i++) {\n var code = string.charCodeAt(i);\n if (code < 128) {\n // up to 7 bits\n count = count + 1;\n } else if (code < 2048) {\n // up to 11 bits\n count = count + 2;\n } else if (code < 65536) {\n // up to 16 bits\n count = count + 3;\n }\n }\n\n return count;\n}\n\nfunction jsonParse(s) {\n var value, error;\n try {\n value = RollbarJSON.parse(s);\n } catch (e) {\n error = e;\n }\n return { error: error, value: value };\n}\n\nfunction makeUnhandledStackInfo(\n message,\n url,\n lineno,\n colno,\n error,\n mode,\n backupMessage,\n errorParser,\n) {\n var location = {\n url: url || '',\n line: lineno,\n column: colno,\n };\n location.func = errorParser.guessFunctionName(location.url, location.line);\n location.context = errorParser.gatherContext(location.url, location.line);\n var href =\n typeof document !== 'undefined' &&\n document &&\n document.location &&\n document.location.href;\n var useragent =\n typeof window !== 'undefined' &&\n window &&\n window.navigator &&\n window.navigator.userAgent;\n return {\n mode: mode,\n message: error ? String(error) : message || backupMessage,\n url: href,\n stack: [location],\n useragent: useragent,\n };\n}\n\nfunction wrapCallback(logger, f) {\n return function (err, resp) {\n try {\n f(err, resp);\n } catch (e) {\n logger.error(e);\n }\n };\n}\n\nfunction nonCircularClone(obj) {\n var seen = [obj];\n\n function clone(obj, seen) {\n var value,\n name,\n newSeen,\n result = {};\n\n try {\n for (name in obj) {\n value = obj[name];\n\n if (value && (isType(value, 'object') || isType(value, 'array'))) {\n if (seen.includes(value)) {\n result[name] = 'Removed circular reference: ' + typeName(value);\n } else {\n newSeen = seen.slice();\n newSeen.push(value);\n result[name] = clone(value, newSeen);\n }\n continue;\n }\n\n result[name] = value;\n }\n } catch (e) {\n result = 'Failed cloning custom data: ' + e.message;\n }\n return result;\n }\n return clone(obj, seen);\n}\n\nfunction createItem(args, logger, notifier, requestKeys, lambdaContext) {\n var message, err, custom, callback, request;\n var arg;\n var extraArgs = [];\n var diagnostic = {};\n var argTypes = [];\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n argTypes.push(typ);\n switch (typ) {\n case 'undefined':\n break;\n case 'string':\n message ? extraArgs.push(arg) : (message = arg);\n break;\n case 'function':\n callback = wrapCallback(logger, arg);\n break;\n case 'date':\n extraArgs.push(arg);\n break;\n case 'error':\n case 'domexception':\n case 'exception': // Firefox Exception type\n err ? extraArgs.push(arg) : (err = arg);\n break;\n case 'object':\n case 'array':\n if (\n arg instanceof Error ||\n (typeof DOMException !== 'undefined' && arg instanceof DOMException)\n ) {\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 (\n arg instanceof Error ||\n (typeof DOMException !== 'undefined' && arg instanceof DOMException)\n ) {\n err ? extraArgs.push(arg) : (err = arg);\n break;\n }\n extraArgs.push(arg);\n }\n }\n\n // if custom is an array this turns it into an object with integer keys\n if (custom) custom = nonCircularClone(custom);\n\n if (extraArgs.length > 0) {\n if (!custom) custom = nonCircularClone({});\n custom.extraArgs = nonCircularClone(extraArgs);\n }\n\n var item = {\n message: message,\n err: err,\n custom: custom,\n timestamp: now(),\n callback: callback,\n notifier: notifier,\n diagnostic: diagnostic,\n uuid: uuid4(),\n };\n\n setCustomItemKeys(item, custom);\n\n if (requestKeys && request) {\n item.request = request;\n }\n if (lambdaContext) {\n item.lambdaContext = lambdaContext;\n }\n item._originalArgs = args;\n item.diagnostic.original_arg_types = argTypes;\n return item;\n}\n\nfunction setCustomItemKeys(item, custom) {\n if (custom && custom.level !== undefined) {\n item.level = custom.level;\n delete custom.level;\n }\n if (custom && custom.skipFrames !== undefined) {\n item.skipFrames = custom.skipFrames;\n delete custom.skipFrames;\n }\n}\n\nfunction addErrorContext(item, errors) {\n var custom = item.data.custom || {};\n var contextAdded = false;\n\n try {\n for (var i = 0; i < errors.length; ++i) {\n if (errors[i].hasOwnProperty('rollbarContext')) {\n custom = merge(custom, nonCircularClone(errors[i].rollbarContext));\n contextAdded = true;\n }\n }\n\n // Avoid adding an empty object to the data.\n if (contextAdded) {\n item.data.custom = custom;\n }\n } catch (e) {\n item.diagnostic.error_context = 'Failed: ' + e.message;\n }\n}\n\nvar TELEMETRY_TYPES = [\n 'log',\n 'network',\n 'dom',\n 'navigation',\n 'error',\n 'manual',\n];\nvar TELEMETRY_LEVELS = ['critical', 'error', 'warning', 'info', 'debug'];\n\nfunction arrayIncludes(arr, val) {\n for (var k = 0; k < arr.length; ++k) {\n if (arr[k] === val) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction createTelemetryEvent(args) {\n var type, metadata, level;\n var arg;\n\n for (var i = 0, l = args.length; i < l; ++i) {\n arg = args[i];\n\n var typ = typeName(arg);\n switch (typ) {\n case 'string':\n if (!type && arrayIncludes(TELEMETRY_TYPES, arg)) {\n type = arg;\n } else if (!level && arrayIncludes(TELEMETRY_LEVELS, arg)) {\n level = arg;\n }\n break;\n case 'object':\n metadata = arg;\n break;\n default:\n break;\n }\n }\n var event = {\n type: type || 'manual',\n metadata: metadata || {},\n level: level,\n };\n\n return event;\n}\n\n/*\n * get - given an obj/array and a keypath, return the value at that keypath or\n * undefined if not possible.\n *\n * @param obj - an object or array\n * @param path - a string of keys separated by '.' such as 'plugin.jquery.0.message'\n * which would correspond to 42 in `{plugin: {jquery: [{message: 42}]}}`\n */\nfunction get(obj, path) {\n if (!obj) {\n return undefined;\n }\n var keys = path.split('.');\n var result = obj;\n try {\n for (var i = 0, len = keys.length; i < len; ++i) {\n result = result[keys[i]];\n }\n } catch (e) {\n result = undefined;\n }\n return result;\n}\n\nfunction set(obj, path, value) {\n if (!obj) {\n return;\n }\n var keys = path.split('.');\n var len = keys.length;\n if (len < 1) {\n return;\n }\n if (len === 1) {\n obj[keys[0]] = value;\n return;\n }\n try {\n var temp = obj[keys[0]] || {};\n var replacement = temp;\n for (var i = 1; i < len - 1; ++i) {\n temp[keys[i]] = temp[keys[i]] || {};\n temp = temp[keys[i]];\n }\n temp[keys[len - 1]] = value;\n obj[keys[0]] = replacement;\n } catch (e) {\n return;\n }\n}\n\nfunction formatArgsAsString(args) {\n var i, len, arg;\n var result = [];\n for (i = 0, len = args.length; i < len; ++i) {\n arg = args[i];\n switch (typeName(arg)) {\n case 'object':\n arg = stringify(arg);\n arg = arg.error || arg.value;\n if (arg.length > 500) {\n arg = arg.substr(0, 497) + '...';\n }\n break;\n case 'null':\n arg = 'null';\n break;\n case 'undefined':\n arg = 'undefined';\n break;\n case 'symbol':\n arg = arg.toString();\n break;\n }\n result.push(arg);\n }\n return result.join(' ');\n}\n\nfunction now() {\n if (Date.now) {\n return +Date.now();\n }\n return +new Date();\n}\n\nfunction filterIp(requestData, captureIp) {\n if (!requestData || !requestData['user_ip'] || captureIp === true) {\n return;\n }\n var newIp = requestData['user_ip'];\n if (!captureIp) {\n newIp = null;\n } else {\n try {\n var parts;\n if (newIp.indexOf('.') !== -1) {\n parts = newIp.split('.');\n parts.pop();\n parts.push('0');\n newIp = parts.join('.');\n } else if (newIp.indexOf(':') !== -1) {\n parts = newIp.split(':');\n if (parts.length > 2) {\n var beginning = parts.slice(0, 3);\n var slashIdx = beginning[2].indexOf('/');\n if (slashIdx !== -1) {\n beginning[2] = beginning[2].substring(0, slashIdx);\n }\n var terminal = '0000:0000:0000:0000:0000';\n newIp = beginning.concat(terminal).join(':');\n }\n } else {\n newIp = null;\n }\n } catch (e) {\n newIp = null;\n }\n }\n requestData['user_ip'] = newIp;\n}\n\nfunction handleOptions(current, input, payload, logger) {\n var result = merge(current, input, payload);\n result = updateDeprecatedOptions(result, logger);\n if (!input || input.overwriteScrubFields) {\n return result;\n }\n if (input.scrubFields) {\n result.scrubFields = (current.scrubFields || []).concat(input.scrubFields);\n }\n return result;\n}\n\nfunction updateDeprecatedOptions(options, logger) {\n if (options.hostWhiteList && !options.hostSafeList) {\n options.hostSafeList = options.hostWhiteList;\n options.hostWhiteList = undefined;\n logger && logger.log('hostWhiteList is deprecated. Use hostSafeList.');\n }\n if (options.hostBlackList && !options.hostBlockList) {\n options.hostBlockList = options.hostBlackList;\n options.hostBlackList = undefined;\n logger && logger.log('hostBlackList is deprecated. Use hostBlockList.');\n }\n return options;\n}\n\nmodule.exports = {\n addParamsAndAccessTokenToPath: addParamsAndAccessTokenToPath,\n createItem: createItem,\n addErrorContext: addErrorContext,\n createTelemetryEvent: createTelemetryEvent,\n filterIp: filterIp,\n formatArgsAsString: formatArgsAsString,\n formatUrl: formatUrl,\n get: get,\n handleOptions: handleOptions,\n isError: isError,\n isFiniteNumber: isFiniteNumber,\n isFunction: isFunction,\n isIterable: isIterable,\n isNativeFunction: isNativeFunction,\n isObject: isObject,\n isString: isString,\n isType: isType,\n isPromise: isPromise,\n jsonParse: jsonParse,\n LEVELS: LEVELS,\n makeUnhandledStackInfo: makeUnhandledStackInfo,\n merge: merge,\n now: now,\n redact: redact,\n RollbarJSON: RollbarJSON,\n sanitizeUrl: sanitizeUrl,\n set: set,\n setupJSON: setupJSON,\n stringify: stringify,\n maxByteSize: maxByteSize,\n typeName: typeName,\n uuid4: uuid4,\n};\n","'use strict';\n\n/*\n * headers - Detect when fetch Headers are undefined and use a partial polyfill.\n *\n * A full polyfill is not used in order to keep package size as small as possible.\n * Since this is only used internally and is not added to the window object,\n * the full interface doesn't need to be supported.\n *\n * This implementation is modified from whatwg-fetch:\n * https://github.com/github/fetch\n */\nfunction headers(headers) {\n if (typeof Headers === 'undefined') {\n return new FetchHeaders(headers);\n }\n\n return new Headers(headers);\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n return name.toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value;\n}\n\nfunction iteratorFor(items) {\n var iterator = {\n next: function () {\n var value = items.shift();\n return { done: value === undefined, value: value };\n },\n };\n\n return iterator;\n}\n\nfunction FetchHeaders(headers) {\n this.map = {};\n\n if (headers instanceof FetchHeaders) {\n headers.forEach(function (value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function (header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function (name) {\n this.append(name, headers[name]);\n }, this);\n }\n}\n\nFetchHeaders.prototype.append = function (name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n};\n\nFetchHeaders.prototype.get = function (name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null;\n};\n\nFetchHeaders.prototype.has = function (name) {\n return this.map.hasOwnProperty(normalizeName(name));\n};\n\nFetchHeaders.prototype.forEach = function (callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n};\n\nFetchHeaders.prototype.entries = function () {\n var items = [];\n this.forEach(function (value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items);\n};\n\nmodule.exports = headers;\n","'use strict';\n\nvar polyfillJSON = require('../../vendor/JSON-js/json3');\n\nmodule.exports = polyfillJSON;\n","'use strict';\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\nmodule.exports = replace;\n","'use strict';\n\nvar _ = require('../utility');\n\nfunction traverse(obj, func, seen) {\n var k, v, i;\n var isObj = _.isType(obj, 'object');\n var isArray = _.isType(obj, 'array');\n var keys = [];\n var seenIndex;\n\n // Best might be to use Map here with `obj` as the keys, but we want to support IE < 11.\n seen = seen || { obj: [], mapped: [] };\n\n if (isObj) {\n seenIndex = seen.obj.indexOf(obj);\n\n if (isObj && seenIndex !== -1) {\n // Prefer the mapped object if there is one.\n return seen.mapped[seenIndex] || seen.obj[seenIndex];\n }\n\n seen.obj.push(obj);\n seenIndex = seen.obj.length - 1;\n }\n\n if (isObj) {\n for (k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n keys.push(k);\n }\n }\n } else if (isArray) {\n for (i = 0; i < obj.length; ++i) {\n keys.push(i);\n }\n }\n\n var result = isObj ? {} : [];\n var same = true;\n for (i = 0; i < keys.length; ++i) {\n k = keys[i];\n v = obj[k];\n result[k] = func(k, v, seen);\n same = same && result[k] === obj[k];\n }\n\n if (isObj && !same) {\n seen.mapped[seenIndex] = result;\n }\n\n return !same ? result : obj;\n}\n\nmodule.exports = traverse;\n","// 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","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(409);\n"],"names":["root","factory","exports","module","define","amd","this","global","console","prop","method","con","dummy","properties","methods","split","pop","window","StackFrame","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","parse","error","stacktrace","parseOpera","stack","match","parseV8OrIE","parseFFOrSafari","Error","extractLocation","urlLike","indexOf","parts","exec","replace","undefined","filter","line","map","sanitizedLine","location","tokens","slice","locationParts","functionName","join","fileName","lineNumber","columnNumber","source","functionNameRegex","matches","e","message","length","parseOpera9","parseOpera11","parseOpera10","lineRE","lines","result","i","len","push","argsRaw","functionCall","shift","args","_isNumber","n","isNaN","parseFloat","isFinite","_capitalize","str","charAt","toUpperCase","substring","_getter","p","booleanProps","numericProps","stringProps","arrayProps","objectProps","props","concat","obj","prototype","getArgs","setArgs","v","Object","toString","call","TypeError","getEvalOrigin","evalOrigin","setEvalOrigin","getFileName","getLineNumber","getColumnNumber","getFunctionName","getIsEval","fromString","argsStartIndex","argsEndIndex","lastIndexOf","locationString","Boolean","j","Number","k","String","_","helpers","defaultOptions","hostname","path","search","version","protocol","port","Api","options","transport","urllib","truncation","jsonBackup","url","accessToken","transportOptions","_getTransport","getTransportFromOptions","postItem","data","callback","payload","buildPayload","self","setTimeout","post","buildJsonPayload","stringifyResult","truncate","stringify","value","postJsonPayload","jsonPayload","configure","oldOptions","merge","isType","context","contextResult","substr","access_token","defaults","timeout","gWindow","defaultTransport","fetch","XMLHttpRequest","detectTransport","proxy","endpoint","opts","pathname","transportAPI","host","appendPathToPath","base","baseTrailingSlash","test","pathBeginningSlash","rollbar","_rollbarConfig","alias","globalAlias","shimRunning","shimId","_rollbarStartTime","Date","getTime","Rollbar","_rollbarDidLoad","Client","API","logger","globals","Transport","transforms","sharedTransforms","predicates","sharedPredicates","errorParser","client","handleOptions","_configuredOptions","Telemeter","components","telemeter","Instrumenter","instrumenter","polyfillJSON","wrapGlobals","scrub","api","_gWindow","gDocument","document","isChrome","chrome","runtime","anonymousErrorsPending","notifier","addTransform","handleDomException","handleItemWithError","ensureItemHasSomethingToSay","addBaseInfo","addRequestInfo","addClientInfo","addPluginInfo","addBody","addMessageWithError","addTelemetryData","addConfigToPayload","addScrubber","addPayloadOptions","userTransform","addConfiguredOptions","addDiagnosticKeys","itemToPayload","addTransformsToNotifier","queue","addPredicate","checkLevel","checkIgnore","userCheckIgnore","urlIsNotBlockListed","urlIsSafeListed","messageIsIgnored","setupUnhandledCapture","instrument","setupJSON","_instance","handleUninitialized","maybeCallback","_getFirstFunction","isFunction","init","setComponents","payloadData","lastError","log","item","_createItem","arguments","uuid","apply","debug","info","warn","warning","critical","sendJsonPayload","unhandledExceptionsInitialized","captureUncaught","handleUncaughtExceptions","captureUncaughtExceptions","wrapGlobalEventHandlers","unhandledRejectionsInitialized","captureUnhandledRejections","handleUnhandledRejections","handleUncaughtException","lineno","colno","inspectAnonymousErrors","stackInfo","makeUnhandledStackInfo","isError","_unhandledStackInfo","level","uncaughtErrorLevel","_isUncaught","handleAnonymousErrors","r","prepareStackTrace","_stack","_isAnonymous","handleUnhandledRejection","reason","promise","reasonResult","_rollbarContext","_originalArgs","wrap","f","_before","ctxFn","_isWrap","_rollbar_wrapped","exc","_rollbarWrappedError","_wrappedSource","hasOwnProperty","captureEvent","event","createTelemetryEvent","type","metadata","captureDomContentLoaded","ts","captureLoad","loadFull","createItem","scrubFields","logLevel","reportLevel","verbose","enabled","transmit","sendConfig","includeItemsInTelemetry","captureIp","ignoreDuplicateErrors","Detection","ieVersion","undef","div","createElement","all","getElementsByTagName","innerHTML","getElementType","getAttribute","toLowerCase","descriptionToString","desc","tagName","out","id","classes","attributes","key","describeElement","elem","className","attr","elementArrayToString","a","nextStr","totalLength","separator","MAX_LENGTH","unshift","treeToArray","nextDescription","height","parentNode","getElementFromEvent","evt","doc","target","elementFromPoint","clientX","clientY","isDescribedElement","element","subtypes","handler","shim","oldOnError","_rollbarOldOnError","onerror","fn","Array","old","ret","_rollbarWindowOnError","_rollbarURH","belongsToShim","removeEventListener","rejectionHandler","detail","addEventListener","detection","formatArgsAsString","settings","get","headers","urlparser","domUtil","network","networkResponseHeaders","networkResponseBody","networkRequestHeaders","networkRequestBody","networkErrorOnHttp5xx","networkErrorOnHttp4xx","networkErrorOnHttp0","dom","navigation","connectivity","contentSecurityPolicy","errorOnContentSecurityPolicy","restore","replacements","b","_window","_document","autoInstrument","scrubTelemetryInputs","telemetryScrubber","defaultValueScrubber","patterns","RegExp","description","name","attrs","nameFromDescription","diagnostic","eventRemovers","contentsecuritypolicy","_location","_lastHref","href","_isUrlObject","input","URL","oldSettings","deinstrumentNetwork","instrumentNetwork","deinstrumentConsole","instrumentConsole","deinstrumentDom","instrumentDom","deinstrumentNavigation","instrumentNavigation","deinstrumentConnectivity","instrumentConnectivity","deinstrumentContentSecurityPolicy","instrumentContentSecurityPolicy","wrapProp","xhr","orig","xhrp","isUrlObject","__rollbar_xhr","status_code","start_time_ms","now","end_time_ms","header","request_headers","request_content_type","onreadystatechangeHandler","request","__rollbar_event","captureNetwork","readyState","response_content_type","getResponseHeader","headersConfig","allHeaders","getAllResponseHeaders","arr","trim","body","responseText","response","isJsonContentType","scrubJson","code","status","levelFromStatus","errorOnHttpStatus","onreadystatechange","trackHttpErrors","t","reqHeaders","fetchHeaders","then","resp","text","clone","subtype","rollbarUUID","contentType","includes","json","JSON","inHeaders","outHeaders","entries","currentHeader","next","done","skipFrames","c","wrapConsole","origConsole","captureLog","Function","removeListeners","clickHandler","handleClick","bind","blurHandler","handleBlur","addListener","hasTag","anchorOrButton","captureDomEvent","checked","handleSelectInputChanged","multiple","selected","selectedIndex","isChecked","elementString","captureDom","app","history","pushState","current","handleUrlChange","from","to","parsedHref","parsedTo","parsedFrom","hash","captureNavigation","captureConnectivityChange","handleCspEvent","cspEvent","blockedURI","violatedDirective","effectiveDirective","sourceFile","originalPolicy","handleCspError","cspHandler","section","altType","capture","attachEvent","detachEvent","addBodyMessage","custom","extra","set","stackFromItem","buildTrace","guess","guessErrorClass","trace","exception","class","errorClass","stackFrame","frame","pre","contextLength","mid","rawStack","raw","rawException","frames","filename","sanitizeUrl","func","column","sendFrameUrl","endsWith","Math","floor","reverse","err","Stack","originalError","nested","_savedStackTrace","addErrorContext","chain","cause","e2","environment","platform","framework","language","server","requestInfo","query_string","remoteString","user_ip","keys","nav","navigator","scr","screen","runtime_ms","timestamp","round","javascript","browser","userAgent","cookie_enabled","cookieEnabled","width","cur","plugins","navPlugins","l","traceChain","traces","traceChainLength","trace_chain","addBodyTraceChain","addBodyTrace","scrubFn","scrubPaths","makeFetchRequest","makeXhrRequest","params","requestFactory","addParamsAndAccessTokenToPath","formatUrl","_makeZoneRequest","writeData","currentZone","Zone","_name","rootZone","_parent","run","_makeRequest","RollbarProxy","_msg","_proxyRequest","controller","timeoutId","isFiniteNumber","AbortController","abort","signal","clearTimeout","catch","_newRetriableError","xmlhttp","factories","ActiveXObject","numFactories","_createXMLHTTPObject","parseResponse","jsonParse","_isNormalFailure","ex","open","setRequestHeader","send","e1","XDomainRequest","xdomainrequest","onprogress","ontimeout","onload","last","auth","query","parseInt","pathParts","_extendListenerPrototype","oldAddEventListener","_rollbarOldAdd","addFn","bubble","oldRemoveEventListener","_rollbarOldRemove","removeFn","maxItems","itemsPerMin","ErrorStackParser","ERR_CLASS_REGEXP","gatherContext","Frame","_stackFrame","skip","parserStack","getStack","constructorName","constructor","guessFunctionName","errMsg","errClassMatch","errClass","hasOwn","toStr","isPlainObject","hasOwnConstructor","hasIsPrototypeOf","src","copy","Notifier","transform","addPendingItem","_applyTransforms","removePendingItem","addItem","transformIndex","transformsLength","cb","matchFrames","list","block","listLength","frameLength","urlIsOnAList","safeOrBlock","hostBlockList","hostSafeList","tracesLength","listName","levelVal","LEVELS","isUncaught","onSendCallback","ignoredMessages","rIgnoredMessage","messages","messagesFromItem","Queue","rateLimiter","pendingItems","pendingRequests","retryQueue","retryHandle","waitCallback","waitIntervalID","predicate","idx","splice","originalItem","predicateResult","_applyPredicates","stop","_maybeLog","_makeApiRequest","_dequeuePendingRequest","wait","_maybeCallWait","clearInterval","setInterval","rateLimitResponse","shouldSend","_maybeRetry","RETRIABLE_ERRORS","shouldRetry","retryInterval","maxRetries","retries","_retryApiRequest","retryObject","RateLimiter","startTime","counter","perMinCounter","platformOptions","configureGlobal","checkRate","limit","ignoreRateLimit","shouldSendValue","globalRateLimit","limitPerMin","perMinute","itemsPerMinute","rateLimitPayload","globalSettings","elapsedTime","globalRateLimitPerMin","setPlatformOptions","tracer","validateTracer","setStackTraceLimit","lastErrorHash","stackTraceLimit","scope","active","_defaultLogLevel","_log","defaultLevel","_sameAsLastError","_addTracingInfo","_captureRollbarItem","telemetryEvents","copyEvents","itemHash","generateItemHash","span","spanContext","toSpanId","toTraceId","validateSpan","setTag","opentracingSpanId","opentracingTraceId","opentracing_span_id","opentracing_trace_id","traverse","scrubPath","redact","paramRes","pat","_getScrubFieldRegexs","queryRes","_getScrubQueryParamRegexs","redactQueryParam","dummy0","paramPart","scrubber","seen","tmpV","valScrubber","paramScrubber","MAX_EVENTS","maxTelemetryEvents","maxQueueSize","max","min","getLevel","manual","newMaxEvents","deleteCount","events","filterTelemetry","timestamp_ms","captureError","requestData","statusCode","change","addFunctionOption","payloadOptions","tracePath","newExtra","newItem","isPromise","promisedItem","configuredOptions","configured_options","is_anonymous","is_uncaught","raw_error","constructor_name","failed","selectFrames","range","truncateFrames","maybeTruncateValue","val","truncateStrings","truncator","typeName","truncateTraceData","traceData","minBody","needsTruncation","maxSize","maxByteSize","strategy","results","strategies","RollbarJSON","x","isNativeFunction","funcMatchString","reIsNative","isObject","uuid4","d","random","parseUriOptions","strictMode","q","parser","strict","loose","backup","jsonError","backupError","wrapCallback","nonCircularClone","newSeen","TELEMETRY_TYPES","TELEMETRY_LEVELS","arrayIncludes","paramsArray","sort","qs","h","requestKeys","lambdaContext","arg","extraArgs","argTypes","typ","DOMException","setCustomItemKeys","original_arg_types","errors","contextAdded","rollbarContext","error_context","filterIp","newIp","beginning","slashIdx","u","hostWhiteList","hostBlackList","updateDeprecatedOptions","overwriteScrubFields","isIterable","isString","s","mode","backupMessage","useragent","baseUrlParts","o","m","uri","$0","$1","$2","parseUri","anchor","temp","replacement","string","count","charCodeAt","normalizeName","FetchHeaders","forEach","append","isArray","getOwnPropertyNames","normalizeValue","oldValue","has","thisArg","items","iteratorFor","Headers","seenIndex","isObj","mapped","same","gap","indent","meta","rep","state","container","escapes","number","action","rx_escapable","this_value","valueOf","quote","lastIndex","holder","partial","mind","toJSON","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","replacer","space","go","firstokey","okey","ovalue","firstavalue","avalue","ocomma","acomma","colon","SyntaxError","reviver","tx","ignore","fromCharCode","walk","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__"],"sourceRoot":""}
\ No newline at end of file
diff --git a/docs/extension-exceptions.md b/docs/extension-exceptions.md
index 906bc16f8..9b7517870 100644
--- a/docs/extension-exceptions.md
+++ b/docs/extension-exceptions.md
@@ -7,7 +7,7 @@ For most websites, the path for dealing with browser extension originating excep
## Dealing with adblockers
-The most common type of extension that can be problematic is adblockers. These extensions can disable loading
+The most common type of extension that can be problematic is adblockers. These extensions can disable loading
certain external scripts or remove elements from a page based on a simple set of heuristics.
You can see a [full example](https://github.com/rollbar/rollbar.js/tree/master/examples/extension-exceptions/)
@@ -24,7 +24,7 @@ Load Rollbar.js as normal.
captureUncaught: true,
payload: {
environment: 'development',
- }
+ },
};
```
@@ -33,45 +33,50 @@ Add an html element with "bait" class names to be removed by adblockers.
```html
-
+
```
Add functions to check for the presence and visibility of our bait div.
```js
- function disableRollbar() {
- Rollbar.configure({enabled: false});
- }
-
- function checkForAds() {
- var bait = document.getElementById("blocker-bait");
+function disableRollbar() {
+ Rollbar.configure({ enabled: false });
+}
- if (bait == null) {
- disableRollbar();
- return;
- }
-
- var baitStyles = window.getComputedStyle(bait);
- if (baitStyles && (
- baitStyles.getPropertyValue('display') === 'none' ||
- baitStyles.getPropertyValue('visibility') === 'hidden')) {
- disableRollbar();
- }
- }
+function checkForAds() {
+ var bait = document.getElementById('blocker-bait');
- function onLoadStartAdCheck() {
- // Ad blockers generally execute just after load, let's delay ourselves to get behind it.
- setTimeout(checkForAds, 1);
+ if (bait == null) {
+ disableRollbar();
+ return;
}
- if (window.addEventListener !== undefined) {
- window.addEventListener('load', onLoadStartAdCheck, false);
- } else {
- window.attachEvent('onload', onLoadStartAdCheck);
+ var baitStyles = window.getComputedStyle(bait);
+ if (
+ baitStyles &&
+ (baitStyles.getPropertyValue('display') === 'none' ||
+ baitStyles.getPropertyValue('visibility') === 'hidden')
+ ) {
+ disableRollbar();
}
+}
+
+function onLoadStartAdCheck() {
+ // Ad blockers generally execute just after load, let's delay ourselves to get behind it.
+ setTimeout(checkForAds, 1);
+}
+
+if (window.addEventListener !== undefined) {
+ window.addEventListener('load', onLoadStartAdCheck, false);
+} else {
+ window.attachEvent('onload', onLoadStartAdCheck);
+}
```
-The above approach is likely to work in the majority of cases, *but it is not foolproof*. Extensions and their
+The above approach is likely to work in the majority of cases, _but it is not foolproof_. Extensions and their
behavior evolve over time and nothing stops a user from opening their console and modifying / executing code as well.
A practical approach involves incrementally adjusting your detection as new exceptions occur in large numbers.
diff --git a/docs/migration_v0_to_v1.md b/docs/migration_v0_to_v1.md
index 2e4327123..48bb03c1a 100644
--- a/docs/migration_v0_to_v1.md
+++ b/docs/migration_v0_to_v1.md
@@ -7,19 +7,20 @@
### Change the config object:
```js
-var _rollbarParams = {"server.environment": "production"};
-_rollbarParams["notifier.snippet_version"] = "2"; var _rollbar=["POST_CLIENT_ITEM_ACCESS_TOKEN", _rollbarParams];
+var _rollbarParams = { 'server.environment': 'production' };
+_rollbarParams['notifier.snippet_version'] = '2';
+var _rollbar = ['POST_CLIENT_ITEM_ACCESS_TOKEN', _rollbarParams];
```
-to
+to
```js
var _rollbarConfig = {
- accessToken: "POST_CLIENT_ITEM_ACCESS_TOKEN",
+ accessToken: 'POST_CLIENT_ITEM_ACCESS_TOKEN',
captureUncaught: true,
payload: {
- environment: "production"
- }
+ environment: 'production',
+ },
};
```
@@ -29,21 +30,21 @@ e.g.
```js
var _rollbarParams = {
- checkIgnore: function(msg, url, lineNo, colNo, error) {
+ checkIgnore: function (msg, url, lineNo, colNo, error) {
// don't ignore anything (default)
return false;
},
- context: "home#index",
+ context: 'home#index',
itemsPerMinute: 60,
- level: "error",
+ level: 'error',
person: {
id: 12345,
- username: "johndoe",
- email: "johndoe@example.com"
+ username: 'johndoe',
+ email: 'johndoe@example.com',
},
- "server.branch": "develop",
- "server.environment": "staging",
- "server.host": "web1"
+ 'server.branch': 'develop',
+ 'server.environment': 'staging',
+ 'server.host': 'web1',
};
```
@@ -51,28 +52,28 @@ should be changed to
```js
var _rollbarConfig = {
- accessToken: "POST_CLIENT_ITEM_ACCESS_TOKEN",
+ accessToken: 'POST_CLIENT_ITEM_ACCESS_TOKEN',
captureUncaught: true,
- checkIgnore: function(msg, url, lineNo, colNo, error) {
+ checkIgnore: function (msg, url, lineNo, colNo, error) {
// don't ignore anything (default)
return false;
},
itemsPerMinute: 60,
- logLevel: "error",
+ logLevel: 'error',
payload: {
- environment: "production",
- context: "home#index",
+ environment: 'production',
+ context: 'home#index',
person: {
id: 12345,
- username: "johndoe",
- email: "johndoe@example.com"
+ username: 'johndoe',
+ email: 'johndoe@example.com',
},
server: {
- branch: "develop",
- environment: "staging",
- host: "web1"
- }
- }
+ branch: 'develop',
+ environment: 'staging',
+ host: 'web1',
+ },
+ },
};
```
@@ -80,7 +81,6 @@ var _rollbarConfig = {
For the latest snippet, see the instructions here: [https://rollbar.com/docs/notifier/rollbar.js/](https://rollbar.com/docs/notifier/rollbar.js/).
-
## Update references to `_rollbar.push()`
The v1 notifier has a more intuitive interface for recording errors and generic logging.
@@ -118,19 +118,18 @@ try {
}
```
-
### Recording a log message
From
```js
-_rollbar.push("Some log message");
+_rollbar.push('Some log message');
```
to
```js
-Rollbar.info("Some log message");
+Rollbar.info('Some log message');
```
#### Including custom data
@@ -138,13 +137,17 @@ Rollbar.info("Some log message");
From
```js
-_rollbar.push({level: "warning", msg: "Some warning message", point: {x: 5, y: 10}});
+_rollbar.push({
+ level: 'warning',
+ msg: 'Some warning message',
+ point: { x: 5, y: 10 },
+});
```
to
```js
-Rollbar.warning("Some warning message", {point: {x: 5, y: 10}});
+Rollbar.warning('Some warning message', { point: { x: 5, y: 10 } });
```
#### Using callbacks
@@ -155,11 +158,11 @@ From
try {
doSomething();
} catch (e) {
- _rollbar.push(e, function(err, uuid) {
+ _rollbar.push(e, function (err, uuid) {
if (err !== null) {
- console.error("Could not report an exception to Rollbar, error: " + err);
+ console.error('Could not report an exception to Rollbar, error: ' + err);
} else {
- console.log("Reported exception to Rollbar, uuid: " + uuid);
+ console.log('Reported exception to Rollbar, uuid: ' + uuid);
}
});
}
@@ -171,11 +174,11 @@ to
try {
doSomething();
} catch (e) {
- Rollbar.log(e, function(err, uuid) {
+ Rollbar.log(e, function (err, uuid) {
if (err !== null) {
- console.error("Could not report an exception to Rollbar, error: " + err);
+ console.error('Could not report an exception to Rollbar, error: ' + err);
} else {
- console.log("Reported exception to Rollbar, uuid: " + uuid);
+ console.log('Reported exception to Rollbar, uuid: ' + uuid);
}
});
}
diff --git a/examples/angular2/angular.json b/examples/angular2/angular.json
index 88b3a7c0d..3d993ee20 100644
--- a/examples/angular2/angular.json
+++ b/examples/angular2/angular.json
@@ -18,13 +18,8 @@
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
- "assets": [
- "src/favicon.ico",
- "src/assets"
- ],
- "styles": [
- "src/styles.css"
- ],
+ "assets": ["src/favicon.ico", "src/assets"],
+ "styles": ["src/styles.css"],
"scripts": [],
"es5BrowserSupport": true
},
@@ -79,26 +74,16 @@
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
- "styles": [
- "src/styles.css"
- ],
+ "styles": ["src/styles.css"],
"scripts": [],
- "assets": [
- "src/favicon.ico",
- "src/assets"
- ]
+ "assets": ["src/favicon.ico", "src/assets"]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
- "tsConfig": [
- "src/tsconfig.app.json",
- "src/tsconfig.spec.json"
- ],
- "exclude": [
- "**/node_modules/**"
- ]
+ "tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
+ "exclude": ["**/node_modules/**"]
}
}
}
@@ -124,13 +109,11 @@
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
- "exclude": [
- "**/node_modules/**"
- ]
+ "exclude": ["**/node_modules/**"]
}
}
}
}
},
"defaultProject": "my-app"
-}
\ No newline at end of file
+}
diff --git a/examples/angular2/e2e/protractor.conf.js b/examples/angular2/e2e/protractor.conf.js
index 86776a391..98bba7090 100644
--- a/examples/angular2/e2e/protractor.conf.js
+++ b/examples/angular2/e2e/protractor.conf.js
@@ -5,11 +5,9 @@ const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
- specs: [
- './src/**/*.e2e-spec.ts'
- ],
+ specs: ['./src/**/*.e2e-spec.ts'],
capabilities: {
- 'browserName': 'chrome'
+ browserName: 'chrome',
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
@@ -17,12 +15,14 @@ exports.config = {
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
- print: function() {}
+ print: function () {},
},
onPrepare() {
require('ts-node').register({
- project: require('path').join(__dirname, './tsconfig.e2e.json')
+ project: require('path').join(__dirname, './tsconfig.e2e.json'),
});
- jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
- }
-};
\ No newline at end of file
+ jasmine
+ .getEnv()
+ .addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
+ },
+};
diff --git a/examples/angular2/e2e/src/app.e2e-spec.ts b/examples/angular2/e2e/src/app.e2e-spec.ts
index 3b79f7c47..12ba22b16 100644
--- a/examples/angular2/e2e/src/app.e2e-spec.ts
+++ b/examples/angular2/e2e/src/app.e2e-spec.ts
@@ -16,8 +16,10 @@ describe('workspace-project App', () => {
afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
- expect(logs).not.toContain(jasmine.objectContaining({
- level: logging.Level.SEVERE,
- } as logging.Entry));
+ expect(logs).not.toContain(
+ jasmine.objectContaining({
+ level: logging.Level.SEVERE,
+ } as logging.Entry),
+ );
});
});
diff --git a/examples/angular2/e2e/tsconfig.e2e.json b/examples/angular2/e2e/tsconfig.e2e.json
index a6dd62202..22e04cb18 100644
--- a/examples/angular2/e2e/tsconfig.e2e.json
+++ b/examples/angular2/e2e/tsconfig.e2e.json
@@ -4,10 +4,6 @@
"outDir": "../out-tsc/app",
"module": "commonjs",
"target": "es5",
- "types": [
- "jasmine",
- "jasminewd2",
- "node"
- ]
+ "types": ["jasmine", "jasminewd2", "node"]
}
-}
\ No newline at end of file
+}
diff --git a/examples/angular2/package-lock.json b/examples/angular2/package-lock.json
index 49b91abe3..cb4b81501 100644
--- a/examples/angular2/package-lock.json
+++ b/examples/angular2/package-lock.json
@@ -112,13 +112,79 @@
}
},
"@angular-devkit/schematics": {
- "version": "7.3.9",
- "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-7.3.9.tgz",
- "integrity": "sha512-xzROGCYp7aQbeJ3V6YC0MND7wKEAdWqmm/GaCufEk0dDS8ZGe0sQhcM2oBRa2nQqGQNeThFIH51kx+FayrJP0w==",
+ "version": "15.1.4",
+ "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-15.1.4.tgz",
+ "integrity": "sha512-jpddxo9Qd2yRQ1t9FLhAx5S+luz6HkyhDytq0LFKbxf9ikf1J4oy9riPBFl4pRmrNARWcHZ6GbD20/Ky8PjmXQ==",
"dev": true,
"requires": {
- "@angular-devkit/core": "7.3.9",
- "rxjs": "6.3.3"
+ "@angular-devkit/core": "15.1.4",
+ "jsonc-parser": "3.2.0",
+ "magic-string": "0.27.0",
+ "ora": "5.4.1",
+ "rxjs": "6.6.7"
+ },
+ "dependencies": {
+ "@angular-devkit/core": {
+ "version": "15.1.4",
+ "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.1.4.tgz",
+ "integrity": "sha512-PW5MRmd9DHJR4FaXchwQtj9pXnsghSTnwRvfZeCRNYgU2sv0DKyTV+YTSJB+kNXnoPNG1Je6amDEkiXecpspXg==",
+ "dev": true,
+ "requires": {
+ "ajv": "8.12.0",
+ "ajv-formats": "2.1.1",
+ "jsonc-parser": "3.2.0",
+ "rxjs": "6.6.7",
+ "source-map": "0.7.4"
+ }
+ },
+ "ajv": {
+ "version": "8.12.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz",
+ "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "dev": true
+ },
+ "json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "dev": true
+ },
+ "magic-string": {
+ "version": "0.27.0",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.27.0.tgz",
+ "integrity": "sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==",
+ "dev": true,
+ "requires": {
+ "@jridgewell/sourcemap-codec": "^1.4.13"
+ }
+ },
+ "rxjs": {
+ "version": "6.6.7",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
+ "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
+ "dev": true,
+ "requires": {
+ "tslib": "^1.9.0"
+ }
+ },
+ "source-map": {
+ "version": "0.7.4",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz",
+ "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==",
+ "dev": true
+ }
}
},
"@angular/animations": {
@@ -130,24 +196,277 @@
}
},
"@angular/cli": {
- "version": "7.3.9",
- "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-7.3.9.tgz",
- "integrity": "sha512-7oJj7CKDlFUbQav1x1CV4xKKcbt0pnxY4unKcm7Q1tVXhu8bU2bc3cDA0aJnbofcYb6TJcd/C2qHgCt78q7edA==",
+ "version": "15.1.4",
+ "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-15.1.4.tgz",
+ "integrity": "sha512-ebZiI4arb9wtOUMmTyUvjgDovmwpY8hmGLbkKZiEmAX8+2gbl4e97M+zd0SICZDU8bu5VcpoP6Q3Qb6vVjab9A==",
"dev": true,
"requires": {
- "@angular-devkit/architect": "0.13.9",
- "@angular-devkit/core": "7.3.9",
- "@angular-devkit/schematics": "7.3.9",
- "@schematics/angular": "7.3.9",
- "@schematics/update": "0.13.9",
+ "@angular-devkit/architect": "0.1501.4",
+ "@angular-devkit/core": "15.1.4",
+ "@angular-devkit/schematics": "15.1.4",
+ "@schematics/angular": "15.1.4",
"@yarnpkg/lockfile": "1.1.0",
- "ini": "1.3.5",
- "inquirer": "6.2.1",
- "npm-package-arg": "6.1.0",
- "open": "6.0.0",
- "pacote": "9.4.0",
- "semver": "5.6.0",
- "symbol-observable": "1.2.0"
+ "ansi-colors": "4.1.3",
+ "ini": "3.0.1",
+ "inquirer": "8.2.4",
+ "jsonc-parser": "3.2.0",
+ "npm-package-arg": "10.1.0",
+ "npm-pick-manifest": "8.0.1",
+ "open": "8.4.0",
+ "ora": "5.4.1",
+ "pacote": "15.0.8",
+ "resolve": "1.22.1",
+ "semver": "7.3.8",
+ "symbol-observable": "4.0.0",
+ "yargs": "17.6.2"
+ },
+ "dependencies": {
+ "@angular-devkit/architect": {
+ "version": "0.1501.4",
+ "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1501.4.tgz",
+ "integrity": "sha512-PE0CqPaNzcz8yHEuJwqtKxYvXX9hgWWvC6hI2DWKtC+5WgJLAYJNEGofXQRc227Nj+YySEYUUo8Ja8SYl3lDxA==",
+ "dev": true,
+ "requires": {
+ "@angular-devkit/core": "15.1.4",
+ "rxjs": "6.6.7"
+ }
+ },
+ "@angular-devkit/core": {
+ "version": "15.1.4",
+ "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.1.4.tgz",
+ "integrity": "sha512-PW5MRmd9DHJR4FaXchwQtj9pXnsghSTnwRvfZeCRNYgU2sv0DKyTV+YTSJB+kNXnoPNG1Je6amDEkiXecpspXg==",
+ "dev": true,
+ "requires": {
+ "ajv": "8.12.0",
+ "ajv-formats": "2.1.1",
+ "jsonc-parser": "3.2.0",
+ "rxjs": "6.6.7",
+ "source-map": "0.7.4"
+ }
+ },
+ "ajv": {
+ "version": "8.12.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz",
+ "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "ansi-colors": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz",
+ "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==",
+ "dev": true
+ },
+ "ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "cliui": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
+ "dev": true,
+ "requires": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "dev": true
+ },
+ "get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+ "dev": true
+ },
+ "ini": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-3.0.1.tgz",
+ "integrity": "sha512-it4HyVAUTKBc6m8e1iXWvXSTdndF7HbdN713+kvLrymxTaU4AUBWrJ4vEooP+V7fexnVD3LKcBshjGGPefSMUQ==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true
+ },
+ "is-wsl": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
+ "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
+ "dev": true,
+ "requires": {
+ "is-docker": "^2.0.0"
+ }
+ },
+ "json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "dev": true
+ },
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "open": {
+ "version": "8.4.0",
+ "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz",
+ "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==",
+ "dev": true,
+ "requires": {
+ "define-lazy-prop": "^2.0.0",
+ "is-docker": "^2.1.1",
+ "is-wsl": "^2.2.0"
+ }
+ },
+ "path-parse": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+ "dev": true
+ },
+ "resolve": {
+ "version": "1.22.1",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz",
+ "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==",
+ "dev": true,
+ "requires": {
+ "is-core-module": "^2.9.0",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ }
+ },
+ "rxjs": {
+ "version": "6.6.7",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
+ "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
+ "dev": true,
+ "requires": {
+ "tslib": "^1.9.0"
+ }
+ },
+ "semver": {
+ "version": "7.3.8",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
+ "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
+ "source-map": {
+ "version": "0.7.4",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz",
+ "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==",
+ "dev": true
+ },
+ "string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ },
+ "wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ }
+ },
+ "y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+ "dev": true
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ },
+ "yargs": {
+ "version": "17.6.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz",
+ "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==",
+ "dev": true,
+ "requires": {
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
+ }
+ },
+ "yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
+ "dev": true
+ }
}
},
"@angular/common": {
@@ -609,6 +928,18 @@
}
}
},
+ "@gar/promisify": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz",
+ "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==",
+ "dev": true
+ },
+ "@jridgewell/sourcemap-codec": {
+ "version": "1.4.14",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
+ "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
+ "dev": true
+ },
"@ngtools/webpack": {
"version": "7.3.9",
"resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-7.3.9.tgz",
@@ -622,54 +953,529 @@
"webpack-sources": "1.3.0"
}
},
- "@schematics/angular": {
- "version": "7.3.9",
- "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-7.3.9.tgz",
- "integrity": "sha512-B3lytFtFeYNLfWdlrIzvy3ulFRccD2/zkoL0734J+DAGfUz7vbysJ50RwYL46sQUcKdZdvb48ktfu1S8yooP6Q==",
+ "@npmcli/fs": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz",
+ "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==",
"dev": true,
"requires": {
- "@angular-devkit/core": "7.3.9",
- "@angular-devkit/schematics": "7.3.9",
- "typescript": "3.2.4"
+ "@gar/promisify": "^1.1.3",
+ "semver": "^7.3.5"
+ },
+ "dependencies": {
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "semver": {
+ "version": "7.3.8",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
+ "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ }
}
},
- "@schematics/update": {
- "version": "0.13.9",
- "resolved": "https://registry.npmjs.org/@schematics/update/-/update-0.13.9.tgz",
- "integrity": "sha512-4MQcaKFxhMzZyE//+DknDh3h3duy3avg2oxSHxdwXlCZ8Q92+4lpegjJcSRiqlEwO4qeJ5XnrjrvzfIiaIZOmA==",
+ "@npmcli/git": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-4.0.3.tgz",
+ "integrity": "sha512-8cXNkDIbnXPVbhXMmQ7/bklCAjtmPaXfI9aEM4iH+xSuEHINLMHhlfESvVwdqmHJRJkR48vNJTSUvoF6GRPSFA==",
"dev": true,
"requires": {
- "@angular-devkit/core": "7.3.9",
- "@angular-devkit/schematics": "7.3.9",
- "@yarnpkg/lockfile": "1.1.0",
- "ini": "1.3.5",
- "pacote": "9.4.0",
- "rxjs": "6.3.3",
- "semver": "5.6.0",
- "semver-intersect": "1.4.0"
+ "@npmcli/promise-spawn": "^6.0.0",
+ "lru-cache": "^7.4.4",
+ "mkdirp": "^1.0.4",
+ "npm-pick-manifest": "^8.0.0",
+ "proc-log": "^3.0.0",
+ "promise-inflight": "^1.0.1",
+ "promise-retry": "^2.0.1",
+ "semver": "^7.3.5",
+ "which": "^3.0.0"
+ },
+ "dependencies": {
+ "lru-cache": {
+ "version": "7.14.1",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz",
+ "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==",
+ "dev": true
+ },
+ "mkdirp": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
+ "dev": true
+ },
+ "semver": {
+ "version": "7.3.8",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
+ "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ },
+ "dependencies": {
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ }
+ }
+ },
+ "which": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz",
+ "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==",
+ "dev": true,
+ "requires": {
+ "isexe": "^2.0.0"
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ }
}
},
- "@types/jasmine": {
- "version": "2.8.16",
- "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.8.16.tgz",
- "integrity": "sha512-056oRlBBp7MDzr+HoU5su099s/s7wjZ3KcHxLfv+Byqb9MwdLUvsfLgw1VS97hsh3ddxSPyQu+olHMnoVTUY6g==",
- "dev": true
- },
- "@types/jasminewd2": {
- "version": "2.0.8",
- "resolved": "https://registry.npmjs.org/@types/jasminewd2/-/jasminewd2-2.0.8.tgz",
- "integrity": "sha512-d9p31r7Nxk0ZH0U39PTH0hiDlJ+qNVGjlt1ucOoTUptxb2v+Y5VMnsxfwN+i3hK4yQnqBi3FMmoMFcd1JHDxdg==",
+ "@npmcli/installed-package-contents": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.1.tgz",
+ "integrity": "sha512-GIykAFdOVK31Q1/zAtT5MbxqQL2vyl9mvFJv+OGu01zxbhL3p0xc8gJjdNGX1mWmUT43aEKVO2L6V/2j4TOsAA==",
"dev": true,
"requires": {
- "@types/jasmine": "*"
+ "npm-bundled": "^3.0.0",
+ "npm-normalize-package-bin": "^3.0.0"
}
},
- "@types/node": {
- "version": "8.9.5",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-8.9.5.tgz",
- "integrity": "sha512-jRHfWsvyMtXdbhnz5CVHxaBgnV6duZnPlQuRSo/dm/GnmikNcmZhxIES4E9OZjUmQ8C+HCl4KJux+cXN/ErGDQ==",
- "dev": true
- },
+ "@npmcli/move-file": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz",
+ "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==",
+ "dev": true,
+ "requires": {
+ "mkdirp": "^1.0.4",
+ "rimraf": "^3.0.2"
+ },
+ "dependencies": {
+ "mkdirp": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
+ "dev": true
+ },
+ "rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "dev": true,
+ "requires": {
+ "glob": "^7.1.3"
+ }
+ }
+ }
+ },
+ "@npmcli/node-gyp": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz",
+ "integrity": "sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA==",
+ "dev": true
+ },
+ "@npmcli/promise-spawn": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz",
+ "integrity": "sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg==",
+ "dev": true,
+ "requires": {
+ "which": "^3.0.0"
+ },
+ "dependencies": {
+ "which": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz",
+ "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==",
+ "dev": true,
+ "requires": {
+ "isexe": "^2.0.0"
+ }
+ }
+ }
+ },
+ "@npmcli/run-script": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-6.0.0.tgz",
+ "integrity": "sha512-ql+AbRur1TeOdl1FY+RAwGW9fcr4ZwiVKabdvm93mujGREVuVLbdkXRJDrkTXSdCjaxYydr1wlA2v67jxWG5BQ==",
+ "dev": true,
+ "requires": {
+ "@npmcli/node-gyp": "^3.0.0",
+ "@npmcli/promise-spawn": "^6.0.0",
+ "node-gyp": "^9.0.0",
+ "read-package-json-fast": "^3.0.0",
+ "which": "^3.0.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true
+ },
+ "are-we-there-yet": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz",
+ "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==",
+ "dev": true,
+ "requires": {
+ "delegates": "^1.0.0",
+ "readable-stream": "^3.6.0"
+ }
+ },
+ "chownr": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
+ "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
+ "dev": true
+ },
+ "fs-minipass": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
+ "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
+ "dev": true,
+ "requires": {
+ "minipass": "^3.0.0"
+ },
+ "dependencies": {
+ "minipass": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ }
+ }
+ },
+ "gauge": {
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz",
+ "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==",
+ "dev": true,
+ "requires": {
+ "aproba": "^1.0.3 || ^2.0.0",
+ "color-support": "^1.1.3",
+ "console-control-strings": "^1.1.0",
+ "has-unicode": "^2.0.1",
+ "signal-exit": "^3.0.7",
+ "string-width": "^4.2.3",
+ "strip-ansi": "^6.0.1",
+ "wide-align": "^1.1.5"
+ }
+ },
+ "glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "graceful-fs": {
+ "version": "4.2.10",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
+ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true
+ },
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ },
+ "mkdirp": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
+ "dev": true
+ },
+ "node-gyp": {
+ "version": "9.3.1",
+ "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.1.tgz",
+ "integrity": "sha512-4Q16ZCqq3g8awk6UplT7AuxQ35XN4R/yf/+wSAwcBUAjg7l58RTactWaP8fIDTi0FzI7YcVLujwExakZlfWkXg==",
+ "dev": true,
+ "requires": {
+ "env-paths": "^2.2.0",
+ "glob": "^7.1.4",
+ "graceful-fs": "^4.2.6",
+ "make-fetch-happen": "^10.0.3",
+ "nopt": "^6.0.0",
+ "npmlog": "^6.0.0",
+ "rimraf": "^3.0.2",
+ "semver": "^7.3.5",
+ "tar": "^6.1.2",
+ "which": "^2.0.2"
+ },
+ "dependencies": {
+ "which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "requires": {
+ "isexe": "^2.0.0"
+ }
+ }
+ }
+ },
+ "nopt": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz",
+ "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==",
+ "dev": true,
+ "requires": {
+ "abbrev": "^1.0.0"
+ }
+ },
+ "npmlog": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz",
+ "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==",
+ "dev": true,
+ "requires": {
+ "are-we-there-yet": "^3.0.0",
+ "console-control-strings": "^1.1.0",
+ "gauge": "^4.0.3",
+ "set-blocking": "^2.0.0"
+ }
+ },
+ "readable-stream": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ }
+ },
+ "rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "dev": true,
+ "requires": {
+ "glob": "^7.1.3"
+ }
+ },
+ "semver": {
+ "version": "7.3.8",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
+ "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
+ "signal-exit": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
+ "dev": true
+ },
+ "string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ }
+ },
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ },
+ "tar": {
+ "version": "6.1.13",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz",
+ "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==",
+ "dev": true,
+ "requires": {
+ "chownr": "^2.0.0",
+ "fs-minipass": "^2.0.0",
+ "minipass": "^4.0.0",
+ "minizlib": "^2.1.1",
+ "mkdirp": "^1.0.3",
+ "yallist": "^4.0.0"
+ }
+ },
+ "which": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz",
+ "integrity": "sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ==",
+ "dev": true,
+ "requires": {
+ "isexe": "^2.0.0"
+ }
+ },
+ "wide-align": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz",
+ "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",
+ "dev": true,
+ "requires": {
+ "string-width": "^1.0.2 || 2 || 3 || 4"
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ }
+ }
+ },
+ "@schematics/angular": {
+ "version": "15.1.4",
+ "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-15.1.4.tgz",
+ "integrity": "sha512-4SV8dDGZeSvts01b8y2W6FmpDD0dQhBlGMhMJKC/tUnhfNKfYCs2VKtMBsIc3ZiGP2yoA3+nUiMmtS6hEkXYHw==",
+ "dev": true,
+ "requires": {
+ "@angular-devkit/core": "15.1.4",
+ "@angular-devkit/schematics": "15.1.4",
+ "jsonc-parser": "3.2.0"
+ },
+ "dependencies": {
+ "@angular-devkit/core": {
+ "version": "15.1.4",
+ "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-15.1.4.tgz",
+ "integrity": "sha512-PW5MRmd9DHJR4FaXchwQtj9pXnsghSTnwRvfZeCRNYgU2sv0DKyTV+YTSJB+kNXnoPNG1Je6amDEkiXecpspXg==",
+ "dev": true,
+ "requires": {
+ "ajv": "8.12.0",
+ "ajv-formats": "2.1.1",
+ "jsonc-parser": "3.2.0",
+ "rxjs": "6.6.7",
+ "source-map": "0.7.4"
+ }
+ },
+ "ajv": {
+ "version": "8.12.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz",
+ "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "dev": true
+ },
+ "json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "dev": true
+ },
+ "rxjs": {
+ "version": "6.6.7",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
+ "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
+ "dev": true,
+ "requires": {
+ "tslib": "^1.9.0"
+ }
+ },
+ "source-map": {
+ "version": "0.7.4",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz",
+ "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==",
+ "dev": true
+ }
+ }
+ },
+ "@tootallnate/once": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz",
+ "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==",
+ "dev": true
+ },
+ "@types/jasmine": {
+ "version": "2.8.16",
+ "resolved": "https://registry.npmjs.org/@types/jasmine/-/jasmine-2.8.16.tgz",
+ "integrity": "sha512-056oRlBBp7MDzr+HoU5su099s/s7wjZ3KcHxLfv+Byqb9MwdLUvsfLgw1VS97hsh3ddxSPyQu+olHMnoVTUY6g==",
+ "dev": true
+ },
+ "@types/jasminewd2": {
+ "version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/@types/jasminewd2/-/jasminewd2-2.0.8.tgz",
+ "integrity": "sha512-d9p31r7Nxk0ZH0U39PTH0hiDlJ+qNVGjlt1ucOoTUptxb2v+Y5VMnsxfwN+i3hK4yQnqBi3FMmoMFcd1JHDxdg==",
+ "dev": true,
+ "requires": {
+ "@types/jasmine": "*"
+ }
+ },
+ "@types/node": {
+ "version": "8.9.5",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-8.9.5.tgz",
+ "integrity": "sha512-jRHfWsvyMtXdbhnz5CVHxaBgnV6duZnPlQuRSo/dm/GnmikNcmZhxIES4E9OZjUmQ8C+HCl4KJux+cXN/ErGDQ==",
+ "dev": true
+ },
"@types/q": {
"version": "0.0.32",
"resolved": "https://registry.npmjs.org/@types/q/-/q-0.0.32.tgz",
@@ -897,22 +1703,11 @@
"integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==",
"dev": true
},
- "JSONStream": {
- "version": "1.3.5",
- "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz",
- "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==",
- "dev": true,
- "requires": {
- "jsonparse": "^1.2.0",
- "through": ">=2.2.7 <3"
- }
- },
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
- "dev": true,
- "optional": true
+ "dev": true
},
"accepts": {
"version": "1.3.7",
@@ -958,12 +1753,49 @@
}
},
"agentkeepalive": {
- "version": "3.5.2",
- "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.5.2.tgz",
- "integrity": "sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ==",
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz",
+ "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==",
"dev": true,
"requires": {
+ "debug": "^4.1.0",
+ "depd": "^1.1.2",
"humanize-ms": "^1.2.1"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dev": true,
+ "requires": {
+ "ms": "2.1.2"
+ }
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ }
+ }
+ },
+ "aggregate-error": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
+ "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==",
+ "dev": true,
+ "requires": {
+ "clean-stack": "^2.0.0",
+ "indent-string": "^4.0.0"
+ },
+ "dependencies": {
+ "indent-string": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
+ "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
+ "dev": true
+ }
}
},
"ajv": {
@@ -984,6 +1816,41 @@
"integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==",
"dev": true
},
+ "ajv-formats": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz",
+ "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==",
+ "dev": true,
+ "requires": {
+ "ajv": "^8.0.0"
+ },
+ "dependencies": {
+ "ajv": {
+ "version": "8.12.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz",
+ "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "dev": true
+ },
+ "json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "dev": true
+ }
+ }
+ },
"ajv-keywords": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz",
@@ -1003,10 +1870,13 @@
"dev": true
},
"ansi-escapes": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz",
- "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==",
- "dev": true
+ "version": "4.3.2",
+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
+ "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==",
+ "dev": true,
+ "requires": {
+ "type-fest": "^0.21.3"
+ }
},
"ansi-html": {
"version": "0.0.7",
@@ -1526,6 +2396,40 @@
"integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==",
"dev": true
},
+ "bl": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
+ "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
+ "dev": true,
+ "requires": {
+ "buffer": "^5.5.0",
+ "inherits": "^2.0.4",
+ "readable-stream": "^3.4.0"
+ },
+ "dependencies": {
+ "buffer": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
+ "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+ "dev": true,
+ "requires": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.1.13"
+ }
+ },
+ "readable-stream": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ }
+ }
+ }
+ },
"blob": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz",
@@ -1809,10 +2713,39 @@
"dev": true
},
"builtins": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz",
- "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=",
- "dev": true
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz",
+ "integrity": "sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==",
+ "dev": true,
+ "requires": {
+ "semver": "^7.0.0"
+ },
+ "dependencies": {
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "semver": {
+ "version": "7.3.8",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
+ "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ }
+ }
},
"bytes": {
"version": "3.0.0",
@@ -2044,19 +2977,31 @@
}
}
},
+ "clean-stack": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
+ "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==",
+ "dev": true
+ },
"cli-cursor": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
- "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
+ "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
"dev": true,
"requires": {
- "restore-cursor": "^2.0.0"
+ "restore-cursor": "^3.1.0"
}
},
+ "cli-spinners": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz",
+ "integrity": "sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw==",
+ "dev": true
+ },
"cli-width": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz",
- "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz",
+ "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==",
"dev": true
},
"cliui": {
@@ -2153,6 +3098,12 @@
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
+ "color-support": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
+ "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
+ "dev": true
+ },
"colors": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz",
@@ -2277,8 +3228,7 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
- "dev": true,
- "optional": true
+ "dev": true
},
"constants-browserify": {
"version": "1.0.0",
@@ -2551,9 +3501,9 @@
"dev": true
},
"decode-uri-component": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
- "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
+ "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
"dev": true
},
"deep-equal": {
@@ -2597,6 +3547,29 @@
}
}
},
+ "defaults": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz",
+ "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==",
+ "dev": true,
+ "requires": {
+ "clone": "^1.0.2"
+ },
+ "dependencies": {
+ "clone": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
+ "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==",
+ "dev": true
+ }
+ }
+ },
+ "define-lazy-prop": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
+ "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==",
+ "dev": true
+ },
"define-properties": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
@@ -2694,8 +3667,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
- "dev": true,
- "optional": true
+ "dev": true
},
"depd": {
"version": "1.1.2",
@@ -2864,6 +3836,12 @@
"minimalistic-crypto-utils": "^1.0.0"
}
},
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
"emojis-list": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz",
@@ -2877,12 +3855,25 @@
"dev": true
},
"encoding": {
- "version": "0.1.12",
- "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz",
- "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=",
+ "version": "0.1.13",
+ "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz",
+ "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",
"dev": true,
+ "optional": true,
"requires": {
- "iconv-lite": "~0.4.13"
+ "iconv-lite": "^0.6.2"
+ },
+ "dependencies": {
+ "iconv-lite": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
+ "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
+ "dev": true,
+ "optional": true,
+ "requires": {
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ }
+ }
}
},
"end-of-stream": {
@@ -2991,10 +3982,16 @@
"integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=",
"dev": true
},
+ "env-paths": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz",
+ "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==",
+ "dev": true
+ },
"err-code": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz",
- "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz",
+ "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==",
"dev": true
},
"errno": {
@@ -3059,6 +4056,12 @@
"es6-promise": "^4.0.3"
}
},
+ "escalade": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
+ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
+ "dev": true
+ },
"escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
@@ -3411,9 +4414,9 @@
"dev": true
},
"figures": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz",
- "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=",
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
+ "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
"dev": true,
"requires": {
"escape-string-regexp": "^1.0.5"
@@ -3514,30 +4517,10 @@
}
},
"follow-redirects": {
- "version": "1.9.0",
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.9.0.tgz",
- "integrity": "sha512-CRcPzsSIbXyVDl0QI01muNDu69S8trU4jArW9LpOt2WtC6LyUJetcIrmfHsRBx7/Jb6GHJUiuqyYxPooFfNt6A==",
- "dev": true,
- "requires": {
- "debug": "^3.0.0"
- },
- "dependencies": {
- "debug": {
- "version": "3.2.6",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
- "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
- "dev": true,
- "requires": {
- "ms": "^2.1.1"
- }
- },
- "ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
- "dev": true
- }
- }
+ "version": "1.14.9",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz",
+ "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==",
+ "dev": true
},
"for-in": {
"version": "1.0.2",
@@ -3623,12 +4606,12 @@
}
},
"fs-minipass": {
- "version": "1.2.7",
- "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz",
- "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==",
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.1.tgz",
+ "integrity": "sha512-MhaJDcFRTuLidHrIttu0RDGyyXs/IYHVmlcxfLAEFIWjc1vdLAkdwT7Ace2u7DbitWC0toKMl5eJZRYNVreIMw==",
"dev": true,
"requires": {
- "minipass": "^2.6.0"
+ "minipass": "^4.0.0"
}
},
"fs-write-stream-atomic": {
@@ -4243,12 +5226,6 @@
"globule": "^1.0.0"
}
},
- "genfun": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/genfun/-/genfun-5.0.0.tgz",
- "integrity": "sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA==",
- "dev": true
- },
"get-caller-file": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
@@ -4455,8 +5432,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
- "dev": true,
- "optional": true
+ "dev": true
},
"has-value": {
"version": "1.0.0",
@@ -4546,9 +5522,9 @@
"dev": true
},
"http-cache-semantics": {
- "version": "3.8.1",
- "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz",
- "integrity": "sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
+ "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==",
"dev": true
},
"http-deceiver": {
@@ -4596,23 +5572,39 @@
}
},
"http-proxy-agent": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz",
- "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz",
+ "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==",
"dev": true,
"requires": {
- "agent-base": "4",
- "debug": "3.1.0"
+ "@tootallnate/once": "2",
+ "agent-base": "6",
+ "debug": "4"
},
"dependencies": {
+ "agent-base": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
+ "dev": true,
+ "requires": {
+ "debug": "4"
+ }
+ },
"debug": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
- "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"dev": true,
"requires": {
- "ms": "2.0.0"
+ "ms": "2.1.2"
}
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
}
}
},
@@ -4675,7 +5667,7 @@
"humanize-ms": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",
- "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=",
+ "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==",
"dev": true,
"requires": {
"ms": "^2.0.0"
@@ -4709,12 +5701,32 @@
"dev": true
},
"ignore-walk": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.2.tgz",
- "integrity": "sha512-EXyErtpHbn75ZTsOADsfx6J/FPo6/5cjev46PXrcTpd8z3BoRkXgYu9/JVqrI7tusjmwCZutGeRJeU0Wo1e4Cw==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.0.tgz",
+ "integrity": "sha512-bTf9UWe/UP1yxG3QUrj/KOvEhTAUWPcv+WvbFZ28LcqznXabp7Xu6o9y1JEC18+oqODuS7VhTpekV5XvFwsxJg==",
"dev": true,
"requires": {
- "minimatch": "^3.0.4"
+ "minimatch": "^5.0.1"
+ },
+ "dependencies": {
+ "brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "minimatch": {
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
+ "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^2.0.1"
+ }
+ }
}
},
"image-size": {
@@ -4851,6 +5863,12 @@
"integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=",
"dev": true
},
+ "infer-owner": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz",
+ "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==",
+ "dev": true
+ },
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
@@ -4874,74 +5892,133 @@
"dev": true
},
"inquirer": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.1.tgz",
- "integrity": "sha512-088kl3DRT2dLU5riVMKKr1DlImd6X7smDhpXUCkJDCKvTEJeRiXh0G132HG9u5a+6Ylw9plFRY7RuTnwohYSpg==",
- "dev": true,
- "requires": {
- "ansi-escapes": "^3.0.0",
- "chalk": "^2.0.0",
- "cli-cursor": "^2.1.0",
- "cli-width": "^2.0.0",
- "external-editor": "^3.0.0",
- "figures": "^2.0.0",
- "lodash": "^4.17.10",
- "mute-stream": "0.0.7",
- "run-async": "^2.2.0",
- "rxjs": "^6.1.0",
- "string-width": "^2.1.0",
- "strip-ansi": "^5.0.0",
- "through": "^2.3.6"
+ "version": "8.2.4",
+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.4.tgz",
+ "integrity": "sha512-nn4F01dxU8VeKfq192IjLsxu0/OmMZ4Lg3xKAns148rCaXP6ntAoEkVYZThWjwON8AlzdZZi6oqnhNbxUG9hVg==",
+ "dev": true,
+ "requires": {
+ "ansi-escapes": "^4.2.1",
+ "chalk": "^4.1.1",
+ "cli-cursor": "^3.1.0",
+ "cli-width": "^3.0.0",
+ "external-editor": "^3.0.3",
+ "figures": "^3.0.0",
+ "lodash": "^4.17.21",
+ "mute-stream": "0.0.8",
+ "ora": "^5.4.1",
+ "run-async": "^2.4.0",
+ "rxjs": "^7.5.5",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0",
+ "through": "^2.3.6",
+ "wrap-ansi": "^7.0.0"
},
"dependencies": {
"ansi-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
- "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
"is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true
},
+ "rxjs": {
+ "version": "7.8.0",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz",
+ "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==",
+ "dev": true,
+ "requires": {
+ "tslib": "^2.1.0"
+ }
+ },
"string-width": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
- "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dev": true,
"requires": {
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^4.0.0"
- },
- "dependencies": {
- "strip-ansi": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
- "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
- "dev": true,
- "requires": {
- "ansi-regex": "^3.0.0"
- }
- }
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
}
},
"strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dev": true,
"requires": {
- "ansi-regex": "^4.1.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
- "dev": true
- }
+ "ansi-regex": "^5.0.1"
+ }
+ },
+ "supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ },
+ "tslib": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz",
+ "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==",
+ "dev": true
+ },
+ "wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
}
}
}
@@ -5048,6 +6125,15 @@
"integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
"dev": true
},
+ "is-core-module": {
+ "version": "2.11.0",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz",
+ "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==",
+ "dev": true,
+ "requires": {
+ "has": "^1.0.3"
+ }
+ },
"is-data-descriptor": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
@@ -5099,6 +6185,12 @@
"integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=",
"dev": true
},
+ "is-docker": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
+ "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
+ "dev": true
+ },
"is-extendable": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
@@ -5138,6 +6230,18 @@
"is-extglob": "^2.1.1"
}
},
+ "is-interactive": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz",
+ "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==",
+ "dev": true
+ },
+ "is-lambda": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz",
+ "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==",
+ "dev": true
+ },
"is-number": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
@@ -5191,12 +6295,6 @@
"isobject": "^3.0.1"
}
},
- "is-promise": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz",
- "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=",
- "dev": true
- },
"is-regex": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
@@ -5227,6 +6325,12 @@
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
"dev": true
},
+ "is-unicode-supported": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz",
+ "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==",
+ "dev": true
+ },
"is-utf8": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
@@ -5613,6 +6717,12 @@
"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
"dev": true
},
+ "json-parse-even-better-errors": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz",
+ "integrity": "sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==",
+ "dev": true
+ },
"json-schema": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
@@ -5638,14 +6748,20 @@
"dev": true
},
"json5": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
- "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
+ "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
"dev": true,
"requires": {
"minimist": "^1.2.0"
}
},
+ "jsonc-parser": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz",
+ "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==",
+ "dev": true
+ },
"jsonfile": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
@@ -5658,7 +6774,7 @@
"jsonparse": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz",
- "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=",
+ "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==",
"dev": true
},
"jsprim": {
@@ -5906,9 +7022,9 @@
}
},
"lodash": {
- "version": "4.17.15",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
- "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
},
"lodash.clonedeep": {
@@ -5929,6 +7045,67 @@
"integrity": "sha1-0jM6NtnncXyK0vfKyv7HwytERmQ=",
"dev": true
},
+ "log-symbols": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz",
+ "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",
+ "dev": true,
+ "requires": {
+ "chalk": "^4.1.0",
+ "is-unicode-supported": "^0.1.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ }
+ }
+ },
"log4js": {
"version": "4.5.1",
"resolved": "https://registry.npmjs.org/log4js/-/log4js-4.5.1.tgz",
@@ -6020,110 +7197,268 @@
"dev": true
},
"make-fetch-happen": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-4.0.2.tgz",
- "integrity": "sha512-YMJrAjHSb/BordlsDEcVcPyTbiJKkzqMf48N8dAJZT9Zjctrkb6Yg4TY9Sq2AwSIQJFn5qBBKVTYt3vP5FMIHA==",
- "dev": true,
- "requires": {
- "agentkeepalive": "^3.4.1",
- "cacache": "^11.3.3",
- "http-cache-semantics": "^3.8.1",
- "http-proxy-agent": "^2.1.0",
- "https-proxy-agent": "^2.2.1",
- "lru-cache": "^5.1.1",
- "mississippi": "^3.0.0",
- "node-fetch-npm": "^2.0.2",
- "promise-retry": "^1.1.1",
- "socks-proxy-agent": "^4.0.0",
- "ssri": "^6.0.0"
+ "version": "10.2.1",
+ "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz",
+ "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==",
+ "dev": true,
+ "requires": {
+ "agentkeepalive": "^4.2.1",
+ "cacache": "^16.1.0",
+ "http-cache-semantics": "^4.1.0",
+ "http-proxy-agent": "^5.0.0",
+ "https-proxy-agent": "^5.0.0",
+ "is-lambda": "^1.0.1",
+ "lru-cache": "^7.7.1",
+ "minipass": "^3.1.6",
+ "minipass-collect": "^1.0.2",
+ "minipass-fetch": "^2.0.3",
+ "minipass-flush": "^1.0.5",
+ "minipass-pipeline": "^1.2.4",
+ "negotiator": "^0.6.3",
+ "promise-retry": "^2.0.1",
+ "socks-proxy-agent": "^7.0.0",
+ "ssri": "^9.0.0"
},
"dependencies": {
+ "agent-base": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
+ "dev": true,
+ "requires": {
+ "debug": "4"
+ }
+ },
+ "brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0"
+ }
+ },
"cacache": {
- "version": "11.3.3",
- "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.3.tgz",
- "integrity": "sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA==",
+ "version": "16.1.3",
+ "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz",
+ "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==",
"dev": true,
"requires": {
- "bluebird": "^3.5.5",
- "chownr": "^1.1.1",
- "figgy-pudding": "^3.5.1",
- "glob": "^7.1.4",
- "graceful-fs": "^4.1.15",
- "lru-cache": "^5.1.1",
- "mississippi": "^3.0.0",
- "mkdirp": "^0.5.1",
- "move-concurrently": "^1.0.1",
+ "@npmcli/fs": "^2.1.0",
+ "@npmcli/move-file": "^2.0.0",
+ "chownr": "^2.0.0",
+ "fs-minipass": "^2.1.0",
+ "glob": "^8.0.1",
+ "infer-owner": "^1.0.4",
+ "lru-cache": "^7.7.1",
+ "minipass": "^3.1.6",
+ "minipass-collect": "^1.0.2",
+ "minipass-flush": "^1.0.5",
+ "minipass-pipeline": "^1.2.4",
+ "mkdirp": "^1.0.4",
+ "p-map": "^4.0.0",
"promise-inflight": "^1.0.1",
- "rimraf": "^2.6.3",
- "ssri": "^6.0.1",
- "unique-filename": "^1.1.1",
- "y18n": "^4.0.0"
+ "rimraf": "^3.0.2",
+ "ssri": "^9.0.0",
+ "tar": "^6.1.11",
+ "unique-filename": "^2.0.0"
+ }
+ },
+ "chownr": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
+ "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
+ "dev": true
+ },
+ "debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dev": true,
+ "requires": {
+ "ms": "2.1.2"
+ }
+ },
+ "fs-minipass": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
+ "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
+ "dev": true,
+ "requires": {
+ "minipass": "^3.0.0"
}
},
"glob": {
- "version": "7.1.4",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
- "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
+ "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
- "minimatch": "^3.0.4",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
+ "minimatch": "^5.0.1",
+ "once": "^1.3.0"
+ }
+ },
+ "https-proxy-agent": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
+ "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
+ "dev": true,
+ "requires": {
+ "agent-base": "6",
+ "debug": "4"
}
},
"lru-cache": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
- "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+ "version": "7.14.1",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz",
+ "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
+ "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
"dev": true,
"requires": {
- "yallist": "^3.0.2"
+ "brace-expansion": "^2.0.1"
}
},
- "mississippi": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz",
- "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==",
+ "minipass": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
"dev": true,
"requires": {
- "concat-stream": "^1.5.0",
- "duplexify": "^3.4.2",
- "end-of-stream": "^1.1.0",
- "flush-write-stream": "^1.0.0",
- "from2": "^2.1.0",
- "parallel-transform": "^1.1.0",
- "pump": "^3.0.0",
- "pumpify": "^1.3.3",
- "stream-each": "^1.1.0",
- "through2": "^2.0.0"
+ "yallist": "^4.0.0"
}
},
- "pump": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
- "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
+ "mkdirp": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
+ "dev": true
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ },
+ "negotiator": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
+ "dev": true
+ },
+ "p-map": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",
+ "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",
"dev": true,
"requires": {
- "end-of-stream": "^1.1.0",
- "once": "^1.3.1"
+ "aggregate-error": "^3.0.0"
+ }
+ },
+ "rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "dev": true,
+ "requires": {
+ "glob": "^7.1.3"
+ },
+ "dependencies": {
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ }
}
},
"ssri": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz",
- "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==",
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz",
+ "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==",
"dev": true,
"requires": {
- "figgy-pudding": "^3.5.1"
+ "minipass": "^3.1.1"
+ }
+ },
+ "tar": {
+ "version": "6.1.13",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz",
+ "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==",
+ "dev": true,
+ "requires": {
+ "chownr": "^2.0.0",
+ "fs-minipass": "^2.0.0",
+ "minipass": "^4.0.0",
+ "minizlib": "^2.1.1",
+ "mkdirp": "^1.0.3",
+ "yallist": "^4.0.0"
+ },
+ "dependencies": {
+ "minipass": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.1.tgz",
+ "integrity": "sha512-V9esFpNbK0arbN3fm2sxDKqMYgIp7XtVdE4Esj+PE4Qaaxdg1wIw48ITQIOn1sc8xXSmUviVL3cyjMqPlrVkiA==",
+ "dev": true
+ }
+ }
+ },
+ "unique-filename": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz",
+ "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==",
+ "dev": true,
+ "requires": {
+ "unique-slug": "^3.0.0"
+ }
+ },
+ "unique-slug": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz",
+ "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==",
+ "dev": true,
+ "requires": {
+ "imurmurhash": "^0.1.4"
}
},
"yallist": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true
}
}
@@ -6325,30 +7660,196 @@
"dev": true
},
"minipass": {
- "version": "2.9.0",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz",
- "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==",
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.1.tgz",
+ "integrity": "sha512-V9esFpNbK0arbN3fm2sxDKqMYgIp7XtVdE4Esj+PE4Qaaxdg1wIw48ITQIOn1sc8xXSmUviVL3cyjMqPlrVkiA==",
+ "dev": true
+ },
+ "minipass-collect": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz",
+ "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==",
"dev": true,
"requires": {
- "safe-buffer": "^5.1.2",
- "yallist": "^3.0.0"
+ "minipass": "^3.0.0"
+ },
+ "dependencies": {
+ "minipass": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ }
+ }
+ },
+ "minipass-fetch": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz",
+ "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==",
+ "dev": true,
+ "requires": {
+ "encoding": "^0.1.13",
+ "minipass": "^3.1.6",
+ "minipass-sized": "^1.0.3",
+ "minizlib": "^2.1.2"
},
"dependencies": {
+ "minipass": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ }
+ }
+ },
+ "minipass-flush": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz",
+ "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==",
+ "dev": true,
+ "requires": {
+ "minipass": "^3.0.0"
+ },
+ "dependencies": {
+ "minipass": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ }
+ }
+ },
+ "minipass-json-stream": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz",
+ "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==",
+ "dev": true,
+ "requires": {
+ "jsonparse": "^1.3.1",
+ "minipass": "^3.0.0"
+ },
+ "dependencies": {
+ "minipass": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ }
+ }
+ },
+ "minipass-pipeline": {
+ "version": "1.2.4",
+ "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz",
+ "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==",
+ "dev": true,
+ "requires": {
+ "minipass": "^3.0.0"
+ },
+ "dependencies": {
+ "minipass": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ }
+ }
+ },
+ "minipass-sized": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz",
+ "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==",
+ "dev": true,
+ "requires": {
+ "minipass": "^3.0.0"
+ },
+ "dependencies": {
+ "minipass": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
"yallist": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true
}
}
},
"minizlib": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz",
- "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==",
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",
+ "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
"dev": true,
"requires": {
- "minipass": "^2.9.0"
+ "minipass": "^3.0.0",
+ "yallist": "^4.0.0"
+ },
+ "dependencies": {
+ "minipass": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ }
}
},
"mississippi": {
@@ -6462,9 +7963,9 @@
"dev": true
},
"mute-stream": {
- "version": "0.0.7",
- "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz",
- "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=",
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
+ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
"dev": true
},
"nan": {
@@ -6511,17 +8012,6 @@
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
"dev": true
},
- "node-fetch-npm": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz",
- "integrity": "sha512-nJIxm1QmAj4v3nfCvEeCrYSoVwXyxLnaPBK5W1W5DGEJwjlKuC2VEUycGw5oxk+4zZahRrB84PUJJgEmhFTDFw==",
- "dev": true,
- "requires": {
- "encoding": "^0.1.11",
- "json-parse-better-errors": "^1.0.0",
- "safe-buffer": "^5.1.1"
- }
- },
"node-forge": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz",
@@ -6708,71 +8198,422 @@
"dev": true
},
"npm-bundled": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz",
- "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz",
+ "integrity": "sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ==",
+ "dev": true,
+ "requires": {
+ "npm-normalize-package-bin": "^3.0.0"
+ }
+ },
+ "npm-install-checks": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.0.0.tgz",
+ "integrity": "sha512-SBU9oFglRVZnfElwAtF14NivyulDqF1VKqqwNsFW9HDcbHMAPHpRSsVFgKuwFGq/hVvWZExz62Th0kvxn/XE7Q==",
+ "dev": true,
+ "requires": {
+ "semver": "^7.1.1"
+ },
+ "dependencies": {
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "semver": {
+ "version": "7.3.8",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
+ "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ }
+ }
+ },
+ "npm-normalize-package-bin": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.0.tgz",
+ "integrity": "sha512-g+DPQSkusnk7HYXr75NtzkIP4+N81i3RPsGFidF3DzHd9MT9wWngmqoeg/fnHFz5MNdtG4w03s+QnhewSLTT2Q==",
"dev": true
},
"npm-package-arg": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.0.tgz",
- "integrity": "sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA==",
+ "version": "10.1.0",
+ "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz",
+ "integrity": "sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA==",
"dev": true,
"requires": {
- "hosted-git-info": "^2.6.0",
- "osenv": "^0.1.5",
- "semver": "^5.5.0",
- "validate-npm-package-name": "^3.0.0"
+ "hosted-git-info": "^6.0.0",
+ "proc-log": "^3.0.0",
+ "semver": "^7.3.5",
+ "validate-npm-package-name": "^5.0.0"
+ },
+ "dependencies": {
+ "hosted-git-info": {
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz",
+ "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^7.5.1"
+ }
+ },
+ "lru-cache": {
+ "version": "7.14.1",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz",
+ "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==",
+ "dev": true
+ },
+ "semver": {
+ "version": "7.3.8",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
+ "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ },
+ "dependencies": {
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ }
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ }
}
},
"npm-packlist": {
- "version": "1.4.4",
- "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.4.tgz",
- "integrity": "sha512-zTLo8UcVYtDU3gdeaFu2Xu0n0EvelfHDGuqtNIn5RO7yQj4H1TqNdBc/yZjxnWA0PVB8D3Woyp0i5B43JwQ6Vw==",
+ "version": "7.0.4",
+ "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.4.tgz",
+ "integrity": "sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q==",
"dev": true,
"requires": {
- "ignore-walk": "^3.0.1",
- "npm-bundled": "^1.0.1"
+ "ignore-walk": "^6.0.0"
}
},
"npm-pick-manifest": {
- "version": "2.2.3",
- "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-2.2.3.tgz",
- "integrity": "sha512-+IluBC5K201+gRU85vFlUwX3PFShZAbAgDNp2ewJdWMVSppdo/Zih0ul2Ecky/X7b51J7LrrUAP+XOmOCvYZqA==",
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-8.0.1.tgz",
+ "integrity": "sha512-mRtvlBjTsJvfCCdmPtiu2bdlx8d/KXtF7yNXNWe7G0Z36qWA9Ny5zXsI2PfBZEv7SXgoxTmNaTzGSbbzDZChoA==",
"dev": true,
"requires": {
- "figgy-pudding": "^3.5.1",
- "npm-package-arg": "^6.0.0",
- "semver": "^5.4.1"
+ "npm-install-checks": "^6.0.0",
+ "npm-normalize-package-bin": "^3.0.0",
+ "npm-package-arg": "^10.0.0",
+ "semver": "^7.3.5"
+ },
+ "dependencies": {
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "semver": {
+ "version": "7.3.8",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
+ "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ }
}
},
"npm-registry-fetch": {
- "version": "3.9.1",
- "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-3.9.1.tgz",
- "integrity": "sha512-VQCEZlydXw4AwLROAXWUR7QDfe2Y8Id/vpAgp6TI1/H78a4SiQ1kQrKZALm5/zxM5n4HIi+aYb+idUAV/RuY0Q==",
- "dev": true,
- "requires": {
- "JSONStream": "^1.3.4",
- "bluebird": "^3.5.1",
- "figgy-pudding": "^3.4.1",
- "lru-cache": "^5.1.1",
- "make-fetch-happen": "^4.0.2",
- "npm-package-arg": "^6.1.0"
+ "version": "14.0.3",
+ "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.3.tgz",
+ "integrity": "sha512-YaeRbVNpnWvsGOjX2wk5s85XJ7l1qQBGAp724h8e2CZFFhMSuw9enom7K1mWVUtvXO1uUSFIAPofQK0pPN0ZcA==",
+ "dev": true,
+ "requires": {
+ "make-fetch-happen": "^11.0.0",
+ "minipass": "^4.0.0",
+ "minipass-fetch": "^3.0.0",
+ "minipass-json-stream": "^1.0.1",
+ "minizlib": "^2.1.2",
+ "npm-package-arg": "^10.0.0",
+ "proc-log": "^3.0.0"
},
"dependencies": {
+ "@npmcli/fs": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz",
+ "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==",
+ "dev": true,
+ "requires": {
+ "semver": "^7.3.5"
+ }
+ },
+ "agent-base": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
+ "dev": true,
+ "requires": {
+ "debug": "4"
+ }
+ },
+ "brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "cacache": {
+ "version": "17.0.4",
+ "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.0.4.tgz",
+ "integrity": "sha512-Z/nL3gU+zTUjz5pCA5vVjYM8pmaw2kxM7JEiE0fv3w77Wj+sFbi70CrBruUWH0uNcEdvLDixFpgA2JM4F4DBjA==",
+ "dev": true,
+ "requires": {
+ "@npmcli/fs": "^3.1.0",
+ "fs-minipass": "^3.0.0",
+ "glob": "^8.0.1",
+ "lru-cache": "^7.7.1",
+ "minipass": "^4.0.0",
+ "minipass-collect": "^1.0.2",
+ "minipass-flush": "^1.0.5",
+ "minipass-pipeline": "^1.2.4",
+ "p-map": "^4.0.0",
+ "promise-inflight": "^1.0.1",
+ "ssri": "^10.0.0",
+ "tar": "^6.1.11",
+ "unique-filename": "^3.0.0"
+ }
+ },
+ "chownr": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
+ "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
+ "dev": true
+ },
+ "debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dev": true,
+ "requires": {
+ "ms": "2.1.2"
+ }
+ },
+ "glob": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
+ "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^5.0.1",
+ "once": "^1.3.0"
+ }
+ },
+ "https-proxy-agent": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
+ "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
+ "dev": true,
+ "requires": {
+ "agent-base": "6",
+ "debug": "4"
+ }
+ },
"lru-cache": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
- "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+ "version": "7.14.1",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz",
+ "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==",
+ "dev": true
+ },
+ "make-fetch-happen": {
+ "version": "11.0.3",
+ "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.0.3.tgz",
+ "integrity": "sha512-oPLh5m10lRNNZDjJ2kP8UpboUx2uFXVaVweVe/lWut4iHWcQEmfqSVJt2ihZsFI8HbpwyyocaXbCAWf0g1ukIA==",
"dev": true,
"requires": {
- "yallist": "^3.0.2"
+ "agentkeepalive": "^4.2.1",
+ "cacache": "^17.0.0",
+ "http-cache-semantics": "^4.1.1",
+ "http-proxy-agent": "^5.0.0",
+ "https-proxy-agent": "^5.0.0",
+ "is-lambda": "^1.0.1",
+ "lru-cache": "^7.7.1",
+ "minipass": "^4.0.0",
+ "minipass-fetch": "^3.0.0",
+ "minipass-flush": "^1.0.5",
+ "minipass-pipeline": "^1.2.4",
+ "negotiator": "^0.6.3",
+ "promise-retry": "^2.0.1",
+ "socks-proxy-agent": "^7.0.0",
+ "ssri": "^10.0.0"
+ }
+ },
+ "minimatch": {
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
+ "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^2.0.1"
+ }
+ },
+ "minipass-fetch": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.1.tgz",
+ "integrity": "sha512-t9/wowtf7DYkwz8cfMSt0rMwiyNIBXf5CKZ3S5ZMqRqMYT0oLTp0x1WorMI9WTwvaPg21r1JbFxJMum8JrLGfw==",
+ "dev": true,
+ "requires": {
+ "encoding": "^0.1.13",
+ "minipass": "^4.0.0",
+ "minipass-sized": "^1.0.3",
+ "minizlib": "^2.1.2"
+ }
+ },
+ "mkdirp": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
+ "dev": true
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ },
+ "negotiator": {
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
+ "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
+ "dev": true
+ },
+ "p-map": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",
+ "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",
+ "dev": true,
+ "requires": {
+ "aggregate-error": "^3.0.0"
+ }
+ },
+ "semver": {
+ "version": "7.3.8",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
+ "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ },
+ "dependencies": {
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ }
+ }
+ },
+ "ssri": {
+ "version": "10.0.1",
+ "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.1.tgz",
+ "integrity": "sha512-WVy6di9DlPOeBWEjMScpNipeSX2jIZBGEn5Uuo8Q7aIuFEuDX0pw8RxcOjlD1TWP4obi24ki7m/13+nFpcbXrw==",
+ "dev": true,
+ "requires": {
+ "minipass": "^4.0.0"
+ }
+ },
+ "tar": {
+ "version": "6.1.13",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz",
+ "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==",
+ "dev": true,
+ "requires": {
+ "chownr": "^2.0.0",
+ "fs-minipass": "^2.0.0",
+ "minipass": "^4.0.0",
+ "minizlib": "^2.1.1",
+ "mkdirp": "^1.0.3",
+ "yallist": "^4.0.0"
+ },
+ "dependencies": {
+ "fs-minipass": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
+ "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
+ "dev": true,
+ "requires": {
+ "minipass": "^3.0.0"
+ },
+ "dependencies": {
+ "minipass": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ }
+ }
+ }
+ }
+ },
+ "unique-filename": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz",
+ "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==",
+ "dev": true,
+ "requires": {
+ "unique-slug": "^4.0.0"
+ }
+ },
+ "unique-slug": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz",
+ "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==",
+ "dev": true,
+ "requires": {
+ "imurmurhash": "^0.1.4"
}
},
"yallist": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true
}
}
@@ -6943,20 +8784,12 @@
}
},
"onetime": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz",
- "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=",
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
+ "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
"dev": true,
"requires": {
- "mimic-fn": "^1.0.0"
- },
- "dependencies": {
- "mimic-fn": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
- "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
- "dev": true
- }
+ "mimic-fn": "^2.1.0"
}
},
"open": {
@@ -6995,6 +8828,89 @@
}
}
},
+ "ora": {
+ "version": "5.4.1",
+ "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz",
+ "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==",
+ "dev": true,
+ "requires": {
+ "bl": "^4.1.0",
+ "chalk": "^4.1.0",
+ "cli-cursor": "^3.1.0",
+ "cli-spinners": "^2.5.0",
+ "is-interactive": "^1.0.0",
+ "is-unicode-supported": "^0.1.0",
+ "log-symbols": "^4.1.0",
+ "strip-ansi": "^6.0.0",
+ "wcwidth": "^1.0.1"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^2.0.1"
+ }
+ },
+ "chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true
+ },
+ "strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.1"
+ }
+ },
+ "supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ }
+ }
+ },
"original": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz",
@@ -7014,7 +8930,8 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
- "dev": true
+ "dev": true,
+ "optional": true
},
"os-locale": {
"version": "1.4.0",
@@ -7037,6 +8954,7 @@
"resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
"dev": true,
+ "optional": true,
"requires": {
"os-homedir": "^1.0.0",
"os-tmpdir": "^1.0.0"
@@ -7091,152 +9009,205 @@
"dev": true
},
"pacote": {
- "version": "9.4.0",
- "resolved": "https://registry.npmjs.org/pacote/-/pacote-9.4.0.tgz",
- "integrity": "sha512-WQ1KL/phGMkedYEQx9ODsjj7xvwLSpdFJJdEXrLyw5SILMxcTNt5DTxT2Z93fXuLFYJBlZJdnwdalrQdB/rX5w==",
- "dev": true,
- "requires": {
- "bluebird": "^3.5.3",
- "cacache": "^11.3.2",
- "figgy-pudding": "^3.5.1",
- "get-stream": "^4.1.0",
- "glob": "^7.1.3",
- "lru-cache": "^5.1.1",
- "make-fetch-happen": "^4.0.1",
- "minimatch": "^3.0.4",
- "minipass": "^2.3.5",
- "mississippi": "^3.0.0",
- "mkdirp": "^0.5.1",
- "normalize-package-data": "^2.4.0",
- "npm-package-arg": "^6.1.0",
- "npm-packlist": "^1.1.12",
- "npm-pick-manifest": "^2.2.3",
- "npm-registry-fetch": "^3.8.0",
- "osenv": "^0.1.5",
- "promise-inflight": "^1.0.1",
- "promise-retry": "^1.1.1",
- "protoduck": "^5.0.1",
- "rimraf": "^2.6.2",
- "safe-buffer": "^5.1.2",
- "semver": "^5.6.0",
- "ssri": "^6.0.1",
- "tar": "^4.4.8",
- "unique-filename": "^1.1.1",
- "which": "^1.3.1"
+ "version": "15.0.8",
+ "resolved": "https://registry.npmjs.org/pacote/-/pacote-15.0.8.tgz",
+ "integrity": "sha512-UlcumB/XS6xyyIMwg/WwMAyUmga+RivB5KgkRwA1hZNtrx+0Bt41KxHCvg1kr0pZ/ZeD8qjhW4fph6VaYRCbLw==",
+ "dev": true,
+ "requires": {
+ "@npmcli/git": "^4.0.0",
+ "@npmcli/installed-package-contents": "^2.0.1",
+ "@npmcli/promise-spawn": "^6.0.1",
+ "@npmcli/run-script": "^6.0.0",
+ "cacache": "^17.0.0",
+ "fs-minipass": "^3.0.0",
+ "minipass": "^4.0.0",
+ "npm-package-arg": "^10.0.0",
+ "npm-packlist": "^7.0.0",
+ "npm-pick-manifest": "^8.0.0",
+ "npm-registry-fetch": "^14.0.0",
+ "proc-log": "^3.0.0",
+ "promise-retry": "^2.0.1",
+ "read-package-json": "^6.0.0",
+ "read-package-json-fast": "^3.0.0",
+ "ssri": "^10.0.0",
+ "tar": "^6.1.11"
},
"dependencies": {
+ "@npmcli/fs": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz",
+ "integrity": "sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w==",
+ "dev": true,
+ "requires": {
+ "semver": "^7.3.5"
+ }
+ },
+ "brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0"
+ }
+ },
"cacache": {
- "version": "11.3.3",
- "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.3.tgz",
- "integrity": "sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA==",
+ "version": "17.0.4",
+ "resolved": "https://registry.npmjs.org/cacache/-/cacache-17.0.4.tgz",
+ "integrity": "sha512-Z/nL3gU+zTUjz5pCA5vVjYM8pmaw2kxM7JEiE0fv3w77Wj+sFbi70CrBruUWH0uNcEdvLDixFpgA2JM4F4DBjA==",
"dev": true,
"requires": {
- "bluebird": "^3.5.5",
- "chownr": "^1.1.1",
- "figgy-pudding": "^3.5.1",
- "glob": "^7.1.4",
- "graceful-fs": "^4.1.15",
- "lru-cache": "^5.1.1",
- "mississippi": "^3.0.0",
- "mkdirp": "^0.5.1",
- "move-concurrently": "^1.0.1",
+ "@npmcli/fs": "^3.1.0",
+ "fs-minipass": "^3.0.0",
+ "glob": "^8.0.1",
+ "lru-cache": "^7.7.1",
+ "minipass": "^4.0.0",
+ "minipass-collect": "^1.0.2",
+ "minipass-flush": "^1.0.5",
+ "minipass-pipeline": "^1.2.4",
+ "p-map": "^4.0.0",
"promise-inflight": "^1.0.1",
- "rimraf": "^2.6.3",
- "ssri": "^6.0.1",
- "unique-filename": "^1.1.1",
- "y18n": "^4.0.0"
- },
- "dependencies": {
- "glob": {
- "version": "7.1.4",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
- "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
- "dev": true,
- "requires": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.0.4",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- }
- }
+ "ssri": "^10.0.0",
+ "tar": "^6.1.11",
+ "unique-filename": "^3.0.0"
}
},
- "get-stream": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
- "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
+ "chownr": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
+ "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
+ "dev": true
+ },
+ "glob": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
+ "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
"dev": true,
"requires": {
- "pump": "^3.0.0"
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^5.0.1",
+ "once": "^1.3.0"
}
},
"lru-cache": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
- "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+ "version": "7.14.1",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz",
+ "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
+ "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
"dev": true,
"requires": {
- "yallist": "^3.0.2"
+ "brace-expansion": "^2.0.1"
}
},
- "mississippi": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz",
- "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==",
+ "mkdirp": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
+ "dev": true
+ },
+ "p-map": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",
+ "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",
"dev": true,
"requires": {
- "concat-stream": "^1.5.0",
- "duplexify": "^3.4.2",
- "end-of-stream": "^1.1.0",
- "flush-write-stream": "^1.0.0",
- "from2": "^2.1.0",
- "parallel-transform": "^1.1.0",
- "pump": "^3.0.0",
- "pumpify": "^1.3.3",
- "stream-each": "^1.1.0",
- "through2": "^2.0.0"
+ "aggregate-error": "^3.0.0"
}
},
- "pump": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
- "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
+ "semver": {
+ "version": "7.3.8",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
+ "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
"dev": true,
"requires": {
- "end-of-stream": "^1.1.0",
- "once": "^1.3.1"
+ "lru-cache": "^6.0.0"
+ },
+ "dependencies": {
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ }
}
},
"ssri": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz",
- "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==",
+ "version": "10.0.1",
+ "resolved": "https://registry.npmjs.org/ssri/-/ssri-10.0.1.tgz",
+ "integrity": "sha512-WVy6di9DlPOeBWEjMScpNipeSX2jIZBGEn5Uuo8Q7aIuFEuDX0pw8RxcOjlD1TWP4obi24ki7m/13+nFpcbXrw==",
"dev": true,
"requires": {
- "figgy-pudding": "^3.5.1"
+ "minipass": "^4.0.0"
}
},
"tar": {
- "version": "4.4.13",
- "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz",
- "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==",
+ "version": "6.1.13",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz",
+ "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==",
"dev": true,
"requires": {
- "chownr": "^1.1.1",
- "fs-minipass": "^1.2.5",
- "minipass": "^2.8.6",
- "minizlib": "^1.2.1",
- "mkdirp": "^0.5.0",
- "safe-buffer": "^5.1.2",
- "yallist": "^3.0.3"
+ "chownr": "^2.0.0",
+ "fs-minipass": "^2.0.0",
+ "minipass": "^4.0.0",
+ "minizlib": "^2.1.1",
+ "mkdirp": "^1.0.3",
+ "yallist": "^4.0.0"
+ },
+ "dependencies": {
+ "fs-minipass": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
+ "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
+ "dev": true,
+ "requires": {
+ "minipass": "^3.0.0"
+ },
+ "dependencies": {
+ "minipass": {
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
+ "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ }
+ }
+ }
+ }
+ },
+ "unique-filename": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz",
+ "integrity": "sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g==",
+ "dev": true,
+ "requires": {
+ "unique-slug": "^4.0.0"
+ }
+ },
+ "unique-slug": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz",
+ "integrity": "sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ==",
+ "dev": true,
+ "requires": {
+ "imurmurhash": "^0.1.4"
}
},
"yallist": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
- "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true
}
}
@@ -7507,6 +9478,12 @@
"integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==",
"dev": true
},
+ "proc-log": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz",
+ "integrity": "sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==",
+ "dev": true
+ },
"process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
@@ -7536,22 +9513,13 @@
"dev": true
},
"promise-retry": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-1.1.1.tgz",
- "integrity": "sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0=",
- "dev": true,
- "requires": {
- "err-code": "^1.0.0",
- "retry": "^0.10.0"
- }
- },
- "protoduck": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/protoduck/-/protoduck-5.0.1.tgz",
- "integrity": "sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz",
+ "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==",
"dev": true,
"requires": {
- "genfun": "^5.0.0"
+ "err-code": "^2.0.2",
+ "retry": "^0.12.0"
}
},
"protractor": {
@@ -7823,31 +9791,139 @@
}
}
},
- "raw-loader": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-1.0.0.tgz",
- "integrity": "sha512-Uqy5AqELpytJTRxYT4fhltcKPj0TyaEpzJDcGz7DFJi+pQOOi3GjR/DOdxTkTsF+NzhnldIoG6TORaBlInUuqA==",
- "dev": true,
- "requires": {
- "loader-utils": "^1.1.0",
- "schema-utils": "^1.0.0"
- }
- },
- "read-cache": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
- "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=",
+ "raw-loader": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-1.0.0.tgz",
+ "integrity": "sha512-Uqy5AqELpytJTRxYT4fhltcKPj0TyaEpzJDcGz7DFJi+pQOOi3GjR/DOdxTkTsF+NzhnldIoG6TORaBlInUuqA==",
+ "dev": true,
+ "requires": {
+ "loader-utils": "^1.1.0",
+ "schema-utils": "^1.0.0"
+ }
+ },
+ "read-cache": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz",
+ "integrity": "sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=",
+ "dev": true,
+ "requires": {
+ "pify": "^2.3.0"
+ },
+ "dependencies": {
+ "pify": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
+ "dev": true
+ }
+ }
+ },
+ "read-package-json": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-6.0.0.tgz",
+ "integrity": "sha512-b/9jxWJ8EwogJPpv99ma+QwtqB7FSl3+V6UXS7Aaay8/5VwMY50oIFooY1UKXMWpfNCM6T/PoGqa5GD1g9xf9w==",
+ "dev": true,
+ "requires": {
+ "glob": "^8.0.1",
+ "json-parse-even-better-errors": "^3.0.0",
+ "normalize-package-data": "^5.0.0",
+ "npm-normalize-package-bin": "^3.0.0"
+ },
+ "dependencies": {
+ "brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "glob": {
+ "version": "8.1.0",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
+ "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^5.0.1",
+ "once": "^1.3.0"
+ }
+ },
+ "hosted-git-info": {
+ "version": "6.1.1",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz",
+ "integrity": "sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^7.5.1"
+ }
+ },
+ "lru-cache": {
+ "version": "7.14.1",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz",
+ "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
+ "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^2.0.1"
+ }
+ },
+ "normalize-package-data": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz",
+ "integrity": "sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q==",
+ "dev": true,
+ "requires": {
+ "hosted-git-info": "^6.0.0",
+ "is-core-module": "^2.8.1",
+ "semver": "^7.3.5",
+ "validate-npm-package-license": "^3.0.4"
+ }
+ },
+ "semver": {
+ "version": "7.3.8",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
+ "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ },
+ "dependencies": {
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ }
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ }
+ }
+ },
+ "read-package-json-fast": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz",
+ "integrity": "sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==",
"dev": true,
"requires": {
- "pify": "^2.3.0"
- },
- "dependencies": {
- "pify": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
- "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
- "dev": true
- }
+ "json-parse-even-better-errors": "^3.0.0",
+ "npm-normalize-package-bin": "^3.0.0"
}
},
"read-pkg": {
@@ -8095,6 +10171,12 @@
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
"dev": true
},
+ "require-from-string": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
+ "dev": true
+ },
"require-main-filename": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
@@ -8138,12 +10220,12 @@
"dev": true
},
"restore-cursor": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
- "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
+ "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
"dev": true,
"requires": {
- "onetime": "^2.0.0",
+ "onetime": "^5.1.0",
"signal-exit": "^3.0.2"
}
},
@@ -8154,9 +10236,9 @@
"dev": true
},
"retry": {
- "version": "0.10.1",
- "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz",
- "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=",
+ "version": "0.12.0",
+ "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz",
+ "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==",
"dev": true
},
"rfdc": {
@@ -8190,7 +10272,6 @@
"async": "~1.2.1",
"console-polyfill": "0.3.0",
"decache": "^3.0.5",
- "error-stack-parser": "^2.0.4",
"json-stringify-safe": "~5.0.0",
"lru-cache": "~2.2.1",
"request-ip": "~2.0.1",
@@ -8200,31 +10281,27 @@
"dependencies": {
"@babel/code-frame": {
"version": "7.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz",
+ "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==",
"requires": {
"@babel/highlight": "^7.0.0"
}
},
"@babel/generator": {
"version": "7.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.2.0.tgz",
+ "integrity": "sha512-BA75MVfRlFQG2EZgFYIwyT1r6xSkwfP2bdkY/kLZusEYWiJs4xCowab/alaEaT0wSvmVuXGqiefeBlP+7V1yKg==",
"requires": {
"@babel/types": "^7.2.0",
"jsesc": "^2.5.1",
- "lodash": "^4.17.10",
"source-map": "^0.5.0",
"trim-right": "^1.0.1"
- },
- "dependencies": {
- "lodash": {
- "version": "4.17.11",
- "resolved": false
- }
}
},
"@babel/helper-function-name": {
"version": "7.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz",
+ "integrity": "sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==",
"requires": {
"@babel/helper-get-function-arity": "^7.0.0",
"@babel/template": "^7.1.0",
@@ -8233,21 +10310,24 @@
},
"@babel/helper-get-function-arity": {
"version": "7.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz",
+ "integrity": "sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==",
"requires": {
"@babel/types": "^7.0.0"
}
},
"@babel/helper-split-export-declaration": {
"version": "7.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz",
+ "integrity": "sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==",
"requires": {
"@babel/types": "^7.0.0"
}
},
"@babel/highlight": {
"version": "7.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz",
+ "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==",
"requires": {
"chalk": "^2.0.0",
"esutils": "^2.0.2",
@@ -8256,14 +10336,16 @@
"dependencies": {
"ansi-styles": {
"version": "3.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"requires": {
"color-convert": "^1.9.0"
}
},
"chalk": {
"version": "2.4.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
+ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
@@ -8272,11 +10354,13 @@
},
"has-flag": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"supports-color": {
"version": "5.5.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"requires": {
"has-flag": "^3.0.0"
}
@@ -8285,11 +10369,13 @@
},
"@babel/parser": {
"version": "7.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.2.0.tgz",
+ "integrity": "sha512-M74+GvK4hn1eejD9lZ7967qAwvqTZayQa3g10ag4s9uewgR7TKjeaT0YMyoq+gVfKYABiWZ4MQD701/t5e1Jhg=="
},
"@babel/template": {
"version": "7.1.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.1.2.tgz",
+ "integrity": "sha512-SY1MmplssORfFiLDcOETrW7fCLl+PavlwMh92rrGcikQaRq4iWPVH0MpwPpY3etVMx6RnDjXtr6VZYr/IbP/Ag==",
"requires": {
"@babel/code-frame": "^7.0.0",
"@babel/parser": "^7.1.2",
@@ -8298,7 +10384,8 @@
},
"@babel/traverse": {
"version": "7.1.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.1.6.tgz",
+ "integrity": "sha512-CXedit6GpISz3sC2k2FsGCUpOhUqKdyL0lqNrImQojagnUMXf8hex4AxYFRuMkNGcvJX5QAFGzB5WJQmSv8SiQ==",
"requires": {
"@babel/code-frame": "^7.0.0",
"@babel/generator": "^7.1.6",
@@ -8307,62 +10394,59 @@
"@babel/parser": "^7.1.6",
"@babel/types": "^7.1.6",
"debug": "^4.1.0",
- "globals": "^11.1.0",
- "lodash": "^4.17.10"
+ "globals": "^11.1.0"
},
"dependencies": {
"debug": {
"version": "4.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz",
+ "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==",
"requires": {
"ms": "^2.1.1"
}
},
- "lodash": {
- "version": "4.17.11",
- "resolved": false
- },
"ms": {
"version": "2.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}
}
},
"@babel/types": {
"version": "7.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.2.0.tgz",
+ "integrity": "sha512-b4v7dyfApuKDvmPb+O488UlGuR1WbwMXFsO/cyqMrnfvRAChZKJAYeeglWTjUO1b9UghKKgepAQM5tsvBJca6A==",
"requires": {
"esutils": "^2.0.2",
- "lodash": "^4.17.10",
"to-fast-properties": "^2.0.0"
},
"dependencies": {
- "lodash": {
- "version": "4.17.11",
- "resolved": false
- },
"to-fast-properties": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
+ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4="
}
}
},
"@sinonjs/commons": {
"version": "1.4.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.4.0.tgz",
+ "integrity": "sha512-9jHK3YF/8HtJ9wCAbG+j8cD0i0+ATS9A7gXFqS36TblLPNy6rEEc+SB0imo91eCboGaBYGV/MT1/br/J+EE7Tw==",
"requires": {
"type-detect": "4.0.8"
},
"dependencies": {
"type-detect": {
"version": "4.0.8",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
+ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g=="
}
}
},
"@sinonjs/formatio": {
"version": "3.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.2.1.tgz",
+ "integrity": "sha512-tsHvOB24rvyvV2+zKMmPkZ7dXX6LSLKZ7aOtXY6Edklp0uRcgGpOsQTTGTcWViFyx4uhWc6GV8QdnALbIbIdeQ==",
"requires": {
"@sinonjs/commons": "^1",
"@sinonjs/samsam": "^3.1.0"
@@ -8370,26 +10454,22 @@
},
"@sinonjs/samsam": {
"version": "3.3.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.1.tgz",
+ "integrity": "sha512-wRSfmyd81swH0hA1bxJZJ57xr22kC07a1N4zuIL47yTS04bDk6AoCkczcqHEjcRPmJ+FruGJ9WBQiJwMtIElFw==",
"requires": {
"@sinonjs/commons": "^1.0.2",
- "array-from": "^2.1.1",
- "lodash": "^4.17.11"
- },
- "dependencies": {
- "lodash": {
- "version": "4.17.11",
- "resolved": false
- }
+ "array-from": "^2.1.1"
}
},
"@sinonjs/text-encoding": {
"version": "0.7.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz",
+ "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ=="
},
"@webassemblyjs/ast": {
"version": "1.8.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.8.5.tgz",
+ "integrity": "sha512-aJMfngIZ65+t71C3y2nBBg5FFG0Okt9m0XEgWZ7Ywgn1oMAT8cNwx00Uv1cQyHtidq0Xn94R4TAywO+LCQ+ZAQ==",
"requires": {
"@webassemblyjs/helper-module-context": "1.8.5",
"@webassemblyjs/helper-wasm-bytecode": "1.8.5",
@@ -8398,30 +10478,36 @@
},
"@webassemblyjs/floating-point-hex-parser": {
"version": "1.8.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.8.5.tgz",
+ "integrity": "sha512-9p+79WHru1oqBh9ewP9zW95E3XAo+90oth7S5Re3eQnECGq59ly1Ri5tsIipKGpiStHsUYmY3zMLqtk3gTcOtQ=="
},
"@webassemblyjs/helper-api-error": {
"version": "1.8.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.8.5.tgz",
+ "integrity": "sha512-Za/tnzsvnqdaSPOUXHyKJ2XI7PDX64kWtURyGiJJZKVEdFOsdKUCPTNEVFZq3zJ2R0G5wc2PZ5gvdTRFgm81zA=="
},
"@webassemblyjs/helper-buffer": {
"version": "1.8.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.8.5.tgz",
+ "integrity": "sha512-Ri2R8nOS0U6G49Q86goFIPNgjyl6+oE1abW1pS84BuhP1Qcr5JqMwRFT3Ah3ADDDYGEgGs1iyb1DGX+kAi/c/Q=="
},
"@webassemblyjs/helper-code-frame": {
"version": "1.8.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.8.5.tgz",
+ "integrity": "sha512-VQAadSubZIhNpH46IR3yWO4kZZjMxN1opDrzePLdVKAZ+DFjkGD/rf4v1jap744uPVU6yjL/smZbRIIJTOUnKQ==",
"requires": {
"@webassemblyjs/wast-printer": "1.8.5"
}
},
"@webassemblyjs/helper-fsm": {
"version": "1.8.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.8.5.tgz",
+ "integrity": "sha512-kRuX/saORcg8se/ft6Q2UbRpZwP4y7YrWsLXPbbmtepKr22i8Z4O3V5QE9DbZK908dh5Xya4Un57SDIKwB9eow=="
},
"@webassemblyjs/helper-module-context": {
"version": "1.8.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.8.5.tgz",
+ "integrity": "sha512-/O1B236mN7UNEU4t9X7Pj38i4VoU8CcMHyy3l2cV/kIF4U5KoHXDVqcDuOs1ltkac90IM4vZdHc52t1x8Yfs3g==",
"requires": {
"@webassemblyjs/ast": "1.8.5",
"mamacro": "^0.0.3"
@@ -8429,11 +10515,13 @@
},
"@webassemblyjs/helper-wasm-bytecode": {
"version": "1.8.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.8.5.tgz",
+ "integrity": "sha512-Cu4YMYG3Ddl72CbmpjU/wbP6SACcOPVbHN1dI4VJNJVgFwaKf1ppeFJrwydOG3NDHxVGuCfPlLZNyEdIYlQ6QQ=="
},
"@webassemblyjs/helper-wasm-section": {
"version": "1.8.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.8.5.tgz",
+ "integrity": "sha512-VV083zwR+VTrIWWtgIUpqfvVdK4ff38loRmrdDBgBT8ADXYsEZ5mPQ4Nde90N3UYatHdYoDIFb7oHzMncI02tA==",
"requires": {
"@webassemblyjs/ast": "1.8.5",
"@webassemblyjs/helper-buffer": "1.8.5",
@@ -8443,25 +10531,29 @@
},
"@webassemblyjs/ieee754": {
"version": "1.8.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.8.5.tgz",
+ "integrity": "sha512-aaCvQYrvKbY/n6wKHb/ylAJr27GglahUO89CcGXMItrOBqRarUMxWLJgxm9PJNuKULwN5n1csT9bYoMeZOGF3g==",
"requires": {
"@xtuc/ieee754": "^1.2.0"
}
},
"@webassemblyjs/leb128": {
"version": "1.8.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.8.5.tgz",
+ "integrity": "sha512-plYUuUwleLIziknvlP8VpTgO4kqNaH57Y3JnNa6DLpu/sGcP6hbVdfdX5aHAV716pQBKrfuU26BJK29qY37J7A==",
"requires": {
"@xtuc/long": "4.2.2"
}
},
"@webassemblyjs/utf8": {
"version": "1.8.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.8.5.tgz",
+ "integrity": "sha512-U7zgftmQriw37tfD934UNInokz6yTmn29inT2cAetAsaU9YeVCveWEwhKL1Mg4yS7q//NGdzy79nlXh3bT8Kjw=="
},
"@webassemblyjs/wasm-edit": {
"version": "1.8.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.8.5.tgz",
+ "integrity": "sha512-A41EMy8MWw5yvqj7MQzkDjU29K7UJq1VrX2vWLzfpRHt3ISftOXqrtojn7nlPsZ9Ijhp5NwuODuycSvfAO/26Q==",
"requires": {
"@webassemblyjs/ast": "1.8.5",
"@webassemblyjs/helper-buffer": "1.8.5",
@@ -8475,7 +10567,8 @@
},
"@webassemblyjs/wasm-gen": {
"version": "1.8.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.8.5.tgz",
+ "integrity": "sha512-BCZBT0LURC0CXDzj5FXSc2FPTsxwp3nWcqXQdOZE4U7h7i8FqtFK5Egia6f9raQLpEKT1VL7zr4r3+QX6zArWg==",
"requires": {
"@webassemblyjs/ast": "1.8.5",
"@webassemblyjs/helper-wasm-bytecode": "1.8.5",
@@ -8486,7 +10579,8 @@
},
"@webassemblyjs/wasm-opt": {
"version": "1.8.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.8.5.tgz",
+ "integrity": "sha512-HKo2mO/Uh9A6ojzu7cjslGaHaUU14LdLbGEKqTR7PBKwT6LdPtLLh9fPY33rmr5wcOMrsWDbbdCHq4hQUdd37Q==",
"requires": {
"@webassemblyjs/ast": "1.8.5",
"@webassemblyjs/helper-buffer": "1.8.5",
@@ -8496,7 +10590,8 @@
},
"@webassemblyjs/wasm-parser": {
"version": "1.8.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.8.5.tgz",
+ "integrity": "sha512-pi0SYE9T6tfcMkthwcgCpL0cM9nRYr6/6fjgDtL6q/ZqKHdMWvxitRi5JcZ7RI4SNJJYnYNaWy5UUrHQy998lw==",
"requires": {
"@webassemblyjs/ast": "1.8.5",
"@webassemblyjs/helper-api-error": "1.8.5",
@@ -8508,7 +10603,8 @@
},
"@webassemblyjs/wast-parser": {
"version": "1.8.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.8.5.tgz",
+ "integrity": "sha512-daXC1FyKWHF1i11obK086QRlsMsY4+tIOKgBqI1lxAnkp9xe9YMcgOxm9kLe+ttjs5aWV2KKE1TWJCN57/Btsg==",
"requires": {
"@webassemblyjs/ast": "1.8.5",
"@webassemblyjs/floating-point-hex-parser": "1.8.5",
@@ -8520,7 +10616,8 @@
},
"@webassemblyjs/wast-printer": {
"version": "1.8.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.8.5.tgz",
+ "integrity": "sha512-w0U0pD4EhlnvRyeJzBqaVSJAo9w/ce7/WPogeXLzGkO6hzhr4GnQIZ4W4uUt5b9ooAaXPtnXlj0gzsXEOUNYMg==",
"requires": {
"@webassemblyjs/ast": "1.8.5",
"@webassemblyjs/wast-parser": "1.8.5",
@@ -8529,23 +10626,28 @@
},
"@xtuc/ieee754": {
"version": "1.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
+ "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA=="
},
"@xtuc/long": {
"version": "4.2.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz",
+ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ=="
},
"Base64": {
"version": "0.2.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz",
+ "integrity": "sha1-ujpCMHCOGGcFBl5mur3Uw1z2ACg="
},
"abbrev": {
"version": "1.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
+ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
},
"accepts": {
"version": "1.0.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.0.3.tgz",
+ "integrity": "sha1-krHbDU89tHsFMN9uFa6X21FNwvg=",
"requires": {
"mime": "~1.2.11",
"negotiator": "0.4.6"
@@ -8553,29 +10655,35 @@
"dependencies": {
"negotiator": {
"version": "0.4.6",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.4.6.tgz",
+ "integrity": "sha1-9F+vn6gz7TylElDqmn3fxCZ6RLM="
}
}
},
"acorn": {
"version": "6.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz",
+ "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA=="
},
"acorn-dynamic-import": {
"version": "4.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz",
+ "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw=="
},
"acorn-jsx": {
"version": "5.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz",
+ "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg=="
},
"after": {
"version": "0.8.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz",
+ "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8="
},
"agent-base": {
"version": "2.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz",
+ "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=",
"requires": {
"extend": "~3.0.0",
"semver": "~5.0.1"
@@ -8583,13 +10691,15 @@
"dependencies": {
"semver": {
"version": "5.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz",
+ "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no="
}
}
},
"ajv": {
"version": "6.6.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz",
+ "integrity": "sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww==",
"requires": {
"fast-deep-equal": "^2.0.1",
"fast-json-stable-stringify": "^2.0.0",
@@ -8599,15 +10709,18 @@
},
"ajv-errors": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz",
+ "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ=="
},
"ajv-keywords": {
"version": "3.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz",
+ "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo="
},
"align-text": {
"version": "0.1.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
+ "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
"optional": true,
"requires": {
"kind-of": "^3.0.2",
@@ -8617,31 +10730,38 @@
},
"amdefine": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
+ "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU="
},
"ansi-colors": {
"version": "3.2.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz",
+ "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw=="
},
"ansi-escapes": {
"version": "3.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz",
+ "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ=="
},
"ansi-html": {
"version": "0.0.7",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz",
+ "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4="
},
"ansi-regex": {
"version": "2.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
},
"ansi-styles": {
"version": "2.2.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
+ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
},
"anymatch": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
+ "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
"requires": {
"micromatch": "^3.1.4",
"normalize-path": "^2.1.1"
@@ -8649,76 +10769,92 @@
},
"aproba": {
"version": "1.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
+ "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
},
"argparse": {
"version": "1.0.9",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz",
+ "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=",
"requires": {
"sprintf-js": "~1.0.2"
}
},
"arr-diff": {
"version": "4.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
+ "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA="
},
"arr-flatten": {
"version": "1.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
+ "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg=="
},
"arr-union": {
"version": "3.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
+ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ="
},
"array-each": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz",
+ "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8="
},
"array-find-index": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
+ "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E="
},
"array-flatten": {
"version": "1.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
+ "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
},
"array-from": {
"version": "2.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz",
+ "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU="
},
"array-slice": {
"version": "0.2.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz",
+ "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU="
},
"array-union": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
+ "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
"requires": {
"array-uniq": "^1.0.1"
}
},
"array-uniq": {
"version": "1.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
+ "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY="
},
"array-unique": {
"version": "0.2.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz",
+ "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM="
},
"arraybuffer.slice": {
"version": "0.0.7",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz",
+ "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog=="
},
"asn1": {
"version": "0.2.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
+ "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
"requires": {
"safer-buffer": "~2.1.0"
}
},
"asn1.js": {
"version": "4.10.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz",
+ "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==",
"requires": {
"bn.js": "^4.0.0",
"inherits": "^2.0.1",
@@ -8727,58 +10863,71 @@
},
"assert": {
"version": "1.4.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz",
+ "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=",
"requires": {
"util": "0.10.3"
}
},
"assert-plus": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
},
"assertion-error": {
"version": "1.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
+ "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw=="
},
"assign-symbols": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
+ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c="
},
"astral-regex": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
+ "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg=="
},
"async": {
"version": "1.2.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/async/-/async-1.2.1.tgz",
+ "integrity": "sha1-pIFqF81f9RbfosdpikUzabl5DeA="
},
"async-each": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz",
+ "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0="
},
"async-limiter": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
+ "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg=="
},
"asynckit": {
"version": "0.4.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"atob": {
"version": "2.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
+ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg=="
},
"aws-sign2": {
"version": "0.5.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.5.0.tgz",
+ "integrity": "sha1-xXED96F/wDfwLXwuZLYC6iI/fWM="
},
"aws4": {
"version": "1.6.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz",
+ "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4="
},
"babel-code-frame": {
"version": "6.26.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
+ "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
"requires": {
"chalk": "^1.1.3",
"esutils": "^2.0.2",
@@ -8787,13 +10936,15 @@
"dependencies": {
"js-tokens": {
"version": "3.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
+ "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls="
}
}
},
"babel-core": {
"version": "6.26.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz",
+ "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==",
"dev": true,
"requires": {
"babel-code-frame": "^6.26.0",
@@ -8808,25 +10959,17 @@
"babylon": "^6.18.0",
"convert-source-map": "^1.5.1",
"debug": "^2.6.9",
- "json5": "^0.5.1",
- "lodash": "^4.17.4",
"minimatch": "^3.0.4",
"path-is-absolute": "^1.0.1",
"private": "^0.1.8",
"slash": "^1.0.0",
"source-map": "^0.5.7"
- },
- "dependencies": {
- "lodash": {
- "version": "4.17.11",
- "resolved": false,
- "dev": true
- }
}
},
"babel-eslint": {
"version": "10.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.0.1.tgz",
+ "integrity": "sha512-z7OT1iNV+TjOwHNLLyJk+HN+YVWX+CLE6fPD2SymJZOZQBs+QIexFjhm4keGTm8MW9xr4EC9Q0PbaLB24V5GoQ==",
"requires": {
"@babel/code-frame": "^7.0.0",
"@babel/parser": "^7.0.0",
@@ -8838,36 +10981,35 @@
},
"babel-generator": {
"version": "6.26.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz",
+ "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==",
"requires": {
"babel-messages": "^6.23.0",
"babel-runtime": "^6.26.0",
"babel-types": "^6.26.0",
"detect-indent": "^4.0.0",
"jsesc": "^1.3.0",
- "lodash": "^4.17.4",
"source-map": "^0.5.7",
"trim-right": "^1.0.1"
},
"dependencies": {
"detect-indent": {
"version": "4.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
+ "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=",
"requires": {
"repeating": "^2.0.0"
}
},
"jsesc": {
"version": "1.3.0",
- "resolved": false
- },
- "lodash": {
- "version": "4.17.11",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
+ "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s="
},
"repeating": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
+ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
"requires": {
"is-finite": "^1.0.0"
}
@@ -8876,7 +11018,8 @@
},
"babel-helpers": {
"version": "6.24.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz",
+ "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=",
"dev": true,
"requires": {
"babel-runtime": "^6.22.0",
@@ -8885,7 +11028,8 @@
},
"babel-loader": {
"version": "8.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.0.4.tgz",
+ "integrity": "sha512-fhBhNkUToJcW9nV46v8w87AJOwAJDz84c1CL57n3Stj73FANM/b9TbCUK4YhdOwEyZ+OxhYpdeZDNzSI29Firw==",
"requires": {
"find-cache-dir": "^1.0.0",
"loader-utils": "^1.0.2",
@@ -8895,7 +11039,8 @@
"dependencies": {
"find-cache-dir": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz",
+ "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=",
"requires": {
"commondir": "^1.0.1",
"make-dir": "^1.0.0",
@@ -8904,23 +11049,25 @@
},
"find-up": {
"version": "2.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
+ "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
"requires": {
"locate-path": "^2.0.0"
}
},
"loader-utils": {
"version": "1.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz",
+ "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=",
"requires": {
"big.js": "^3.1.3",
- "emojis-list": "^2.0.0",
- "json5": "^0.5.0"
+ "emojis-list": "^2.0.0"
}
},
"pkg-dir": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz",
+ "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=",
"requires": {
"find-up": "^2.1.0"
}
@@ -8929,35 +11076,30 @@
},
"babel-messages": {
"version": "6.23.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
+ "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
"requires": {
"babel-runtime": "^6.22.0"
}
},
"babel-register": {
"version": "6.26.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz",
+ "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=",
"dev": true,
"requires": {
"babel-core": "^6.26.0",
"babel-runtime": "^6.26.0",
"core-js": "^2.5.0",
"home-or-tmp": "^2.0.0",
- "lodash": "^4.17.4",
"mkdirp": "^0.5.1",
"source-map-support": "^0.4.15"
- },
- "dependencies": {
- "lodash": {
- "version": "4.17.11",
- "resolved": false,
- "dev": true
- }
}
},
"babel-runtime": {
"version": "6.26.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
+ "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
"requires": {
"core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0"
@@ -8965,34 +11107,33 @@
"dependencies": {
"core-js": {
"version": "2.5.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.3.tgz",
+ "integrity": "sha1-isw4NFgk8W2DZbfJtCWRaOjtYD4="
}
}
},
"babel-template": {
"version": "6.26.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz",
+ "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=",
"requires": {
"babel-runtime": "^6.26.0",
"babel-traverse": "^6.26.0",
"babel-types": "^6.26.0",
- "babylon": "^6.18.0",
- "lodash": "^4.17.4"
+ "babylon": "^6.18.0"
},
"dependencies": {
"babylon": {
"version": "6.18.0",
- "resolved": false
- },
- "lodash": {
- "version": "4.17.11",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
+ "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ=="
}
}
},
"babel-traverse": {
"version": "6.26.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
+ "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
"requires": {
"babel-code-frame": "^6.26.0",
"babel-messages": "^6.23.0",
@@ -9001,56 +11142,51 @@
"babylon": "^6.18.0",
"debug": "^2.6.8",
"globals": "^9.18.0",
- "invariant": "^2.2.2",
- "lodash": "^4.17.4"
+ "invariant": "^2.2.2"
},
"dependencies": {
"babylon": {
"version": "6.18.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
+ "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ=="
},
"globals": {
"version": "9.18.0",
- "resolved": false
- },
- "lodash": {
- "version": "4.17.11",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
+ "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ=="
}
}
},
"babel-types": {
"version": "6.26.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
+ "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
"requires": {
"babel-runtime": "^6.26.0",
"esutils": "^2.0.2",
- "lodash": "^4.17.4",
"to-fast-properties": "^1.0.3"
- },
- "dependencies": {
- "lodash": {
- "version": "4.17.11",
- "resolved": false
- }
}
},
"babylon": {
"version": "6.18.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
+ "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
"dev": true
},
"backo2": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz",
+ "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc="
},
"balanced-match": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
"base": {
"version": "0.11.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
+ "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
"requires": {
"cache-base": "^1.0.1",
"class-utils": "^0.3.5",
@@ -9063,32 +11199,37 @@
"dependencies": {
"component-emitter": {
"version": "1.2.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
+ "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY="
},
"define-property": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
"requires": {
"is-descriptor": "^1.0.0"
}
},
"is-accessor-descriptor": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
"requires": {
"kind-of": "^6.0.0"
}
},
"is-data-descriptor": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
"requires": {
"kind-of": "^6.0.0"
}
},
"is-descriptor": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
"requires": {
"is-accessor-descriptor": "^1.0.0",
"is-data-descriptor": "^1.0.0",
@@ -9097,72 +11238,86 @@
},
"isobject": {
"version": "3.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
},
"kind-of": {
"version": "6.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
}
}
},
"base64-arraybuffer": {
"version": "0.1.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz",
+ "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg="
},
"base64-js": {
"version": "0.0.8",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz",
+ "integrity": "sha1-EQHpVE9KdrG8OybUUsqW16NeeXg="
},
"base64-url": {
"version": "1.3.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/base64-url/-/base64-url-1.3.3.tgz",
+ "integrity": "sha1-+LbFN/CaT8WMmcuG4LDpxhRhog8="
},
"base64id": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz",
+ "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY="
},
"basic-auth": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
+ "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==",
"requires": {
"safe-buffer": "5.1.2"
},
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
},
"basic-auth-connect": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/basic-auth-connect/-/basic-auth-connect-1.0.0.tgz",
+ "integrity": "sha1-/bC0OWLKe0BFanwrtI/hc9otISI="
},
"batch": {
"version": "0.6.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz",
+ "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY="
},
"bcrypt-pbkdf": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
+ "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
"requires": {
"tweetnacl": "^0.14.3"
}
},
"better-assert": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz",
+ "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=",
"requires": {
"callsite": "1.0.0"
}
},
"big.js": {
"version": "3.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz",
+ "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q=="
},
"binary": {
"version": "0.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz",
+ "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=",
"requires": {
"buffers": "~0.1.1",
"chainsaw": "~0.1.0"
@@ -9170,18 +11325,21 @@
},
"binary-extensions": {
"version": "1.11.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz",
+ "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU="
},
"bl": {
"version": "1.0.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/bl/-/bl-1.0.3.tgz",
+ "integrity": "sha1-/FQhoo/UImA2w7OJGmaiW8ZNIm4=",
"requires": {
"readable-stream": "~2.0.5"
},
"dependencies": {
"readable-stream": {
"version": "2.0.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",
+ "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
@@ -9193,13 +11351,15 @@
},
"string_decoder": {
"version": "0.10.31",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
},
"blanket": {
"version": "1.1.10",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/blanket/-/blanket-1.1.10.tgz",
+ "integrity": "sha1-m+r8WbZmvUetlOxkCCvxl++Ms0I=",
"requires": {
"acorn": "^1.0.3",
"falafel": "~1.2.0",
@@ -9211,29 +11371,35 @@
"dependencies": {
"acorn": {
"version": "1.2.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz",
+ "integrity": "sha1-yM4n3grMdtiW0rH6099YjZ6C8BQ="
},
"isarray": {
"version": "0.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
}
}
},
"blob": {
"version": "0.0.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz",
+ "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig=="
},
"bluebird": {
"version": "3.5.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
+ "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA=="
},
"bn.js": {
"version": "4.11.8",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz",
+ "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA=="
},
"body": {
"version": "5.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/body/-/body-5.1.0.tgz",
+ "integrity": "sha1-5LoM5BCkaTYyM2dgnstOZVMSUGk=",
"requires": {
"continuable-cache": "^0.3.1",
"error": "^7.0.0",
@@ -9243,7 +11409,8 @@
"dependencies": {
"raw-body": {
"version": "1.1.7",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.1.7.tgz",
+ "integrity": "sha1-HQJ8K/oRasxmI7yo8AAWVyqH1CU=",
"requires": {
"bytes": "1",
"string_decoder": "0.10"
@@ -9251,13 +11418,15 @@
},
"string_decoder": {
"version": "0.10.31",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
},
"body-parser": {
"version": "1.18.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz",
+ "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=",
"requires": {
"bytes": "3.0.0",
"content-type": "~1.0.4",
@@ -9273,11 +11442,13 @@
"dependencies": {
"bytes": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
+ "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg="
},
"http-errors": {
"version": "1.6.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
+ "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
"requires": {
"depd": "~1.1.2",
"inherits": "2.0.3",
@@ -9287,18 +11458,21 @@
},
"iconv-lite": {
"version": "0.4.23",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz",
+ "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
},
"qs": {
"version": "6.5.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
+ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
},
"raw-body": {
"version": "2.3.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz",
+ "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==",
"requires": {
"bytes": "3.0.0",
"http-errors": "1.6.3",
@@ -9308,13 +11482,15 @@
},
"setprototypeof": {
"version": "1.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
+ "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ=="
}
}
},
"bonjour": {
"version": "3.5.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz",
+ "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=",
"requires": {
"array-flatten": "^2.1.0",
"deep-equal": "^1.0.1",
@@ -9326,13 +11502,15 @@
"dependencies": {
"array-flatten": {
"version": "2.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz",
+ "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ=="
}
}
},
"boom": {
"version": "0.4.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/boom/-/boom-0.4.2.tgz",
+ "integrity": "sha1-emNune1O/O+xnO9JR6PGffrukRs=",
"optional": true,
"requires": {
"hoek": "0.9.x"
@@ -9340,7 +11518,8 @@
},
"brace-expansion": {
"version": "1.1.8",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
+ "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@@ -9348,7 +11527,8 @@
},
"braces": {
"version": "2.3.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
+ "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
"requires": {
"arr-flatten": "^1.1.0",
"array-unique": "^0.3.2",
@@ -9364,11 +11544,13 @@
"dependencies": {
"array-unique": {
"version": "0.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
},
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
@@ -9377,15 +11559,18 @@
},
"brorand": {
"version": "1.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
+ "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8="
},
"browser-stdout": {
"version": "1.3.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
+ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw=="
},
"browserify-aes": {
"version": "1.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
+ "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
"requires": {
"buffer-xor": "^1.0.3",
"cipher-base": "^1.0.0",
@@ -9397,7 +11582,8 @@
},
"browserify-cipher": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz",
+ "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==",
"requires": {
"browserify-aes": "^1.0.4",
"browserify-des": "^1.0.0",
@@ -9406,7 +11592,8 @@
},
"browserify-des": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz",
+ "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==",
"requires": {
"cipher-base": "^1.0.1",
"des.js": "^1.0.0",
@@ -9416,13 +11603,15 @@
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
},
"browserify-rsa": {
"version": "4.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
+ "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=",
"requires": {
"bn.js": "^4.1.0",
"randombytes": "^2.0.1"
@@ -9430,7 +11619,8 @@
},
"browserify-sign": {
"version": "4.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz",
+ "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=",
"requires": {
"bn.js": "^4.1.1",
"browserify-rsa": "^4.0.0",
@@ -9443,18 +11633,21 @@
},
"browserify-zlib": {
"version": "0.1.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz",
+ "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=",
"requires": {
"pako": "~0.2.0"
}
},
"browserstack": {
"version": "1.3.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/browserstack/-/browserstack-1.3.1.tgz",
+ "integrity": "sha1-F4S69eP95C5LlKo251KW1DdXPc4="
},
"browserstack-api": {
"version": "0.0.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/browserstack-api/-/browserstack-api-0.0.5.tgz",
+ "integrity": "sha1-8pxCLOJygMVUyOtSoH/fTWTQ6Tw=",
"requires": {
"q": "^1.0.1",
"request": "^2.47.0"
@@ -9462,14 +11655,16 @@
},
"browserstacktunnel-wrapper": {
"version": "1.4.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/browserstacktunnel-wrapper/-/browserstacktunnel-wrapper-1.4.2.tgz",
+ "integrity": "sha1-ZZj7fXhLb/NI4998EEsNnCfqUnU=",
"requires": {
"unzip": "~0.1.9"
}
},
"buffer": {
"version": "3.6.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-3.6.0.tgz",
+ "integrity": "sha1-pyyTb3e5a/UvX357RnGAYoVR3vs=",
"requires": {
"base64-js": "0.0.8",
"ieee754": "^1.1.4",
@@ -9478,35 +11673,43 @@
},
"buffer-from": {
"version": "1.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
+ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
},
"buffer-indexof": {
"version": "1.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz",
+ "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g=="
},
"buffer-xor": {
"version": "1.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
+ "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk="
},
"buffers": {
"version": "0.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz",
+ "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s="
},
"builtin-modules": {
"version": "1.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
+ "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8="
},
"builtin-status-codes": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
+ "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug="
},
"bytes": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz",
+ "integrity": "sha1-NWnt6Lo0MV+rmcPpLLBMciDeH6g="
},
"cacache": {
"version": "11.3.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.2.tgz",
+ "integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==",
"requires": {
"bluebird": "^3.5.3",
"chownr": "^1.1.1",
@@ -9526,11 +11729,13 @@
"dependencies": {
"bluebird": {
"version": "3.5.4",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.4.tgz",
+ "integrity": "sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw=="
},
"glob": {
"version": "7.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
+ "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -9542,24 +11747,28 @@
},
"graceful-fs": {
"version": "4.1.15",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz",
+ "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA=="
},
"lru-cache": {
"version": "5.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
"requires": {
"yallist": "^3.0.2"
}
},
"yallist": {
"version": "3.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
+ "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A=="
}
}
},
"cache-base": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
+ "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
"requires": {
"collection-visit": "^1.0.0",
"component-emitter": "^1.2.1",
@@ -9574,30 +11783,36 @@
"dependencies": {
"component-emitter": {
"version": "1.2.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
+ "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY="
},
"isobject": {
"version": "3.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
}
}
},
"callsite": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz",
+ "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA="
},
"callsites": {
"version": "3.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="
},
"camelcase": {
"version": "1.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
+ "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=",
"optional": true
},
"camelcase-keys": {
"version": "2.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
+ "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=",
"requires": {
"camelcase": "^2.0.0",
"map-obj": "^1.0.0"
@@ -9605,17 +11820,20 @@
"dependencies": {
"camelcase": {
"version": "2.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
+ "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8="
}
}
},
"caseless": {
"version": "0.9.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.9.0.tgz",
+ "integrity": "sha1-t7Zc5r8UE4hlOc/VM/CzDv+pz4g="
},
"center-align": {
"version": "0.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
+ "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=",
"optional": true,
"requires": {
"align-text": "^0.1.3",
@@ -9624,7 +11842,8 @@
},
"chai": {
"version": "4.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz",
+ "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==",
"requires": {
"assertion-error": "^1.1.0",
"check-error": "^1.0.2",
@@ -9636,27 +11855,31 @@
"dependencies": {
"deep-eql": {
"version": "3.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz",
+ "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==",
"requires": {
"type-detect": "^4.0.0"
}
},
"type-detect": {
"version": "4.0.8",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
+ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g=="
}
}
},
"chainsaw": {
"version": "0.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz",
+ "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=",
"requires": {
"traverse": ">=0.3.0 <0.4"
}
},
"chalk": {
"version": "1.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"requires": {
"ansi-styles": "^2.2.1",
"escape-string-regexp": "^1.0.2",
@@ -9667,15 +11890,18 @@
},
"chardet": {
"version": "0.7.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
+ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA=="
},
"check-error": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
+ "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII="
},
"chokidar": {
"version": "2.1.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.5.tgz",
+ "integrity": "sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A==",
"requires": {
"anymatch": "^2.0.0",
"async-each": "^1.0.1",
@@ -9692,11 +11918,13 @@
"dependencies": {
"normalize-path": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="
},
"readdirp": {
"version": "2.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz",
+ "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==",
"requires": {
"graceful-fs": "^4.1.11",
"micromatch": "^3.1.10",
@@ -9705,24 +11933,28 @@
},
"upath": {
"version": "1.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz",
+ "integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q=="
}
}
},
"chownr": {
"version": "1.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz",
+ "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g=="
},
"chrome-trace-event": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz",
+ "integrity": "sha512-xDbVgyfDTT2piup/h8dK/y4QZfJRSa73bw1WZ8b4XM1o7fsFubUVGYcE+1ANtOzJJELGpYoG2961z0Z6OAld9A==",
"requires": {
"tslib": "^1.9.0"
}
},
"cipher-base": {
"version": "1.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
+ "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
"requires": {
"inherits": "^2.0.1",
"safe-buffer": "^5.0.1"
@@ -9730,7 +11962,8 @@
},
"class-utils": {
"version": "0.3.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
+ "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
"requires": {
"arr-union": "^3.1.0",
"define-property": "^0.2.5",
@@ -9740,20 +11973,23 @@
"dependencies": {
"define-property": {
"version": "0.2.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
"requires": {
"is-descriptor": "^0.1.0"
}
},
"isobject": {
"version": "3.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
}
}
},
"cli": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz",
+ "integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=",
"requires": {
"exit": "0.1.2",
"glob": "^7.1.1"
@@ -9761,7 +11997,8 @@
"dependencies": {
"glob": {
"version": "7.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
+ "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -9775,18 +12012,21 @@
},
"cli-cursor": {
"version": "2.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
+ "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=",
"requires": {
"restore-cursor": "^2.0.0"
}
},
"cli-width": {
"version": "2.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz",
+ "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk="
},
"cliui": {
"version": "2.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
+ "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
"optional": true,
"requires": {
"center-align": "^0.1.1",
@@ -9796,15 +12036,18 @@
},
"code-point-at": {
"version": "1.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
+ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
},
"coffeescript": {
"version": "1.10.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.10.0.tgz",
+ "integrity": "sha1-56qDAZF+9iGzXYo580jc3R234z4="
},
"collection-visit": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
+ "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=",
"requires": {
"map-visit": "^1.0.0",
"object-visit": "^1.0.0"
@@ -9812,66 +12055,69 @@
},
"color-convert": {
"version": "1.9.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"requires": {
"color-name": "1.1.3"
}
},
"color-name": {
"version": "1.1.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
},
"colors": {
"version": "1.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz",
+ "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM="
},
"combine-lists": {
"version": "1.0.1",
- "resolved": false,
- "requires": {
- "lodash": "^4.5.0"
- },
- "dependencies": {
- "lodash": {
- "version": "4.17.11",
- "resolved": false
- }
- }
+ "resolved": "https://registry.npmjs.org/combine-lists/-/combine-lists-1.0.1.tgz",
+ "integrity": "sha1-RYwH4J4NkA/Ci3Cj/sLazR0st/Y="
},
"combined-stream": {
"version": "1.0.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz",
+ "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"commander": {
"version": "2.13.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.13.0.tgz",
+ "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA=="
},
"commondir": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
+ "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs="
},
"component-bind": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz",
+ "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E="
},
"component-emitter": {
"version": "1.2.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
+ "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY="
},
"component-inherit": {
"version": "0.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz",
+ "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM="
},
"compressible": {
"version": "1.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/compressible/-/compressible-1.1.0.tgz",
+ "integrity": "sha1-Ek2Ke7oYoFpBCi8lutQTsblK/2c="
},
"compression": {
"version": "1.0.7",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/compression/-/compression-1.0.7.tgz",
+ "integrity": "sha1-/Ev/Jh3043oTAAby2yqZo0iW9Vo=",
"requires": {
"accepts": "1.0.3",
"bytes": "1.0.0",
@@ -9882,17 +12128,20 @@
"dependencies": {
"bytes": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz",
+ "integrity": "sha1-NWnt6Lo0MV+rmcPpLLBMciDeH6g="
}
}
},
"concat-map": {
"version": "0.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"concat-stream": {
"version": "1.6.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
+ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
"requires": {
"buffer-from": "^1.0.0",
"inherits": "^2.0.3",
@@ -9902,7 +12151,8 @@
},
"connect": {
"version": "2.20.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/connect/-/connect-2.20.2.tgz",
+ "integrity": "sha1-RLxkM0x668IZfFLGh0cUAC0Jd74=",
"requires": {
"basic-auth-connect": "1.0.0",
"body-parser": "1.4.3",
@@ -9937,11 +12187,13 @@
"dependencies": {
"batch": {
"version": "0.5.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/batch/-/batch-0.5.1.tgz",
+ "integrity": "sha1-NqS6tZTAUP17UHvKDbMMLZKvT/I="
},
"body-parser": {
"version": "1.4.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.4.3.tgz",
+ "integrity": "sha1-RyeVLP9K8Hc+76SyJsL0Ei9eI00=",
"requires": {
"bytes": "1.0.0",
"depd": "0.3.0",
@@ -9954,11 +12206,13 @@
},
"buffer-crc32": {
"version": "0.2.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.3.tgz",
+ "integrity": "sha1-u1RRnpXRB8vSQA520MqxRnM22SE="
},
"connect-timeout": {
"version": "1.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/connect-timeout/-/connect-timeout-1.1.1.tgz",
+ "integrity": "sha1-bH4xyY8Kxo620TBfZ/IfWm6Q/QQ=",
"requires": {
"debug": "1.0.2",
"on-headers": "0.0.0"
@@ -9966,7 +12220,8 @@
},
"cookie-parser": {
"version": "1.3.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.3.1.tgz",
+ "integrity": "sha1-ML/CkGoESJ1ZvLnjL5DbCOBLtR4=",
"requires": {
"cookie": "0.1.2",
"cookie-signature": "1.0.3"
@@ -9974,11 +12229,13 @@
},
"cookie-signature": {
"version": "1.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.3.tgz",
+ "integrity": "sha1-kc2ZfMUftkFZVzjGnNoCAyj1D/k="
},
"csrf-tokens": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/csrf-tokens/-/csrf-tokens-2.0.0.tgz",
+ "integrity": "sha1-yCEAP7i2rRe8l31v0ahL7cPtYZs=",
"requires": {
"base64-url": "1",
"rndm": "1",
@@ -9988,25 +12245,29 @@
},
"csurf": {
"version": "1.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/csurf/-/csurf-1.2.2.tgz",
+ "integrity": "sha1-Lqny0/LWex4iUykOZ2tiGV3Ld1Y=",
"requires": {
"csrf-tokens": "~2.0.0"
}
},
"debug": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-1.0.2.tgz",
+ "integrity": "sha1-OElZHBDM5khHbDx8Li40FttZY8Q=",
"requires": {
"ms": "0.6.2"
}
},
"depd": {
"version": "0.3.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/depd/-/depd-0.3.0.tgz",
+ "integrity": "sha1-Ecm8KOQlMl+9iziUC+/2n6UyaIM="
},
"errorhandler": {
"version": "1.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/errorhandler/-/errorhandler-1.1.0.tgz",
+ "integrity": "sha1-JzsOuFCtED6abWOpmB2G8bmhIC4=",
"requires": {
"accepts": "1.0.3",
"escape-html": "1.0.1"
@@ -10014,7 +12275,8 @@
},
"express-session": {
"version": "1.4.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.4.0.tgz",
+ "integrity": "sha1-kL+Kk5ocjcAS5KEeTC/DYp98+JQ=",
"requires": {
"buffer-crc32": "0.2.3",
"cookie": "0.1.2",
@@ -10027,7 +12289,8 @@
},
"finalhandler": {
"version": "0.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-0.0.2.tgz",
+ "integrity": "sha1-BgPYde6H1WeiZmkoFcyK1E/M7to=",
"requires": {
"debug": "1.0.2",
"escape-html": "1.0.1"
@@ -10035,27 +12298,33 @@
},
"iconv-lite": {
"version": "0.4.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.3.tgz",
+ "integrity": "sha1-nniHeTt2nMaV6yLSVGpP0tebeh4="
},
"media-typer": {
"version": "0.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.2.0.tgz",
+ "integrity": "sha1-2KBlITrf6qLnYyGitt2jb/YzWYQ="
},
"mime-types": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-1.0.0.tgz",
+ "integrity": "sha1-antKavLn2S+Xr+A/BHx4AejwAdI="
},
"ms": {
"version": "0.6.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz",
+ "integrity": "sha1-2JwhJMb9wTU9Zai3e/GqxLGTcIw="
},
"qs": {
"version": "0.6.6",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/qs/-/qs-0.6.6.tgz",
+ "integrity": "sha1-bgFQmP9RlouKPIGQAdXyyJvEsQc="
},
"serve-index": {
"version": "1.1.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.1.2.tgz",
+ "integrity": "sha1-B0K0gJmCV1OcLSrMbKH0qvJn+XI=",
"requires": {
"accepts": "1.0.3",
"batch": "0.5.1"
@@ -10063,7 +12332,8 @@
},
"type-is": {
"version": "1.3.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.3.1.tgz",
+ "integrity": "sha1-pnibWlITgomt4e+PbZ8odP/XC2s=",
"requires": {
"media-typer": "0.2.0",
"mime-types": "1.0.0"
@@ -10071,60 +12341,73 @@
},
"vhost": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/vhost/-/vhost-2.0.0.tgz",
+ "integrity": "sha1-HiZ3C9D86GxAlFWR5vKExokXkeI="
}
}
},
"connect-history-api-fallback": {
"version": "1.5.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz",
+ "integrity": "sha1-sGhzk0vF40T+9hGhlqb6rgruAVo="
},
"connect-livereload": {
"version": "0.4.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/connect-livereload/-/connect-livereload-0.4.1.tgz",
+ "integrity": "sha1-D4oagWvJuv+uRjfM6pF0Yv41kXo="
},
"console-browserify": {
"version": "1.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz",
+ "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=",
"requires": {
"date-now": "^0.1.4"
}
},
"console-polyfill": {
"version": "0.3.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/console-polyfill/-/console-polyfill-0.3.0.tgz",
+ "integrity": "sha512-w+JSDZS7XML43Xnwo2x5O5vxB0ID7T5BdqDtyqT6uiCAX2kZAgcWxNaGqT97tZfSHzfOcvrfsDAodKcJ3UvnXQ=="
},
"constants-browserify": {
"version": "0.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-0.0.1.tgz",
+ "integrity": "sha1-kld9tSe6bEzwpFaNhLwDH0QeIfI="
},
"content-disposition": {
"version": "0.5.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
+ "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ="
},
"content-type": {
"version": "1.0.4",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
+ "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
},
"continuable-cache": {
"version": "0.3.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/continuable-cache/-/continuable-cache-0.3.1.tgz",
+ "integrity": "sha1-vXJ6f67XfnH/OYWskzUakSczrQ8="
},
"convert-source-map": {
"version": "1.5.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz",
+ "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU="
},
"cookie": {
"version": "0.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.1.2.tgz",
+ "integrity": "sha1-cv7D0k5Io0Mgc9kMEmQgBQYQBLE="
},
"cookie-signature": {
"version": "1.0.6",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
+ "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
},
"copy-concurrently": {
"version": "1.0.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz",
+ "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==",
"requires": {
"aproba": "^1.1.1",
"fs-write-stream-atomic": "^1.0.8",
@@ -10136,19 +12419,23 @@
},
"copy-descriptor": {
"version": "0.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
+ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40="
},
"core-js": {
"version": "2.6.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.0.tgz",
+ "integrity": "sha512-kLRC6ncVpuEW/1kwrOXYX6KQASCVtrh1gQr/UiaVgFlf9WE5Vp+lNe5+h3LuMr5PAucWnnEXwH0nQHRH/gpGtw=="
},
"core-util-is": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"coveralls": {
"version": "2.13.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-2.13.3.tgz",
+ "integrity": "sha512-iiAmn+l1XqRwNLXhW8Rs5qHZRFMYp9ZIPjEOVRpC/c4so6Y/f4/lFi0FfR5B9cCqgyhkJ5cZmbvcVRfP8MHchw==",
"requires": {
"js-yaml": "3.6.1",
"lcov-parse": "0.0.10",
@@ -10159,37 +12446,44 @@
"dependencies": {
"assert-plus": {
"version": "0.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz",
+ "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ="
},
"aws-sign2": {
"version": "0.6.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
+ "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8="
},
"boom": {
"version": "2.10.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
+ "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
"requires": {
"hoek": "2.x.x"
}
},
"caseless": {
"version": "0.11.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz",
+ "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c="
},
"cryptiles": {
"version": "2.0.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
+ "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=",
"requires": {
"boom": "2.x.x"
}
},
"esprima": {
"version": "2.7.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz",
+ "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE="
},
"form-data": {
"version": "2.1.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz",
+ "integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.5",
@@ -10198,7 +12492,8 @@
},
"har-validator": {
"version": "2.0.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz",
+ "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=",
"requires": {
"chalk": "^1.1.1",
"commander": "^2.9.0",
@@ -10208,7 +12503,8 @@
},
"hawk": {
"version": "3.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz",
+ "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=",
"requires": {
"boom": "2.x.x",
"cryptiles": "2.x.x",
@@ -10218,11 +12514,13 @@
},
"hoek": {
"version": "2.16.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
+ "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0="
},
"http-signature": {
"version": "1.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz",
+ "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=",
"requires": {
"assert-plus": "^0.2.0",
"jsprim": "^1.2.2",
@@ -10231,7 +12529,8 @@
},
"js-yaml": {
"version": "3.6.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz",
+ "integrity": "sha1-bl/mfYsgXOTSL60Ft3geja3MSzA=",
"requires": {
"argparse": "^1.0.7",
"esprima": "^2.6.0"
@@ -10239,11 +12538,13 @@
},
"qs": {
"version": "6.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz",
+ "integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw="
},
"request": {
"version": "2.79.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz",
+ "integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=",
"requires": {
"aws-sign2": "~0.6.0",
"aws4": "^1.2.1",
@@ -10269,20 +12570,23 @@
},
"sntp": {
"version": "1.0.9",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
+ "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=",
"requires": {
"hoek": "2.x.x"
}
},
"tunnel-agent": {
"version": "0.4.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz",
+ "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us="
}
}
},
"create-ecdh": {
"version": "4.0.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz",
+ "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==",
"requires": {
"bn.js": "^4.1.0",
"elliptic": "^6.0.0"
@@ -10290,7 +12594,8 @@
},
"create-hash": {
"version": "1.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
+ "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
"requires": {
"cipher-base": "^1.0.1",
"inherits": "^2.0.1",
@@ -10301,7 +12606,8 @@
"dependencies": {
"ripemd160": {
"version": "2.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz",
+ "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==",
"requires": {
"hash-base": "^3.0.0",
"inherits": "^2.0.1"
@@ -10309,7 +12615,8 @@
},
"sha.js": {
"version": "2.4.11",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
+ "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
"requires": {
"inherits": "^2.0.1",
"safe-buffer": "^5.0.1"
@@ -10319,7 +12626,8 @@
},
"create-hmac": {
"version": "1.1.7",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
+ "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
"requires": {
"cipher-base": "^1.0.3",
"create-hash": "^1.1.0",
@@ -10331,7 +12639,8 @@
"dependencies": {
"ripemd160": {
"version": "2.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz",
+ "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==",
"requires": {
"hash-base": "^3.0.0",
"inherits": "^2.0.1"
@@ -10339,7 +12648,8 @@
},
"sha.js": {
"version": "2.4.11",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
+ "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
"requires": {
"inherits": "^2.0.1",
"safe-buffer": "^5.0.1"
@@ -10349,7 +12659,8 @@
},
"cross-spawn": {
"version": "6.0.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
+ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
"requires": {
"nice-try": "^1.0.4",
"path-key": "^2.0.1",
@@ -10360,7 +12671,8 @@
"dependencies": {
"which": {
"version": "1.3.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"requires": {
"isexe": "^2.0.0"
}
@@ -10369,7 +12681,8 @@
},
"cryptiles": {
"version": "0.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-0.2.2.tgz",
+ "integrity": "sha1-7ZH/HxetE9N0gohZT4pIoNJvMlw=",
"optional": true,
"requires": {
"boom": "0.4.x"
@@ -10377,7 +12690,8 @@
},
"crypto-browserify": {
"version": "3.2.8",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.2.8.tgz",
+ "integrity": "sha1-ubEdvm2WUd2IKgHmzEZ99xjs8Yk=",
"requires": {
"pbkdf2-compat": "2.0.1",
"ripemd160": "0.2.0",
@@ -10386,55 +12700,65 @@
},
"ctype": {
"version": "0.5.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.3.tgz",
+ "integrity": "sha1-gsGMJGH3QRTvFsE1IkrQuRRMoS8="
},
"currently-unhandled": {
"version": "0.4.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
+ "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=",
"requires": {
"array-find-index": "^1.0.1"
}
},
"custom-event": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz",
+ "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU="
},
"cyclist": {
"version": "0.2.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz",
+ "integrity": "sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA="
},
"d": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
+ "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
"requires": {
"es5-ext": "^0.10.9"
}
},
"dashdash": {
"version": "1.14.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
+ "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
"requires": {
"assert-plus": "^1.0.0"
}
},
"date-format": {
"version": "1.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/date-format/-/date-format-1.2.0.tgz",
+ "integrity": "sha1-YV6CjiM90aubua4JUODOzPpuytg="
},
"date-now": {
"version": "0.1.4",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz",
+ "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs="
},
"date-time": {
"version": "1.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/date-time/-/date-time-1.1.0.tgz",
+ "integrity": "sha1-GIdtC9pMGf5w3Tv0sDTygbEqQLY=",
"requires": {
"time-zone": "^0.1.0"
}
},
"dateformat": {
"version": "1.0.12",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz",
+ "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=",
"requires": {
"get-stdin": "^4.0.1",
"meow": "^3.3.0"
@@ -10442,14 +12766,16 @@
},
"debug": {
"version": "2.6.9",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
},
"decache": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/decache/-/decache-3.1.0.tgz",
+ "integrity": "sha1-T1A2+9ZYH8yXI3rDlUokS5U2wto=",
"optional": true,
"requires": {
"find": "^0.2.4"
@@ -10457,37 +12783,39 @@
},
"decamelize": {
"version": "1.2.0",
- "resolved": false
- },
- "decode-uri-component": {
- "version": "0.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
},
"deep-eql": {
"version": "0.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz",
+ "integrity": "sha1-71WKyrjeJSBs1xOQbXTlaTDrafI=",
"requires": {
"type-detect": "0.1.1"
}
},
"deep-equal": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz",
+ "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU="
},
"deep-for-each": {
"version": "2.0.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/deep-for-each/-/deep-for-each-2.0.3.tgz",
+ "integrity": "sha512-Y9mu+rplGcNZ7veer+5rqcdI9w3aPb7/WyE/nYnsuPevaE2z5YuC2u7/Gz/hIKsa0zo8sE8gKoBimSNsO/sr+A==",
"requires": {
"lodash.isplainobject": "^4.0.6"
}
},
"deep-is": {
"version": "0.1.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
+ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ="
},
"default-gateway": {
"version": "2.7.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-2.7.2.tgz",
+ "integrity": "sha512-lAc4i9QJR0YHSDFdzeBQKfZ1SRDG3hsJNEkrpcZa8QhBfidLAilT60BDEIVUUGqosFp425KOgB3uYqcnQrWafQ==",
"requires": {
"execa": "^0.10.0",
"ip-regex": "^2.1.0"
@@ -10495,14 +12823,16 @@
},
"define-properties": {
"version": "1.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
+ "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
"requires": {
"object-keys": "^1.0.12"
}
},
"define-property": {
"version": "2.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
+ "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
"requires": {
"is-descriptor": "^1.0.2",
"isobject": "^3.0.1"
@@ -10510,21 +12840,24 @@
"dependencies": {
"is-accessor-descriptor": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
"requires": {
"kind-of": "^6.0.0"
}
},
"is-data-descriptor": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
"requires": {
"kind-of": "^6.0.0"
}
},
"is-descriptor": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
"requires": {
"is-accessor-descriptor": "^1.0.0",
"is-data-descriptor": "^1.0.0",
@@ -10533,17 +12866,20 @@
},
"isobject": {
"version": "3.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
},
"kind-of": {
"version": "6.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
}
}
},
"del": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz",
+ "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=",
"requires": {
"globby": "^6.1.0",
"is-path-cwd": "^1.0.0",
@@ -10555,21 +12891,25 @@
"dependencies": {
"pify": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY="
}
}
},
"delayed-stream": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"depd": {
"version": "1.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
+ "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
},
"des.js": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz",
+ "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=",
"requires": {
"inherits": "^2.0.1",
"minimalistic-assert": "^1.0.0"
@@ -10577,27 +12917,33 @@
},
"destroy": {
"version": "1.0.4",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
+ "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
},
"detect-file": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz",
+ "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc="
},
"detect-node": {
"version": "2.0.4",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz",
+ "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw=="
},
"di": {
"version": "0.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz",
+ "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw="
},
"diff": {
"version": "1.0.7",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/diff/-/diff-1.0.7.tgz",
+ "integrity": "sha1-JLuwAcSn1VIhaefKvbLCgU7ZHPQ="
},
"diffie-hellman": {
"version": "5.0.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
+ "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
"requires": {
"bn.js": "^4.1.0",
"miller-rabin": "^4.0.0",
@@ -10606,11 +12952,13 @@
},
"dns-equal": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz",
+ "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0="
},
"dns-packet": {
"version": "1.3.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz",
+ "integrity": "sha512-0UxfQkMhYAUaZI+xrNZOz/as5KgDU0M/fQ9b6SpkyLbk3GEswDi6PADJVaYJradtRVsRIlF1zLyOodbcTCDzUg==",
"requires": {
"ip": "^1.1.0",
"safe-buffer": "^5.0.1"
@@ -10618,21 +12966,24 @@
},
"dns-txt": {
"version": "2.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz",
+ "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=",
"requires": {
"buffer-indexof": "^1.0.0"
}
},
"doctrine": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
+ "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
"requires": {
"esutils": "^2.0.2"
}
},
"dom-serialize": {
"version": "2.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz",
+ "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=",
"requires": {
"custom-event": "~1.0.0",
"ent": "~2.2.0",
@@ -10642,7 +12993,8 @@
},
"dom-serializer": {
"version": "0.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz",
+ "integrity": "sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=",
"requires": {
"domelementtype": "~1.1.1",
"entities": "~1.1.1"
@@ -10650,32 +13002,38 @@
"dependencies": {
"domelementtype": {
"version": "1.1.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz",
+ "integrity": "sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs="
},
"entities": {
"version": "1.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
+ "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w=="
}
}
},
"domain-browser": {
"version": "1.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
+ "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA=="
},
"domelementtype": {
"version": "1.3.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz",
+ "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w=="
},
"domhandler": {
"version": "2.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz",
+ "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=",
"requires": {
"domelementtype": "1"
}
},
"domutils": {
"version": "1.5.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz",
+ "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=",
"requires": {
"dom-serializer": "0",
"domelementtype": "1"
@@ -10683,11 +13041,13 @@
},
"duplexer": {
"version": "0.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
+ "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E="
},
"duplexify": {
"version": "3.6.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.6.1.tgz",
+ "integrity": "sha512-vM58DwdnKmty+FSPzT14K9JXb90H+j5emaR4KYbr2KTIz00WHGbWOe5ghQTx233ZCLZtrGDALzKwcjEtSt35mA==",
"requires": {
"end-of-stream": "^1.0.0",
"inherits": "^2.0.1",
@@ -10697,7 +13057,8 @@
},
"ecc-jsbn": {
"version": "0.1.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
+ "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
"requires": {
"jsbn": "~0.1.0",
"safer-buffer": "^2.1.0"
@@ -10705,11 +13066,13 @@
},
"ee-first": {
"version": "1.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.0.3.tgz",
+ "integrity": "sha1-bJjECJq+y1p7hcGsRJqmA9Oz2r4="
},
"elliptic": {
"version": "6.4.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz",
+ "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==",
"requires": {
"bn.js": "^4.4.0",
"brorand": "^1.0.1",
@@ -10722,26 +13085,31 @@
},
"emoji-regex": {
"version": "7.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
},
"emojis-list": {
"version": "2.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz",
+ "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k="
},
"encodeurl": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+ "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
},
"end-of-stream": {
"version": "1.4.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
+ "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
"requires": {
"once": "^1.4.0"
}
},
"engine.io": {
"version": "3.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.2.1.tgz",
+ "integrity": "sha512-+VlKzHzMhaU+GsCIg4AoXF1UdDFjHHwMmMKqMJNDNLlUlejz58FCy4LBqB2YVJskHGYl06BatYWKP2TVdVXE5w==",
"requires": {
"accepts": "~1.3.4",
"base64id": "1.0.0",
@@ -10753,7 +13121,8 @@
"dependencies": {
"accepts": {
"version": "1.3.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz",
+ "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=",
"requires": {
"mime-types": "~2.1.18",
"negotiator": "0.6.1"
@@ -10761,22 +13130,26 @@
},
"cookie": {
"version": "0.3.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
+ "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s="
},
"debug": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"mime-db": {
"version": "1.38.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz",
+ "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg=="
},
"mime-types": {
"version": "2.1.22",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz",
+ "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==",
"requires": {
"mime-db": "~1.38.0"
}
@@ -10785,7 +13158,8 @@
},
"engine.io-client": {
"version": "3.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.2.1.tgz",
+ "integrity": "sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw==",
"requires": {
"component-emitter": "1.2.1",
"component-inherit": "0.0.3",
@@ -10802,7 +13176,8 @@
"dependencies": {
"debug": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
@@ -10811,7 +13186,8 @@
},
"engine.io-parser": {
"version": "2.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.3.tgz",
+ "integrity": "sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA==",
"requires": {
"after": "0.8.2",
"arraybuffer.slice": "~0.0.7",
@@ -10822,7 +13198,8 @@
},
"enhanced-resolve": {
"version": "4.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz",
+ "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==",
"requires": {
"graceful-fs": "^4.1.2",
"memory-fs": "^0.4.0",
@@ -10831,22 +13208,26 @@
},
"ent": {
"version": "2.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz",
+ "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0="
},
"entities": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz",
+ "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY="
},
"errno": {
"version": "0.1.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.6.tgz",
+ "integrity": "sha512-IsORQDpaaSwcDP4ZZnHxgE85werpo34VYn1Ud3mq+eUsF593faR8oCZNXrROVkpFu2TsbrNhHin0aUrTsQ9vNw==",
"requires": {
"prr": "~1.0.1"
}
},
"error": {
"version": "7.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/error/-/error-7.0.2.tgz",
+ "integrity": "sha1-pfdf/02ZJhJt2sDqXcOOaJFTywI=",
"requires": {
"string-template": "~0.2.1",
"xtend": "~4.0.0"
@@ -10854,27 +13235,31 @@
},
"error-ex": {
"version": "1.3.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
+ "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=",
"requires": {
"is-arrayish": "^0.2.1"
}
},
"error-stack-parser": {
"version": "1.3.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-1.3.3.tgz",
+ "integrity": "sha1-+tpuOpzSsOCA5tb8dRQYZJc081w=",
"requires": {
"stackframe": "^0.3.1"
},
"dependencies": {
"stackframe": {
"version": "0.3.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-0.3.1.tgz",
+ "integrity": "sha1-M6qE8Rd6VUjIk1Uzy/6zQgl19aQ="
}
}
},
"es-abstract": {
"version": "1.12.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz",
+ "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==",
"requires": {
"es-to-primitive": "^1.1.1",
"function-bind": "^1.1.1",
@@ -10885,7 +13270,8 @@
},
"es-to-primitive": {
"version": "1.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz",
+ "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==",
"requires": {
"is-callable": "^1.1.4",
"is-date-object": "^1.0.1",
@@ -10894,7 +13280,8 @@
},
"es5-ext": {
"version": "0.10.46",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.46.tgz",
+ "integrity": "sha512-24XxRvJXNFwEMpJb3nOkiRJKRoupmjYmOPVlI65Qy2SrtxwOTB+g6ODjBKOtwEHbYrhWRty9xxOWLNdClT2djw==",
"requires": {
"es6-iterator": "~2.0.3",
"es6-symbol": "~3.1.1",
@@ -10903,7 +13290,8 @@
},
"es6-iterator": {
"version": "2.0.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
+ "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=",
"requires": {
"d": "1",
"es5-ext": "^0.10.35",
@@ -10912,11 +13300,13 @@
},
"es6-promise": {
"version": "4.2.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.5.tgz",
+ "integrity": "sha512-n6wvpdE43VFtJq+lUDYDBFUwV8TZbuGXLV4D6wKafg13ldznKsyEvatubnmUe31zcvelSzOHF+XbaT+Bl9ObDg=="
},
"es6-symbol": {
"version": "3.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
+ "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
"requires": {
"d": "1",
"es5-ext": "~0.10.14"
@@ -10924,15 +13314,18 @@
},
"escape-html": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.1.tgz",
+ "integrity": "sha1-GBoobq05ejmpKFfPsdQwUuNWv/A="
},
"escape-string-regexp": {
"version": "1.0.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"escodegen": {
"version": "1.7.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.7.1.tgz",
+ "integrity": "sha1-MOz89mypjcZ80v0WKr626vqM5vw=",
"requires": {
"esprima": "^1.2.2",
"estraverse": "^1.9.1",
@@ -10943,15 +13336,18 @@
"dependencies": {
"esprima": {
"version": "1.2.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.5.tgz",
+ "integrity": "sha1-CZNQL+r2aBODJXVvMPmlH+7sEek="
},
"estraverse": {
"version": "1.9.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz",
+ "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q="
},
"optionator": {
"version": "0.5.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.5.0.tgz",
+ "integrity": "sha1-t1qJlaLUF98ltuTjhi9QqohlE2g=",
"requires": {
"deep-is": "~0.1.2",
"fast-levenshtein": "~1.0.0",
@@ -10963,7 +13359,8 @@
},
"source-map": {
"version": "0.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz",
+ "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=",
"optional": true,
"requires": {
"amdefine": ">=0.0.4"
@@ -10973,7 +13370,8 @@
},
"eslint": {
"version": "5.16.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz",
+ "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==",
"requires": {
"@babel/code-frame": "^7.0.0",
"ajv": "^6.9.1",
@@ -10998,7 +13396,6 @@
"js-yaml": "^3.13.0",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.3.0",
- "lodash": "^4.17.11",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.1",
"natural-compare": "^1.4.0",
@@ -11015,7 +13412,8 @@
"dependencies": {
"ajv": {
"version": "6.10.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz",
+ "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==",
"requires": {
"fast-deep-equal": "^2.0.1",
"fast-json-stable-stringify": "^2.0.0",
@@ -11025,18 +13423,21 @@
},
"ansi-regex": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
},
"ansi-styles": {
"version": "3.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"requires": {
"color-convert": "^1.9.0"
}
},
"chalk": {
"version": "2.4.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
@@ -11045,14 +13446,16 @@
},
"debug": {
"version": "4.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": {
"ms": "^2.1.1"
}
},
"eslint-scope": {
"version": "4.0.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz",
+ "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==",
"requires": {
"esrecurse": "^4.1.0",
"estraverse": "^4.1.1"
@@ -11060,7 +13463,8 @@
},
"glob": {
"version": "7.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
+ "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -11072,11 +13476,13 @@
},
"has-flag": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"js-yaml": {
"version": "3.13.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
+ "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
"requires": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
@@ -11084,34 +13490,35 @@
},
"levn": {
"version": "0.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
+ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
"requires": {
"prelude-ls": "~1.1.2",
"type-check": "~0.3.2"
}
},
- "lodash": {
- "version": "4.17.11",
- "resolved": false
- },
"ms": {
"version": "2.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
},
"progress": {
"version": "2.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
+ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA=="
},
"strip-ansi": {
"version": "4.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
"requires": {
"ansi-regex": "^3.0.0"
}
},
"supports-color": {
"version": "5.5.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"requires": {
"has-flag": "^3.0.0"
}
@@ -11120,7 +13527,8 @@
},
"eslint-loader": {
"version": "2.1.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/eslint-loader/-/eslint-loader-2.1.2.tgz",
+ "integrity": "sha512-rA9XiXEOilLYPOIInvVH5S/hYfyTPyxag6DZhoQOduM+3TkghAEQ3VcFO8VnX4J4qg/UIBzp72aOf/xvYmpmsg==",
"requires": {
"loader-fs-cache": "^1.0.0",
"loader-utils": "^1.0.2",
@@ -11131,29 +13539,24 @@
"dependencies": {
"big.js": {
"version": "5.2.2",
- "resolved": false
- },
- "json5": {
- "version": "1.0.1",
- "resolved": false,
- "requires": {
- "minimist": "^1.2.0"
- }
+ "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
+ "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ=="
},
"loader-utils": {
"version": "1.2.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz",
+ "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==",
"requires": {
"big.js": "^5.2.2",
- "emojis-list": "^2.0.0",
- "json5": "^1.0.1"
+ "emojis-list": "^2.0.0"
}
}
}
},
"eslint-scope": {
"version": "3.7.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz",
+ "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=",
"requires": {
"esrecurse": "^4.1.0",
"estraverse": "^4.1.1"
@@ -11161,15 +13564,18 @@
},
"eslint-utils": {
"version": "1.3.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz",
+ "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q=="
},
"eslint-visitor-keys": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz",
+ "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ=="
},
"espree": {
"version": "5.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz",
+ "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==",
"requires": {
"acorn": "^6.0.7",
"acorn-jsx": "^5.0.0",
@@ -11178,62 +13584,74 @@
"dependencies": {
"acorn": {
"version": "6.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz",
+ "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA=="
}
}
},
"esprima": {
"version": "4.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
},
"esquery": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz",
+ "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==",
"requires": {
"estraverse": "^4.0.0"
}
},
"esrecurse": {
"version": "4.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz",
+ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==",
"requires": {
"estraverse": "^4.1.0"
}
},
"estraverse": {
"version": "4.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
+ "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM="
},
"esutils": {
"version": "2.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
+ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs="
},
"etag": {
"version": "1.8.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
},
"eventemitter2": {
"version": "0.4.14",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz",
+ "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas="
},
"eventemitter3": {
"version": "1.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-1.2.0.tgz",
+ "integrity": "sha1-HIaZHYFq0eUEdQ5zh0Ik7PO+xQg="
},
"events": {
"version": "1.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz",
+ "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ="
},
"eventsource": {
"version": "1.0.7",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.0.7.tgz",
+ "integrity": "sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ==",
"requires": {
"original": "^1.0.0"
}
},
"evp_bytestokey": {
"version": "1.0.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz",
+ "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==",
"requires": {
"md5.js": "^1.3.4",
"safe-buffer": "^5.1.1"
@@ -11241,7 +13659,8 @@
},
"execa": {
"version": "0.10.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz",
+ "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==",
"requires": {
"cross-spawn": "^6.0.0",
"get-stream": "^3.0.0",
@@ -11254,11 +13673,13 @@
},
"exit": {
"version": "0.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz",
+ "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw="
},
"expand-braces": {
"version": "0.1.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/expand-braces/-/expand-braces-0.1.2.tgz",
+ "integrity": "sha1-SIsdHSRRyz06axks/AMPRMWFX+o=",
"requires": {
"array-slice": "^0.2.3",
"array-unique": "^0.2.1",
@@ -11267,14 +13688,16 @@
"dependencies": {
"braces": {
"version": "0.1.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/braces/-/braces-0.1.5.tgz",
+ "integrity": "sha1-wIVxEIUpHYt1/ddOqw+FlygHEeY=",
"requires": {
"expand-range": "^0.1.0"
}
},
"expand-range": {
"version": "0.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-0.1.1.tgz",
+ "integrity": "sha1-TLjtoJk8pW+k9B/ELzy7TMrf8EQ=",
"requires": {
"is-number": "^0.1.1",
"repeat-string": "^0.2.2"
@@ -11282,17 +13705,20 @@
},
"is-number": {
"version": "0.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-0.1.1.tgz",
+ "integrity": "sha1-aaevEWlj1HIG7JvZtIoUIW8eOAY="
},
"repeat-string": {
"version": "0.2.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-0.2.2.tgz",
+ "integrity": "sha1-x6jTI2BoNiBZp+RlH8aITosftK4="
}
}
},
"expand-brackets": {
"version": "2.1.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
+ "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
"requires": {
"debug": "^2.3.3",
"define-property": "^0.2.5",
@@ -11305,14 +13731,16 @@
"dependencies": {
"define-property": {
"version": "0.2.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
"requires": {
"is-descriptor": "^0.1.0"
}
},
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
@@ -11321,18 +13749,21 @@
},
"expand-tilde": {
"version": "2.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz",
+ "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=",
"requires": {
"homedir-polyfill": "^1.0.1"
}
},
"expect.js": {
"version": "0.3.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/expect.js/-/expect.js-0.3.1.tgz",
+ "integrity": "sha1-sKWaDS7/VDdUTr8M6qYBWEHQm1s="
},
"express": {
"version": "4.16.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz",
+ "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==",
"requires": {
"accepts": "~1.3.5",
"array-flatten": "1.1.1",
@@ -11368,7 +13799,8 @@
"dependencies": {
"accepts": {
"version": "1.3.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz",
+ "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=",
"requires": {
"mime-types": "~2.1.18",
"negotiator": "0.6.1"
@@ -11376,7 +13808,8 @@
},
"body-parser": {
"version": "1.18.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz",
+ "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=",
"requires": {
"bytes": "3.0.0",
"content-type": "~1.0.4",
@@ -11392,19 +13825,23 @@
},
"bytes": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
+ "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg="
},
"cookie": {
"version": "0.3.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
+ "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s="
},
"escape-html": {
"version": "1.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
},
"finalhandler": {
"version": "1.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz",
+ "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==",
"requires": {
"debug": "2.6.9",
"encodeurl": "~1.0.2",
@@ -11417,11 +13854,13 @@
},
"fresh": {
"version": "0.5.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+ "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
},
"http-errors": {
"version": "1.6.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
+ "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
"requires": {
"depd": "~1.1.2",
"inherits": "2.0.3",
@@ -11431,33 +13870,39 @@
},
"iconv-lite": {
"version": "0.4.23",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz",
+ "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
},
"ipaddr.js": {
"version": "1.8.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz",
+ "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4="
},
"mime-db": {
"version": "1.37.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz",
+ "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg=="
},
"mime-types": {
"version": "2.1.21",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz",
+ "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==",
"requires": {
"mime-db": "~1.37.0"
}
},
"parseurl": {
"version": "1.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
+ "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M="
},
"proxy-addr": {
"version": "2.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz",
+ "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==",
"requires": {
"forwarded": "~0.1.2",
"ipaddr.js": "1.8.0"
@@ -11465,11 +13910,13 @@
},
"qs": {
"version": "6.5.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
+ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
},
"raw-body": {
"version": "2.3.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz",
+ "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==",
"requires": {
"bytes": "3.0.0",
"http-errors": "1.6.3",
@@ -11479,11 +13926,13 @@
},
"safe-buffer": {
"version": "5.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"serve-static": {
"version": "1.13.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz",
+ "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==",
"requires": {
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
@@ -11493,11 +13942,13 @@
},
"setprototypeof": {
"version": "1.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
+ "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ=="
},
"type-is": {
"version": "1.6.16",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz",
+ "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==",
"requires": {
"media-typer": "0.3.0",
"mime-types": "~2.1.18"
@@ -11505,21 +13956,25 @@
},
"utils-merge": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
},
"vary": {
"version": "1.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
}
}
},
"extend": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.0.tgz",
+ "integrity": "sha1-WkdDU7nzNT3dgXbf03uRyDpG8dQ="
},
"extend-shallow": {
"version": "3.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
+ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
"requires": {
"assign-symbols": "^1.0.0",
"is-extendable": "^1.0.1"
@@ -11527,7 +13982,8 @@
"dependencies": {
"is-extendable": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
"requires": {
"is-plain-object": "^2.0.4"
}
@@ -11536,7 +13992,8 @@
},
"external-editor": {
"version": "3.0.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz",
+ "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==",
"requires": {
"chardet": "^0.7.0",
"iconv-lite": "^0.4.24",
@@ -11545,7 +14002,8 @@
},
"extglob": {
"version": "2.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
+ "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
"requires": {
"array-unique": "^0.3.2",
"define-property": "^1.0.0",
@@ -11559,39 +14017,45 @@
"dependencies": {
"array-unique": {
"version": "0.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
},
"define-property": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
"requires": {
"is-descriptor": "^1.0.0"
}
},
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
},
"is-accessor-descriptor": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
"requires": {
"kind-of": "^6.0.0"
}
},
"is-data-descriptor": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
"requires": {
"kind-of": "^6.0.0"
}
},
"is-descriptor": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
"requires": {
"is-accessor-descriptor": "^1.0.0",
"is-data-descriptor": "^1.0.0",
@@ -11600,13 +14064,15 @@
},
"kind-of": {
"version": "6.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
}
}
},
"extract-zip": {
"version": "1.5.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.5.0.tgz",
+ "integrity": "sha1-ksz22B73Cp+kwXRxFMzvbYaIpsQ=",
"requires": {
"concat-stream": "1.5.0",
"debug": "0.7.4",
@@ -11616,7 +14082,8 @@
"dependencies": {
"concat-stream": {
"version": "1.5.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.0.tgz",
+ "integrity": "sha1-U/fUPFHF5D+ByP3QMyHGMb5o1hE=",
"requires": {
"inherits": "~2.0.1",
"readable-stream": "~2.0.0",
@@ -11625,22 +14092,26 @@
},
"debug": {
"version": "0.7.4",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz",
+ "integrity": "sha1-BuHqgILCyxTjmAbiLi9vdX+Srzk="
},
"minimist": {
"version": "0.0.8",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
},
"mkdirp": {
"version": "0.5.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz",
+ "integrity": "sha1-HXMHam35hs2TROFecfzAWkyavxI=",
"requires": {
"minimist": "0.0.8"
}
},
"readable-stream": {
"version": "2.0.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",
+ "integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
@@ -11652,21 +14123,25 @@
},
"string_decoder": {
"version": "0.10.31",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
},
"extsprintf": {
"version": "1.3.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
+ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
},
"eyes": {
"version": "0.1.8",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz",
+ "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A="
},
"falafel": {
"version": "1.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/falafel/-/falafel-1.2.0.tgz",
+ "integrity": "sha1-wY0k71CRF0pJfzGM0ksCaiXN2rQ=",
"requires": {
"acorn": "^1.0.3",
"foreach": "^2.0.5",
@@ -11676,65 +14151,71 @@
"dependencies": {
"acorn": {
"version": "1.2.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz",
+ "integrity": "sha1-yM4n3grMdtiW0rH6099YjZ6C8BQ="
},
"isarray": {
"version": "0.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
}
}
},
"fast-deep-equal": {
"version": "2.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
+ "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
},
"fast-json-stable-stringify": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
+ "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
},
"fast-levenshtein": {
"version": "1.0.7",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.0.7.tgz",
+ "integrity": "sha1-AXjc3uAjuSkFGTrwlZ6KdjnP3Lk="
},
"faye-websocket": {
"version": "0.10.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz",
+ "integrity": "sha1-TkkvjQTftviQA1B/btvy1QHnxvQ=",
"requires": {
"websocket-driver": ">=0.5.1"
}
},
"fd-slicer": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz",
+ "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU=",
"requires": {
"pend": "~1.2.0"
}
},
"fg-lodash": {
"version": "0.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/fg-lodash/-/fg-lodash-0.0.2.tgz",
+ "integrity": "sha1-mINSU39CfaavIiEpu2OsyknmL6M=",
"requires": {
- "lodash": "^2.4.1",
"underscore.string": "~2.3.3"
},
"dependencies": {
- "lodash": {
- "version": "2.4.2",
- "resolved": false
- },
"underscore.string": {
"version": "2.3.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz",
+ "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0="
}
}
},
"figgy-pudding": {
"version": "3.5.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.1.tgz",
+ "integrity": "sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w=="
},
"figures": {
"version": "1.7.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
+ "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=",
"requires": {
"escape-string-regexp": "^1.0.5",
"object-assign": "^4.1.0"
@@ -11742,14 +14223,16 @@
},
"file-entry-cache": {
"version": "5.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz",
+ "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==",
"requires": {
"flat-cache": "^2.0.1"
}
},
"fileset": {
"version": "0.1.8",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/fileset/-/fileset-0.1.8.tgz",
+ "integrity": "sha1-UGuRqTluqn4y+0KoQHfHoMc2t0E=",
"requires": {
"glob": "3.x",
"minimatch": "0.x"
@@ -11757,7 +14240,8 @@
"dependencies": {
"glob": {
"version": "3.2.11",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz",
+ "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=",
"requires": {
"inherits": "2",
"minimatch": "0.3"
@@ -11765,7 +14249,8 @@
"dependencies": {
"minimatch": {
"version": "0.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz",
+ "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=",
"requires": {
"lru-cache": "2",
"sigmund": "~1.0.0"
@@ -11775,7 +14260,8 @@
},
"minimatch": {
"version": "0.4.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.4.0.tgz",
+ "integrity": "sha1-vSx9Bg0sjI/Xzefx8u0tWycP2xs=",
"requires": {
"lru-cache": "2",
"sigmund": "~1.0.0"
@@ -11785,7 +14271,8 @@
},
"fill-range": {
"version": "4.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+ "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
"requires": {
"extend-shallow": "^2.0.1",
"is-number": "^3.0.0",
@@ -11795,7 +14282,8 @@
"dependencies": {
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
@@ -11804,7 +14292,8 @@
},
"finalhandler": {
"version": "1.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz",
+ "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=",
"requires": {
"debug": "2.6.9",
"encodeurl": "~1.0.1",
@@ -11817,21 +14306,25 @@
"dependencies": {
"escape-html": {
"version": "1.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
},
"parseurl": {
"version": "1.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
+ "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M="
},
"statuses": {
"version": "1.3.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz",
+ "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4="
}
}
},
"find": {
"version": "0.2.9",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/find/-/find-0.2.9.tgz",
+ "integrity": "sha1-S3Px/55WrZG3bnFkB/5f/mVUu4w=",
"optional": true,
"requires": {
"traverse-chain": "~0.1.0"
@@ -11839,7 +14332,8 @@
},
"find-cache-dir": {
"version": "0.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-0.1.1.tgz",
+ "integrity": "sha1-yN765XyKUqinhPnjHFfHQumToLk=",
"requires": {
"commondir": "^1.0.1",
"mkdirp": "^0.5.1",
@@ -11848,7 +14342,8 @@
},
"find-up": {
"version": "1.1.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
+ "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
"requires": {
"path-exists": "^2.0.0",
"pinkie-promise": "^2.0.0"
@@ -11856,7 +14351,8 @@
"dependencies": {
"path-exists": {
"version": "2.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
+ "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
"requires": {
"pinkie-promise": "^2.0.0"
}
@@ -11865,14 +14361,16 @@
},
"findup-sync": {
"version": "0.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz",
+ "integrity": "sha1-N5MKpdgWt3fANEXhlmzGeQpMCxY=",
"requires": {
"glob": "~5.0.0"
}
},
"fined": {
"version": "1.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.1.tgz",
+ "integrity": "sha512-jQp949ZmEbiYHk3gkbdtpJ0G1+kgtLQBNdP5edFP7Fh+WAYceLQz6yO1SBj72Xkg8GVyTB3bBzAYrHJVh5Xd5g==",
"requires": {
"expand-tilde": "^2.0.2",
"is-plain-object": "^2.0.3",
@@ -11883,18 +14381,21 @@
},
"finished": {
"version": "1.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/finished/-/finished-1.2.2.tgz",
+ "integrity": "sha1-QWCOr639ZWg7RqEiC8Sx7D2u3Ng=",
"requires": {
"ee-first": "1.0.3"
}
},
"flagged-respawn": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz",
+ "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q=="
},
"flat-cache": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
+ "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==",
"requires": {
"flatted": "^2.0.0",
"rimraf": "2.6.3",
@@ -11903,7 +14404,8 @@
"dependencies": {
"glob": {
"version": "7.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
+ "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -11915,7 +14417,8 @@
},
"rimraf": {
"version": "2.6.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
+ "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
"requires": {
"glob": "^7.1.3"
}
@@ -11924,11 +14427,13 @@
},
"flatted": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz",
+ "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg=="
},
"flush-write-stream": {
"version": "1.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz",
+ "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==",
"requires": {
"inherits": "^2.0.3",
"readable-stream": "^2.3.6"
@@ -11936,11 +14441,13 @@
"dependencies": {
"process-nextick-args": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
+ "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
},
"readable-stream": {
"version": "2.3.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
@@ -11953,7 +14460,8 @@
},
"string_decoder": {
"version": "1.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
}
@@ -11962,19 +14470,23 @@
},
"for-in": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
+ "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA="
},
"foreach": {
"version": "2.0.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
+ "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k="
},
"forever-agent": {
"version": "0.6.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
+ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
},
"form-data": {
"version": "0.1.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.4.tgz",
+ "integrity": "sha1-kavXiKupcCsaq/qLwBAxoqyeOxI=",
"optional": true,
"requires": {
"async": "~0.9.0",
@@ -11984,12 +14496,14 @@
"dependencies": {
"async": {
"version": "0.9.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz",
+ "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=",
"optional": true
},
"combined-stream": {
"version": "0.0.7",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz",
+ "integrity": "sha1-ATfmV7qlp1QcV6w3rF/AfXO03B8=",
"optional": true,
"requires": {
"delayed-stream": "0.0.5"
@@ -11997,29 +14511,34 @@
},
"delayed-stream": {
"version": "0.0.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz",
+ "integrity": "sha1-1LH0OpPoKW3+AmlPRoC8N6MTxz8=",
"optional": true
}
}
},
"forwarded": {
"version": "0.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
+ "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
},
"fragment-cache": {
"version": "0.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
+ "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
"requires": {
"map-cache": "^0.2.2"
}
},
"fresh": {
"version": "0.2.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.2.2.tgz",
+ "integrity": "sha1-lzHc9WeMf660T7kDxPct9VGH+nc="
},
"from2": {
"version": "2.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz",
+ "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=",
"requires": {
"inherits": "^2.0.1",
"readable-stream": "^2.0.0"
@@ -12027,14 +14546,16 @@
},
"fs-access": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/fs-access/-/fs-access-1.0.1.tgz",
+ "integrity": "sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o=",
"requires": {
"null-check": "^1.0.0"
}
},
"fs-extra": {
"version": "0.26.7",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz",
+ "integrity": "sha1-muH92UiXeY7at20JGM9C0MMYT6k=",
"requires": {
"graceful-fs": "^4.1.2",
"jsonfile": "^2.1.0",
@@ -12045,7 +14566,8 @@
},
"fs-write-stream-atomic": {
"version": "1.0.10",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz",
+ "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=",
"requires": {
"graceful-fs": "^4.1.2",
"iferr": "^0.1.5",
@@ -12055,11 +14577,13 @@
},
"fs.realpath": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"fstream": {
"version": "0.1.31",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/fstream/-/fstream-0.1.31.tgz",
+ "integrity": "sha1-czfwWPu7vvqMn1YaKMqwhJICyYg=",
"requires": {
"graceful-fs": "~3.0.2",
"inherits": "~2.0.0",
@@ -12069,7 +14593,8 @@
"dependencies": {
"graceful-fs": {
"version": "3.0.11",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz",
+ "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=",
"requires": {
"natives": "^1.1.0"
}
@@ -12078,64 +14603,77 @@
},
"function-bind": {
"version": "1.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
"functional-red-black-tree": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
+ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc="
},
"gaze": {
"version": "1.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz",
+ "integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==",
"requires": {
"globule": "^1.0.0"
}
},
"generate-function": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz",
+ "integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ="
},
"generate-object-property": {
"version": "1.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz",
+ "integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=",
"requires": {
"is-property": "^1.0.0"
}
},
"get-caller-file": {
"version": "1.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
+ "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w=="
},
"get-func-name": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz",
+ "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE="
},
"get-stdin": {
"version": "4.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
+ "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4="
},
"get-stream": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
+ "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
},
"get-value": {
"version": "2.0.6",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
+ "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg="
},
"getobject": {
"version": "0.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz",
+ "integrity": "sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw="
},
"getpass": {
"version": "0.1.7",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
+ "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
"requires": {
"assert-plus": "^1.0.0"
}
},
"glob": {
"version": "5.0.15",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
+ "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=",
"requires": {
"inflight": "^1.0.4",
"inherits": "2",
@@ -12146,7 +14684,8 @@
},
"glob-parent": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
+ "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
"requires": {
"is-glob": "^3.1.0",
"path-dirname": "^1.0.0"
@@ -12154,7 +14693,8 @@
"dependencies": {
"is-glob": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
"requires": {
"is-extglob": "^2.1.0"
}
@@ -12163,7 +14703,8 @@
},
"global-modules": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
+ "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==",
"requires": {
"global-prefix": "^1.0.1",
"is-windows": "^1.0.1",
@@ -12172,7 +14713,8 @@
},
"global-prefix": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz",
+ "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=",
"requires": {
"expand-tilde": "^2.0.2",
"homedir-polyfill": "^1.0.1",
@@ -12183,7 +14725,8 @@
"dependencies": {
"which": {
"version": "1.3.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"requires": {
"isexe": "^2.0.0"
}
@@ -12192,11 +14735,13 @@
},
"globals": {
"version": "11.9.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/globals/-/globals-11.9.0.tgz",
+ "integrity": "sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg=="
},
"globby": {
"version": "6.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
+ "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=",
"requires": {
"array-union": "^1.0.1",
"glob": "^7.0.3",
@@ -12207,7 +14752,8 @@
"dependencies": {
"glob": {
"version": "7.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
+ "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -12221,16 +14767,17 @@
},
"globule": {
"version": "1.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz",
+ "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==",
"requires": {
"glob": "~7.1.1",
- "lodash": "~4.17.10",
"minimatch": "~3.0.2"
},
"dependencies": {
"glob": {
"version": "7.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
+ "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -12239,24 +14786,23 @@
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
- },
- "lodash": {
- "version": "4.17.11",
- "resolved": false
}
}
},
"graceful-fs": {
"version": "4.1.11",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
+ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
},
"growl": {
"version": "1.9.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz",
+ "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8="
},
"grunt": {
"version": "1.0.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.3.tgz",
+ "integrity": "sha512-/JzmZNPfKorlCrrmxWqQO4JVodO+DVd5XX4DkocL/1WlLlKVLE9+SdEIempOAxDhWPysLle6afvn/hg7Ck2k9g==",
"requires": {
"coffeescript": "~1.10.0",
"dateformat": "~1.0.12",
@@ -12279,11 +14825,13 @@
"dependencies": {
"esprima": {
"version": "2.7.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz",
+ "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE="
},
"glob": {
"version": "7.0.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz",
+ "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -12295,7 +14843,8 @@
},
"grunt-cli": {
"version": "1.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz",
+ "integrity": "sha1-VisRnrsGndtGSs4oRVAb6Xs1tqg=",
"requires": {
"findup-sync": "~0.3.0",
"grunt-known-options": "~1.1.0",
@@ -12305,7 +14854,8 @@
},
"js-yaml": {
"version": "3.5.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.5.5.tgz",
+ "integrity": "sha1-A3fDgBfKvHMisNH7zSWkkWQfL74=",
"requires": {
"argparse": "^1.0.2",
"esprima": "^2.6.0"
@@ -12313,7 +14863,8 @@
},
"nopt": {
"version": "3.0.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
+ "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=",
"requires": {
"abbrev": "1"
}
@@ -12322,37 +14873,42 @@
},
"grunt-blanket-mocha": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-blanket-mocha/-/grunt-blanket-mocha-1.0.0.tgz",
+ "integrity": "sha1-wfJFaktS2mhhuKsFabg6dhVztUI=",
"requires": {
"blanket": "~1.1.6",
"grunt": ">=0.4.0",
"grunt-lib-phantomjs": "^1.0.2",
- "lodash": "^3.9.0",
"mocha": "^2.4.5"
},
"dependencies": {
"commander": {
"version": "2.3.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.3.0.tgz",
+ "integrity": "sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM="
},
"debug": {
"version": "2.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.2.0.tgz",
+ "integrity": "sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=",
"requires": {
"ms": "0.7.1"
}
},
"diff": {
"version": "1.4.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz",
+ "integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8="
},
"escape-string-regexp": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz",
+ "integrity": "sha1-Tbwv5nTnGUnK8/smlc5/LcHZqNE="
},
"glob": {
"version": "3.2.11",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz",
+ "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=",
"requires": {
"inherits": "2",
"minimatch": "0.3"
@@ -12360,7 +14916,8 @@
},
"jade": {
"version": "0.26.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/jade/-/jade-0.26.3.tgz",
+ "integrity": "sha1-jxDXl32NefL2/4YqgbBRPMslaGw=",
"requires": {
"commander": "0.6.1",
"mkdirp": "0.3.0"
@@ -12368,17 +14925,20 @@
"dependencies": {
"commander": {
"version": "0.6.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz",
+ "integrity": "sha1-+mihT2qUXVTbvlDYzbMyDp47GgY="
},
"mkdirp": {
"version": "0.3.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz",
+ "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4="
}
}
},
"minimatch": {
"version": "0.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz",
+ "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=",
"requires": {
"lru-cache": "2",
"sigmund": "~1.0.0"
@@ -12386,7 +14946,8 @@
},
"mocha": {
"version": "2.5.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-2.5.3.tgz",
+ "integrity": "sha1-FhvlvetJZ3HrmzV0UFC2IrWu/Fg=",
"requires": {
"commander": "2.3.0",
"debug": "2.2.0",
@@ -12402,17 +14963,20 @@
},
"ms": {
"version": "0.7.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz",
+ "integrity": "sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg="
},
"supports-color": {
"version": "1.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.2.0.tgz",
+ "integrity": "sha1-/x7R5hFp0Gs88tWI4YixjYhH4X4="
}
}
},
"grunt-bumpup": {
"version": "0.6.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-bumpup/-/grunt-bumpup-0.6.3.tgz",
+ "integrity": "sha1-dU6Wu2pTN9C5VInl3EmWuvyLtBQ=",
"requires": {
"moment": "^2.8.3",
"semver": "^4.0.3"
@@ -12420,13 +14984,15 @@
"dependencies": {
"semver": {
"version": "4.3.6",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz",
+ "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto="
}
}
},
"grunt-cli": {
"version": "1.3.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.3.2.tgz",
+ "integrity": "sha512-8OHDiZZkcptxVXtMfDxJvmN7MVJNE8L/yIcPb4HB7TlyFD1kDvjHrb62uhySsU14wJx9ORMnTuhRMQ40lH/orQ==",
"requires": {
"grunt-known-options": "~1.1.0",
"interpret": "~1.1.0",
@@ -12437,11 +15003,13 @@
"dependencies": {
"interpret": {
"version": "1.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz",
+ "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ="
},
"nopt": {
"version": "4.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
+ "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
"requires": {
"abbrev": "1",
"osenv": "^0.1.4"
@@ -12451,11 +15019,13 @@
},
"grunt-contrib-concat": {
"version": "0.3.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/grunt-contrib-concat/-/grunt-contrib-concat-0.3.0.tgz",
+ "integrity": "sha1-SPoNQzbSm2U62CJaa9b4VrRIPjI="
},
"grunt-contrib-connect": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-contrib-connect/-/grunt-contrib-connect-2.0.0.tgz",
+ "integrity": "sha512-JVjM9UDP84WbT2S7swkyuwPuxFtT+zry/RUBuP3IT8LZPEQjtzzMwiM+qimswNKQ9plh5WhcFWaaqz2ruB9/DA==",
"requires": {
"async": "^2.6.1",
"connect": "^3.6.6",
@@ -12470,14 +15040,13 @@
"dependencies": {
"async": {
"version": "2.6.1",
- "resolved": false,
- "requires": {
- "lodash": "^4.17.10"
- }
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
+ "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ=="
},
"connect": {
"version": "3.6.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz",
+ "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=",
"requires": {
"debug": "2.6.9",
"finalhandler": "1.1.0",
@@ -12487,19 +15056,18 @@
},
"connect-livereload": {
"version": "0.6.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/connect-livereload/-/connect-livereload-0.6.0.tgz",
+ "integrity": "sha1-+fAJh0rWg3GDr7FwtMTjhXodfOs="
},
"escape-html": {
"version": "1.0.3",
- "resolved": false
- },
- "lodash": {
- "version": "4.17.11",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
},
"morgan": {
"version": "1.9.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.1.tgz",
+ "integrity": "sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA==",
"requires": {
"basic-auth": "~2.0.0",
"debug": "2.6.9",
@@ -12510,15 +15078,18 @@
},
"on-headers": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz",
+ "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c="
},
"parseurl": {
"version": "1.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
+ "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M="
},
"serve-static": {
"version": "1.13.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz",
+ "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==",
"requires": {
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
@@ -12528,17 +15099,20 @@
},
"utils-merge": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
}
}
},
"grunt-contrib-copy": {
"version": "0.5.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-0.5.0.tgz",
+ "integrity": "sha1-QQB1rEWlhWuhkbHMclclRQ1KAhU="
},
"grunt-contrib-jshint": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-2.0.0.tgz",
+ "integrity": "sha512-4qR411I1bhvVrPkKBzCUcrWkTEtBuWioXi9ABWRXHoplRScg03jiMqLDpzS4pDhVsLOTx5F9l+0cnMc+Gd2MWg==",
"requires": {
"chalk": "^2.4.1",
"hooker": "^0.2.3",
@@ -12547,14 +15121,16 @@
"dependencies": {
"ansi-styles": {
"version": "3.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"requires": {
"color-convert": "^1.9.0"
}
},
"chalk": {
"version": "2.4.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
+ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
@@ -12563,11 +15139,13 @@
},
"has-flag": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"supports-color": {
"version": "5.5.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"requires": {
"has-flag": "^3.0.0"
}
@@ -12576,7 +15154,8 @@
},
"grunt-contrib-uglify": {
"version": "4.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-4.0.0.tgz",
+ "integrity": "sha512-vy3Vop2KDqdiwcGOGAjyKvjHFrRD/YK4KPQWR3Yt6OdYlgFw1z7HCuk66+IJ9s7oJmp9uRQXuuSHyawKRAgiMw==",
"requires": {
"chalk": "^2.4.1",
"maxmin": "^2.1.0",
@@ -12586,14 +15165,16 @@
"dependencies": {
"ansi-styles": {
"version": "3.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"requires": {
"color-convert": "^1.9.0"
}
},
"chalk": {
"version": "2.4.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
+ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
@@ -12602,26 +15183,31 @@
},
"commander": {
"version": "2.17.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz",
+ "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg=="
},
"has-flag": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"source-map": {
"version": "0.6.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
},
"supports-color": {
"version": "5.5.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"requires": {
"has-flag": "^3.0.0"
}
},
"uglify-js": {
"version": "3.4.9",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz",
+ "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==",
"requires": {
"commander": "~2.17.1",
"source-map": "~0.6.1"
@@ -12631,30 +15217,25 @@
},
"grunt-contrib-watch": {
"version": "1.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-contrib-watch/-/grunt-contrib-watch-1.1.0.tgz",
+ "integrity": "sha512-yGweN+0DW5yM+oo58fRu/XIRrPcn3r4tQx+nL7eMRwjpvk+rQY6R8o94BPK0i2UhTg9FN21hS+m8vR8v9vXfeg==",
"requires": {
"async": "^2.6.0",
"gaze": "^1.1.0",
- "lodash": "^4.17.10",
"tiny-lr": "^1.1.1"
},
"dependencies": {
"async": {
"version": "2.6.1",
- "resolved": false,
- "requires": {
- "lodash": "^4.17.10"
- }
- },
- "lodash": {
- "version": "4.17.11",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
+ "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ=="
}
}
},
"grunt-express": {
"version": "1.4.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-express/-/grunt-express-1.4.1.tgz",
+ "integrity": "sha1-j/4IGtOkfeDOoNHk8VZc5FPtxh4=",
"requires": {
"connect": "^2.15.0",
"connect-livereload": "^0.4.0",
@@ -12668,7 +15249,8 @@
"dependencies": {
"argparse": {
"version": "0.1.16",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz",
+ "integrity": "sha1-z9AeD7uj1srtBJ+9dY1A9lGW9Xw=",
"requires": {
"underscore": "~1.7.0",
"underscore.string": "~2.4.0"
@@ -12676,41 +15258,48 @@
"dependencies": {
"underscore.string": {
"version": "2.4.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz",
+ "integrity": "sha1-jN2PusTi0uoefi6Al8QvRCKA+Fs="
}
}
},
"async": {
"version": "0.2.10",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz",
+ "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E="
},
"coffee-script": {
"version": "1.3.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz",
+ "integrity": "sha1-FQ1rTLUiiUNp7+1qIQHCC8f0pPQ="
},
"colors": {
"version": "0.6.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz",
+ "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w="
},
"dateformat": {
"version": "1.0.2-1.2.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.2-1.2.3.tgz",
+ "integrity": "sha1-sCIMAt6YYXQztyhRz0fePfLNvuk="
},
"esprima": {
"version": "1.0.4",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz",
+ "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0="
},
"findup-sync": {
"version": "0.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.1.3.tgz",
+ "integrity": "sha1-fz56l7gjksZTvwZYm9hRkOk8NoM=",
"requires": {
- "glob": "~3.2.9",
- "lodash": "~2.4.1"
+ "glob": "~3.2.9"
},
"dependencies": {
"glob": {
"version": "3.2.11",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz",
+ "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=",
"requires": {
"inherits": "2",
"minimatch": "0.3"
@@ -12718,11 +15307,13 @@
},
"inherits": {
"version": "2.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"minimatch": {
"version": "0.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz",
+ "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=",
"requires": {
"lru-cache": "2",
"sigmund": "~1.0.0"
@@ -12732,14 +15323,16 @@
},
"gaze": {
"version": "0.5.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz",
+ "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=",
"requires": {
"globule": "~0.1.0"
}
},
"glob": {
"version": "3.1.21",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz",
+ "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=",
"requires": {
"graceful-fs": "~1.2.0",
"inherits": "1",
@@ -12748,91 +15341,86 @@
},
"globule": {
"version": "0.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz",
+ "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=",
"requires": {
"glob": "~3.1.21",
- "lodash": "~1.0.1",
"minimatch": "~0.2.11"
- },
- "dependencies": {
- "lodash": {
- "version": "1.0.2",
- "resolved": false
- }
}
},
"graceful-fs": {
"version": "1.2.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz",
+ "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q="
},
"grunt-contrib-watch": {
"version": "0.6.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-contrib-watch/-/grunt-contrib-watch-0.6.1.tgz",
+ "integrity": "sha1-ZP3LolpjX1tNobbOb5DaCutuPxU=",
"requires": {
"async": "~0.2.9",
"gaze": "~0.5.1",
- "lodash": "~2.4.1",
"tiny-lr-fork": "0.0.5"
}
},
"grunt-legacy-log": {
"version": "0.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-0.1.3.tgz",
+ "integrity": "sha1-7ClCboAwIa9ZAp+H0vnNczWgVTE=",
"requires": {
"colors": "~0.6.2",
"grunt-legacy-log-utils": "~0.1.1",
"hooker": "~0.2.3",
- "lodash": "~2.4.1",
"underscore.string": "~2.3.3"
},
"dependencies": {
"underscore.string": {
"version": "2.3.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz",
+ "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0="
}
}
},
"grunt-legacy-log-utils": {
"version": "0.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-0.1.1.tgz",
+ "integrity": "sha1-wHBrndkGThFvNvI/5OawSGcsD34=",
"requires": {
"colors": "~0.6.2",
- "lodash": "~2.4.1",
"underscore.string": "~2.3.3"
},
"dependencies": {
"underscore.string": {
"version": "2.3.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.3.3.tgz",
+ "integrity": "sha1-ccCL9rQosRM/N+ePo6Icgvcymw0="
}
}
},
"grunt-legacy-util": {
"version": "0.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-0.2.0.tgz",
+ "integrity": "sha1-kzJIhNv343qf98Am3/RR2UqeVUs=",
"requires": {
"async": "~0.1.22",
"exit": "~0.1.1",
"getobject": "~0.1.0",
"hooker": "~0.2.3",
- "lodash": "~0.9.2",
"underscore.string": "~2.2.1",
"which": "~1.0.5"
},
"dependencies": {
"async": {
"version": "0.1.22",
- "resolved": false
- },
- "lodash": {
- "version": "0.9.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz",
+ "integrity": "sha1-D8GqoIig4+8Ovi2IMbqw3PiEUGE="
}
}
},
"grunt-parallel": {
"version": "0.3.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-parallel/-/grunt-parallel-0.3.1.tgz",
+ "integrity": "sha1-nRGihytEp7ug7IFvAziKFfpWRmM=",
"requires": {
"grunt": "~0.4.1",
"lpad": "~0.1.0",
@@ -12841,11 +15429,13 @@
"dependencies": {
"async": {
"version": "0.1.22",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/async/-/async-0.1.22.tgz",
+ "integrity": "sha1-D8GqoIig4+8Ovi2IMbqw3PiEUGE="
},
"grunt": {
"version": "0.4.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt/-/grunt-0.4.5.tgz",
+ "integrity": "sha1-VpN81RlDJK3/bSB2MYMqnWuk5/A=",
"requires": {
"async": "~0.1.22",
"coffee-script": "~1.3.3",
@@ -12861,43 +15451,38 @@
"hooker": "~0.2.3",
"iconv-lite": "~0.2.11",
"js-yaml": "~2.0.5",
- "lodash": "~0.9.2",
"minimatch": "~0.2.12",
"nopt": "~1.0.10",
"rimraf": "~2.2.8",
"underscore.string": "~2.2.1",
"which": "~1.0.5"
}
- },
- "lodash": {
- "version": "0.9.2",
- "resolved": false
}
}
},
"iconv-lite": {
"version": "0.2.11",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz",
+ "integrity": "sha1-HOYKOleGSiktEyH/RgnKS7llrcg="
},
"inherits": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz",
+ "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js="
},
"js-yaml": {
"version": "2.0.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-2.0.5.tgz",
+ "integrity": "sha1-olrmUJmZ6X3yeMZxnaEb0Gh3Q6g=",
"requires": {
"argparse": "~ 0.1.11",
"esprima": "~ 1.0.2"
}
},
- "lodash": {
- "version": "2.4.2",
- "resolved": false
- },
"minimatch": {
"version": "0.2.14",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz",
+ "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=",
"requires": {
"lru-cache": "2",
"sigmund": "~1.0.0"
@@ -12905,34 +15490,30 @@
},
"q": {
"version": "0.8.12",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/q/-/q-0.8.12.tgz",
+ "integrity": "sha1-kWKpHhGBnEvNp9oVz1/vqtB3iCM="
},
"rimraf": {
"version": "2.2.8",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz",
+ "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI="
},
"underscore.string": {
"version": "2.2.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.2.1.tgz",
+ "integrity": "sha1-18D6KvXVoaZ/QlPa7pgTLnM/Dxk="
}
}
},
"grunt-karma": {
"version": "3.0.1",
- "resolved": false,
- "requires": {
- "lodash": "^4.17.10"
- },
- "dependencies": {
- "lodash": {
- "version": "4.17.11",
- "resolved": false
- }
- }
+ "resolved": "https://registry.npmjs.org/grunt-karma/-/grunt-karma-3.0.1.tgz",
+ "integrity": "sha512-iNt1Qe5GoePMIfBQmeffvfrvnvwTfJ9/h9p9gqGMIuEdVsUo4PKhTxIwyW5NMbHrgD8p2UEdeTJH4l0QGz4YtA=="
},
"grunt-karma-coveralls": {
"version": "2.5.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-karma-coveralls/-/grunt-karma-coveralls-2.5.4.tgz",
+ "integrity": "sha1-rzFHM17YzIcte4PP62mZbrlM8wk=",
"requires": {
"coveralls": "^2.10",
"glob": "^4.0",
@@ -12942,7 +15523,8 @@
"dependencies": {
"glob": {
"version": "4.5.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz",
+ "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=",
"requires": {
"inflight": "^1.0.4",
"inherits": "2",
@@ -12952,7 +15534,8 @@
},
"minimatch": {
"version": "2.0.10",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz",
+ "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=",
"requires": {
"brace-expansion": "^1.0.0"
}
@@ -12961,42 +15544,39 @@
},
"grunt-known-options": {
"version": "1.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-1.1.1.tgz",
+ "integrity": "sha512-cHwsLqoighpu7TuYj5RonnEuxGVFnztcUqTqp5rXFGYL4OuPFofwC4Ycg7n9fYwvK6F5WbYgeVOwph9Crs2fsQ=="
},
"grunt-legacy-log": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-2.0.0.tgz",
+ "integrity": "sha512-1m3+5QvDYfR1ltr8hjiaiNjddxGdQWcH0rw1iKKiQnF0+xtgTazirSTGu68RchPyh1OBng1bBUjLmX8q9NpoCw==",
"requires": {
"colors": "~1.1.2",
"grunt-legacy-log-utils": "~2.0.0",
- "hooker": "~0.2.3",
- "lodash": "~4.17.5"
- },
- "dependencies": {
- "lodash": {
- "version": "4.17.11",
- "resolved": false
- }
+ "hooker": "~0.2.3"
}
},
"grunt-legacy-log-utils": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.0.1.tgz",
+ "integrity": "sha512-o7uHyO/J+i2tXG8r2bZNlVk20vlIFJ9IEYyHMCQGfWYru8Jv3wTqKZzvV30YW9rWEjq0eP3cflQ1qWojIe9VFA==",
"requires": {
- "chalk": "~2.4.1",
- "lodash": "~4.17.10"
+ "chalk": "~2.4.1"
},
"dependencies": {
"ansi-styles": {
"version": "3.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"requires": {
"color-convert": "^1.9.0"
}
},
"chalk": {
"version": "2.4.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
+ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
@@ -13005,15 +15585,13 @@
},
"has-flag": {
"version": "3.0.0",
- "resolved": false
- },
- "lodash": {
- "version": "4.17.11",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"supports-color": {
"version": "5.5.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"requires": {
"has-flag": "^3.0.0"
}
@@ -13022,28 +15600,26 @@
},
"grunt-legacy-util": {
"version": "1.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.1.1.tgz",
+ "integrity": "sha512-9zyA29w/fBe6BIfjGENndwoe1Uy31BIXxTH3s8mga0Z5Bz2Sp4UCjkeyv2tI449ymkx3x26B+46FV4fXEddl5A==",
"requires": {
"async": "~1.5.2",
"exit": "~0.1.1",
"getobject": "~0.1.0",
"hooker": "~0.2.3",
- "lodash": "~4.17.10",
"underscore.string": "~3.3.4",
"which": "~1.3.0"
},
"dependencies": {
"async": {
"version": "1.5.2",
- "resolved": false
- },
- "lodash": {
- "version": "4.17.11",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
+ "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo="
},
"which": {
"version": "1.3.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"requires": {
"isexe": "^2.0.0"
}
@@ -13052,7 +15628,8 @@
},
"grunt-lib-phantomjs": {
"version": "1.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-lib-phantomjs/-/grunt-lib-phantomjs-1.1.0.tgz",
+ "integrity": "sha1-np7c3Z/S3UDgwYHJQ3HVcqpe6tI=",
"requires": {
"eventemitter2": "^0.4.9",
"phantomjs-prebuilt": "^2.1.3",
@@ -13063,7 +15640,8 @@
"dependencies": {
"extract-zip": {
"version": "1.6.7",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz",
+ "integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=",
"requires": {
"concat-stream": "1.6.2",
"debug": "2.6.9",
@@ -13073,7 +15651,8 @@
},
"fs-extra": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz",
+ "integrity": "sha1-zTzl9+fLYUWIP8rjGR6Yd/hYeVA=",
"requires": {
"graceful-fs": "^4.1.2",
"jsonfile": "^2.1.0",
@@ -13082,7 +15661,8 @@
},
"phantomjs-prebuilt": {
"version": "2.1.16",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.16.tgz",
+ "integrity": "sha1-79ISpKOWbTZHaE6ouniFSb4q7+8=",
"requires": {
"es6-promise": "^4.0.3",
"extract-zip": "^1.6.5",
@@ -13097,7 +15677,8 @@
},
"which": {
"version": "1.3.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"requires": {
"isexe": "^2.0.0"
}
@@ -13106,20 +15687,22 @@
},
"grunt-mocha": {
"version": "1.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-mocha/-/grunt-mocha-1.1.0.tgz",
+ "integrity": "sha1-l1MSM8IVOmo4Q2DhTk+FGusfm1M=",
"requires": {
"grunt-lib-phantomjs": "^1.0.2",
- "lodash": "^3.9.0",
"mocha": ">=2.5.3"
},
"dependencies": {
"commander": {
"version": "2.15.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz",
+ "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag=="
},
"concat-stream": {
"version": "1.6.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
+ "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
"requires": {
"buffer-from": "^1.0.0",
"inherits": "^2.0.3",
@@ -13129,11 +15712,13 @@
},
"diff": {
"version": "3.5.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
+ "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA=="
},
"extract-zip": {
"version": "1.6.7",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz",
+ "integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=",
"requires": {
"concat-stream": "1.6.2",
"debug": "2.6.9",
@@ -13143,7 +15728,8 @@
},
"fs-extra": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz",
+ "integrity": "sha1-zTzl9+fLYUWIP8rjGR6Yd/hYeVA=",
"requires": {
"graceful-fs": "^4.1.2",
"jsonfile": "^2.1.0",
@@ -13152,7 +15738,8 @@
},
"glob": {
"version": "7.1.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
+ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -13164,11 +15751,13 @@
},
"growl": {
"version": "1.10.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
+ "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA=="
},
"grunt-lib-phantomjs": {
"version": "1.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-lib-phantomjs/-/grunt-lib-phantomjs-1.1.0.tgz",
+ "integrity": "sha1-np7c3Z/S3UDgwYHJQ3HVcqpe6tI=",
"requires": {
"eventemitter2": "^0.4.9",
"phantomjs-prebuilt": "^2.1.3",
@@ -13179,11 +15768,13 @@
},
"has-flag": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"mocha": {
"version": "5.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz",
+ "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==",
"requires": {
"browser-stdout": "1.3.1",
"commander": "2.15.1",
@@ -13200,7 +15791,8 @@
"dependencies": {
"debug": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
@@ -13209,7 +15801,8 @@
},
"phantomjs-prebuilt": {
"version": "2.1.16",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.16.tgz",
+ "integrity": "sha1-79ISpKOWbTZHaE6ouniFSb4q7+8=",
"requires": {
"es6-promise": "^4.0.3",
"extract-zip": "^1.6.5",
@@ -13224,18 +15817,21 @@
},
"semver": {
"version": "5.6.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
+ "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg=="
},
"supports-color": {
"version": "5.4.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz",
+ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==",
"requires": {
"has-flag": "^3.0.0"
}
},
"which": {
"version": "1.3.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"requires": {
"isexe": "^2.0.0"
}
@@ -13244,7 +15840,8 @@
},
"grunt-mocha-cov": {
"version": "0.4.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-mocha-cov/-/grunt-mocha-cov-0.4.0.tgz",
+ "integrity": "sha1-gCOWbbBYdTdBuFeNrOY8b3ECHXo=",
"requires": {
"blanket": "1.1.6",
"coveralls": "2.11.2",
@@ -13258,7 +15855,8 @@
"dependencies": {
"argparse": {
"version": "0.1.16",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-0.1.16.tgz",
+ "integrity": "sha1-z9AeD7uj1srtBJ+9dY1A9lGW9Xw=",
"requires": {
"underscore": "~1.7.0",
"underscore.string": "~2.4.0"
@@ -13266,18 +15864,21 @@
},
"async": {
"version": "0.9.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz",
+ "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0="
},
"bl": {
"version": "0.9.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/bl/-/bl-0.9.5.tgz",
+ "integrity": "sha1-wGt5evCF6gC8Unr8jvzxHeIjIFQ=",
"requires": {
"readable-stream": "~1.0.26"
}
},
"blanket": {
"version": "1.1.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/blanket/-/blanket-1.1.6.tgz",
+ "integrity": "sha1-/5N4Pf4ItPi6p5DNRpSPXzxv0VI=",
"requires": {
"esprima": "~1.0.2",
"falafel": "~0.1.6",
@@ -13286,25 +15887,29 @@
},
"boom": {
"version": "2.10.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
+ "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
"requires": {
"hoek": "2.x.x"
}
},
"combined-stream": {
"version": "0.0.7",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz",
+ "integrity": "sha1-ATfmV7qlp1QcV6w3rF/AfXO03B8=",
"requires": {
"delayed-stream": "0.0.5"
}
},
"commander": {
"version": "2.3.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.3.0.tgz",
+ "integrity": "sha1-/UMOiJgy7DU7ms0d4hfBHLPu+HM="
},
"coveralls": {
"version": "2.11.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-2.11.2.tgz",
+ "integrity": "sha1-1NmCAWyy+dqJ13qyBNhqhTfmoS0=",
"requires": {
"js-yaml": "3.0.1",
"lcov-parse": "0.0.6",
@@ -13314,11 +15919,13 @@
"dependencies": {
"lcov-parse": {
"version": "0.0.6",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.6.tgz",
+ "integrity": "sha1-gZ5dqL8HkfnT857qXtGGgYfxEXU="
},
"request": {
"version": "2.40.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/request/-/request-2.40.0.tgz",
+ "integrity": "sha1-TdZw9pbx5uhC5mtLXoOTAaub62c=",
"requires": {
"aws-sign2": "~0.5.0",
"forever-agent": "~0.5.0",
@@ -13339,48 +15946,57 @@
},
"cryptiles": {
"version": "2.0.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
+ "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=",
"requires": {
"boom": "2.x.x"
}
},
"debug": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.0.0.tgz",
+ "integrity": "sha1-ib2d9nMrUSVrxnBTQrugLtEhMe8=",
"requires": {
"ms": "0.6.2"
}
},
"delayed-stream": {
"version": "0.0.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz",
+ "integrity": "sha1-1LH0OpPoKW3+AmlPRoC8N6MTxz8="
},
"diff": {
"version": "1.0.8",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/diff/-/diff-1.0.8.tgz",
+ "integrity": "sha1-NDJ2MI7Jkbe8giZ+1VvBQR+XFmY="
},
"escape-string-regexp": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz",
+ "integrity": "sha1-Tbwv5nTnGUnK8/smlc5/LcHZqNE="
},
"esprima": {
"version": "1.0.4",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz",
+ "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0="
},
"falafel": {
"version": "0.1.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/falafel/-/falafel-0.1.6.tgz",
+ "integrity": "sha1-MITPPUG1nRXIE75vJZVX/cgrBmA=",
"requires": {
"esprima": "~1.0.2"
}
},
"forever-agent": {
"version": "0.5.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.2.tgz",
+ "integrity": "sha1-bQ4JxJIflKJ/Y9O0nF/v8epMUTA="
},
"glob": {
"version": "3.2.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.3.tgz",
+ "integrity": "sha1-4xPusknHr/qlxHUoaw4RW1mDlGc=",
"requires": {
"graceful-fs": "~2.0.0",
"inherits": "2",
@@ -13389,23 +16005,28 @@
},
"graceful-fs": {
"version": "2.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.3.tgz",
+ "integrity": "sha1-fNLNsiiko/Nule+mzBQt59GhNtA="
},
"growl": {
"version": "1.8.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/growl/-/growl-1.8.1.tgz",
+ "integrity": "sha1-Sy3sjZB+k9szZiTc7AGDUC+MlCg="
},
"hoek": {
"version": "2.16.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
+ "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0="
},
"isarray": {
"version": "0.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"jade": {
"version": "0.26.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/jade/-/jade-0.26.3.tgz",
+ "integrity": "sha1-jxDXl32NefL2/4YqgbBRPMslaGw=",
"requires": {
"commander": "0.6.1",
"mkdirp": "0.3.0"
@@ -13413,17 +16034,20 @@
"dependencies": {
"commander": {
"version": "0.6.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz",
+ "integrity": "sha1-+mihT2qUXVTbvlDYzbMyDp47GgY="
},
"mkdirp": {
"version": "0.3.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz",
+ "integrity": "sha1-G79asbqCevI1dRQ0kEJkVfSB/h4="
}
}
},
"js-yaml": {
"version": "3.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.0.1.tgz",
+ "integrity": "sha1-dkBf6lvOMPyPQF1Ixtyn8KMsav4=",
"requires": {
"argparse": "~ 0.1.11",
"esprima": "~ 1.0.2"
@@ -13431,23 +16055,28 @@
},
"lcov-parse": {
"version": "0.0.9",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.9.tgz",
+ "integrity": "sha1-3dyJMIKup4Vkd6O434YmXMqz7AQ="
},
"log-driver": {
"version": "1.2.4",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.4.tgz",
+ "integrity": "sha1-LWLX+u9F2KcTQZYaBLB2HsqZz6M="
},
"mime-db": {
"version": "1.12.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.12.0.tgz",
+ "integrity": "sha1-PQxjGA9FjrENMlqqN9fFiuMS6dc="
},
"mime-types": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-1.0.2.tgz",
+ "integrity": "sha1-mVrhOSq4r/y/yyZB3QVOlDwNXc4="
},
"minimatch": {
"version": "0.2.14",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz",
+ "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=",
"requires": {
"lru-cache": "2",
"sigmund": "~1.0.0"
@@ -13455,18 +16084,21 @@
},
"minimist": {
"version": "0.0.8",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
},
"mkdirp": {
"version": "0.5.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz",
+ "integrity": "sha1-HXMHam35hs2TROFecfzAWkyavxI=",
"requires": {
"minimist": "0.0.8"
}
},
"mocha": {
"version": "2.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-2.2.1.tgz",
+ "integrity": "sha1-BKL4rrFJ/lAXfgCn710IxjnpEms=",
"requires": {
"commander": "2.3.0",
"debug": "2.0.0",
@@ -13481,28 +16113,34 @@
},
"ms": {
"version": "0.6.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz",
+ "integrity": "sha1-2JwhJMb9wTU9Zai3e/GqxLGTcIw="
},
"node-uuid": {
"version": "1.4.8",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz",
+ "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc="
},
"oauth-sign": {
"version": "0.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.3.0.tgz",
+ "integrity": "sha1-y1QPk7srIqfVlBaRoojWDo6pOG4=",
"optional": true
},
"object-keys": {
"version": "0.4.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz",
+ "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY="
},
"qs": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/qs/-/qs-1.0.2.tgz",
+ "integrity": "sha1-UKk+K1r2aRwxvOpdrnjubqGQN2g="
},
"readable-stream": {
"version": "1.0.34",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+ "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
@@ -13512,7 +16150,8 @@
},
"request": {
"version": "2.53.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/request/-/request-2.53.0.tgz",
+ "integrity": "sha1-GAo66St7Y5gC5PlUXdj83rcddgw=",
"requires": {
"aws-sign2": "~0.5.0",
"bl": "~0.9.0",
@@ -13535,7 +16174,8 @@
"dependencies": {
"form-data": {
"version": "0.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.2.0.tgz",
+ "integrity": "sha1-Jvi8JtpkQOKZy9z7aQNcT3em5GY=",
"requires": {
"async": "~0.9.0",
"combined-stream": "~0.0.4",
@@ -13544,7 +16184,8 @@
},
"hawk": {
"version": "2.3.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/hawk/-/hawk-2.3.1.tgz",
+ "integrity": "sha1-HnMc45RH+h0PbXB/e87r7A/R7B8=",
"requires": {
"boom": "2.x.x",
"cryptiles": "2.x.x",
@@ -13554,43 +16195,51 @@
},
"mime-types": {
"version": "2.0.14",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.0.14.tgz",
+ "integrity": "sha1-MQ4VnbI+B3+Lsit0jav6SVcUCqY=",
"requires": {
"mime-db": "~1.12.0"
}
},
"oauth-sign": {
"version": "0.6.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.6.0.tgz",
+ "integrity": "sha1-fb6uRPbKRU4fFoRR1jB0ZzWBPOM="
},
"qs": {
"version": "2.3.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/qs/-/qs-2.3.3.tgz",
+ "integrity": "sha1-6eha2+ddoLvkyOBHaghikPhjtAQ="
}
}
},
"sntp": {
"version": "1.0.9",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
+ "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=",
"requires": {
"hoek": "2.x.x"
}
},
"string_decoder": {
"version": "0.10.31",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
},
"supports-color": {
"version": "1.2.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-1.2.1.tgz",
+ "integrity": "sha1-Eu4hUHCGzZjBBY2ewPSsR2t687I="
},
"underscore.string": {
"version": "2.4.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-2.4.0.tgz",
+ "integrity": "sha1-jN2PusTi0uoefi6Al8QvRCKA+Fs="
},
"xtend": {
"version": "2.1.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",
+ "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=",
"requires": {
"object-keys": "~0.4.0"
}
@@ -13599,7 +16248,8 @@
},
"grunt-parallel": {
"version": "0.5.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-parallel/-/grunt-parallel-0.5.1.tgz",
+ "integrity": "sha1-X3ozdvYYVCQSjEsqLPLi0Hw39dk=",
"requires": {
"lpad": "~0.1.0",
"q": "~0.8.12"
@@ -13607,35 +16257,34 @@
"dependencies": {
"q": {
"version": "0.8.12",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/q/-/q-0.8.12.tgz",
+ "integrity": "sha1-kWKpHhGBnEvNp9oVz1/vqtB3iCM="
}
}
},
"grunt-saucelabs": {
"version": "9.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-saucelabs/-/grunt-saucelabs-9.0.0.tgz",
+ "integrity": "sha1-1ogCWgVQHeysCp4SndTk9QpCAUo=",
"requires": {
"colors": "~1.1.2",
- "lodash": "~4.13.1",
"q": "~1.4.1",
"requestretry": "~1.9.0",
"sauce-tunnel": "~2.5.0",
"saucelabs": "~1.2.0"
},
"dependencies": {
- "lodash": {
- "version": "4.13.1",
- "resolved": false
- },
"q": {
"version": "1.4.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz",
+ "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4="
}
}
},
"grunt-tagrelease": {
"version": "0.3.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-tagrelease/-/grunt-tagrelease-0.3.3.tgz",
+ "integrity": "sha1-sU4Ja7PKdqcyLoflm4jTnpgce2Y=",
"requires": {
"semver": "~2.1.0",
"shelljs": "~0.2.5"
@@ -13643,50 +16292,51 @@
"dependencies": {
"semver": {
"version": "2.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/semver/-/semver-2.1.0.tgz",
+ "integrity": "sha1-NWKUqQaQtph3TWLPNdfJH5g+coo="
},
"shelljs": {
"version": "0.2.6",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.2.6.tgz",
+ "integrity": "sha1-kEktcv/MgVmXa6umL7D2iE8MM3g="
}
}
},
"grunt-text-replace": {
"version": "0.4.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/grunt-text-replace/-/grunt-text-replace-0.4.0.tgz",
+ "integrity": "sha1-252c5Z4v5J2id+nbwZXD4Rz7FsI="
},
"grunt-vows": {
"version": "0.4.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/grunt-vows/-/grunt-vows-0.4.2.tgz",
+ "integrity": "sha1-n9QvyBgTMcI+ZeRAfIQjmfYnnOM="
},
"grunt-webpack": {
"version": "3.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/grunt-webpack/-/grunt-webpack-3.1.3.tgz",
+ "integrity": "sha512-SaZ8K8lG4iTxs7ClZxOWCf3kxqS2y+Eel8SbaEGgBKwhAp6e45beIu+vhBZRLX3vonKML2kjemKsQ21REaqNFQ==",
"requires": {
- "deep-for-each": "^2.0.2",
- "lodash": "^4.7.0"
- },
- "dependencies": {
- "lodash": {
- "version": "4.17.11",
- "resolved": false
- }
+ "deep-for-each": "^2.0.2"
}
},
"gzip-size": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-3.0.0.tgz",
+ "integrity": "sha1-VGGI6b3DN/Zzdy+BZgRks4nc5SA=",
"requires": {
"duplexer": "^0.1.1"
}
},
"handle-thing": {
"version": "1.2.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz",
+ "integrity": "sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ="
},
"handlebars": {
"version": "4.0.11",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz",
+ "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=",
"requires": {
"async": "^1.4.0",
"optimist": "^0.6.1",
@@ -13696,11 +16346,13 @@
"dependencies": {
"async": {
"version": "1.5.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
+ "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo="
},
"source-map": {
"version": "0.4.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
+ "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
"requires": {
"amdefine": ">=0.0.4"
}
@@ -13709,11 +16361,13 @@
},
"har-schema": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
+ "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
},
"har-validator": {
"version": "5.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz",
+ "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==",
"requires": {
"ajv": "^6.5.5",
"har-schema": "^2.0.0"
@@ -13721,46 +16375,54 @@
},
"has": {
"version": "1.0.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+ "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"requires": {
"function-bind": "^1.1.1"
}
},
"has-ansi": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
+ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
"requires": {
"ansi-regex": "^2.0.0"
}
},
"has-binary2": {
"version": "1.0.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz",
+ "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==",
"requires": {
"isarray": "2.0.1"
},
"dependencies": {
"isarray": {
"version": "2.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
+ "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4="
}
}
},
"has-cors": {
"version": "1.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz",
+ "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk="
},
"has-flag": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
+ "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo="
},
"has-symbols": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
+ "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q="
},
"has-value": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
+ "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=",
"requires": {
"get-value": "^2.0.6",
"has-values": "^1.0.0",
@@ -13769,13 +16431,15 @@
"dependencies": {
"isobject": {
"version": "3.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
}
}
},
"has-values": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz",
+ "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=",
"requires": {
"is-number": "^3.0.0",
"kind-of": "^4.0.0"
@@ -13783,14 +16447,16 @@
"dependencies": {
"is-number": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
"requires": {
"kind-of": "^3.0.2"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "^1.1.5"
}
@@ -13799,7 +16465,8 @@
},
"kind-of": {
"version": "4.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
+ "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
"requires": {
"is-buffer": "^1.1.5"
}
@@ -13808,7 +16475,8 @@
},
"hash-base": {
"version": "3.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz",
+ "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=",
"requires": {
"inherits": "^2.0.1",
"safe-buffer": "^5.0.1"
@@ -13816,7 +16484,8 @@
},
"hash.js": {
"version": "1.1.7",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
+ "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
"requires": {
"inherits": "^2.0.3",
"minimalistic-assert": "^1.0.1"
@@ -13824,7 +16493,8 @@
},
"hasha": {
"version": "2.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/hasha/-/hasha-2.2.0.tgz",
+ "integrity": "sha1-eNfL/B5tZjA/55g3NlmEUXsvbuE=",
"requires": {
"is-stream": "^1.0.1",
"pinkie-promise": "^2.0.0"
@@ -13832,7 +16502,8 @@
},
"hawk": {
"version": "1.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/hawk/-/hawk-1.1.1.tgz",
+ "integrity": "sha1-h81JH5tG5OKurKM1QWdmiF0tHtk=",
"optional": true,
"requires": {
"boom": "0.4.x",
@@ -13843,11 +16514,13 @@
},
"he": {
"version": "1.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz",
+ "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0="
},
"hmac-drbg": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
+ "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=",
"requires": {
"hash.js": "^1.0.3",
"minimalistic-assert": "^1.0.0",
@@ -13856,12 +16529,14 @@
},
"hoek": {
"version": "0.9.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/hoek/-/hoek-0.9.1.tgz",
+ "integrity": "sha1-PTIkYrrfB3Fup+uFuviAec3c5QU=",
"optional": true
},
"home-or-tmp": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz",
+ "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=",
"dev": true,
"requires": {
"os-homedir": "^1.0.0",
@@ -13870,22 +16545,26 @@
},
"homedir-polyfill": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz",
+ "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=",
"requires": {
"parse-passwd": "^1.0.0"
}
},
"hooker": {
"version": "0.2.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz",
+ "integrity": "sha1-uDT3I8xKJCqmWWNFnfbZhMXT2Vk="
},
"hosted-git-info": {
"version": "2.5.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz",
+ "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg=="
},
"hpack.js": {
"version": "2.1.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz",
+ "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=",
"requires": {
"inherits": "^2.0.1",
"obuf": "^1.0.0",
@@ -13895,11 +16574,13 @@
},
"html-entities": {
"version": "1.2.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz",
+ "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8="
},
"htmlparser2": {
"version": "3.8.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz",
+ "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=",
"requires": {
"domelementtype": "1",
"domhandler": "2.3",
@@ -13910,11 +16591,13 @@
"dependencies": {
"isarray": {
"version": "0.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.1.14",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
+ "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
@@ -13924,13 +16607,15 @@
},
"string_decoder": {
"version": "0.10.31",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
},
"http-browserify": {
"version": "1.7.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/http-browserify/-/http-browserify-1.7.0.tgz",
+ "integrity": "sha1-M3la3nLfiKz7/TZ3PO/tp2RzWyA=",
"requires": {
"Base64": "~0.2.0",
"inherits": "~2.0.1"
@@ -13938,11 +16623,13 @@
},
"http-deceiver": {
"version": "1.2.7",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz",
+ "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc="
},
"http-errors": {
"version": "1.6.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz",
+ "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=",
"requires": {
"depd": "1.1.1",
"inherits": "2.0.3",
@@ -13952,17 +16639,20 @@
"dependencies": {
"depd": {
"version": "1.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz",
+ "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k="
}
}
},
"http-parser-js": {
"version": "0.5.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.0.tgz",
+ "integrity": "sha512-cZdEF7r4gfRIq7ezX9J0T+kQmJNOub71dWbgAXVHDct80TKP4MCETtZQ31xyv38UwgzkWPYF/Xc0ge55dW9Z9w=="
},
"http-proxy": {
"version": "1.16.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.16.2.tgz",
+ "integrity": "sha1-Bt/ykpUr9k2+hHH6nfcwZtTzd0I=",
"requires": {
"eventemitter3": "1.x.x",
"requires-port": "1.x.x"
@@ -13970,25 +16660,28 @@
},
"http-proxy-middleware": {
"version": "0.18.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz",
+ "integrity": "sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q==",
"requires": {
"http-proxy": "^1.16.2",
"is-glob": "^4.0.0",
- "lodash": "^4.17.5",
"micromatch": "^3.1.9"
},
"dependencies": {
"arr-diff": {
"version": "4.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
+ "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA="
},
"array-unique": {
"version": "0.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
},
"braces": {
"version": "2.3.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
+ "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
"requires": {
"arr-flatten": "^1.1.0",
"array-unique": "^0.3.2",
@@ -14004,7 +16697,8 @@
"dependencies": {
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
@@ -14013,7 +16707,8 @@
},
"expand-brackets": {
"version": "2.1.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
+ "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
"requires": {
"debug": "^2.3.3",
"define-property": "^0.2.5",
@@ -14026,28 +16721,32 @@
"dependencies": {
"define-property": {
"version": "0.2.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
"requires": {
"is-descriptor": "^0.1.0"
}
},
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
},
"is-accessor-descriptor": {
"version": "0.1.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
"requires": {
"kind-of": "^3.0.2"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "^1.1.5"
}
@@ -14056,14 +16755,16 @@
},
"is-data-descriptor": {
"version": "0.1.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
"requires": {
"kind-of": "^3.0.2"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "^1.1.5"
}
@@ -14072,7 +16773,8 @@
},
"is-descriptor": {
"version": "0.1.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
"requires": {
"is-accessor-descriptor": "^0.1.6",
"is-data-descriptor": "^0.1.4",
@@ -14081,13 +16783,15 @@
},
"kind-of": {
"version": "5.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+ "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw=="
}
}
},
"extglob": {
"version": "2.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
+ "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
"requires": {
"array-unique": "^0.3.2",
"define-property": "^1.0.0",
@@ -14101,14 +16805,16 @@
"dependencies": {
"define-property": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
"requires": {
"is-descriptor": "^1.0.0"
}
},
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
@@ -14117,7 +16823,8 @@
},
"fill-range": {
"version": "4.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+ "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
"requires": {
"extend-shallow": "^2.0.1",
"is-number": "^3.0.0",
@@ -14127,7 +16834,8 @@
"dependencies": {
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
@@ -14136,21 +16844,24 @@
},
"is-accessor-descriptor": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
"requires": {
"kind-of": "^6.0.0"
}
},
"is-data-descriptor": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
"requires": {
"kind-of": "^6.0.0"
}
},
"is-descriptor": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
"requires": {
"is-accessor-descriptor": "^1.0.0",
"is-data-descriptor": "^1.0.0",
@@ -14159,25 +16870,29 @@
},
"is-extglob": {
"version": "2.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI="
},
"is-glob": {
"version": "4.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz",
+ "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=",
"requires": {
"is-extglob": "^2.1.1"
}
},
"is-number": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
"requires": {
"kind-of": "^3.0.2"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "^1.1.5"
}
@@ -14186,19 +16901,18 @@
},
"isobject": {
"version": "3.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
},
"kind-of": {
"version": "6.0.2",
- "resolved": false
- },
- "lodash": {
- "version": "4.17.11",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
},
"micromatch": {
"version": "3.1.10",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
+ "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
"requires": {
"arr-diff": "^4.0.0",
"array-unique": "^0.3.2",
@@ -14219,7 +16933,8 @@
},
"http-signature": {
"version": "0.10.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz",
+ "integrity": "sha1-T72sEyVZqoMjEh5UB3nAoBKyfmY=",
"requires": {
"asn1": "0.1.11",
"assert-plus": "^0.1.5",
@@ -14228,21 +16943,25 @@
"dependencies": {
"asn1": {
"version": "0.1.11",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz",
+ "integrity": "sha1-VZvhg3bQik7E2+gId9J4GGObLfc="
},
"assert-plus": {
"version": "0.1.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.5.tgz",
+ "integrity": "sha1-7nQAlBMALYTOxyGcasgRgS5yMWA="
}
}
},
"https-browserify": {
"version": "0.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.0.tgz",
+ "integrity": "sha1-s//f5zSyo9Sp79WOhlTJH86G6v0="
},
"https-proxy-agent": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz",
+ "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=",
"requires": {
"agent-base": "2",
"debug": "2",
@@ -14251,14 +16970,14 @@
},
"ibrik": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ibrik/-/ibrik-2.0.0.tgz",
+ "integrity": "sha1-iaJDTypcgrkhZsPZfeO1Y27qLpw=",
"requires": {
"coffee-script": "~1.8.0",
"esprima": "1.2.x",
"estraverse": "~1.8.0",
"fileset": "0.1.x",
"istanbul": "~0.3.2",
- "lodash": "~2.4.1",
"mkdirp": "~0.5.0",
"optimist": "~0.6.1",
"which": "~1.0.5"
@@ -14266,53 +16985,58 @@
"dependencies": {
"coffee-script": {
"version": "1.8.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.8.0.tgz",
+ "integrity": "sha1-nJ8dK0pSoADe0Vtll5FwNkgmPB0=",
"requires": {
"mkdirp": "~0.3.5"
},
"dependencies": {
"mkdirp": {
"version": "0.3.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz",
+ "integrity": "sha1-3j5fiWHIjHh+4TaN+EmsRBPsqNc="
}
}
},
"esprima": {
"version": "1.2.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.5.tgz",
+ "integrity": "sha1-CZNQL+r2aBODJXVvMPmlH+7sEek="
},
"estraverse": {
"version": "1.8.0",
- "resolved": false
- },
- "lodash": {
- "version": "2.4.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.8.0.tgz",
+ "integrity": "sha1-PxJk+2LIUA265eT3NwXNV21q9Cg="
}
}
},
"iconv-lite": {
"version": "0.4.24",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+ "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
},
"ieee754": {
"version": "1.1.8",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz",
+ "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q="
},
"iferr": {
"version": "0.1.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz",
+ "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE="
},
"ignore": {
"version": "4.0.6",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
+ "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg=="
},
"import-fresh": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz",
+ "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==",
"requires": {
"parent-module": "^1.0.0",
"resolve-from": "^4.0.0"
@@ -14320,7 +17044,8 @@
},
"import-local": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz",
+ "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==",
"requires": {
"pkg-dir": "^3.0.0",
"resolve-cwd": "^2.0.0"
@@ -14328,14 +17053,16 @@
"dependencies": {
"find-up": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
+ "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
"requires": {
"locate-path": "^3.0.0"
}
},
"locate-path": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
+ "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
"requires": {
"p-locate": "^3.0.0",
"path-exists": "^3.0.0"
@@ -14343,25 +17070,29 @@
},
"p-limit": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz",
+ "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==",
"requires": {
"p-try": "^2.0.0"
}
},
"p-locate": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
+ "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
"requires": {
"p-limit": "^2.0.0"
}
},
"p-try": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz",
+ "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ=="
},
"pkg-dir": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz",
+ "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==",
"requires": {
"find-up": "^3.0.0"
}
@@ -14370,18 +17101,21 @@
},
"imurmurhash": {
"version": "0.1.4",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o="
},
"indent-string": {
"version": "2.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz",
+ "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=",
"requires": {
"repeating": "^2.0.0"
},
"dependencies": {
"repeating": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
+ "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
"requires": {
"is-finite": "^1.0.0"
}
@@ -14390,11 +17124,13 @@
},
"indexof": {
"version": "0.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz",
+ "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10="
},
"inflight": {
"version": "1.0.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"requires": {
"once": "^1.3.0",
"wrappy": "1"
@@ -14402,15 +17138,18 @@
},
"inherits": {
"version": "2.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"ini": {
"version": "1.3.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
+ "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw=="
},
"inquirer": {
"version": "6.3.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz",
+ "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==",
"requires": {
"ansi-escapes": "^3.2.0",
"chalk": "^2.4.2",
@@ -14418,7 +17157,6 @@
"cli-width": "^2.0.0",
"external-editor": "^3.0.3",
"figures": "^2.0.0",
- "lodash": "^4.17.11",
"mute-stream": "0.0.7",
"run-async": "^2.2.0",
"rxjs": "^6.4.0",
@@ -14429,18 +17167,21 @@
"dependencies": {
"ansi-regex": {
"version": "4.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
},
"ansi-styles": {
"version": "3.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"requires": {
"color-convert": "^1.9.0"
}
},
"chalk": {
"version": "2.4.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
@@ -14449,29 +17190,29 @@
},
"figures": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz",
+ "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=",
"requires": {
"escape-string-regexp": "^1.0.5"
}
},
"has-flag": {
"version": "3.0.0",
- "resolved": false
- },
- "lodash": {
- "version": "4.17.11",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"strip-ansi": {
"version": "5.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"requires": {
"ansi-regex": "^4.1.0"
}
},
"supports-color": {
"version": "5.5.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"requires": {
"has-flag": "^3.0.0"
}
@@ -14480,7 +17221,8 @@
},
"internal-ip": {
"version": "3.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-3.0.1.tgz",
+ "integrity": "sha512-NXXgESC2nNVtU+pqmC9e6R8B1GpKxzsAQhffvh5AL79qKnodd+L7tnEQmTiUAVngqLalPbSqRA7XGIEL5nCd0Q==",
"requires": {
"default-gateway": "^2.6.0",
"ipaddr.js": "^1.5.2"
@@ -14488,30 +17230,36 @@
},
"invariant": {
"version": "2.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz",
+ "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=",
"requires": {
"loose-envify": "^1.0.0"
}
},
"invert-kv": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz",
+ "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA=="
},
"ip": {
"version": "1.1.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz",
+ "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo="
},
"ip-regex": {
"version": "2.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz",
+ "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk="
},
"ipaddr.js": {
"version": "1.8.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.1.tgz",
+ "integrity": "sha1-+kt5+kf9Pe9eOxWYJRYcClGclCc="
},
"is-absolute": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz",
+ "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==",
"requires": {
"is-relative": "^1.0.0",
"is-windows": "^1.0.1"
@@ -14519,51 +17267,60 @@
},
"is-accessor-descriptor": {
"version": "0.1.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
"requires": {
"kind-of": "^3.0.2"
}
},
"is-arrayish": {
"version": "0.2.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
},
"is-binary-path": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
+ "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
"requires": {
"binary-extensions": "^1.0.0"
}
},
"is-buffer": {
"version": "1.1.6",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
},
"is-builtin-module": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
+ "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
"requires": {
"builtin-modules": "^1.0.0"
}
},
"is-callable": {
"version": "1.1.4",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
+ "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA=="
},
"is-data-descriptor": {
"version": "0.1.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
"requires": {
"kind-of": "^3.0.2"
}
},
"is-date-object": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
+ "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY="
},
"is-descriptor": {
"version": "0.1.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
"requires": {
"is-accessor-descriptor": "^0.1.6",
"is-data-descriptor": "^0.1.4",
@@ -14572,39 +17329,46 @@
"dependencies": {
"kind-of": {
"version": "5.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+ "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw=="
}
}
},
"is-extendable": {
"version": "0.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
+ "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik="
},
"is-extglob": {
"version": "2.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI="
},
"is-finite": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz",
+ "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=",
"requires": {
"number-is-nan": "^1.0.0"
}
},
"is-fullwidth-code-point": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
},
"is-glob": {
"version": "4.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
+ "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
"requires": {
"is-extglob": "^2.1.1"
}
},
"is-my-json-valid": {
"version": "2.17.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.1.tgz",
+ "integrity": "sha512-Q2khNw+oBlWuaYvEEHtKSw/pCxD2L5Rc1C+UQme9X6JdRDh7m5D7HkozA0qa3DUkQ6VzCnEm8mVIQPyIRkI5sQ==",
"requires": {
"generate-function": "^2.0.0",
"generate-object-property": "^1.1.0",
@@ -14614,132 +17378,152 @@
},
"is-number": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
"requires": {
"kind-of": "^3.0.2"
}
},
"is-number-like": {
"version": "1.0.8",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-number-like/-/is-number-like-1.0.8.tgz",
+ "integrity": "sha512-6rZi3ezCyFcn5L71ywzz2bS5b2Igl1En3eTlZlvKjpz1n3IZLAYMbKYAIQgFmEu0GENg92ziU/faEOA/aixjbA==",
"requires": {
"lodash.isfinite": "^3.3.2"
}
},
"is-path-cwd": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz",
+ "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0="
},
"is-path-in-cwd": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz",
+ "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==",
"requires": {
"is-path-inside": "^1.0.0"
}
},
"is-path-inside": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz",
+ "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=",
"requires": {
"path-is-inside": "^1.0.1"
}
},
"is-plain-object": {
"version": "2.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
+ "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
"requires": {
"isobject": "^3.0.1"
},
"dependencies": {
"isobject": {
"version": "3.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
}
}
},
"is-promise": {
"version": "2.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz",
+ "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o="
},
"is-property": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
+ "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ="
},
"is-regex": {
"version": "1.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
+ "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
"requires": {
"has": "^1.0.1"
}
},
"is-relative": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz",
+ "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==",
"requires": {
"is-unc-path": "^1.0.0"
}
},
"is-stream": {
"version": "1.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
+ "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
},
"is-symbol": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
+ "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==",
"requires": {
"has-symbols": "^1.0.0"
}
},
"is-typedarray": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
+ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
},
"is-unc-path": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz",
+ "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==",
"requires": {
"unc-path-regex": "^0.1.2"
}
},
"is-utf8": {
"version": "0.2.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
+ "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI="
},
"is-windows": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
+ "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA=="
},
"is-wsl": {
"version": "1.1.0",
- "resolved": false
- },
- "is_js": {
- "version": "0.9.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz",
+ "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0="
},
"isarray": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"isbinaryfile": {
"version": "3.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.2.tgz",
+ "integrity": "sha1-Sj6XTsDLqQBNP8bN5yCeppNopiE="
},
"isexe": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
},
"isobject": {
"version": "3.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
},
"isstream": {
"version": "0.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
+ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
},
"istanbul": {
"version": "0.3.22",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.3.22.tgz",
+ "integrity": "sha1-PhZNhQIf4ZyYXR8OfvDD4i0BLrY=",
"requires": {
"abbrev": "1.0.x",
"async": "1.x",
@@ -14759,15 +17543,18 @@
"dependencies": {
"abbrev": {
"version": "1.0.9",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz",
+ "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU="
},
"esprima": {
"version": "2.5.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.5.0.tgz",
+ "integrity": "sha1-84ekb9NEwbGjm6+MIL+0O20AWMw="
},
"fileset": {
"version": "0.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/fileset/-/fileset-0.2.1.tgz",
+ "integrity": "sha1-WI74lzxmI7KnbfRlEFaWuWqsgGc=",
"requires": {
"glob": "5.x",
"minimatch": "2.x"
@@ -14775,45 +17562,52 @@
},
"minimatch": {
"version": "2.0.10",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz",
+ "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=",
"requires": {
"brace-expansion": "^1.0.0"
}
},
"nopt": {
"version": "3.0.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
+ "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=",
"requires": {
"abbrev": "1"
}
},
"resolve": {
"version": "1.1.7",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
+ "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs="
},
"supports-color": {
"version": "3.2.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
+ "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=",
"requires": {
"has-flag": "^1.0.0"
}
},
"which": {
"version": "1.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz",
+ "integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==",
"requires": {
"isexe": "^2.0.0"
}
},
"wordwrap": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
+ "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus="
}
}
},
"istanbul-instrumenter-loader": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-2.0.0.tgz",
+ "integrity": "sha1-5UkpAKsLuoNe+oAkywC+mz7qJwA=",
"requires": {
"convert-source-map": "^1.3.0",
"istanbul-lib-instrument": "^1.1.3",
@@ -14823,7 +17617,8 @@
},
"istanbul-lib-instrument": {
"version": "1.10.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz",
+ "integrity": "sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==",
"requires": {
"babel-generator": "^6.18.0",
"babel-template": "^6.16.0",
@@ -14836,21 +17631,25 @@
"dependencies": {
"babylon": {
"version": "6.18.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
+ "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ=="
},
"istanbul-lib-coverage": {
"version": "1.2.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz",
+ "integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ=="
},
"semver": {
"version": "5.6.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
+ "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg=="
}
}
},
"jade": {
"version": "0.27.7",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/jade/-/jade-0.27.7.tgz",
+ "integrity": "sha1-sVfjEzeJpXJMvd3UU0HHWQ2pJ6o=",
"requires": {
"coffee-script": "~1.4.0",
"commander": "0.6.1",
@@ -14859,40 +17658,48 @@
"dependencies": {
"coffee-script": {
"version": "1.4.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.4.0.tgz",
+ "integrity": "sha1-XjvIqsJsAajie/EHcixWVfWtfTY="
},
"commander": {
"version": "0.6.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz",
+ "integrity": "sha1-+mihT2qUXVTbvlDYzbMyDp47GgY="
},
"mkdirp": {
"version": "0.3.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz",
+ "integrity": "sha1-3j5fiWHIjHh+4TaN+EmsRBPsqNc="
}
}
},
"jasmine-core": {
"version": "2.9.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-2.9.1.tgz",
+ "integrity": "sha1-trvB2OZSUNVvWIhGFwXr7uuI8i8="
},
"jquery": {
"version": "3.3.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.3.1.tgz",
+ "integrity": "sha512-Ubldcmxp5np52/ENotGxlLe6aGMvmF4R8S6tZjsP6Knsaxd/xp3Zrh50cG93lR6nPXyUFwzN3ZSOQI0wRJNdGg=="
},
"jquery-mockjax": {
"version": "2.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/jquery-mockjax/-/jquery-mockjax-2.3.0.tgz",
+ "integrity": "sha512-ur5YhwDwT2P+zz4RJedV/ldC+4lZQQoU3/nNKRbK521jTTGvnrzmx4PZJM4Dquk1r2OlIER4sK5ZaxunMbaB7w==",
"requires": {
"jquery": ">=1.5.2"
}
},
"js-tokens": {
"version": "4.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
},
"js-yaml": {
"version": "3.4.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.4.5.tgz",
+ "integrity": "sha1-w0A3l98SuRhmV08t4jZG/oyvtE0=",
"requires": {
"argparse": "^1.0.2",
"esprima": "^2.6.0"
@@ -14900,84 +17707,89 @@
"dependencies": {
"esprima": {
"version": "2.7.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz",
+ "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE="
}
}
},
"jsbn": {
"version": "0.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
+ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
},
"jsesc": {
"version": "2.5.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
+ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA=="
},
"jshint": {
"version": "2.9.7",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.9.7.tgz",
+ "integrity": "sha512-Q8XN38hGsVQhdlM+4gd1Xl7OB1VieSuCJf+fEJjpo59JH99bVJhXRXAh26qQ15wfdd1VPMuDWNeSWoNl53T4YA==",
"requires": {
"cli": "~1.0.0",
"console-browserify": "1.1.x",
"exit": "0.1.x",
"htmlparser2": "3.8.x",
- "lodash": "~4.17.10",
"minimatch": "~3.0.2",
"shelljs": "0.3.x",
"strip-json-comments": "1.0.x"
},
"dependencies": {
- "lodash": {
- "version": "4.17.11",
- "resolved": false
- },
"strip-json-comments": {
"version": "1.0.4",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz",
+ "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E="
}
}
},
"json-parse-better-errors": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
+ "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw=="
},
"json-schema": {
"version": "0.2.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
+ "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
},
"json-schema-traverse": {
"version": "0.4.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
},
"json-stable-stringify-without-jsonify": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
+ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE="
},
"json-stringify-safe": {
"version": "5.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
+ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
},
"json3": {
"version": "3.3.2",
- "resolved": false
- },
- "json5": {
- "version": "0.5.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz",
+ "integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE="
},
"jsonfile": {
"version": "2.4.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
+ "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
"requires": {
"graceful-fs": "^4.1.6"
}
},
"jsonpointer": {
"version": "4.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz",
+ "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk="
},
"jsprim": {
"version": "1.4.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
+ "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
"requires": {
"assert-plus": "1.0.0",
"extsprintf": "1.3.0",
@@ -14987,11 +17799,13 @@
},
"just-extend": {
"version": "4.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.0.2.tgz",
+ "integrity": "sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw=="
},
"karma": {
"version": "4.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/karma/-/karma-4.0.1.tgz",
+ "integrity": "sha512-ind+4s03BqIXas7ZmraV3/kc5+mnqwCd+VDX1FndS6jxbt03kQKX2vXrWxNLuCjVYmhMwOZosAEKMM0a2q7w7A==",
"requires": {
"bluebird": "^3.3.0",
"body-parser": "^1.16.1",
@@ -15007,7 +17821,6 @@
"graceful-fs": "^4.1.2",
"http-proxy": "^1.13.0",
"isbinaryfile": "^3.0.0",
- "lodash": "^4.17.11",
"log4js": "^4.0.0",
"mime": "^2.3.1",
"minimatch": "^3.0.2",
@@ -15024,7 +17837,8 @@
"dependencies": {
"anymatch": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
+ "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
"requires": {
"micromatch": "^3.1.4",
"normalize-path": "^2.1.1"
@@ -15032,7 +17846,8 @@
"dependencies": {
"normalize-path": {
"version": "2.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
+ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
"requires": {
"remove-trailing-separator": "^1.0.1"
}
@@ -15041,15 +17856,18 @@
},
"arr-diff": {
"version": "4.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
+ "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA="
},
"array-unique": {
"version": "0.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
},
"braces": {
"version": "2.3.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
+ "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
"requires": {
"arr-flatten": "^1.1.0",
"array-unique": "^0.3.2",
@@ -15065,7 +17883,8 @@
},
"chokidar": {
"version": "2.1.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.5.tgz",
+ "integrity": "sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A==",
"requires": {
"anymatch": "^2.0.0",
"async-each": "^1.0.1",
@@ -15082,7 +17901,8 @@
},
"connect": {
"version": "3.6.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz",
+ "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=",
"requires": {
"debug": "2.6.9",
"finalhandler": "1.1.0",
@@ -15092,7 +17912,8 @@
},
"expand-brackets": {
"version": "2.1.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
+ "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
"requires": {
"debug": "^2.3.3",
"define-property": "^0.2.5",
@@ -15105,21 +17926,24 @@
"dependencies": {
"define-property": {
"version": "0.2.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
"requires": {
"is-descriptor": "^0.1.0"
}
},
"is-accessor-descriptor": {
"version": "0.1.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
"requires": {
"kind-of": "^3.0.2"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "^1.1.5"
}
@@ -15128,14 +17952,16 @@
},
"is-data-descriptor": {
"version": "0.1.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
"requires": {
"kind-of": "^3.0.2"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "^1.1.5"
}
@@ -15144,7 +17970,8 @@
},
"is-descriptor": {
"version": "0.1.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
"requires": {
"is-accessor-descriptor": "^0.1.6",
"is-data-descriptor": "^0.1.4",
@@ -15153,20 +17980,23 @@
},
"kind-of": {
"version": "5.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+ "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw=="
}
}
},
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
},
"extglob": {
"version": "2.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
+ "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
"requires": {
"array-unique": "^0.3.2",
"define-property": "^1.0.0",
@@ -15180,7 +18010,8 @@
"dependencies": {
"define-property": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
"requires": {
"is-descriptor": "^1.0.0"
}
@@ -15189,7 +18020,8 @@
},
"fill-range": {
"version": "4.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+ "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
"requires": {
"extend-shallow": "^2.0.1",
"is-number": "^3.0.0",
@@ -15199,7 +18031,8 @@
},
"glob": {
"version": "7.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
+ "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -15211,7 +18044,8 @@
},
"glob-parent": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
+ "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
"requires": {
"is-glob": "^3.1.0",
"path-dirname": "^1.0.0"
@@ -15219,7 +18053,8 @@
"dependencies": {
"is-glob": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
"requires": {
"is-extglob": "^2.1.0"
}
@@ -15228,33 +18063,38 @@
},
"is-accessor-descriptor": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
"requires": {
"kind-of": "^6.0.0"
},
"dependencies": {
"kind-of": {
"version": "6.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
}
}
},
"is-data-descriptor": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
"requires": {
"kind-of": "^6.0.0"
},
"dependencies": {
"kind-of": {
"version": "6.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
}
}
},
"is-descriptor": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
"requires": {
"is-accessor-descriptor": "^1.0.0",
"is-data-descriptor": "^1.0.0",
@@ -15263,39 +18103,41 @@
"dependencies": {
"kind-of": {
"version": "6.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
}
}
},
"is-extglob": {
"version": "2.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI="
},
"is-glob": {
"version": "4.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
+ "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
"requires": {
"is-extglob": "^2.1.1"
}
},
"is-number": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
"requires": {
"kind-of": "^3.0.2"
}
},
"isobject": {
"version": "3.0.1",
- "resolved": false
- },
- "lodash": {
- "version": "4.17.11",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
},
"micromatch": {
"version": "3.1.10",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
+ "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
"requires": {
"arr-diff": "^4.0.0",
"array-unique": "^0.3.2",
@@ -15314,7 +18156,8 @@
"dependencies": {
"extend-shallow": {
"version": "3.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
+ "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
"requires": {
"assign-symbols": "^1.0.0",
"is-extendable": "^1.0.1"
@@ -15322,32 +18165,38 @@
},
"is-extendable": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
"requires": {
"is-plain-object": "^2.0.4"
}
},
"kind-of": {
"version": "6.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
}
}
},
"mime": {
"version": "2.4.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz",
+ "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w=="
},
"normalize-path": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="
},
"parseurl": {
"version": "1.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
+ "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M="
},
"readdirp": {
"version": "2.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz",
+ "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==",
"requires": {
"graceful-fs": "^4.1.11",
"micromatch": "^3.1.10",
@@ -15356,21 +18205,25 @@
},
"source-map": {
"version": "0.6.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
},
"upath": {
"version": "1.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz",
+ "integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q=="
},
"utils-merge": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
}
}
},
"karma-browserstack-launcher": {
"version": "0.1.11",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/karma-browserstack-launcher/-/karma-browserstack-launcher-0.1.11.tgz",
+ "integrity": "sha1-a3kWJGSF6ZjMJz37KWyiRgbgkJU=",
"requires": {
"browserstack": "1.3.1",
"browserstacktunnel-wrapper": "~1.4.2",
@@ -15379,17 +18232,20 @@
"dependencies": {
"q": {
"version": "1.4.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/q/-/q-1.4.1.tgz",
+ "integrity": "sha1-VXBbzZPF82c1MMLCy8DCs63cKG4="
}
}
},
"karma-chai": {
"version": "0.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/karma-chai/-/karma-chai-0.1.0.tgz",
+ "integrity": "sha1-vuWtQEAFF4Ea40u5RfdikJEIt5o="
},
"karma-chrome-launcher": {
"version": "2.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz",
+ "integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==",
"requires": {
"fs-access": "^1.0.0",
"which": "^1.2.1"
@@ -15397,7 +18253,8 @@
"dependencies": {
"which": {
"version": "1.3.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"requires": {
"isexe": "^2.0.0"
}
@@ -15406,7 +18263,8 @@
},
"karma-coverage": {
"version": "0.2.7",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/karma-coverage/-/karma-coverage-0.2.7.tgz",
+ "integrity": "sha1-92dAsnW78woKufQdjPVoQ6CZRXY=",
"requires": {
"dateformat": "~1.0.6",
"ibrik": "~2.0.0",
@@ -15416,7 +18274,8 @@
"dependencies": {
"dateformat": {
"version": "1.0.12",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz",
+ "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=",
"requires": {
"get-stdin": "^4.0.1",
"meow": "^3.3.0"
@@ -15424,7 +18283,8 @@
},
"minimatch": {
"version": "0.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz",
+ "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=",
"requires": {
"lru-cache": "2",
"sigmund": "~1.0.0"
@@ -15434,30 +18294,36 @@
},
"karma-expect": {
"version": "1.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/karma-expect/-/karma-expect-1.1.3.tgz",
+ "integrity": "sha1-xrClb/GJA9sRr08JjMbnzxmM4nU=",
"requires": {
"expect.js": "^0.3.1"
}
},
"karma-firefox-launcher": {
"version": "0.1.7",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/karma-firefox-launcher/-/karma-firefox-launcher-0.1.7.tgz",
+ "integrity": "sha1-wF3YZTNpHmLzGVJZUJjovTV9OfM="
},
"karma-html2js-preprocessor": {
"version": "1.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/karma-html2js-preprocessor/-/karma-html2js-preprocessor-1.1.0.tgz",
+ "integrity": "sha1-/Ant8Eu+K7bu6boZaPgmtziAIL0="
},
"karma-jquery": {
"version": "0.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/karma-jquery/-/karma-jquery-0.1.0.tgz",
+ "integrity": "sha1-fcRzfY2kKNfTxkVcQgER3MAhf7Y="
},
"karma-mocha": {
"version": "0.2.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/karma-mocha/-/karma-mocha-0.2.2.tgz",
+ "integrity": "sha1-OI7ZF9oV3LGW0bkVwZNO+AMZP44="
},
"karma-mocha-reporter": {
"version": "1.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/karma-mocha-reporter/-/karma-mocha-reporter-1.3.0.tgz",
+ "integrity": "sha1-r2pGwIqcVcf9OUw6WqJhetoVhKU=",
"requires": {
"chalk": "1.1.1",
"karma": ">=0.13"
@@ -15465,7 +18331,8 @@
"dependencies": {
"accepts": {
"version": "1.3.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz",
+ "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=",
"requires": {
"mime-types": "~2.1.18",
"negotiator": "0.6.1"
@@ -15473,7 +18340,8 @@
},
"anymatch": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
+ "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
"requires": {
"micromatch": "^3.1.4",
"normalize-path": "^2.1.1"
@@ -15481,23 +18349,28 @@
},
"arr-diff": {
"version": "4.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
+ "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA="
},
"array-unique": {
"version": "0.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
},
"arraybuffer.slice": {
"version": "0.0.7",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz",
+ "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog=="
},
"blob": {
"version": "0.0.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz",
+ "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig=="
},
"body-parser": {
"version": "1.18.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz",
+ "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=",
"requires": {
"bytes": "3.0.0",
"content-type": "~1.0.4",
@@ -15513,7 +18386,8 @@
},
"braces": {
"version": "2.3.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
+ "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
"requires": {
"arr-flatten": "^1.1.0",
"array-unique": "^0.3.2",
@@ -15529,7 +18403,8 @@
"dependencies": {
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
@@ -15538,11 +18413,13 @@
},
"bytes": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
+ "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg="
},
"chalk": {
"version": "1.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.1.tgz",
+ "integrity": "sha1-UJr7ZwZudJn36zU1x3RFdyri0Bk=",
"requires": {
"ansi-styles": "^2.1.0",
"escape-string-regexp": "^1.0.2",
@@ -15553,7 +18430,8 @@
},
"chokidar": {
"version": "2.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz",
+ "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==",
"requires": {
"anymatch": "^2.0.0",
"async-each": "^1.0.0",
@@ -15571,19 +18449,23 @@
},
"circular-json": {
"version": "0.5.9",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.5.9.tgz",
+ "integrity": "sha512-4ivwqHpIFJZBuhN3g/pEcdbnGUywkBblloGbkglyloVjjR3uT6tieI89MVOfbP2tHX5sgb01FuLgAOzebNlJNQ=="
},
"colors": {
"version": "1.3.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz",
+ "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg=="
},
"component-emitter": {
"version": "1.2.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
+ "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY="
},
"connect": {
"version": "3.6.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz",
+ "integrity": "sha1-Ce/2xVr3I24TcTWnJXSFi2eG9SQ=",
"requires": {
"debug": "2.6.9",
"finalhandler": "1.1.0",
@@ -15593,15 +18475,18 @@
},
"cookie": {
"version": "0.3.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
+ "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s="
},
"core-js": {
"version": "2.6.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.0.tgz",
+ "integrity": "sha512-kLRC6ncVpuEW/1kwrOXYX6KQASCVtrh1gQr/UiaVgFlf9WE5Vp+lNe5+h3LuMr5PAucWnnEXwH0nQHRH/gpGtw=="
},
"engine.io": {
"version": "3.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.2.1.tgz",
+ "integrity": "sha512-+VlKzHzMhaU+GsCIg4AoXF1UdDFjHHwMmMKqMJNDNLlUlejz58FCy4LBqB2YVJskHGYl06BatYWKP2TVdVXE5w==",
"requires": {
"accepts": "~1.3.4",
"base64id": "1.0.0",
@@ -15613,20 +18498,23 @@
"dependencies": {
"debug": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
"engine.io-client": {
"version": "3.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.2.1.tgz",
+ "integrity": "sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw==",
"requires": {
"component-emitter": "1.2.1",
"component-inherit": "0.0.3",
@@ -15643,20 +18531,23 @@
"dependencies": {
"debug": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
"engine.io-parser": {
"version": "2.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.3.tgz",
+ "integrity": "sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA==",
"requires": {
"after": "0.8.2",
"arraybuffer.slice": "~0.0.7",
@@ -15667,11 +18558,13 @@
},
"escape-html": {
"version": "1.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
},
"expand-brackets": {
"version": "2.1.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
+ "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
"requires": {
"debug": "^2.3.3",
"define-property": "^0.2.5",
@@ -15684,28 +18577,32 @@
"dependencies": {
"define-property": {
"version": "0.2.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
"requires": {
"is-descriptor": "^0.1.0"
}
},
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
},
"is-accessor-descriptor": {
"version": "0.1.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
"requires": {
"kind-of": "^3.0.2"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "^1.1.5"
}
@@ -15714,14 +18611,16 @@
},
"is-data-descriptor": {
"version": "0.1.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
"requires": {
"kind-of": "^3.0.2"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "^1.1.5"
}
@@ -15730,7 +18629,8 @@
},
"is-descriptor": {
"version": "0.1.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
"requires": {
"is-accessor-descriptor": "^0.1.6",
"is-data-descriptor": "^0.1.4",
@@ -15739,13 +18639,15 @@
},
"kind-of": {
"version": "5.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+ "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw=="
}
}
},
"extglob": {
"version": "2.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
+ "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
"requires": {
"array-unique": "^0.3.2",
"define-property": "^1.0.0",
@@ -15759,14 +18661,16 @@
"dependencies": {
"define-property": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
"requires": {
"is-descriptor": "^1.0.0"
}
},
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
@@ -15775,7 +18679,8 @@
},
"fill-range": {
"version": "4.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+ "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
"requires": {
"extend-shallow": "^2.0.1",
"is-number": "^3.0.0",
@@ -15785,7 +18690,8 @@
"dependencies": {
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
@@ -15794,7 +18700,8 @@
},
"finalhandler": {
"version": "1.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz",
+ "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=",
"requires": {
"debug": "2.6.9",
"encodeurl": "~1.0.1",
@@ -15807,13 +18714,15 @@
"dependencies": {
"statuses": {
"version": "1.3.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz",
+ "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4="
}
}
},
"glob": {
"version": "7.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
+ "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -15825,7 +18734,8 @@
},
"glob-parent": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
+ "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
"requires": {
"is-glob": "^3.1.0",
"path-dirname": "^1.0.0"
@@ -15833,7 +18743,8 @@
"dependencies": {
"is-glob": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
"requires": {
"is-extglob": "^2.1.0"
}
@@ -15842,7 +18753,8 @@
},
"http-errors": {
"version": "1.6.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
+ "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
"requires": {
"depd": "~1.1.2",
"inherits": "2.0.3",
@@ -15852,28 +18764,32 @@
},
"iconv-lite": {
"version": "0.4.23",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz",
+ "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
},
"is-accessor-descriptor": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
"requires": {
"kind-of": "^6.0.0"
}
},
"is-data-descriptor": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
"requires": {
"kind-of": "^6.0.0"
}
},
"is-descriptor": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
"requires": {
"is-accessor-descriptor": "^1.0.0",
"is-data-descriptor": "^1.0.0",
@@ -15882,25 +18798,29 @@
},
"is-extglob": {
"version": "2.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI="
},
"is-glob": {
"version": "4.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz",
+ "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=",
"requires": {
"is-extglob": "^2.1.1"
}
},
"is-number": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
"requires": {
"kind-of": "^3.0.2"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "^1.1.5"
}
@@ -15909,15 +18829,18 @@
},
"isarray": {
"version": "2.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
+ "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4="
},
"isobject": {
"version": "3.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
},
"karma": {
"version": "3.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/karma/-/karma-3.1.3.tgz",
+ "integrity": "sha512-JU4FYUtFEGsLZd6ZJzLrivcPj0TkteBiIRDcXWFsltPMGgZMDtby/MIzNOzgyZv/9dahs9vHpSxerC/ZfeX9Qw==",
"requires": {
"bluebird": "^3.3.0",
"body-parser": "^1.16.1",
@@ -15934,7 +18857,6 @@
"graceful-fs": "^4.1.2",
"http-proxy": "^1.13.0",
"isbinaryfile": "^3.0.0",
- "lodash": "^4.17.5",
"log4js": "^3.0.0",
"mime": "^2.3.1",
"minimatch": "^3.0.2",
@@ -15951,15 +18873,13 @@
},
"kind-of": {
"version": "6.0.2",
- "resolved": false
- },
- "lodash": {
- "version": "4.17.11",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
},
"log4js": {
"version": "3.0.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/log4js/-/log4js-3.0.6.tgz",
+ "integrity": "sha512-ezXZk6oPJCWL483zj64pNkMuY/NcRX5MPiB0zE6tjZM137aeusrOnW1ecxgF9cmwMWkBMhjteQxBPoZBh9FDxQ==",
"requires": {
"circular-json": "^0.5.5",
"date-format": "^1.2.0",
@@ -15970,7 +18890,8 @@
"dependencies": {
"debug": {
"version": "3.2.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
+ "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
}
@@ -15979,7 +18900,8 @@
},
"micromatch": {
"version": "3.1.10",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
+ "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
"requires": {
"arr-diff": "^4.0.0",
"array-unique": "^0.3.2",
@@ -15998,34 +18920,41 @@
},
"mime": {
"version": "2.4.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz",
+ "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w=="
},
"mime-db": {
"version": "1.37.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz",
+ "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg=="
},
"mime-types": {
"version": "2.1.21",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz",
+ "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==",
"requires": {
"mime-db": "~1.37.0"
}
},
"ms": {
"version": "2.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
},
"parseurl": {
"version": "1.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
+ "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M="
},
"qs": {
"version": "6.5.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
+ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
},
"raw-body": {
"version": "2.3.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz",
+ "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==",
"requires": {
"bytes": "3.0.0",
"http-errors": "1.6.3",
@@ -16035,11 +18964,13 @@
},
"setprototypeof": {
"version": "1.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
+ "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ=="
},
"socket.io": {
"version": "2.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.1.1.tgz",
+ "integrity": "sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA==",
"requires": {
"debug": "~3.1.0",
"engine.io": "~3.2.0",
@@ -16051,24 +18982,28 @@
"dependencies": {
"debug": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
"socket.io-adapter": {
"version": "1.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz",
+ "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs="
},
"socket.io-client": {
"version": "2.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.1.1.tgz",
+ "integrity": "sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ==",
"requires": {
"backo2": "1.0.2",
"base64-arraybuffer": "0.1.5",
@@ -16088,20 +19023,23 @@
"dependencies": {
"debug": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
"socket.io-parser": {
"version": "3.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.2.0.tgz",
+ "integrity": "sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA==",
"requires": {
"component-emitter": "1.2.1",
"debug": "~3.1.0",
@@ -16110,24 +19048,28 @@
"dependencies": {
"debug": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
"source-map": {
"version": "0.6.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
},
"type-is": {
"version": "1.6.16",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz",
+ "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==",
"requires": {
"media-typer": "0.3.0",
"mime-types": "~2.1.18"
@@ -16135,15 +19077,18 @@
},
"ultron": {
"version": "1.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz",
+ "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og=="
},
"utils-merge": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+ "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
},
"ws": {
"version": "3.3.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz",
+ "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==",
"requires": {
"async-limiter": "~1.0.0",
"safe-buffer": "~5.1.0",
@@ -16152,21 +19097,23 @@
},
"xmlhttprequest-ssl": {
"version": "1.5.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz",
+ "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4="
}
}
},
"karma-phantomjs-launcher": {
"version": "1.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/karma-phantomjs-launcher/-/karma-phantomjs-launcher-1.0.4.tgz",
+ "integrity": "sha1-0jyjSAG9qYY60xjju0vUBisTrNI=",
"requires": {
- "lodash": "^4.0.1",
"phantomjs-prebuilt": "^2.1.7"
},
"dependencies": {
"extract-zip": {
"version": "1.6.7",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.6.7.tgz",
+ "integrity": "sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k=",
"requires": {
"concat-stream": "1.6.2",
"debug": "2.6.9",
@@ -16176,20 +19123,18 @@
},
"fs-extra": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz",
+ "integrity": "sha1-zTzl9+fLYUWIP8rjGR6Yd/hYeVA=",
"requires": {
"graceful-fs": "^4.1.2",
"jsonfile": "^2.1.0",
"klaw": "^1.0.0"
}
},
- "lodash": {
- "version": "4.17.11",
- "resolved": false
- },
"phantomjs-prebuilt": {
"version": "2.1.16",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.16.tgz",
+ "integrity": "sha1-79ISpKOWbTZHaE6ouniFSb4q7+8=",
"requires": {
"es6-promise": "^4.0.3",
"extract-zip": "^1.6.5",
@@ -16204,7 +19149,8 @@
},
"which": {
"version": "1.3.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"requires": {
"isexe": "^2.0.0"
}
@@ -16213,98 +19159,104 @@
},
"karma-requirejs": {
"version": "0.2.6",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/karma-requirejs/-/karma-requirejs-0.2.6.tgz",
+ "integrity": "sha1-GncMZPkBMgo4nGW0lEdGMmNy3vg="
},
"karma-safari-launcher": {
"version": "0.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/karma-safari-launcher/-/karma-safari-launcher-0.1.1.tgz",
+ "integrity": "sha1-pjgKzKtgpYP91iT0G5o/EP30EAg="
},
"karma-sinon": {
"version": "1.0.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/karma-sinon/-/karma-sinon-1.0.5.tgz",
+ "integrity": "sha1-TjRD8oMP3s/2JNN0cWPxIX2qKpo="
},
"karma-sourcemap-loader": {
"version": "0.3.7",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/karma-sourcemap-loader/-/karma-sourcemap-loader-0.3.7.tgz",
+ "integrity": "sha1-kTIsd/jxPUb+0GKwQuEAnUxFBdg=",
"requires": {
"graceful-fs": "^4.1.2"
}
},
"karma-webpack": {
"version": "3.0.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/karma-webpack/-/karma-webpack-3.0.5.tgz",
+ "integrity": "sha512-nRudGJWstvVuA6Tbju9tyGUfXTtI1UXMXoRHVmM2/78D0q6s/Ye2IC157PKNDC15PWFGR0mVIRtWLAdcfsRJoA==",
"requires": {
"async": "^2.0.0",
"babel-runtime": "^6.0.0",
"loader-utils": "^1.0.0",
- "lodash": "^4.0.0",
"source-map": "^0.5.6",
"webpack-dev-middleware": "^2.0.6"
},
"dependencies": {
"async": {
"version": "2.6.1",
- "resolved": false,
- "requires": {
- "lodash": "^4.17.10"
- }
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
+ "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ=="
},
"loader-utils": {
"version": "1.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz",
+ "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=",
"requires": {
"big.js": "^3.1.3",
- "emojis-list": "^2.0.0",
- "json5": "^0.5.0"
+ "emojis-list": "^2.0.0"
}
- },
- "lodash": {
- "version": "4.17.11",
- "resolved": false
}
}
},
"kew": {
"version": "0.7.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz",
+ "integrity": "sha1-edk9LTM2PW/dKXCzNdkUGtWR15s="
},
"killable": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz",
+ "integrity": "sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg=="
},
"kind-of": {
"version": "3.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "^1.1.5"
}
},
"klaw": {
"version": "1.3.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz",
+ "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=",
"requires": {
"graceful-fs": "^4.1.9"
}
},
"lazy-cache": {
"version": "1.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
+ "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=",
"optional": true
},
"lcid": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz",
+ "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==",
"requires": {
"invert-kv": "^2.0.0"
}
},
"lcov-parse": {
"version": "0.0.10",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz",
+ "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM="
},
"levn": {
"version": "0.2.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.2.5.tgz",
+ "integrity": "sha1-uo0znQykphDjo/FFucr0iAcVUFQ=",
"requires": {
"prelude-ls": "~1.1.0",
"type-check": "~0.3.1"
@@ -16312,7 +19264,8 @@
},
"liftoff": {
"version": "2.5.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz",
+ "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=",
"requires": {
"extend": "^3.0.0",
"findup-sync": "^2.0.0",
@@ -16326,15 +19279,18 @@
"dependencies": {
"arr-diff": {
"version": "4.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
+ "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA="
},
"array-unique": {
"version": "0.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
},
"braces": {
"version": "2.3.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
+ "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
"requires": {
"arr-flatten": "^1.1.0",
"array-unique": "^0.3.2",
@@ -16350,7 +19306,8 @@
"dependencies": {
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
@@ -16359,7 +19316,8 @@
},
"expand-brackets": {
"version": "2.1.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
+ "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
"requires": {
"debug": "^2.3.3",
"define-property": "^0.2.5",
@@ -16372,28 +19330,32 @@
"dependencies": {
"define-property": {
"version": "0.2.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
"requires": {
"is-descriptor": "^0.1.0"
}
},
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
},
"is-accessor-descriptor": {
"version": "0.1.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
"requires": {
"kind-of": "^3.0.2"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "^1.1.5"
}
@@ -16402,14 +19364,16 @@
},
"is-data-descriptor": {
"version": "0.1.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
"requires": {
"kind-of": "^3.0.2"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "^1.1.5"
}
@@ -16418,7 +19382,8 @@
},
"is-descriptor": {
"version": "0.1.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
"requires": {
"is-accessor-descriptor": "^0.1.6",
"is-data-descriptor": "^0.1.4",
@@ -16427,13 +19392,15 @@
},
"kind-of": {
"version": "5.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+ "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw=="
}
}
},
"extglob": {
"version": "2.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
+ "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
"requires": {
"array-unique": "^0.3.2",
"define-property": "^1.0.0",
@@ -16447,14 +19414,16 @@
"dependencies": {
"define-property": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
"requires": {
"is-descriptor": "^1.0.0"
}
},
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
@@ -16463,7 +19432,8 @@
},
"fill-range": {
"version": "4.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+ "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
"requires": {
"extend-shallow": "^2.0.1",
"is-number": "^3.0.0",
@@ -16473,7 +19443,8 @@
"dependencies": {
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
@@ -16482,7 +19453,8 @@
},
"findup-sync": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz",
+ "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=",
"requires": {
"detect-file": "^1.0.0",
"is-glob": "^3.1.0",
@@ -16492,21 +19464,24 @@
},
"is-accessor-descriptor": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
"requires": {
"kind-of": "^6.0.0"
}
},
"is-data-descriptor": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
"requires": {
"kind-of": "^6.0.0"
}
},
"is-descriptor": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
"requires": {
"is-accessor-descriptor": "^1.0.0",
"is-data-descriptor": "^1.0.0",
@@ -16515,25 +19490,29 @@
},
"is-extglob": {
"version": "2.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI="
},
"is-glob": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
"requires": {
"is-extglob": "^2.1.0"
}
},
"is-number": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
"requires": {
"kind-of": "^3.0.2"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "^1.1.5"
}
@@ -16542,15 +19521,18 @@
},
"isobject": {
"version": "3.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
},
"kind-of": {
"version": "6.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
},
"micromatch": {
"version": "3.1.10",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
+ "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
"requires": {
"arr-diff": "^4.0.0",
"array-unique": "^0.3.2",
@@ -16571,11 +19553,13 @@
},
"livereload-js": {
"version": "2.4.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.4.0.tgz",
+ "integrity": "sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw=="
},
"load-json-file": {
"version": "1.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
+ "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
"requires": {
"graceful-fs": "^4.1.2",
"parse-json": "^2.2.0",
@@ -16586,7 +19570,8 @@
},
"loader-fs-cache": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/loader-fs-cache/-/loader-fs-cache-1.0.2.tgz",
+ "integrity": "sha512-70IzT/0/L+M20jUlEqZhZyArTU6VKLRTYRDAYN26g4jfzpJqjipLL3/hgYpySqI9PwsVRHHFja0LfEmsx9X2Cw==",
"requires": {
"find-cache-dir": "^0.1.1",
"mkdirp": "0.5.1"
@@ -16594,43 +19579,37 @@
},
"loader-runner": {
"version": "2.4.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz",
+ "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw=="
},
"loader-utils": {
"version": "0.2.17",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz",
+ "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=",
"requires": {
"big.js": "^3.1.3",
"emojis-list": "^2.0.0",
- "json5": "^0.5.0",
"object-assign": "^4.0.1"
- },
- "dependencies": {
- "json5": {
- "version": "0.5.1",
- "resolved": false
- }
}
},
"locate-path": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
+ "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
"requires": {
"p-locate": "^2.0.0",
"path-exists": "^3.0.0"
}
},
- "lodash": {
- "version": "3.10.1",
- "resolved": false
- },
"lodash._arraycopy": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz",
+ "integrity": "sha1-due3wfH7klRzdIeKVi7Qaj5Q9uE="
},
"lodash._baseassign": {
"version": "3.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz",
+ "integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=",
"requires": {
"lodash._basecopy": "^3.0.0",
"lodash.keys": "^3.0.0"
@@ -16638,15 +19617,18 @@
},
"lodash._basecopy": {
"version": "3.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz",
+ "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY="
},
"lodash._bindcallback": {
"version": "3.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz",
+ "integrity": "sha1-5THCdkTPi1epnhftlbNcdIeJOS4="
},
"lodash._createassigner": {
"version": "3.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz",
+ "integrity": "sha1-g4pbri/aymOsIt7o4Z+k5taXCxE=",
"requires": {
"lodash._bindcallback": "^3.0.0",
"lodash._isiterateecall": "^3.0.0",
@@ -16655,15 +19637,18 @@
},
"lodash._getnative": {
"version": "3.9.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz",
+ "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U="
},
"lodash._isiterateecall": {
"version": "3.0.9",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz",
+ "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw="
},
"lodash.assign": {
"version": "3.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-3.2.0.tgz",
+ "integrity": "sha1-POnwI0tLIiPilrj6CsH+6OvKZPo=",
"requires": {
"lodash._baseassign": "^3.0.0",
"lodash._createassigner": "^3.0.0",
@@ -16672,11 +19657,13 @@
},
"lodash.debounce": {
"version": "4.0.8",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
+ "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168="
},
"lodash.defaults": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-3.0.0.tgz",
+ "integrity": "sha1-jxmEVB6IsAIYygkA+diVkDjHLpo=",
"requires": {
"lodash._arraycopy": "^3.0.0",
"lodash.assign": "^3.0.0"
@@ -16684,23 +19671,28 @@
},
"lodash.isarguments": {
"version": "3.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz",
+ "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo="
},
"lodash.isarray": {
"version": "3.0.4",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz",
+ "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U="
},
"lodash.isfinite": {
"version": "3.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz",
+ "integrity": "sha1-+4m2WpqAKBgz8LdHizpRBPiY67M="
},
"lodash.isplainobject": {
"version": "4.0.6",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
+ "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs="
},
"lodash.keys": {
"version": "3.1.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz",
+ "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=",
"requires": {
"lodash._getnative": "^3.0.0",
"lodash.isarguments": "^3.0.0",
@@ -16709,29 +19701,34 @@
},
"lodash.restparam": {
"version": "3.6.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz",
+ "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU="
},
"log-driver": {
"version": "1.2.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.5.tgz",
+ "integrity": "sha1-euTsJXMC/XkNVXyxDJcQDYV7AFY="
},
"log-symbols": {
"version": "2.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
+ "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
"requires": {
"chalk": "^2.0.1"
},
"dependencies": {
"ansi-styles": {
"version": "3.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"requires": {
"color-convert": "^1.9.0"
}
},
"chalk": {
"version": "2.4.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
+ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
@@ -16740,11 +19737,13 @@
},
"has-flag": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"supports-color": {
"version": "5.5.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"requires": {
"has-flag": "^3.0.0"
}
@@ -16753,7 +19752,8 @@
},
"log4js": {
"version": "4.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/log4js/-/log4js-4.1.0.tgz",
+ "integrity": "sha512-eDa+zZPeVEeK6QGJAePyXM6pg4P3n3TO5rX9iZMVY48JshsTyLJZLIL5HipI1kQ2qLsSyOpUqNND/C5H4WhhiA==",
"requires": {
"date-format": "^2.0.0",
"debug": "^4.1.1",
@@ -16764,25 +19764,26 @@
"dependencies": {
"async": {
"version": "2.6.2",
- "resolved": false,
- "requires": {
- "lodash": "^4.17.11"
- }
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz",
+ "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg=="
},
"date-format": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/date-format/-/date-format-2.0.0.tgz",
+ "integrity": "sha512-M6UqVvZVgFYqZL1SfHsRGIQSz3ZL+qgbsV5Lp1Vj61LZVYuEwcMXYay7DRDtYs2HQQBK5hQtQ0fD9aEJ89V0LA=="
},
"debug": {
"version": "4.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": {
"ms": "^2.1.1"
}
},
"fs-extra": {
"version": "7.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz",
+ "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==",
"requires": {
"graceful-fs": "^4.1.2",
"jsonfile": "^4.0.0",
@@ -16791,33 +19792,32 @@
},
"jsonfile": {
"version": "4.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
+ "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
"requires": {
"graceful-fs": "^4.1.6"
}
},
- "lodash": {
- "version": "4.17.11",
- "resolved": false
- },
"ms": {
"version": "2.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
},
"streamroller": {
"version": "1.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-1.0.4.tgz",
+ "integrity": "sha512-Wc2Gm5ygjSX8ZpW9J7Y9FwiSzTlKSvcl0FTTMd3rn7RoxDXpBW+xD9TY5sWL2n0UR61COB0LG1BQvN6nTUQbLQ==",
"requires": {
"async": "^2.6.1",
"date-format": "^2.0.0",
"debug": "^3.1.0",
- "fs-extra": "^7.0.0",
- "lodash": "^4.17.10"
+ "fs-extra": "^7.0.0"
},
"dependencies": {
"debug": {
"version": "3.2.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
+ "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
}
@@ -16828,11 +19828,13 @@
},
"loglevel": {
"version": "1.6.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz",
+ "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po="
},
"loglevelnext": {
"version": "1.0.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/loglevelnext/-/loglevelnext-1.0.5.tgz",
+ "integrity": "sha512-V/73qkPuJmx4BcBF19xPBr+0ZRVBhc4POxvZTZdMeXpJ4NItXSJ/MSwuFT0kQJlCbXvdlZoQQ/418bS1y9Jh6A==",
"requires": {
"es6-symbol": "^3.1.1",
"object.assign": "^4.1.0"
@@ -16840,29 +19842,34 @@
},
"lolex": {
"version": "3.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/lolex/-/lolex-3.1.0.tgz",
+ "integrity": "sha512-zFo5MgCJ0rZ7gQg69S4pqBsLURbFw11X68C18OcJjJQbqaXm2NoTrGl1IMM3TIz0/BnN1tIs2tzmmqvCsOMMjw=="
},
"longest": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
+ "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
"optional": true
},
"loose-envify": {
"version": "1.3.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz",
+ "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=",
"requires": {
"js-tokens": "^3.0.0"
},
"dependencies": {
"js-tokens": {
"version": "3.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
+ "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls="
}
}
},
"loud-rejection": {
"version": "1.6.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
+ "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=",
"requires": {
"currently-unhandled": "^0.4.1",
"signal-exit": "^3.0.0"
@@ -16870,67 +19877,79 @@
},
"lpad": {
"version": "0.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/lpad/-/lpad-0.1.0.tgz",
+ "integrity": "sha1-5MYMKROTIcWXDeSTtJauDXdM0qc="
},
"lru-cache": {
"version": "2.2.4",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz",
+ "integrity": "sha1-bGWGGb7PFAMdDQtZSxYELOTcBj0="
},
"make-dir": {
"version": "1.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz",
+ "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==",
"requires": {
"pify": "^3.0.0"
},
"dependencies": {
"pify": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY="
}
}
},
"make-iterator": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz",
+ "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==",
"requires": {
"kind-of": "^6.0.2"
},
"dependencies": {
"kind-of": {
"version": "6.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
}
}
},
"mamacro": {
"version": "0.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz",
+ "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA=="
},
"map-age-cleaner": {
"version": "0.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
+ "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
"requires": {
"p-defer": "^1.0.0"
}
},
"map-cache": {
"version": "0.2.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
+ "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8="
},
"map-obj": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
+ "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0="
},
"map-visit": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
+ "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=",
"requires": {
"object-visit": "^1.0.0"
}
},
"match-stream": {
"version": "0.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/match-stream/-/match-stream-0.0.2.tgz",
+ "integrity": "sha1-mesFAJOzTf+t5CG5rAtBCpz6F88=",
"requires": {
"buffers": "~0.1.1",
"readable-stream": "~1.0.0"
@@ -16938,11 +19957,13 @@
"dependencies": {
"isarray": {
"version": "0.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.0.34",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+ "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
@@ -16952,13 +19973,15 @@
},
"string_decoder": {
"version": "0.10.31",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
},
"maxmin": {
"version": "2.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-2.1.0.tgz",
+ "integrity": "sha1-TTsiCQPZXu5+t6x/qGTnLcCaMWY=",
"requires": {
"chalk": "^1.0.0",
"figures": "^1.0.1",
@@ -16968,7 +19991,8 @@
},
"md5.js": {
"version": "1.3.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
+ "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==",
"requires": {
"hash-base": "^3.0.0",
"inherits": "^2.0.1",
@@ -16977,17 +20001,20 @@
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
},
"media-typer": {
"version": "0.3.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+ "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
},
"mem": {
"version": "4.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/mem/-/mem-4.0.0.tgz",
+ "integrity": "sha512-WQxG/5xYc3tMbYLXoXPm81ET2WDULiU5FxbuIoNbJqLOOI8zehXFdZuiUEgfdrU2mVB1pxBZUGlYORSrpuJreA==",
"requires": {
"map-age-cleaner": "^0.1.1",
"mimic-fn": "^1.0.0",
@@ -16996,7 +20023,8 @@
},
"memory-fs": {
"version": "0.4.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz",
+ "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=",
"requires": {
"errno": "^0.1.3",
"readable-stream": "^2.0.1"
@@ -17004,7 +20032,8 @@
},
"meow": {
"version": "3.7.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
+ "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
"requires": {
"camelcase-keys": "^2.0.0",
"decamelize": "^1.1.2",
@@ -17020,11 +20049,13 @@
},
"merge-descriptors": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
+ "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
},
"method-override": {
"version": "2.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/method-override/-/method-override-2.0.2.tgz",
+ "integrity": "sha1-AFMSeMeXiWQL8n6X4mo6Wh98ynM=",
"requires": {
"methods": "1.0.1",
"parseurl": "1.0.1",
@@ -17033,17 +20064,20 @@
"dependencies": {
"methods": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/methods/-/methods-1.0.1.tgz",
+ "integrity": "sha1-dbyRlD3/19oDfPPusO1zoAN80Us="
}
}
},
"methods": {
"version": "1.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
+ "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
},
"micromatch": {
"version": "3.1.10",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
+ "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
"requires": {
"arr-diff": "^4.0.0",
"array-unique": "^0.3.2",
@@ -17062,17 +20096,20 @@
"dependencies": {
"array-unique": {
"version": "0.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
},
"kind-of": {
"version": "6.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
}
}
},
"miller-rabin": {
"version": "4.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz",
+ "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==",
"requires": {
"bn.js": "^4.0.0",
"brorand": "^1.0.1"
@@ -17080,45 +20117,54 @@
},
"mime": {
"version": "1.2.11",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz",
+ "integrity": "sha1-WCA+7Ybjpe8XrtK32evUfwpg3RA="
},
"mime-db": {
"version": "1.30.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz",
+ "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE="
},
"mime-types": {
"version": "2.1.17",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz",
+ "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=",
"requires": {
"mime-db": "~1.30.0"
}
},
"mimic-fn": {
"version": "1.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
+ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ=="
},
"minimalistic-assert": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
+ "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A=="
},
"minimalistic-crypto-utils": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
+ "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo="
},
"minimatch": {
"version": "3.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "1.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
+ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
},
"mississippi": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz",
+ "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==",
"requires": {
"concat-stream": "^1.5.0",
"duplexify": "^3.4.2",
@@ -17134,7 +20180,8 @@
},
"mixin-deep": {
"version": "1.3.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz",
+ "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==",
"requires": {
"for-in": "^1.0.2",
"is-extendable": "^1.0.1"
@@ -17142,7 +20189,8 @@
"dependencies": {
"is-extendable": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
+ "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
"requires": {
"is-plain-object": "^2.0.4"
}
@@ -17151,20 +20199,23 @@
},
"mkdirp": {
"version": "0.5.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
+ "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"requires": {
"minimist": "0.0.8"
},
"dependencies": {
"minimist": {
"version": "0.0.8",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
}
}
},
"mocha": {
"version": "5.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz",
+ "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==",
"requires": {
"browser-stdout": "1.3.1",
"commander": "2.15.1",
@@ -17181,22 +20232,26 @@
"dependencies": {
"commander": {
"version": "2.15.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz",
+ "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag=="
},
"debug": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"diff": {
"version": "3.5.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
+ "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA=="
},
"glob": {
"version": "7.1.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
+ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -17208,15 +20263,18 @@
},
"growl": {
"version": "1.10.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
+ "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA=="
},
"has-flag": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"supports-color": {
"version": "5.4.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz",
+ "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==",
"requires": {
"has-flag": "^3.0.0"
}
@@ -17225,32 +20283,38 @@
},
"mocha-lcov-reporter": {
"version": "0.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mocha-lcov-reporter/-/mocha-lcov-reporter-0.0.2.tgz",
+ "integrity": "sha1-rdE60kFYQxVwytpELGFO3F5P65U="
},
"moment": {
"version": "2.22.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz",
+ "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y="
},
"mootools": {
"version": "1.5.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mootools/-/mootools-1.5.2.tgz",
+ "integrity": "sha1-H93xtOCp5l0g1IO5tLCOHoexFho="
},
"morgan": {
"version": "1.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.1.1.tgz",
+ "integrity": "sha1-zeRdLoB+vMQ5dFhG6oA5LmkJgUY=",
"requires": {
"bytes": "1.0.0"
},
"dependencies": {
"bytes": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-1.0.0.tgz",
+ "integrity": "sha1-NWnt6Lo0MV+rmcPpLLBMciDeH6g="
}
}
},
"move-concurrently": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
+ "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=",
"requires": {
"aproba": "^1.1.1",
"copy-concurrently": "^1.0.0",
@@ -17262,11 +20326,13 @@
},
"ms": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"multicast-dns": {
"version": "6.2.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz",
+ "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==",
"requires": {
"dns-packet": "^1.3.1",
"thunky": "^1.0.2"
@@ -17274,11 +20340,13 @@
},
"multicast-dns-service-types": {
"version": "1.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz",
+ "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE="
},
"multiparty": {
"version": "3.2.9",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/multiparty/-/multiparty-3.2.9.tgz",
+ "integrity": "sha1-xzNz6pwBLnd2zlvEDJNiZLa6LB4=",
"requires": {
"readable-stream": "~1.1.9",
"stream-counter": "~0.2.0"
@@ -17286,11 +20354,13 @@
"dependencies": {
"isarray": {
"version": "0.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.1.14",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
+ "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
@@ -17300,17 +20370,20 @@
},
"string_decoder": {
"version": "0.10.31",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
},
"mute-stream": {
"version": "0.0.7",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz",
+ "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s="
},
"nanomatch": {
"version": "1.2.13",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
+ "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==",
"requires": {
"arr-diff": "^4.0.0",
"array-unique": "^0.3.2",
@@ -17327,49 +20400,60 @@
"dependencies": {
"arr-diff": {
"version": "4.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
+ "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA="
},
"array-unique": {
"version": "0.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
},
"kind-of": {
"version": "6.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
}
}
},
"native-or-bluebird": {
"version": "1.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/native-or-bluebird/-/native-or-bluebird-1.1.2.tgz",
+ "integrity": "sha1-OSHhECMtHreQ89rGG7NwUxx9NW4="
},
"natives": {
"version": "1.1.6",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.6.tgz",
+ "integrity": "sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA=="
},
"natural-compare": {
"version": "1.4.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
+ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc="
},
"negotiator": {
"version": "0.6.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
+ "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk="
},
"neo-async": {
"version": "2.6.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz",
+ "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA=="
},
"next-tick": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
+ "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw="
},
"nice-try": {
"version": "1.0.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
+ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
},
"nise": {
"version": "1.4.10",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/nise/-/nise-1.4.10.tgz",
+ "integrity": "sha512-sa0RRbj53dovjc7wombHmVli9ZihXbXCQ2uH3TNm03DyvOSIQbxg+pbqDKrk2oxMK1rtLGVlKxcB9rrc6X5YjA==",
"requires": {
"@sinonjs/formatio": "^3.1.0",
"@sinonjs/text-encoding": "^0.7.1",
@@ -17380,15 +20464,18 @@
"dependencies": {
"isarray": {
"version": "0.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"lolex": {
"version": "2.7.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/lolex/-/lolex-2.7.5.tgz",
+ "integrity": "sha512-l9x0+1offnKKIzYVjyXU2SiwhXDLekRzKyhnbyldPHvC7BvLPVpdNUNR2KeMAiCN2D/kLNttZgQD5WjSxuBx3Q=="
},
"path-to-regexp": {
"version": "1.7.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz",
+ "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=",
"requires": {
"isarray": "0.0.1"
}
@@ -17397,13 +20484,13 @@
},
"nock": {
"version": "9.1.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/nock/-/nock-9.1.6.tgz",
+ "integrity": "sha512-DuKF+1W/FnMO6MXIGgCIWcM95bETjBbmFdR4v7dAj1zH9a9XhOjAa//PuWh98XIXxcZt7wdiv0JlO0AA0e2kqQ==",
"requires": {
"chai": ">=1.9.2 <4.0.0",
"debug": "^2.2.0",
"deep-equal": "^1.0.0",
"json-stringify-safe": "^5.0.1",
- "lodash": "~4.17.2",
"mkdirp": "^0.5.0",
"propagate": "0.4.0",
"qs": "^6.5.1",
@@ -17412,38 +20499,40 @@
"dependencies": {
"assertion-error": {
"version": "1.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
+ "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw=="
},
"chai": {
"version": "3.5.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz",
+ "integrity": "sha1-TQJjewZ/6Vi9v906QOxW/vc3Mkc=",
"requires": {
"assertion-error": "^1.0.1",
"deep-eql": "^0.1.3",
"type-detect": "^1.0.0"
}
},
- "lodash": {
- "version": "4.17.11",
- "resolved": false
- },
"semver": {
"version": "5.5.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
+ "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA=="
},
"type-detect": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-1.0.0.tgz",
+ "integrity": "sha1-diIXzAbbJY7EiQihKY6LlRIejqI="
}
}
},
"node-forge": {
"version": "0.7.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.5.tgz",
+ "integrity": "sha512-MmbQJ2MTESTjt3Gi/3yG1wGpIMhUfcIypUCGtTizFR9IiccFwxSpfp0vtIZlkFclEqERemxfnSdZEMR9VqqEFQ=="
},
"node-http2": {
"version": "4.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/node-http2/-/node-http2-4.0.1.tgz",
+ "integrity": "sha1-Fk/1O13SLITwrxQrh3xerraAmVk=",
"requires": {
"assert": "1.4.1",
"events": "1.1.1",
@@ -17457,15 +20546,18 @@
"dependencies": {
"https-browserify": {
"version": "0.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz",
+ "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI="
},
"punycode": {
"version": "1.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
+ "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0="
},
"stream-browserify": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz",
+ "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=",
"requires": {
"inherits": "~2.0.1",
"readable-stream": "^2.0.2"
@@ -17473,14 +20565,16 @@
},
"timers-browserify": {
"version": "2.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.2.tgz",
+ "integrity": "sha1-q0iDz1l9zVCvIRNJoA+8pWrIa4Y=",
"requires": {
"setimmediate": "^1.0.4"
}
},
"url": {
"version": "0.11.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
+ "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=",
"requires": {
"punycode": "1.3.2",
"querystring": "0.2.0"
@@ -17490,7 +20584,8 @@
},
"node-libs-browser": {
"version": "0.5.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-0.5.3.tgz",
+ "integrity": "sha1-Ve+oiOyQes24z/xOelFxJ4DhO2o=",
"requires": {
"assert": "^1.1.1",
"browserify-zlib": "~0.1.4",
@@ -17519,11 +20614,13 @@
"dependencies": {
"isarray": {
"version": "0.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.1.14",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
+ "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
@@ -17533,27 +20630,31 @@
},
"string_decoder": {
"version": "0.10.31",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
},
"nopt": {
"version": "1.0.10",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
+ "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=",
"requires": {
"abbrev": "1"
}
},
"noptify": {
"version": "0.0.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/noptify/-/noptify-0.0.3.tgz",
+ "integrity": "sha1-WPZUpz2XU98MUdlobckhBKZ/S7s=",
"requires": {
"nopt": "~2.0.0"
},
"dependencies": {
"nopt": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/nopt/-/nopt-2.0.0.tgz",
+ "integrity": "sha1-ynQW8gpeP5w7hhgPlilfo9C1Lg0=",
"requires": {
"abbrev": "1"
}
@@ -17562,7 +20663,8 @@
},
"normalize-package-data": {
"version": "2.4.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
+ "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==",
"requires": {
"hosted-git-info": "^2.1.4",
"is-builtin-module": "^1.0.0",
@@ -17572,47 +20674,56 @@
"dependencies": {
"semver": {
"version": "5.5.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
+ "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA=="
}
}
},
"normalize-path": {
"version": "2.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
+ "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
"requires": {
"remove-trailing-separator": "^1.0.1"
}
},
"npm-run-path": {
"version": "2.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
+ "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
"requires": {
"path-key": "^2.0.0"
}
},
"null-check": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/null-check/-/null-check-1.0.0.tgz",
+ "integrity": "sha1-l33/1xdgErnsMNKjnbXPcqBDnt0="
},
"number-is-nan": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
+ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
},
"oauth-sign": {
"version": "0.8.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
+ "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM="
},
"object-assign": {
"version": "4.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"object-component": {
"version": "0.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz",
+ "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE="
},
"object-copy": {
"version": "0.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
+ "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
"requires": {
"copy-descriptor": "^0.1.0",
"define-property": "^0.2.5",
@@ -17621,7 +20732,8 @@
"dependencies": {
"define-property": {
"version": "0.2.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
"requires": {
"is-descriptor": "^0.1.0"
}
@@ -17630,28 +20742,33 @@
},
"object-hash": {
"version": "1.3.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz",
+ "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA=="
},
"object-keys": {
"version": "1.0.12",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz",
+ "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag=="
},
"object-visit": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
+ "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=",
"requires": {
"isobject": "^3.0.0"
},
"dependencies": {
"isobject": {
"version": "3.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
}
}
},
"object.assign": {
"version": "4.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
+ "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
"requires": {
"define-properties": "^1.1.2",
"function-bind": "^1.1.1",
@@ -17661,7 +20778,8 @@
},
"object.defaults": {
"version": "1.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz",
+ "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=",
"requires": {
"array-each": "^1.0.1",
"array-slice": "^1.0.0",
@@ -17671,24 +20789,28 @@
"dependencies": {
"array-slice": {
"version": "1.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz",
+ "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w=="
},
"for-own": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz",
+ "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=",
"requires": {
"for-in": "^1.0.1"
}
},
"isobject": {
"version": "3.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
}
}
},
"object.getownpropertydescriptors": {
"version": "2.0.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz",
+ "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=",
"requires": {
"define-properties": "^1.1.2",
"es-abstract": "^1.5.1"
@@ -17696,7 +20818,8 @@
},
"object.map": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz",
+ "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=",
"requires": {
"for-own": "^1.0.0",
"make-iterator": "^1.0.0"
@@ -17704,7 +20827,8 @@
"dependencies": {
"for-own": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz",
+ "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=",
"requires": {
"for-in": "^1.0.1"
}
@@ -17713,66 +20837,77 @@
},
"object.pick": {
"version": "1.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
+ "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
"requires": {
"isobject": "^3.0.1"
},
"dependencies": {
"isobject": {
"version": "3.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
}
}
},
"obuf": {
"version": "1.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz",
+ "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg=="
},
"on-finished": {
"version": "2.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
+ "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
"requires": {
"ee-first": "1.1.1"
},
"dependencies": {
"ee-first": {
"version": "1.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
}
}
},
"on-headers": {
"version": "0.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-0.0.0.tgz",
+ "integrity": "sha1-7igX+DRDJXhc2cLfKyQrvBfK9MQ="
},
"once": {
"version": "1.4.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"requires": {
"wrappy": "1"
}
},
"onetime": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz",
+ "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=",
"requires": {
"mimic-fn": "^1.0.0"
}
},
"open": {
"version": "0.0.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/open/-/open-0.0.5.tgz",
+ "integrity": "sha1-QsPhjslUZra/DcQvOilFw/DK2Pw="
},
"opn": {
"version": "5.4.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/opn/-/opn-5.4.0.tgz",
+ "integrity": "sha512-YF9MNdVy/0qvJvDtunAOzFw9iasOQHpVthTCvGzxt61Il64AYSGdK+rYwld7NAfk9qJ7dt+hymBNSc9LNYS+Sw==",
"requires": {
"is-wsl": "^1.1.0"
}
},
"optimist": {
"version": "0.6.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
+ "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=",
"requires": {
"minimist": "~0.0.1",
"wordwrap": "~0.0.2"
@@ -17780,13 +20915,15 @@
"dependencies": {
"minimist": {
"version": "0.0.10",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
+ "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8="
}
}
},
"optionator": {
"version": "0.8.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz",
+ "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=",
"requires": {
"deep-is": "~0.1.3",
"fast-levenshtein": "~2.0.4",
@@ -17798,11 +20935,13 @@
"dependencies": {
"fast-levenshtein": {
"version": "2.0.6",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
},
"levn": {
"version": "0.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
+ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
"requires": {
"prelude-ls": "~1.1.2",
"type-check": "~0.3.2"
@@ -17810,28 +20949,30 @@
},
"wordwrap": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
+ "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus="
}
}
},
"original": {
"version": "1.0.2",
- "resolved": false,
- "requires": {
- "url-parse": "^1.4.3"
- }
+ "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz",
+ "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg=="
},
"os-browserify": {
"version": "0.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz",
+ "integrity": "sha1-ScoCk+CxlZCl9d4Qx/JlphfY/lQ="
},
"os-homedir": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
+ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
},
"os-locale": {
"version": "3.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.0.1.tgz",
+ "integrity": "sha512-7g5e7dmXPtzcP4bgsZ8ixDVqA7oWYuEz4lOSujeWyliPai4gfVDiFIcwBg3aGCPnmSGfzOKTK3ccPn0CKv3DBw==",
"requires": {
"execa": "^0.10.0",
"lcid": "^2.0.0",
@@ -17840,11 +20981,13 @@
},
"os-tmpdir": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
+ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
},
"osenv": {
"version": "0.1.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
+ "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
"requires": {
"os-homedir": "^1.0.0",
"os-tmpdir": "^1.0.0"
@@ -17852,53 +20995,64 @@
},
"over": {
"version": "0.0.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/over/-/over-0.0.5.tgz",
+ "integrity": "sha1-8phS5w/X4l82DgE6jsRMgq7bVwg="
},
"p-defer": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
+ "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww="
},
"p-finally": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
+ "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4="
},
"p-is-promise": {
"version": "1.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz",
+ "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4="
},
"p-limit": {
"version": "1.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
+ "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
"requires": {
"p-try": "^1.0.0"
}
},
"p-locate": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
+ "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
"requires": {
"p-limit": "^1.1.0"
}
},
"p-map": {
"version": "1.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz",
+ "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA=="
},
"p-try": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
+ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M="
},
"package": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/package/-/package-1.0.1.tgz",
+ "integrity": "sha1-0lofmeJQbcsn1nBLg9yooxLk7cw="
},
"pako": {
"version": "0.2.9",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz",
+ "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU="
},
"parallel-transform": {
"version": "1.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz",
+ "integrity": "sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=",
"requires": {
"cyclist": "~0.2.2",
"inherits": "^2.0.3",
@@ -17907,14 +21061,16 @@
},
"parent-module": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
"requires": {
"callsites": "^3.0.0"
}
},
"parse-asn1": {
"version": "5.1.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz",
+ "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==",
"requires": {
"asn1.js": "^4.0.0",
"browserify-aes": "^1.0.0",
@@ -17926,7 +21082,8 @@
},
"parse-filepath": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz",
+ "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=",
"requires": {
"is-absolute": "^1.0.0",
"map-cache": "^0.2.0",
@@ -17935,83 +21092,100 @@
},
"parse-json": {
"version": "2.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
+ "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
"requires": {
"error-ex": "^1.2.0"
}
},
"parse-ms": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-1.0.1.tgz",
+ "integrity": "sha1-VjRtR0nXjyNDDKDHE4UK75GqNh0="
},
"parse-passwd": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
+ "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY="
},
"parseqs": {
"version": "0.0.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz",
+ "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=",
"requires": {
"better-assert": "~1.0.0"
}
},
"parseuri": {
"version": "0.0.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz",
+ "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=",
"requires": {
"better-assert": "~1.0.0"
}
},
"parseurl": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.0.1.tgz",
+ "integrity": "sha1-Llfc5u/dN8NRhwEDCUTCK/OIt7Q="
},
"pascalcase": {
"version": "0.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
+ "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ="
},
"path-browserify": {
"version": "0.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz",
+ "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo="
},
"path-dirname": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz",
+ "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA="
},
"path-exists": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
+ "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
},
"path-is-absolute": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"path-is-inside": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz",
+ "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM="
},
"path-key": {
"version": "2.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
+ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
},
"path-root": {
"version": "0.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz",
+ "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=",
"requires": {
"path-root-regex": "^0.1.0"
}
},
"path-root-regex": {
"version": "0.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz",
+ "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0="
},
"path-to-regexp": {
"version": "0.1.7",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
+ "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
},
"path-type": {
"version": "1.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
+ "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
"requires": {
"graceful-fs": "^4.1.2",
"pify": "^2.0.0",
@@ -18020,15 +21194,18 @@
},
"pathval": {
"version": "1.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz",
+ "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA="
},
"pause": {
"version": "0.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz",
+ "integrity": "sha1-HUCLP9t2kjuVQ9lvtMnf1TXZy10="
},
"pbkdf2": {
"version": "3.0.17",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz",
+ "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==",
"requires": {
"create-hash": "^1.1.2",
"create-hmac": "^1.1.4",
@@ -18039,7 +21216,8 @@
"dependencies": {
"ripemd160": {
"version": "2.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz",
+ "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==",
"requires": {
"hash-base": "^3.0.0",
"inherits": "^2.0.1"
@@ -18047,7 +21225,8 @@
},
"sha.js": {
"version": "2.4.11",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
+ "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
"requires": {
"inherits": "^2.0.1",
"safe-buffer": "^5.0.1"
@@ -18057,19 +21236,23 @@
},
"pbkdf2-compat": {
"version": "2.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz",
+ "integrity": "sha1-tuDI+plJTZTgURV1gCpZpcFC8og="
},
"pend": {
"version": "1.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
+ "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA="
},
"performance-now": {
"version": "2.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
+ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
"phantomjs": {
"version": "2.1.7",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/phantomjs/-/phantomjs-2.1.7.tgz",
+ "integrity": "sha1-xpEPZ5NcNyhbYRQyn8LyfV8+MTQ=",
"requires": {
"extract-zip": "~1.5.0",
"fs-extra": "~0.26.4",
@@ -18083,40 +21266,44 @@
"dependencies": {
"assert-plus": {
"version": "0.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz",
+ "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ="
},
"async": {
"version": "2.6.0",
- "resolved": false,
- "requires": {
- "lodash": "^4.14.0"
- }
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz",
+ "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw=="
},
"aws-sign2": {
"version": "0.6.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
+ "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8="
},
"boom": {
"version": "2.10.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
+ "integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
"requires": {
"hoek": "2.x.x"
}
},
"caseless": {
"version": "0.11.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz",
+ "integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c="
},
"cryptiles": {
"version": "2.0.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
+ "integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=",
"requires": {
"boom": "2.x.x"
}
},
"form-data": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-1.0.1.tgz",
+ "integrity": "sha1-rjFduaSQf6BlUCMEpm13M0de43w=",
"requires": {
"async": "^2.0.1",
"combined-stream": "^1.0.5",
@@ -18125,7 +21312,8 @@
},
"har-validator": {
"version": "2.0.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz",
+ "integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=",
"requires": {
"chalk": "^1.1.1",
"commander": "^2.9.0",
@@ -18135,7 +21323,8 @@
},
"hawk": {
"version": "3.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz",
+ "integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=",
"requires": {
"boom": "2.x.x",
"cryptiles": "2.x.x",
@@ -18145,32 +21334,33 @@
},
"hoek": {
"version": "2.16.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
+ "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0="
},
"http-signature": {
"version": "1.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz",
+ "integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=",
"requires": {
"assert-plus": "^0.2.0",
"jsprim": "^1.2.2",
"sshpk": "^1.7.0"
}
},
- "lodash": {
- "version": "4.17.4",
- "resolved": false
- },
"node-uuid": {
"version": "1.4.8",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz",
+ "integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc="
},
"qs": {
"version": "5.2.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/qs/-/qs-5.2.1.tgz",
+ "integrity": "sha1-gB/uAw4LlFDWOFrcSKTMVbRK7fw="
},
"request": {
"version": "2.67.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/request/-/request-2.67.0.tgz",
+ "integrity": "sha1-ivdHgOK/EeoK6aqWXBHxGv0nJ0I=",
"requires": {
"aws-sign2": "~0.6.0",
"bl": "~1.0.0",
@@ -18196,22 +21386,26 @@
},
"sntp": {
"version": "1.0.9",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
+ "integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=",
"requires": {
"hoek": "2.x.x"
}
},
"tough-cookie": {
"version": "2.2.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.2.2.tgz",
+ "integrity": "sha1-yDoYMPTl7wuT7yo0iOck+N4Basc="
},
"tunnel-agent": {
"version": "0.4.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz",
+ "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us="
},
"which": {
"version": "1.2.14",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz",
+ "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=",
"requires": {
"isexe": "^2.0.0"
}
@@ -18220,33 +21414,39 @@
},
"pify": {
"version": "2.3.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
+ "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
},
"pinkie": {
"version": "2.0.4",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
+ "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA="
},
"pinkie-promise": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
+ "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
"requires": {
"pinkie": "^2.0.0"
}
},
"pkg-dir": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz",
+ "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=",
"requires": {
"find-up": "^1.0.0"
}
},
"plur": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/plur/-/plur-1.0.0.tgz",
+ "integrity": "sha1-24XGgU9eXlo7Se/CjWBP7GKXUVY="
},
"portfinder": {
"version": "1.0.20",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.20.tgz",
+ "integrity": "sha512-Yxe4mTyDzTd59PZJY4ojZR8F+E5e97iq2ZOHPz3HDgSvYC5siNad2tLooQ5y5QHyQhc3xVqvyk/eNA3wuoa7Sw==",
"requires": {
"async": "^1.5.2",
"debug": "^2.2.0",
@@ -18255,13 +21455,15 @@
"dependencies": {
"async": {
"version": "1.5.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
+ "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo="
}
}
},
"portscanner": {
"version": "2.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/portscanner/-/portscanner-2.2.0.tgz",
+ "integrity": "sha512-IFroCz/59Lqa2uBvzK3bKDbDDIEaAY8XJ1jFxcLWTqosrsc32//P4VuSB2vZXoHiHqOmx8B5L5hnKOxL/7FlPw==",
"requires": {
"async": "^2.6.0",
"is-number-like": "^1.0.3"
@@ -18269,35 +21471,33 @@
"dependencies": {
"async": {
"version": "2.6.1",
- "resolved": false,
- "requires": {
- "lodash": "^4.17.10"
- }
- },
- "lodash": {
- "version": "4.17.11",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
+ "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ=="
}
}
},
"posix-character-classes": {
"version": "0.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
+ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs="
},
"prelude-ls": {
"version": "1.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
+ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ="
},
"pretty-bytes": {
"version": "3.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-3.0.1.tgz",
+ "integrity": "sha1-J9AAjXeAY6C0gRuzXHnxvV1fvM8=",
"requires": {
"number-is-nan": "^1.0.0"
}
},
"pretty-ms": {
"version": "2.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-2.1.0.tgz",
+ "integrity": "sha1-QlfCVt8/sLRR1q/6qwIYhBJpgdw=",
"requires": {
"is-finite": "^1.0.1",
"parse-ms": "^1.0.0",
@@ -18306,44 +21506,54 @@
},
"private": {
"version": "0.1.8",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz",
+ "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==",
"dev": true
},
"process": {
"version": "0.11.10",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+ "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI="
},
"process-nextick-args": {
"version": "1.0.7",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
+ "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M="
},
"progress": {
"version": "1.1.8",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz",
+ "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74="
},
"promise-inflight": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz",
+ "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM="
},
"propagate": {
"version": "0.4.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/propagate/-/propagate-0.4.0.tgz",
+ "integrity": "sha1-8/zKCm/gZzanulcpZgaWF8EwtIE="
},
"prr": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
+ "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY="
},
"pseudomap": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
+ "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
},
"psl": {
"version": "1.1.29",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz",
+ "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ=="
},
"public-encrypt": {
"version": "4.0.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz",
+ "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==",
"requires": {
"bn.js": "^4.1.0",
"browserify-rsa": "^4.0.0",
@@ -18355,13 +21565,15 @@
"dependencies": {
"safe-buffer": {
"version": "5.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
}
}
},
"pullstream": {
"version": "0.4.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/pullstream/-/pullstream-0.4.1.tgz",
+ "integrity": "sha1-1vs79a7Wl+gxFQ6xACwlo/iuExQ=",
"requires": {
"over": ">= 0.0.5 < 1",
"readable-stream": "~1.0.31",
@@ -18371,11 +21583,13 @@
"dependencies": {
"isarray": {
"version": "0.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.0.34",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+ "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
@@ -18385,13 +21599,15 @@
},
"string_decoder": {
"version": "0.10.31",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
},
"pump": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
+ "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
"requires": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
@@ -18399,7 +21615,8 @@
},
"pumpify": {
"version": "1.5.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz",
+ "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==",
"requires": {
"duplexify": "^3.6.0",
"inherits": "^2.0.3",
@@ -18408,7 +21625,8 @@
"dependencies": {
"pump": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
+ "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
"requires": {
"end-of-stream": "^1.1.0",
"once": "^1.3.1"
@@ -18418,46 +21636,56 @@
},
"punycode": {
"version": "1.4.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
+ "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
},
"q": {
"version": "1.5.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
+ "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc="
},
"qjobs": {
"version": "1.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz",
+ "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg=="
},
"qs": {
"version": "6.5.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz",
+ "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A=="
},
"querystring": {
"version": "0.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
+ "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA="
},
"querystring-es3": {
"version": "0.2.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz",
+ "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM="
},
"querystringify": {
"version": "2.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.0.tgz",
+ "integrity": "sha512-sluvZZ1YiTLD5jsqZcDmFyV2EwToyXZBfpoVOmktMmW+VEnhgakFHnasVph65fOjGPTWN0Nw3+XQaSeMayr0kg=="
},
"rand-token": {
"version": "0.2.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/rand-token/-/rand-token-0.2.1.tgz",
+ "integrity": "sha1-3GfIEjMGyRInstw/W+pz0wE3YiY="
},
"randombytes": {
"version": "2.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
+ "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
"requires": {
"safe-buffer": "^5.1.0"
}
},
"randomfill": {
"version": "1.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz",
+ "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==",
"requires": {
"randombytes": "^2.0.5",
"safe-buffer": "^5.1.0"
@@ -18465,11 +21693,13 @@
},
"range-parser": {
"version": "1.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz",
+ "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4="
},
"raw-body": {
"version": "1.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-1.2.2.tgz",
+ "integrity": "sha1-DGjh7ijP7X26SCIjSuxgeEYcvB8=",
"requires": {
"bytes": "1",
"iconv-lite": "0.4.3"
@@ -18477,17 +21707,20 @@
"dependencies": {
"iconv-lite": {
"version": "0.4.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.3.tgz",
+ "integrity": "sha1-nniHeTt2nMaV6yLSVGpP0tebeh4="
}
}
},
"raw-loader": {
"version": "0.5.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz",
+ "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao="
},
"read-pkg": {
"version": "1.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
+ "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
"requires": {
"load-json-file": "^1.0.0",
"normalize-package-data": "^2.3.2",
@@ -18496,7 +21729,8 @@
},
"read-pkg-up": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
+ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
"requires": {
"find-up": "^1.0.0",
"read-pkg": "^1.0.0"
@@ -18504,7 +21738,8 @@
},
"readable-stream": {
"version": "2.3.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz",
+ "integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
@@ -18517,7 +21752,8 @@
},
"readdirp": {
"version": "2.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz",
+ "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=",
"requires": {
"graceful-fs": "^4.1.2",
"minimatch": "^3.0.2",
@@ -18527,7 +21763,8 @@
"dependencies": {
"minimatch": {
"version": "3.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -18536,14 +21773,16 @@
},
"rechoir": {
"version": "0.6.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
+ "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
"requires": {
"resolve": "^1.1.6"
}
},
"redent": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
+ "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=",
"requires": {
"indent-string": "^2.1.0",
"strip-indent": "^1.0.1"
@@ -18551,11 +21790,13 @@
},
"regenerator-runtime": {
"version": "0.11.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
+ "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
},
"regex-not": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
+ "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
"requires": {
"extend-shallow": "^3.0.2",
"safe-regex": "^1.1.0"
@@ -18563,23 +21804,28 @@
},
"regexpp": {
"version": "2.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz",
+ "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw=="
},
"remove-trailing-separator": {
"version": "1.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
+ "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8="
},
"repeat-element": {
"version": "1.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz",
+ "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo="
},
"repeat-string": {
"version": "1.6.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
+ "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc="
},
"request": {
"version": "2.88.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
+ "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==",
"requires": {
"aws-sign2": "~0.7.0",
"aws4": "^1.8.0",
@@ -18605,30 +21851,36 @@
"dependencies": {
"aws-sign2": {
"version": "0.7.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
+ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
},
"aws4": {
"version": "1.8.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
+ "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ=="
},
"caseless": {
"version": "0.12.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
+ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"combined-stream": {
"version": "1.0.7",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz",
+ "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"extend": {
"version": "3.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
+ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
},
"form-data": {
"version": "2.3.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
+ "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.6",
@@ -18637,7 +21889,8 @@
},
"http-signature": {
"version": "1.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
+ "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
"requires": {
"assert-plus": "^1.0.0",
"jsprim": "^1.2.2",
@@ -18646,30 +21899,36 @@
},
"mime-db": {
"version": "1.37.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz",
+ "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg=="
},
"mime-types": {
"version": "2.1.21",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz",
+ "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==",
"requires": {
"mime-db": "~1.37.0"
}
},
"oauth-sign": {
"version": "0.9.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
+ "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
},
"qs": {
"version": "6.5.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
+ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
},
"safe-buffer": {
"version": "5.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"tough-cookie": {
"version": "2.4.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz",
+ "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==",
"requires": {
"psl": "^1.1.24",
"punycode": "^1.4.1"
@@ -18677,34 +21936,36 @@
},
"tunnel-agent": {
"version": "0.6.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
+ "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
"requires": {
"safe-buffer": "^5.0.1"
}
},
"uuid": {
"version": "3.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
+ "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
}
}
},
"request-ip": {
"version": "2.0.2",
- "resolved": false,
- "requires": {
- "is_js": "^0.9.0"
- }
+ "resolved": "https://registry.npmjs.org/request-ip/-/request-ip-2.0.2.tgz",
+ "integrity": "sha1-3urm1K8hdoSX24zQX6NxQ/jxJX4="
},
"request-progress": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-2.0.1.tgz",
+ "integrity": "sha1-XTa7V5YcZzqlt4jbyBQf3yO0Tgg=",
"requires": {
"throttleit": "^1.0.0"
}
},
"requestretry": {
"version": "1.9.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/requestretry/-/requestretry-1.9.1.tgz",
+ "integrity": "sha1-CioATq8hGWnEzCz+vz/p5XuSx04=",
"requires": {
"extend": "^3.0.0",
"fg-lodash": "0.0.2",
@@ -18714,40 +21975,48 @@
},
"require-directory": {
"version": "2.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
},
"require-main-filename": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
+ "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE="
},
"requirejs": {
"version": "2.3.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.5.tgz",
+ "integrity": "sha512-svnO+aNcR/an9Dpi44C7KSAy5fFGLtmPbaaCeQaklUz8BQhS64tWWIIlvEA5jrWICzlO/X9KSzSeXFnZdBu8nw=="
},
"requires-port": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
+ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8="
},
"resolve": {
"version": "1.1.7",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
+ "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs="
},
"resolve-cwd": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz",
+ "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=",
"requires": {
"resolve-from": "^3.0.0"
},
"dependencies": {
"resolve-from": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
+ "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g="
}
}
},
"resolve-dir": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz",
+ "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=",
"requires": {
"expand-tilde": "^2.0.0",
"global-modules": "^1.0.0"
@@ -18755,22 +22024,26 @@
},
"resolve-from": {
"version": "4.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="
},
"resolve-url": {
"version": "0.2.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
+ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo="
},
"response-time": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/response-time/-/response-time-2.0.0.tgz",
+ "integrity": "sha1-Zcs5/VDeL0/9vdKF8YVZZr1vyzY=",
"requires": {
"on-headers": "0.0.0"
}
},
"restore-cursor": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
+ "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=",
"requires": {
"onetime": "^2.0.0",
"signal-exit": "^3.0.2"
@@ -18778,15 +22051,18 @@
},
"ret": {
"version": "0.1.15",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
+ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg=="
},
"rfdc": {
"version": "1.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.1.2.tgz",
+ "integrity": "sha512-92ktAgvZhBzYTIK0Mja9uen5q5J3NRVMoDkJL2VMwq6SXjVCgqvQeVP2XAaUY6HT+XpQYeLSjb3UoitBryKmdA=="
},
"right-align": {
"version": "0.1.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
+ "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
"optional": true,
"requires": {
"align-text": "^0.1.1"
@@ -18794,14 +22070,16 @@
},
"rimraf": {
"version": "2.6.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
+ "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
"requires": {
"glob": "^7.0.5"
},
"dependencies": {
"glob": {
"version": "7.1.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
+ "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@@ -18813,7 +22091,8 @@
},
"minimatch": {
"version": "3.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"requires": {
"brace-expansion": "^1.1.7"
}
@@ -18822,55 +22101,65 @@
},
"ripemd160": {
"version": "0.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-0.2.0.tgz",
+ "integrity": "sha1-K/GYveFnys+lHAqSjoS2i74XH84="
},
"rndm": {
"version": "1.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/rndm/-/rndm-1.2.0.tgz",
+ "integrity": "sha1-8z/pz7Urv9UgqhgyO8ZdsRCht2w="
},
"run-async": {
"version": "2.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz",
+ "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=",
"requires": {
"is-promise": "^2.1.0"
}
},
"run-queue": {
"version": "1.0.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz",
+ "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=",
"requires": {
"aproba": "^1.1.1"
}
},
"rxjs": {
"version": "6.5.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.1.tgz",
+ "integrity": "sha512-y0j31WJc83wPu31vS1VlAFW5JGrnGC+j+TtGAa1fRQphy48+fDYiDmX8tjGloToEsMkxnouOg/1IzXGKkJnZMg==",
"requires": {
"tslib": "^1.9.0"
}
},
"safe-buffer": {
"version": "5.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
+ "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
},
"safe-json-parse": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/safe-json-parse/-/safe-json-parse-1.0.1.tgz",
+ "integrity": "sha1-PnZyPjjf3aE8mx0poeB//uSzC1c="
},
"safe-regex": {
"version": "1.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
+ "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
"requires": {
"ret": "~0.1.10"
}
},
"safer-buffer": {
"version": "2.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"sauce-tunnel": {
"version": "2.5.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/sauce-tunnel/-/sauce-tunnel-2.5.0.tgz",
+ "integrity": "sha1-DuTE/5tH4BPosHLL+sSVt/7Y6Os=",
"requires": {
"chalk": "^1.1.3",
"request": "^2.72.0",
@@ -18879,14 +22168,16 @@
},
"saucelabs": {
"version": "1.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/saucelabs/-/saucelabs-1.2.0.tgz",
+ "integrity": "sha1-XoBHazbaG0LRDzlwfprypTsD2Io=",
"requires": {
"https-proxy-agent": "^1.0.0"
}
},
"schema-utils": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz",
+ "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==",
"requires": {
"ajv": "^6.1.0",
"ajv-errors": "^1.0.0",
@@ -18895,33 +22186,39 @@
},
"scmp": {
"version": "0.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/scmp/-/scmp-0.0.3.tgz",
+ "integrity": "sha1-NkjfLXKUZB5/eGc//CloHZutkHM="
},
"script-loader": {
"version": "0.6.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/script-loader/-/script-loader-0.6.1.tgz",
+ "integrity": "sha1-GDxhA5Rar1E0tG8DADte4rrUTOs=",
"requires": {
"raw-loader": "~0.5.1"
}
},
"select-hose": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz",
+ "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo="
},
"selfsigned": {
"version": "1.10.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.4.tgz",
+ "integrity": "sha512-9AukTiDmHXGXWtWjembZ5NDmVvP2695EtpgbCsxCa68w3c88B+alqbmZ4O3hZ4VWGXeGWzEVdvqgAJD8DQPCDw==",
"requires": {
"node-forge": "0.7.5"
}
},
"semver": {
"version": "5.6.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
+ "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg=="
},
"send": {
"version": "0.16.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz",
+ "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==",
"requires": {
"debug": "2.6.9",
"depd": "~1.1.2",
@@ -18940,38 +22237,45 @@
"dependencies": {
"escape-html": {
"version": "1.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
},
"fresh": {
"version": "0.5.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
+ "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
},
"mime": {
"version": "1.4.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz",
+ "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ=="
}
}
},
"serialize-javascript": {
"version": "1.7.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.7.0.tgz",
+ "integrity": "sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA=="
},
"serve-favicon": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.0.1.tgz",
+ "integrity": "sha1-SCaXXZ8XPKOkFY6WmBYfdd7Hr+w=",
"requires": {
"fresh": "0.2.2"
},
"dependencies": {
"fresh": {
"version": "0.2.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.2.2.tgz",
+ "integrity": "sha1-lzHc9WeMf660T7kDxPct9VGH+nc="
}
}
},
"serve-index": {
"version": "1.9.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz",
+ "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=",
"requires": {
"accepts": "~1.3.4",
"batch": "0.6.1",
@@ -18984,7 +22288,8 @@
"dependencies": {
"accepts": {
"version": "1.3.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz",
+ "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=",
"requires": {
"mime-types": "~2.1.18",
"negotiator": "0.6.1"
@@ -18992,7 +22297,8 @@
"dependencies": {
"mime-types": {
"version": "2.1.21",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz",
+ "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==",
"requires": {
"mime-db": "~1.37.0"
}
@@ -19001,21 +22307,25 @@
},
"escape-html": {
"version": "1.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
},
"mime-db": {
"version": "1.37.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz",
+ "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg=="
},
"parseurl": {
"version": "1.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
+ "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M="
}
}
},
"serve-static": {
"version": "1.2.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.2.3.tgz",
+ "integrity": "sha1-k87Lw0Dweey4WJKB0dwxwmwM0Vg=",
"requires": {
"escape-html": "1.0.1",
"parseurl": "1.0.1",
@@ -19024,26 +22334,31 @@
"dependencies": {
"debug": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-1.0.2.tgz",
+ "integrity": "sha1-OElZHBDM5khHbDx8Li40FttZY8Q=",
"requires": {
"ms": "0.6.2"
}
},
"fresh": {
"version": "0.2.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.2.2.tgz",
+ "integrity": "sha1-lzHc9WeMf660T7kDxPct9VGH+nc="
},
"ms": {
"version": "0.6.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ms/-/ms-0.6.2.tgz",
+ "integrity": "sha1-2JwhJMb9wTU9Zai3e/GqxLGTcIw="
},
"range-parser": {
"version": "1.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.0.3.tgz",
+ "integrity": "sha1-aHKCNTXGkuLCoBA4Jq/YLC4P8XU="
},
"send": {
"version": "0.4.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/send/-/send-0.4.3.tgz",
+ "integrity": "sha1-lieyO3cH+/Y3ODHKxXkzMLWUtkA=",
"requires": {
"debug": "1.0.2",
"escape-html": "1.0.1",
@@ -19057,15 +22372,18 @@
},
"set-blocking": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
+ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
},
"set-immediate-shim": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz",
+ "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E="
},
"set-value": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz",
+ "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==",
"requires": {
"extend-shallow": "^2.0.1",
"is-extendable": "^0.1.1",
@@ -19075,7 +22393,8 @@
"dependencies": {
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
@@ -19084,42 +22403,51 @@
},
"setimmediate": {
"version": "1.0.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
+ "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU="
},
"setprototypeof": {
"version": "1.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz",
+ "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ="
},
"sha.js": {
"version": "2.2.6",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.2.6.tgz",
+ "integrity": "sha1-F93t3F9yL7ZlAWWIlUYZd4ZzFbo="
},
"shebang-command": {
"version": "1.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
+ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
"requires": {
"shebang-regex": "^1.0.0"
}
},
"shebang-regex": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
+ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
},
"shelljs": {
"version": "0.3.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz",
+ "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E="
},
"sigmund": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
+ "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA="
},
"signal-exit": {
"version": "3.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
+ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
},
"sinon": {
"version": "7.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/sinon/-/sinon-7.3.0.tgz",
+ "integrity": "sha512-0pYvgRv46fODzT/PByqb79MVNpyxsxf38WEiXTABOF8RfIMcIARfZ+1ORuxwAmHkreZ/jST3UDBdKCRhUy/e1A==",
"requires": {
"@sinonjs/commons": "^1.4.0",
"@sinonjs/formatio": "^3.2.1",
@@ -19132,15 +22460,18 @@
"dependencies": {
"diff": {
"version": "3.5.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
+ "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA=="
},
"has-flag": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"supports-color": {
"version": "5.5.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"requires": {
"has-flag": "^3.0.0"
}
@@ -19149,12 +22480,14 @@
},
"slash": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
+ "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=",
"dev": true
},
"slice-ansi": {
"version": "2.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz",
+ "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==",
"requires": {
"ansi-styles": "^3.2.0",
"astral-regex": "^1.0.0",
@@ -19163,7 +22496,8 @@
"dependencies": {
"ansi-styles": {
"version": "3.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"requires": {
"color-convert": "^1.9.0"
}
@@ -19172,18 +22506,21 @@
},
"slice-stream": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/slice-stream/-/slice-stream-1.0.0.tgz",
+ "integrity": "sha1-WzO9ZvATsaf4ZGCwPUY97DmtPqA=",
"requires": {
"readable-stream": "~1.0.31"
},
"dependencies": {
"isarray": {
"version": "0.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.0.34",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+ "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
@@ -19193,13 +22530,15 @@
},
"string_decoder": {
"version": "0.10.31",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
},
"snapdragon": {
"version": "0.8.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
+ "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
"requires": {
"base": "^0.11.1",
"debug": "^2.2.0",
@@ -19213,14 +22552,16 @@
"dependencies": {
"define-property": {
"version": "0.2.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
"requires": {
"is-descriptor": "^0.1.0"
}
},
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
@@ -19229,7 +22570,8 @@
},
"snapdragon-node": {
"version": "2.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
+ "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
"requires": {
"define-property": "^1.0.0",
"isobject": "^3.0.0",
@@ -19238,28 +22580,32 @@
"dependencies": {
"define-property": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
"requires": {
"is-descriptor": "^1.0.0"
}
},
"is-accessor-descriptor": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
"requires": {
"kind-of": "^6.0.0"
}
},
"is-data-descriptor": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
"requires": {
"kind-of": "^6.0.0"
}
},
"is-descriptor": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
"requires": {
"is-accessor-descriptor": "^1.0.0",
"is-data-descriptor": "^1.0.0",
@@ -19268,24 +22614,28 @@
},
"isobject": {
"version": "3.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
},
"kind-of": {
"version": "6.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
}
}
},
"snapdragon-util": {
"version": "3.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
+ "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
"requires": {
"kind-of": "^3.2.0"
}
},
"sntp": {
"version": "0.2.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz",
+ "integrity": "sha1-+4hfGLDzqtGJ+CSGJTa87ux1CQA=",
"optional": true,
"requires": {
"hoek": "0.9.x"
@@ -19293,7 +22643,8 @@
},
"socket.io": {
"version": "2.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.1.1.tgz",
+ "integrity": "sha512-rORqq9c+7W0DAK3cleWNSyfv/qKXV99hV4tZe+gGLfBECw3XEhBy7x85F3wypA9688LKjtwO9pX9L33/xQI8yA==",
"requires": {
"debug": "~3.1.0",
"engine.io": "~3.2.0",
@@ -19305,7 +22656,8 @@
"dependencies": {
"debug": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
@@ -19314,11 +22666,13 @@
},
"socket.io-adapter": {
"version": "1.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz",
+ "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs="
},
"socket.io-client": {
"version": "2.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.1.1.tgz",
+ "integrity": "sha512-jxnFyhAuFxYfjqIgduQlhzqTcOEQSn+OHKVfAxWaNWa7ecP7xSNk2Dx/3UEsDcY7NcFafxvNvKPmmO7HTwTxGQ==",
"requires": {
"backo2": "1.0.2",
"base64-arraybuffer": "0.1.5",
@@ -19338,7 +22692,8 @@
"dependencies": {
"debug": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
@@ -19347,7 +22702,8 @@
},
"socket.io-parser": {
"version": "3.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.2.0.tgz",
+ "integrity": "sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA==",
"requires": {
"component-emitter": "1.2.1",
"debug": "~3.1.0",
@@ -19356,20 +22712,23 @@
"dependencies": {
"debug": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
+ "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"isarray": {
"version": "2.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
+ "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4="
}
}
},
"sockjs": {
"version": "0.3.19",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz",
+ "integrity": "sha512-V48klKZl8T6MzatbLlzzRNhMepEys9Y4oGFpypBFFn1gLI/QQ9HtLLyWJNbPlwGLelOVOEijUbTTJeLLI59jLw==",
"requires": {
"faye-websocket": "^0.10.0",
"uuid": "^3.0.1"
@@ -19377,50 +22736,55 @@
},
"sockjs-client": {
"version": "1.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.3.0.tgz",
+ "integrity": "sha512-R9jxEzhnnrdxLCNln0xg5uGHqMnkhPSTzUZH2eXcR03S/On9Yvoq2wyUZILRUhZCNVu2PmwWVoyuiPz8th8zbg==",
"requires": {
"debug": "^3.2.5",
"eventsource": "^1.0.7",
"faye-websocket": "~0.11.1",
"inherits": "^2.0.3",
- "json3": "^3.3.2",
- "url-parse": "^1.4.3"
+ "json3": "^3.3.2"
},
"dependencies": {
"debug": {
"version": "3.2.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
+ "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
}
},
"faye-websocket": {
"version": "0.11.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.1.tgz",
+ "integrity": "sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg=",
"requires": {
"websocket-driver": ">=0.5.1"
}
},
"ms": {
"version": "2.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}
}
},
"source-list-map": {
"version": "2.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz",
+ "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw=="
},
"source-map": {
"version": "0.5.7",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
},
"source-map-resolve": {
"version": "0.5.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz",
+ "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==",
"requires": {
"atob": "^2.1.1",
- "decode-uri-component": "^0.2.0",
"resolve-url": "^0.2.1",
"source-map-url": "^0.4.0",
"urix": "^0.1.0"
@@ -19428,7 +22792,8 @@
},
"source-map-support": {
"version": "0.4.18",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz",
+ "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==",
"dev": true,
"requires": {
"source-map": "^0.5.6"
@@ -19436,26 +22801,31 @@
},
"source-map-url": {
"version": "0.4.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
+ "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM="
},
"spdx-correct": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz",
+ "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=",
"requires": {
"spdx-license-ids": "^1.0.2"
}
},
"spdx-expression-parse": {
"version": "1.0.4",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz",
+ "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw="
},
"spdx-license-ids": {
"version": "1.2.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz",
+ "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc="
},
"spdy": {
"version": "3.4.7",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz",
+ "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=",
"requires": {
"debug": "^2.6.8",
"handle-thing": "^1.2.5",
@@ -19467,7 +22837,8 @@
},
"spdy-transport": {
"version": "2.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.1.1.tgz",
+ "integrity": "sha512-q7D8c148escoB3Z7ySCASadkegMmUZW8Wb/Q1u0/XBgDKMO880rLQDj8Twiew/tYi7ghemKUi/whSYOwE17f5Q==",
"requires": {
"debug": "^2.6.8",
"detect-node": "^2.0.3",
@@ -19480,25 +22851,29 @@
},
"split": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz",
+ "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==",
"requires": {
"through": "2"
}
},
"split-string": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
+ "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
"requires": {
"extend-shallow": "^3.0.0"
}
},
"sprintf-js": {
"version": "1.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
},
"sshpk": {
"version": "1.15.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.2.tgz",
+ "integrity": "sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA==",
"requires": {
"asn1": "~0.2.3",
"assert-plus": "^1.0.0",
@@ -19513,18 +22888,21 @@
},
"ssri": {
"version": "6.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz",
+ "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==",
"requires": {
"figgy-pudding": "^3.5.1"
}
},
"stackframe": {
"version": "0.2.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-0.2.2.tgz",
+ "integrity": "sha1-R3s9BnsspRwocDmtBUGS/lSS+V4="
},
"static-extend": {
"version": "0.1.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
+ "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
"requires": {
"define-property": "^0.2.5",
"object-copy": "^0.1.0"
@@ -19532,7 +22910,8 @@
"dependencies": {
"define-property": {
"version": "0.2.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
"requires": {
"is-descriptor": "^0.1.0"
}
@@ -19541,11 +22920,13 @@
},
"statuses": {
"version": "1.4.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
+ "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew=="
},
"stream-browserify": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-1.0.0.tgz",
+ "integrity": "sha1-v5tKv7QrJ011FHnkTg/yZWtvEZM=",
"requires": {
"inherits": "~2.0.1",
"readable-stream": "^1.0.27-1"
@@ -19553,11 +22934,13 @@
"dependencies": {
"isarray": {
"version": "0.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.1.14",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
+ "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
@@ -19567,24 +22950,28 @@
},
"string_decoder": {
"version": "0.10.31",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
},
"stream-counter": {
"version": "0.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/stream-counter/-/stream-counter-0.2.0.tgz",
+ "integrity": "sha1-3tJmVWMZyLDiIoErnPOyb6fZR94=",
"requires": {
"readable-stream": "~1.1.8"
},
"dependencies": {
"isarray": {
"version": "0.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.1.14",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
+ "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
@@ -19594,13 +22981,15 @@
},
"string_decoder": {
"version": "0.10.31",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
},
"stream-each": {
"version": "1.2.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz",
+ "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==",
"requires": {
"end-of-stream": "^1.1.0",
"stream-shift": "^1.0.0"
@@ -19608,7 +22997,8 @@
},
"stream-http": {
"version": "2.8.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz",
+ "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==",
"requires": {
"builtin-status-codes": "^3.0.0",
"inherits": "^2.0.1",
@@ -19619,11 +23009,13 @@
"dependencies": {
"process-nextick-args": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
+ "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
},
"readable-stream": {
"version": "2.3.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
@@ -19636,7 +23028,8 @@
},
"string_decoder": {
"version": "1.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
}
@@ -19645,11 +23038,13 @@
},
"stream-shift": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz",
+ "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI="
},
"streamroller": {
"version": "0.7.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-0.7.0.tgz",
+ "integrity": "sha512-WREzfy0r0zUqp3lGO096wRuUp7ho1X6uo/7DJfTlEi0Iv/4gT7YHqXDjKC2ioVGBZtE8QzsQD9nx1nIuoZ57jQ==",
"requires": {
"date-format": "^1.2.0",
"debug": "^3.1.0",
@@ -19659,28 +23054,33 @@
"dependencies": {
"debug": {
"version": "3.2.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
+ "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
}
},
"ms": {
"version": "2.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}
}
},
"strict-loader": {
"version": "0.1.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/strict-loader/-/strict-loader-0.1.3.tgz",
+ "integrity": "sha1-xu61UoDfzsR2a4ANx0Ks/2dzH+U="
},
"string-template": {
"version": "0.2.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz",
+ "integrity": "sha1-QpMuWYo1LQH8IuwzZ9nYTuxsmt0="
},
"string-width": {
"version": "2.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
+ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
"requires": {
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^4.0.0"
@@ -19688,11 +23088,13 @@
"dependencies": {
"ansi-regex": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
},
"strip-ansi": {
"version": "4.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
"requires": {
"ansi-regex": "^3.0.0"
}
@@ -19701,65 +23103,75 @@
},
"string_decoder": {
"version": "1.0.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
+ "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"requires": {
"safe-buffer": "~5.1.0"
}
},
"stringstream": {
"version": "0.0.6",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz",
+ "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA=="
},
"strip-ansi": {
"version": "3.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": {
"ansi-regex": "^2.0.0"
}
},
"strip-bom": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
+ "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
"requires": {
"is-utf8": "^0.2.0"
}
},
"strip-eof": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
+ "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
},
"strip-indent": {
"version": "1.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
+ "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=",
"requires": {
"get-stdin": "^4.0.1"
}
},
"strip-json-comments": {
"version": "2.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
+ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo="
},
"sugar": {
"version": "1.5.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/sugar/-/sugar-1.5.0.tgz",
+ "integrity": "sha1-2dP7oQ96iH4G5q37B4onrLH8BVY="
},
"supports-color": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
},
"table": {
"version": "5.2.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/table/-/table-5.2.3.tgz",
+ "integrity": "sha512-N2RsDAMvDLvYwFcwbPyF3VmVSSkuF+G1e+8inhBLtHpvwXGw4QRPEZhihQNeEN0i1up6/f6ObCJXNdlRG3YVyQ==",
"requires": {
"ajv": "^6.9.1",
- "lodash": "^4.17.11",
"slice-ansi": "^2.1.0",
"string-width": "^3.0.0"
},
"dependencies": {
"ajv": {
"version": "6.10.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz",
+ "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==",
"requires": {
"fast-deep-equal": "^2.0.1",
"fast-json-stable-stringify": "^2.0.0",
@@ -19769,15 +23181,13 @@
},
"ansi-regex": {
"version": "4.1.0",
- "resolved": false
- },
- "lodash": {
- "version": "4.17.11",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
},
"string-width": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"requires": {
"emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0",
@@ -19786,7 +23196,8 @@
},
"strip-ansi": {
"version": "5.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"requires": {
"ansi-regex": "^4.1.0"
}
@@ -19795,31 +23206,36 @@
},
"tapable": {
"version": "1.1.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz",
+ "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA=="
},
"temp": {
"version": "0.7.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/temp/-/temp-0.7.0.tgz",
+ "integrity": "sha1-00vcjn+VXaKmpHP+oHrWAdaLp48=",
"requires": {
"rimraf": "~2.2.6"
},
"dependencies": {
"rimraf": {
"version": "2.2.8",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz",
+ "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI="
}
}
},
"temporary": {
"version": "0.0.8",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/temporary/-/temporary-0.0.8.tgz",
+ "integrity": "sha1-oYqYHSi6jKNgJ/s8MFOMPst0CsA=",
"requires": {
"package": ">= 1.0.0 < 1.2.0"
}
},
"terser": {
"version": "3.17.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/terser/-/terser-3.17.0.tgz",
+ "integrity": "sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ==",
"requires": {
"commander": "^2.19.0",
"source-map": "~0.6.1",
@@ -19828,15 +23244,18 @@
"dependencies": {
"commander": {
"version": "2.20.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
+ "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ=="
},
"source-map": {
"version": "0.6.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
},
"source-map-support": {
"version": "0.5.12",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz",
+ "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==",
"requires": {
"buffer-from": "^1.0.0",
"source-map": "^0.6.0"
@@ -19846,7 +23265,8 @@
},
"terser-webpack-plugin": {
"version": "1.2.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.2.3.tgz",
+ "integrity": "sha512-GOK7q85oAb/5kE12fMuLdn2btOS9OBZn4VsecpHDywoUC/jLhSAKOiYo0ezx7ss2EXPMzyEWFoE0s1WLE+4+oA==",
"requires": {
"cacache": "^11.0.2",
"find-cache-dir": "^2.0.0",
@@ -19860,7 +23280,8 @@
"dependencies": {
"find-cache-dir": {
"version": "2.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz",
+ "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==",
"requires": {
"commondir": "^1.0.1",
"make-dir": "^2.0.0",
@@ -19869,14 +23290,16 @@
},
"find-up": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
+ "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
"requires": {
"locate-path": "^3.0.0"
}
},
"locate-path": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
+ "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
"requires": {
"p-locate": "^3.0.0",
"path-exists": "^3.0.0"
@@ -19884,7 +23307,8 @@
},
"make-dir": {
"version": "2.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
+ "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
"requires": {
"pify": "^4.0.1",
"semver": "^5.6.0"
@@ -19892,54 +23316,64 @@
},
"p-limit": {
"version": "2.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz",
+ "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==",
"requires": {
"p-try": "^2.0.0"
}
},
"p-locate": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
+ "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
"requires": {
"p-limit": "^2.0.0"
}
},
"p-try": {
"version": "2.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
},
"pify": {
"version": "4.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
+ "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g=="
},
"pkg-dir": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz",
+ "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==",
"requires": {
"find-up": "^3.0.0"
}
},
"source-map": {
"version": "0.6.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
}
}
},
"text-table": {
"version": "0.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
+ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ="
},
"throttleit": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz",
+ "integrity": "sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw="
},
"through": {
"version": "2.3.8",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
+ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU="
},
"through2": {
"version": "2.0.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
+ "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
"requires": {
"readable-stream": "~2.3.6",
"xtend": "~4.0.1"
@@ -19947,11 +23381,13 @@
"dependencies": {
"process-nextick-args": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
+ "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
},
"readable-stream": {
"version": "2.3.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
+ "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
@@ -19964,7 +23400,8 @@
},
"string_decoder": {
"version": "1.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
}
@@ -19973,11 +23410,13 @@
},
"thunky": {
"version": "1.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.3.tgz",
+ "integrity": "sha512-YwT8pjmNcAXBZqrubu22P4FYsh2D4dxRmnWBOL8Jk8bUcRUtc5326kx32tuTmFDAZtLOGEVNl8POAR8j896Iow=="
},
"time-grunt": {
"version": "1.4.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/time-grunt/-/time-grunt-1.4.0.tgz",
+ "integrity": "sha1-BiIT5mDJB+hvRAVWwB6mWXtxJCA=",
"requires": {
"chalk": "^1.0.0",
"date-time": "^1.1.0",
@@ -19990,18 +23429,21 @@
},
"time-zone": {
"version": "0.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-0.1.0.tgz",
+ "integrity": "sha1-Sncotqwo2w4Aj1FAQ/1VW9VXO0Y="
},
"timers-browserify": {
"version": "1.4.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz",
+ "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=",
"requires": {
"process": "~0.11.0"
}
},
"tiny-lr": {
"version": "1.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/tiny-lr/-/tiny-lr-1.1.1.tgz",
+ "integrity": "sha512-44yhA3tsaRoMOjQQ+5v5mVdqef+kH6Qze9jTpqtVufgYjYt08zyZAwNwwVBj3i1rJMnR52IxOW0LK0vBzgAkuA==",
"requires": {
"body": "^5.1.0",
"debug": "^3.1.0",
@@ -20013,20 +23455,23 @@
"dependencies": {
"debug": {
"version": "3.2.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
+ "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
}
},
"ms": {
"version": "2.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}
}
},
"tiny-lr-fork": {
"version": "0.0.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/tiny-lr-fork/-/tiny-lr-fork-0.0.5.tgz",
+ "integrity": "sha1-Hpnh4qhGm3NquX2X7vqYxx927Qo=",
"requires": {
"debug": "~0.7.0",
"faye-websocket": "~0.4.3",
@@ -20036,51 +23481,61 @@
"dependencies": {
"debug": {
"version": "0.7.4",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/debug/-/debug-0.7.4.tgz",
+ "integrity": "sha1-BuHqgILCyxTjmAbiLi9vdX+Srzk="
},
"faye-websocket": {
"version": "0.4.4",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.4.4.tgz",
+ "integrity": "sha1-wUxbO/FNdBf/v9mQwKdJXNnzN7w="
},
"qs": {
"version": "0.5.6",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/qs/-/qs-0.5.6.tgz",
+ "integrity": "sha1-MbGtBYVnZRxSaSFQa5qHk5EaA4Q="
}
}
},
"tmp": {
"version": "0.0.33",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
+ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
"requires": {
"os-tmpdir": "~1.0.2"
}
},
"to-array": {
"version": "0.1.4",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz",
+ "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA="
},
"to-arraybuffer": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
+ "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M="
},
"to-fast-properties": {
"version": "1.0.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
+ "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc="
},
"to-iso-string": {
"version": "0.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/to-iso-string/-/to-iso-string-0.0.2.tgz",
+ "integrity": "sha1-TcGeZk38y+Jb2NtQiwDG2hWCVdE="
},
"to-object-path": {
"version": "0.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
+ "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=",
"requires": {
"kind-of": "^3.0.2"
}
},
"to-regex": {
"version": "3.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
+ "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
"requires": {
"define-property": "^2.0.2",
"extend-shallow": "^3.0.2",
@@ -20090,7 +23545,8 @@
},
"to-regex-range": {
"version": "2.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
+ "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
"requires": {
"is-number": "^3.0.0",
"repeat-string": "^1.6.1"
@@ -20098,7 +23554,8 @@
"dependencies": {
"is-number": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
"requires": {
"kind-of": "^3.0.2"
}
@@ -20107,65 +23564,78 @@
},
"touch": {
"version": "0.0.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/touch/-/touch-0.0.3.tgz",
+ "integrity": "sha1-Ua7z1ElXHU8oel2Hyci0kYGg2x0=",
"requires": {
"nopt": "~1.0.10"
}
},
"tough-cookie": {
"version": "2.3.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz",
+ "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=",
"requires": {
"punycode": "^1.4.1"
}
},
"traverse": {
"version": "0.3.9",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz",
+ "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk="
},
"traverse-chain": {
"version": "0.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/traverse-chain/-/traverse-chain-0.1.0.tgz",
+ "integrity": "sha1-YdvC1Ttp/2CRoSoWj9fUMxB+QPE=",
"optional": true
},
"trim-newlines": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz",
+ "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM="
},
"trim-right": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
+ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM="
},
"tslib": {
"version": "1.9.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
+ "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
},
"tty-browserify": {
"version": "0.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
+ "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY="
},
"tunnel-agent": {
"version": "0.4.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz",
+ "integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us="
},
"tweetnacl": {
"version": "0.14.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
+ "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
},
"type-check": {
"version": "0.3.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
+ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
"requires": {
"prelude-ls": "~1.1.2"
}
},
"type-detect": {
"version": "0.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-0.1.1.tgz",
+ "integrity": "sha1-C6XsKohWQORw6k6FBZcZANrFiCI="
},
"type-is": {
"version": "1.6.16",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz",
+ "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==",
"requires": {
"media-typer": "0.3.0",
"mime-types": "~2.1.18"
@@ -20173,11 +23643,13 @@
"dependencies": {
"mime-db": {
"version": "1.38.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz",
+ "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg=="
},
"mime-types": {
"version": "2.1.22",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz",
+ "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==",
"requires": {
"mime-db": "~1.38.0"
}
@@ -20186,11 +23658,13 @@
},
"typedarray": {
"version": "0.0.6",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
+ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
},
"uglify-js": {
"version": "2.8.29",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
+ "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
"optional": true,
"requires": {
"source-map": "~0.5.1",
@@ -20200,12 +23674,14 @@
"dependencies": {
"window-size": {
"version": "0.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
+ "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=",
"optional": true
},
"yargs": {
"version": "3.10.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
+ "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
"optional": true,
"requires": {
"camelcase": "^1.0.2",
@@ -20218,12 +23694,14 @@
},
"uglify-to-browserify": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz",
+ "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=",
"optional": true
},
"uglifyjs-webpack-plugin": {
"version": "2.1.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-2.1.2.tgz",
+ "integrity": "sha512-G1fJx2uOAAfvdZ77SVCzmFo6mv8uKaHoZBL9Qq/ciC8r6p0ANOL1uY85fIUiyWXKw5RzAaJYZfNSL58Or2hQ0A==",
"requires": {
"cacache": "^11.2.0",
"find-cache-dir": "^2.0.0",
@@ -20237,11 +23715,13 @@
"dependencies": {
"commander": {
"version": "2.20.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
+ "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ=="
},
"find-cache-dir": {
"version": "2.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz",
+ "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==",
"requires": {
"commondir": "^1.0.1",
"make-dir": "^2.0.0",
@@ -20250,14 +23730,16 @@
},
"find-up": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
+ "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
"requires": {
"locate-path": "^3.0.0"
}
},
"locate-path": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
+ "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
"requires": {
"p-locate": "^3.0.0",
"path-exists": "^3.0.0"
@@ -20265,7 +23747,8 @@
},
"make-dir": {
"version": "2.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
+ "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
"requires": {
"pify": "^4.0.1",
"semver": "^5.6.0"
@@ -20273,40 +23756,47 @@
},
"p-limit": {
"version": "2.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz",
+ "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==",
"requires": {
"p-try": "^2.0.0"
}
},
"p-locate": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
+ "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
"requires": {
"p-limit": "^2.0.0"
}
},
"p-try": {
"version": "2.2.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
},
"pify": {
"version": "4.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
+ "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g=="
},
"pkg-dir": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz",
+ "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==",
"requires": {
"find-up": "^3.0.0"
}
},
"source-map": {
"version": "0.6.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
},
"uglify-js": {
"version": "3.5.8",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.5.8.tgz",
+ "integrity": "sha512-GFSjB1nZIzoIq70qvDRtWRORHX3vFkAnyK/rDExc0BN7r9+/S+Voz3t/fwJuVfjppAMz+ceR2poE7tkhvnVwQQ==",
"requires": {
"commander": "~2.20.0",
"source-map": "~0.6.1"
@@ -20316,7 +23806,8 @@
},
"uid-safe": {
"version": "1.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-1.1.0.tgz",
+ "integrity": "sha1-WNbF2r+N+9jVKDSDmAbAP9YUMjI=",
"requires": {
"base64-url": "1.2.1",
"native-or-bluebird": "~1.1.2"
@@ -20324,25 +23815,30 @@
"dependencies": {
"base64-url": {
"version": "1.2.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/base64-url/-/base64-url-1.2.1.tgz",
+ "integrity": "sha1-GZ/WYXAqDnt9yubgaYuwicUvbXg="
}
}
},
"ultron": {
"version": "1.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz",
+ "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og=="
},
"unc-path-regex": {
"version": "0.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
+ "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo="
},
"underscore": {
"version": "1.7.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz",
+ "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk="
},
"underscore.string": {
"version": "3.3.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.5.tgz",
+ "integrity": "sha512-g+dpmgn+XBneLmXXo+sGlW5xQEt4ErkS3mgeN2GFbremYeMBSJKr9Wf2KJplQVaiPY/f7FN6atosWYNm9ovrYg==",
"requires": {
"sprintf-js": "^1.0.3",
"util-deprecate": "^1.0.2"
@@ -20350,7 +23846,8 @@
},
"union-value": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz",
+ "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=",
"requires": {
"arr-union": "^3.1.0",
"get-value": "^2.0.6",
@@ -20360,14 +23857,16 @@
"dependencies": {
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
},
"set-value": {
"version": "0.4.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz",
+ "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=",
"requires": {
"extend-shallow": "^2.0.1",
"is-extendable": "^0.1.1",
@@ -20379,29 +23878,34 @@
},
"unique-filename": {
"version": "1.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz",
+ "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==",
"requires": {
"unique-slug": "^2.0.0"
}
},
"unique-slug": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.1.tgz",
+ "integrity": "sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==",
"requires": {
"imurmurhash": "^0.1.4"
}
},
"universalify": {
"version": "0.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
+ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="
},
"unpipe": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
},
"unset-value": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
+ "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=",
"requires": {
"has-value": "^0.3.1",
"isobject": "^3.0.0"
@@ -20409,7 +23913,8 @@
"dependencies": {
"has-value": {
"version": "0.3.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz",
+ "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=",
"requires": {
"get-value": "^2.0.3",
"has-values": "^0.1.4",
@@ -20418,7 +23923,8 @@
"dependencies": {
"isobject": {
"version": "2.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
+ "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
"requires": {
"isarray": "1.0.0"
}
@@ -20427,17 +23933,20 @@
},
"has-values": {
"version": "0.1.4",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
+ "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E="
},
"isobject": {
"version": "3.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
}
}
},
"unzip": {
"version": "0.1.11",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/unzip/-/unzip-0.1.11.tgz",
+ "integrity": "sha1-iXScY7BY19kNYZ+GuYqhU107l/A=",
"requires": {
"binary": ">= 0.3.0 < 1",
"fstream": ">= 0.1.30 < 1",
@@ -20449,11 +23958,13 @@
"dependencies": {
"isarray": {
"version": "0.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+ "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.0.34",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+ "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
@@ -20463,38 +23974,45 @@
},
"string_decoder": {
"version": "0.10.31",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+ "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
},
"upath": {
"version": "1.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz",
+ "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw=="
},
"uri-js": {
"version": "4.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
+ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
"requires": {
"punycode": "^2.1.0"
},
"dependencies": {
"punycode": {
"version": "2.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
+ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
}
}
},
"uri-path": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/uri-path/-/uri-path-1.0.0.tgz",
+ "integrity": "sha1-l0fwGDWJM8Md4PzP2C0TjmcmLjI="
},
"urix": {
"version": "0.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
+ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI="
},
"url": {
"version": "0.10.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz",
+ "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=",
"requires": {
"punycode": "1.3.2",
"querystring": "0.2.0"
@@ -20502,29 +24020,25 @@
"dependencies": {
"punycode": {
"version": "1.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
+ "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0="
}
}
},
"url-join": {
"version": "2.0.5",
- "resolved": false
- },
- "url-parse": {
- "version": "1.4.4",
- "resolved": false,
- "requires": {
- "querystringify": "^2.0.0",
- "requires-port": "^1.0.0"
- }
+ "resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.5.tgz",
+ "integrity": "sha1-WvIvGMBSoACkjXuCxenC4v7tpyg="
},
"use": {
"version": "3.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
+ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ=="
},
"useragent": {
"version": "2.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.3.0.tgz",
+ "integrity": "sha512-4AoH4pxuSvHCjqLO04sU6U/uE65BYza8l/KKBS0b0hnUPWi+cQ2BpeTEwejCSx9SPV5/U03nniDTrWx5NrmKdw==",
"requires": {
"lru-cache": "4.1.x",
"tmp": "0.0.x"
@@ -20532,7 +24046,8 @@
"dependencies": {
"lru-cache": {
"version": "4.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz",
+ "integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==",
"requires": {
"pseudomap": "^1.0.2",
"yallist": "^2.1.2"
@@ -20542,24 +24057,28 @@
},
"util": {
"version": "0.10.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
+ "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
"requires": {
"inherits": "2.0.1"
},
"dependencies": {
"inherits": {
"version": "2.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
+ "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE="
}
}
},
"util-deprecate": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"util.promisify": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz",
+ "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==",
"requires": {
"define-properties": "^1.1.2",
"object.getownpropertydescriptors": "^2.0.3"
@@ -20567,22 +24086,26 @@
},
"utils-merge": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz",
+ "integrity": "sha1-ApT7kiu5N1FTVBxPcJYjHyh8ivg="
},
"uuid": {
"version": "3.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz",
+ "integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE="
},
"v8flags": {
"version": "3.1.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.1.tgz",
+ "integrity": "sha512-iw/1ViSEaff8NJ3HLyEjawk/8hjJib3E7pvG4pddVXfUg1983s3VGsiClDjhK64MQVDGqc1Q8r18S4VKQZS9EQ==",
"requires": {
"homedir-polyfill": "^1.0.1"
}
},
"validate-npm-package-license": {
"version": "3.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz",
+ "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=",
"requires": {
"spdx-correct": "~1.0.0",
"spdx-expression-parse": "~1.0.0"
@@ -20590,11 +24113,13 @@
},
"vary": {
"version": "0.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/vary/-/vary-0.1.0.tgz",
+ "integrity": "sha1-3wlFiZ6TwMxb0YzIMh2dIedPYXY="
},
"verror": {
"version": "1.10.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
+ "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
"requires": {
"assert-plus": "^1.0.0",
"core-util-is": "1.0.2",
@@ -20603,18 +24128,21 @@
},
"vm-browserify": {
"version": "0.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
+ "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=",
"requires": {
"indexof": "0.0.1"
}
},
"void-elements": {
"version": "2.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz",
+ "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w="
},
"vows": {
"version": "0.7.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/vows/-/vows-0.7.0.tgz",
+ "integrity": "sha1-3QBl8RC6DAptY+hEhRwyCBdtWGc=",
"requires": {
"diff": "~1.0.3",
"eyes": ">=0.1.6"
@@ -20622,7 +24150,8 @@
},
"watchpack": {
"version": "1.6.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz",
+ "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==",
"requires": {
"chokidar": "^2.0.2",
"graceful-fs": "^4.1.2",
@@ -20631,14 +24160,16 @@
},
"wbuf": {
"version": "1.7.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz",
+ "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==",
"requires": {
"minimalistic-assert": "^1.0.0"
}
},
"webpack": {
"version": "4.30.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.30.0.tgz",
+ "integrity": "sha512-4hgvO2YbAFUhyTdlR4FNyt2+YaYBYHavyzjCMbZzgglo02rlKi/pcsEzwCuCpsn1ryzIl1cq/u8ArIKu8JBYMg==",
"requires": {
"@webassemblyjs/ast": "1.8.5",
"@webassemblyjs/helper-module-context": "1.8.5",
@@ -20668,22 +24199,26 @@
"dependencies": {
"base64-js": {
"version": "1.3.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz",
+ "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw=="
},
"big.js": {
"version": "5.2.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
+ "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ=="
},
"browserify-zlib": {
"version": "0.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz",
+ "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==",
"requires": {
"pako": "~1.0.5"
}
},
"buffer": {
"version": "4.9.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz",
+ "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=",
"requires": {
"base64-js": "^1.0.2",
"ieee754": "^1.1.4",
@@ -20692,11 +24227,13 @@
},
"constants-browserify": {
"version": "1.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
+ "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U="
},
"crypto-browserify": {
"version": "3.12.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
+ "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==",
"requires": {
"browserify-cipher": "^1.0.0",
"browserify-sign": "^4.0.0",
@@ -20713,7 +24250,8 @@
},
"eslint-scope": {
"version": "4.0.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz",
+ "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==",
"requires": {
"esrecurse": "^4.1.0",
"estraverse": "^4.1.1"
@@ -20721,31 +24259,27 @@
},
"events": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz",
+ "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA=="
},
"https-browserify": {
"version": "1.0.0",
- "resolved": false
- },
- "json5": {
- "version": "1.0.1",
- "resolved": false,
- "requires": {
- "minimist": "^1.2.0"
- }
+ "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
+ "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM="
},
"loader-utils": {
"version": "1.2.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz",
+ "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==",
"requires": {
"big.js": "^5.2.2",
- "emojis-list": "^2.0.0",
- "json5": "^1.0.1"
+ "emojis-list": "^2.0.0"
}
},
"node-libs-browser": {
"version": "2.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.0.tgz",
+ "integrity": "sha512-5MQunG/oyOaBdttrL40dA7bUfPORLRWMUJLQtMg7nluxUvk5XwnLdL9twQHFAjRx/y7mIMkLKT9++qPbbk6BZA==",
"requires": {
"assert": "^1.1.1",
"browserify-zlib": "^0.2.0",
@@ -20774,15 +24308,18 @@
},
"os-browserify": {
"version": "0.3.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz",
+ "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc="
},
"pako": {
"version": "1.0.10",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz",
+ "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw=="
},
"stream-browserify": {
"version": "2.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz",
+ "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==",
"requires": {
"inherits": "~2.0.1",
"readable-stream": "^2.0.2"
@@ -20790,14 +24327,16 @@
},
"timers-browserify": {
"version": "2.0.10",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz",
+ "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==",
"requires": {
"setimmediate": "^1.0.4"
}
},
"url": {
"version": "0.11.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
+ "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=",
"requires": {
"punycode": "1.3.2",
"querystring": "0.2.0"
@@ -20805,13 +24344,15 @@
"dependencies": {
"punycode": {
"version": "1.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
+ "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0="
}
}
},
"util": {
"version": "0.11.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz",
+ "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==",
"requires": {
"inherits": "2.0.3"
}
@@ -20820,7 +24361,8 @@
},
"webpack-dev-middleware": {
"version": "2.0.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-2.0.6.tgz",
+ "integrity": "sha512-tj5LLD9r4tDuRIDa5Mu9lnY2qBBehAITv6A9irqXhw/HQquZgTx3BCd57zYbU2gMDnncA49ufK2qVQSbaKJwOw==",
"requires": {
"loud-rejection": "^1.6.0",
"memory-fs": "~0.4.1",
@@ -20833,13 +24375,15 @@
"dependencies": {
"mime": {
"version": "2.4.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz",
+ "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w=="
}
}
},
"webpack-dev-server": {
"version": "3.1.10",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.10.tgz",
+ "integrity": "sha512-RqOAVjfqZJtQcB0LmrzJ5y4Jp78lv9CK0MZ1YJDTaTmedMZ9PU9FLMQNrMCfVu8hHzaVLVOJKBlGEHMN10z+ww==",
"requires": {
"ansi-html": "0.0.7",
"bonjour": "^3.5.0",
@@ -20873,7 +24417,8 @@
"dependencies": {
"accepts": {
"version": "1.3.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz",
+ "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=",
"requires": {
"mime-types": "~2.1.18",
"negotiator": "0.6.1"
@@ -20881,7 +24426,8 @@
},
"anymatch": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
+ "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
"requires": {
"micromatch": "^3.1.4",
"normalize-path": "^2.1.1"
@@ -20889,15 +24435,18 @@
},
"arr-diff": {
"version": "4.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
+ "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA="
},
"array-unique": {
"version": "0.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
},
"braces": {
"version": "2.3.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
+ "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
"requires": {
"arr-flatten": "^1.1.0",
"array-unique": "^0.3.2",
@@ -20913,7 +24462,8 @@
"dependencies": {
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
@@ -20922,11 +24472,13 @@
},
"bytes": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
+ "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg="
},
"chokidar": {
"version": "2.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz",
+ "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==",
"requires": {
"anymatch": "^2.0.0",
"async-each": "^1.0.0",
@@ -20944,14 +24496,16 @@
},
"compressible": {
"version": "2.0.15",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.15.tgz",
+ "integrity": "sha512-4aE67DL33dSW9gw4CI2H/yTxqHLNcxp0yS6jB+4h+wr3e43+1z7vm0HU9qXOH8j+qjKuL8+UtkOxYQSMq60Ylw==",
"requires": {
"mime-db": ">= 1.36.0 < 2"
}
},
"compression": {
"version": "1.7.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.3.tgz",
+ "integrity": "sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg==",
"requires": {
"accepts": "~1.3.5",
"bytes": "3.0.0",
@@ -20964,7 +24518,8 @@
"dependencies": {
"debug": {
"version": "2.6.9",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
@@ -20973,20 +24528,23 @@
},
"debug": {
"version": "3.2.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
+ "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
},
"dependencies": {
"ms": {
"version": "2.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+ "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}
}
},
"expand-brackets": {
"version": "2.1.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
+ "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
"requires": {
"debug": "^2.3.3",
"define-property": "^0.2.5",
@@ -20999,35 +24557,40 @@
"dependencies": {
"debug": {
"version": "2.6.9",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
},
"define-property": {
"version": "0.2.5",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+ "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
"requires": {
"is-descriptor": "^0.1.0"
}
},
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
},
"is-accessor-descriptor": {
"version": "0.1.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+ "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
"requires": {
"kind-of": "^3.0.2"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "^1.1.5"
}
@@ -21036,14 +24599,16 @@
},
"is-data-descriptor": {
"version": "0.1.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+ "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
"requires": {
"kind-of": "^3.0.2"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "^1.1.5"
}
@@ -21052,7 +24617,8 @@
},
"is-descriptor": {
"version": "0.1.6",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+ "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
"requires": {
"is-accessor-descriptor": "^0.1.6",
"is-data-descriptor": "^0.1.4",
@@ -21061,13 +24627,15 @@
},
"kind-of": {
"version": "5.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+ "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw=="
}
}
},
"extglob": {
"version": "2.0.4",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
+ "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
"requires": {
"array-unique": "^0.3.2",
"define-property": "^1.0.0",
@@ -21081,14 +24649,16 @@
"dependencies": {
"define-property": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+ "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
"requires": {
"is-descriptor": "^1.0.0"
}
},
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
@@ -21097,7 +24667,8 @@
},
"fill-range": {
"version": "4.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+ "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
"requires": {
"extend-shallow": "^2.0.1",
"is-number": "^3.0.0",
@@ -21107,7 +24678,8 @@
"dependencies": {
"extend-shallow": {
"version": "2.0.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+ "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
@@ -21116,7 +24688,8 @@
},
"glob-parent": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
+ "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
"requires": {
"is-glob": "^3.1.0",
"path-dirname": "^1.0.0"
@@ -21124,7 +24697,8 @@
"dependencies": {
"is-glob": {
"version": "3.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+ "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
"requires": {
"is-extglob": "^2.1.0"
}
@@ -21133,25 +24707,29 @@
},
"has-flag": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"is-accessor-descriptor": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+ "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
"requires": {
"kind-of": "^6.0.0"
}
},
"is-data-descriptor": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+ "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
"requires": {
"kind-of": "^6.0.0"
}
},
"is-descriptor": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+ "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
"requires": {
"is-accessor-descriptor": "^1.0.0",
"is-data-descriptor": "^1.0.0",
@@ -21160,25 +24738,29 @@
},
"is-extglob": {
"version": "2.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI="
},
"is-glob": {
"version": "4.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz",
+ "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=",
"requires": {
"is-extglob": "^2.1.1"
}
},
"is-number": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+ "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
"requires": {
"kind-of": "^3.0.2"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+ "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "^1.1.5"
}
@@ -21187,15 +24769,18 @@
},
"isobject": {
"version": "3.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
},
"kind-of": {
"version": "6.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
},
"micromatch": {
"version": "3.1.10",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
+ "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
"requires": {
"arr-diff": "^4.0.0",
"array-unique": "^0.3.2",
@@ -21214,45 +24799,54 @@
},
"mime": {
"version": "2.4.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz",
+ "integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w=="
},
"mime-db": {
"version": "1.37.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz",
+ "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg=="
},
"mime-types": {
"version": "2.1.21",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz",
+ "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==",
"requires": {
"mime-db": "~1.37.0"
}
},
"on-headers": {
"version": "1.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz",
+ "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c="
},
"safe-buffer": {
"version": "5.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"supports-color": {
"version": "5.5.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"requires": {
"has-flag": "^3.0.0"
}
},
"uuid": {
"version": "3.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
+ "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
},
"vary": {
"version": "1.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
},
"webpack-dev-middleware": {
"version": "3.4.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.4.0.tgz",
+ "integrity": "sha512-Q9Iyc0X9dP9bAsYskAVJ/hmIZZQwf/3Sy4xCAZgL5cUkjZmUZLt4l5HpbST/Pdgjn3u6pE7u5OdGd1apgzRujA==",
"requires": {
"memory-fs": "~0.4.1",
"mime": "^2.3.1",
@@ -21262,7 +24856,8 @@
},
"webpack-log": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz",
+ "integrity": "sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==",
"requires": {
"ansi-colors": "^3.0.0",
"uuid": "^3.3.2"
@@ -21272,7 +24867,8 @@
},
"webpack-log": {
"version": "1.2.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-1.2.0.tgz",
+ "integrity": "sha512-U9AnICnu50HXtiqiDxuli5gLB5PGBo7VvcHx36jRZHwK4vzOYLbImqT4lwWwoMHdQWwEKw736fCHEekokTEKHA==",
"requires": {
"chalk": "^2.1.0",
"log-symbols": "^2.1.0",
@@ -21282,14 +24878,16 @@
"dependencies": {
"ansi-styles": {
"version": "3.2.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"requires": {
"color-convert": "^1.9.0"
}
},
"chalk": {
"version": "2.4.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
+ "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
@@ -21298,24 +24896,28 @@
},
"has-flag": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"supports-color": {
"version": "5.5.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"requires": {
"has-flag": "^3.0.0"
}
},
"uuid": {
"version": "3.3.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
+ "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
}
}
},
"webpack-sources": {
"version": "1.3.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz",
+ "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==",
"requires": {
"source-list-map": "^2.0.0",
"source-map": "~0.6.1"
@@ -21323,13 +24925,15 @@
"dependencies": {
"source-map": {
"version": "0.6.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
}
}
},
"websocket-driver": {
"version": "0.7.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.0.tgz",
+ "integrity": "sha1-DK+dLXVdk67gSdS90NP+LMoqJOs=",
"requires": {
"http-parser-js": ">=0.4.0",
"websocket-extensions": ">=0.1.1"
@@ -21337,11 +24941,13 @@
},
"websocket-extensions": {
"version": "0.1.3",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz",
+ "integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg=="
},
"websocket-stream": {
"version": "5.1.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/websocket-stream/-/websocket-stream-5.1.2.tgz",
+ "integrity": "sha512-lchLOk435iDWs0jNuL+hiU14i3ERSrMA0IKSiJh7z6X/i4XNsutBZrtqu2CPOZuA4G/zabiqVAos0vW+S7GEVw==",
"requires": {
"duplexify": "^3.5.1",
"inherits": "^2.0.1",
@@ -21353,11 +24959,13 @@
"dependencies": {
"ultron": {
"version": "1.1.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz",
+ "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og=="
},
"ws": {
"version": "3.3.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz",
+ "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==",
"requires": {
"async-limiter": "~1.0.0",
"safe-buffer": "~5.1.0",
@@ -21368,30 +24976,36 @@
},
"when": {
"version": "3.7.8",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/when/-/when-3.7.8.tgz",
+ "integrity": "sha1-xxMLan6gRpPoQs3J56Hyqjmjn4I="
},
"which": {
"version": "1.0.9",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/which/-/which-1.0.9.tgz",
+ "integrity": "sha1-RgwdoPgQED0DIam2M6+eV15kSG8="
},
"which-module": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
+ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
},
"wordwrap": {
"version": "0.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
+ "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8="
},
"worker-farm": {
"version": "1.6.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.6.0.tgz",
+ "integrity": "sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ==",
"requires": {
"errno": "~0.1.7"
},
"dependencies": {
"errno": {
"version": "0.1.7",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
+ "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==",
"requires": {
"prr": "~1.0.1"
}
@@ -21400,7 +25014,8 @@
},
"wrap-ansi": {
"version": "2.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
+ "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
"requires": {
"string-width": "^1.0.1",
"strip-ansi": "^3.0.1"
@@ -21408,14 +25023,16 @@
"dependencies": {
"is-fullwidth-code-point": {
"version": "1.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
+ "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"requires": {
"number-is-nan": "^1.0.0"
}
},
"string-width": {
"version": "1.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
+ "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
@@ -21426,18 +25043,21 @@
},
"wrappy": {
"version": "1.0.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"write": {
"version": "1.0.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz",
+ "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==",
"requires": {
"mkdirp": "^0.5.1"
}
},
"ws": {
"version": "3.3.3",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz",
+ "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==",
"requires": {
"async-limiter": "~1.0.0",
"safe-buffer": "~5.1.0",
@@ -21446,27 +25066,33 @@
},
"xmlhttprequest-ssl": {
"version": "1.5.5",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz",
+ "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4="
},
"xregexp": {
"version": "4.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.0.0.tgz",
+ "integrity": "sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg=="
},
"xtend": {
"version": "4.0.1",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
+ "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68="
},
"y18n": {
"version": "4.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
+ "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
},
"yallist": {
"version": "2.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
+ "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
},
"yargs": {
"version": "12.0.2",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.2.tgz",
+ "integrity": "sha512-e7SkEx6N6SIZ5c5H22RTZae61qtn3PYUE8JYbBFlK9sYmh3DMQ6E5ygtaG/2BW0JZi4WGgTR2IV5ChqlqrDGVQ==",
"requires": {
"cliui": "^4.0.0",
"decamelize": "^2.0.0",
@@ -21484,11 +25110,13 @@
"dependencies": {
"ansi-regex": {
"version": "3.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
},
"cliui": {
"version": "4.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
+ "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==",
"requires": {
"string-width": "^2.1.1",
"strip-ansi": "^4.0.0",
@@ -21497,21 +25125,24 @@
},
"decamelize": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-2.0.0.tgz",
+ "integrity": "sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg==",
"requires": {
"xregexp": "4.0.0"
}
},
"find-up": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
+ "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
"requires": {
"locate-path": "^3.0.0"
}
},
"locate-path": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
+ "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
"requires": {
"p-locate": "^3.0.0",
"path-exists": "^3.0.0"
@@ -21519,25 +25150,29 @@
},
"p-limit": {
"version": "2.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz",
+ "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==",
"requires": {
"p-try": "^2.0.0"
}
},
"p-locate": {
"version": "3.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
+ "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
"requires": {
"p-limit": "^2.0.0"
}
},
"p-try": {
"version": "2.0.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz",
+ "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ=="
},
"strip-ansi": {
"version": "4.0.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
"requires": {
"ansi-regex": "^3.0.0"
}
@@ -21546,38 +25181,39 @@
},
"yargs-parser": {
"version": "10.1.0",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz",
+ "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==",
"requires": {
"camelcase": "^4.1.0"
},
"dependencies": {
"camelcase": {
"version": "4.1.0",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
+ "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0="
}
}
},
"yauzl": {
"version": "2.4.1",
- "resolved": false,
+ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.4.1.tgz",
+ "integrity": "sha1-lSj0QtqxsihOWLQ3m7GU4i4MQAU=",
"requires": {
"fd-slicer": "~1.0.1"
}
},
"yeast": {
"version": "0.1.2",
- "resolved": false
+ "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz",
+ "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk="
}
}
},
"run-async": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz",
- "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=",
- "dev": true,
- "requires": {
- "is-promise": "^2.1.0"
- }
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",
+ "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==",
+ "dev": true
},
"run-queue": {
"version": "1.0.3",
@@ -21746,15 +25382,6 @@
"semver": "^5.3.0"
}
},
- "semver-intersect": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/semver-intersect/-/semver-intersect-1.4.0.tgz",
- "integrity": "sha512-d8fvGg5ycKAq0+I6nfWeCx6ffaWJCsBYU0H2Rq56+/zFePYfT8mXkB3tWBSjR5BerkHNZ5eTPIk1/LBYas35xQ==",
- "dev": true,
- "requires": {
- "semver": "^5.0.0"
- }
- },
"send": {
"version": "0.17.1",
"resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
@@ -21958,9 +25585,9 @@
"dev": true
},
"smart-buffer": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.0.2.tgz",
- "integrity": "sha512-JDhEpTKzXusOqXZ0BUIdH+CjFdO/CR3tLlf5CN34IypI+xMmXW1uB16OOY8z3cICbJlDAVJzNbwBhNO0wt9OAw==",
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
+ "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
"dev": true
},
"snapdragon": {
@@ -22231,33 +25858,57 @@
}
},
"socks": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/socks/-/socks-2.3.2.tgz",
- "integrity": "sha512-pCpjxQgOByDHLlNqlnh/mNSAxIUkyBBuwwhTcV+enZGbDaClPvHdvm6uvOwZfFJkam7cGhBNbb4JxiP8UZkRvQ==",
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz",
+ "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==",
"dev": true,
"requires": {
- "ip": "^1.1.5",
- "smart-buffer": "4.0.2"
+ "ip": "^2.0.0",
+ "smart-buffer": "^4.2.0"
+ },
+ "dependencies": {
+ "ip": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz",
+ "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==",
+ "dev": true
+ }
}
},
"socks-proxy-agent": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz",
- "integrity": "sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg==",
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz",
+ "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==",
"dev": true,
"requires": {
- "agent-base": "~4.2.1",
- "socks": "~2.3.2"
+ "agent-base": "^6.0.2",
+ "debug": "^4.3.3",
+ "socks": "^2.6.2"
},
"dependencies": {
"agent-base": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz",
- "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==",
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
+ "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
+ "dev": true,
+ "requires": {
+ "debug": "4"
+ }
+ },
+ "debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"dev": true,
"requires": {
- "es6-promisify": "^5.0.0"
+ "ms": "2.1.2"
}
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
}
}
},
@@ -22739,10 +26390,16 @@
"has-flag": "^3.0.0"
}
},
+ "supports-preserve-symlinks-flag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+ "dev": true
+ },
"symbol-observable": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz",
- "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz",
+ "integrity": "sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==",
"dev": true
},
"tapable": {
@@ -23197,6 +26854,12 @@
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
"dev": true
},
+ "type-fest": {
+ "version": "0.21.3",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
+ "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
+ "dev": true
+ },
"type-is": {
"version": "1.6.18",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
@@ -23367,9 +27030,9 @@
}
},
"url-parse": {
- "version": "1.4.7",
- "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz",
- "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==",
+ "version": "1.5.10",
+ "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz",
+ "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",
"dev": true,
"requires": {
"querystringify": "^2.1.1",
@@ -23448,12 +27111,12 @@
}
},
"validate-npm-package-name": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz",
- "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz",
+ "integrity": "sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==",
"dev": true,
"requires": {
- "builtins": "^1.0.3"
+ "builtins": "^5.0.0"
}
},
"vary": {
@@ -23505,6 +27168,15 @@
"minimalistic-assert": "^1.0.0"
}
},
+ "wcwidth": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
+ "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==",
+ "dev": true,
+ "requires": {
+ "defaults": "^1.0.3"
+ }
+ },
"webdriver-js-extender": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/webdriver-js-extender/-/webdriver-js-extender-2.1.0.tgz",
diff --git a/examples/angular2/package.json b/examples/angular2/package.json
index 06056d25f..df72d2036 100644
--- a/examples/angular2/package.json
+++ b/examples/angular2/package.json
@@ -27,7 +27,7 @@
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.13.0",
- "@angular/cli": "~7.3.6",
+ "@angular/cli": "~15.1.4",
"@angular/compiler-cli": "~7.2.0",
"@angular/language-service": "~7.2.0",
"@types/jasmine": "~2.8.8",
diff --git a/examples/angular2/src/app/app-routing.module.ts b/examples/angular2/src/app/app-routing.module.ts
index d425c6f56..11c2e8407 100644
--- a/examples/angular2/src/app/app-routing.module.ts
+++ b/examples/angular2/src/app/app-routing.module.ts
@@ -5,6 +5,6 @@ const routes: Routes = [];
@NgModule({
imports: [RouterModule.forRoot(routes)],
- exports: [RouterModule]
+ exports: [RouterModule],
})
-export class AppRoutingModule { }
+export class AppRoutingModule {}
diff --git a/examples/angular2/src/app/app.component.html b/examples/angular2/src/app/app.component.html
index b0c533d70..62e304ba1 100644
--- a/examples/angular2/src/app/app.component.html
+++ b/examples/angular2/src/app/app.component.html
@@ -1,8 +1,6 @@
-
-
- Rollbar example for Angular 2+
-
+
+
Rollbar example for Angular 2+
Log info
Throw Error
diff --git a/examples/angular2/src/app/app.component.spec.ts b/examples/angular2/src/app/app.component.spec.ts
index 3fe58ce0f..b9031c734 100644
--- a/examples/angular2/src/app/app.component.spec.ts
+++ b/examples/angular2/src/app/app.component.spec.ts
@@ -5,12 +5,8 @@ import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
- imports: [
- RouterTestingModule
- ],
- declarations: [
- AppComponent
- ],
+ imports: [RouterTestingModule],
+ declarations: [AppComponent],
}).compileComponents();
}));
@@ -30,6 +26,8 @@ describe('AppComponent', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
- expect(compiled.querySelector('h1').textContent).toContain('Welcome to my-app!');
+ expect(compiled.querySelector('h1').textContent).toContain(
+ 'Welcome to my-app!',
+ );
});
});
diff --git a/examples/angular2/src/app/app.component.ts b/examples/angular2/src/app/app.component.ts
index 2fbc3e4f7..5fd4783e1 100644
--- a/examples/angular2/src/app/app.component.ts
+++ b/examples/angular2/src/app/app.component.ts
@@ -5,10 +5,13 @@ import * as Rollbar from 'rollbar';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
- styleUrls: ['./app.component.css']
+ styleUrls: ['./app.component.css'],
})
export class AppComponent {
- constructor(@Inject(RollbarService) private rollbar: Rollbar, private ngZone: NgZone) {
+ constructor(
+ @Inject(RollbarService) private rollbar: Rollbar,
+ private ngZone: NgZone,
+ ) {
// Used by rollbar.js tests
window['angularAppComponent'] = this;
}
diff --git a/examples/angular2/src/app/app.module.ts b/examples/angular2/src/app/app.module.ts
index 9b6427d67..dec95454c 100644
--- a/examples/angular2/src/app/app.module.ts
+++ b/examples/angular2/src/app/app.module.ts
@@ -5,19 +5,13 @@ import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { RollbarService, rollbarFactory, RollbarErrorHandler } from './rollbar';
-
@NgModule({
- declarations: [
- AppComponent
- ],
- imports: [
- BrowserModule,
- AppRoutingModule
- ],
+ declarations: [AppComponent],
+ imports: [BrowserModule, AppRoutingModule],
providers: [
{ provide: ErrorHandler, useClass: RollbarErrorHandler },
- { provide: RollbarService, useFactory: rollbarFactory }
+ { provide: RollbarService, useFactory: rollbarFactory },
],
- bootstrap: [AppComponent]
+ bootstrap: [AppComponent],
})
export class AppModule {}
diff --git a/examples/angular2/src/app/rollbar.ts b/examples/angular2/src/app/rollbar.ts
index 38e2f2a1d..9cabd196d 100644
--- a/examples/angular2/src/app/rollbar.ts
+++ b/examples/angular2/src/app/rollbar.ts
@@ -3,10 +3,10 @@ import {
Injectable,
Inject,
InjectionToken,
- ErrorHandler
+ ErrorHandler,
} from '@angular/core';
-const rollbarConfig:Rollbar.Configuration = {
+const rollbarConfig: Rollbar.Configuration = {
accessToken: 'POST_CLIENT_ITEM_TOKEN',
captureUncaught: true,
captureUnhandledRejections: true,
@@ -16,7 +16,7 @@ const rollbarConfig:Rollbar.Configuration = {
wrapGlobalEventHandlers: false,
scrubRequestBody: true,
exitOnUncaughtException: false,
- stackTraceLimit: 20
+ stackTraceLimit: 20,
};
export const RollbarService = new InjectionToken
('rollbar');
@@ -25,7 +25,7 @@ export const RollbarService = new InjectionToken('rollbar');
export class RollbarErrorHandler implements ErrorHandler {
constructor(@Inject(RollbarService) private rollbar: Rollbar) {}
- handleError(err:any) : void {
+ handleError(err: any): void {
this.rollbar.error(err.originalError || err);
}
}
diff --git a/examples/angular2/src/environments/environment.prod.ts b/examples/angular2/src/environments/environment.prod.ts
index 3612073bc..c9669790b 100644
--- a/examples/angular2/src/environments/environment.prod.ts
+++ b/examples/angular2/src/environments/environment.prod.ts
@@ -1,3 +1,3 @@
export const environment = {
- production: true
+ production: true,
};
diff --git a/examples/angular2/src/environments/environment.ts b/examples/angular2/src/environments/environment.ts
index 7b4f817ad..99c3763ca 100644
--- a/examples/angular2/src/environments/environment.ts
+++ b/examples/angular2/src/environments/environment.ts
@@ -3,7 +3,7 @@
// The list of file replacements can be found in `angular.json`.
export const environment = {
- production: false
+ production: false,
};
/*
diff --git a/examples/angular2/src/index.html b/examples/angular2/src/index.html
index 0450fa57c..06a1b03e7 100644
--- a/examples/angular2/src/index.html
+++ b/examples/angular2/src/index.html
@@ -1,14 +1,14 @@
-
-
- MyApp
-
+
+
+ MyApp
+
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/examples/angular2/src/karma.conf.js b/examples/angular2/src/karma.conf.js
index 5934e22d1..c5f0bfc23 100644
--- a/examples/angular2/src/karma.conf.js
+++ b/examples/angular2/src/karma.conf.js
@@ -10,15 +10,15 @@ module.exports = function (config) {
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
- require('@angular-devkit/build-angular/plugins/karma')
+ require('@angular-devkit/build-angular/plugins/karma'),
],
client: {
- clearContext: false // leave Jasmine Spec Runner output visible in browser
+ clearContext: false, // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage/my-app'),
reports: ['html', 'lcovonly', 'text-summary'],
- fixWebpackSourcePaths: true
+ fixWebpackSourcePaths: true,
},
reporters: ['progress', 'kjhtml'],
port: 9876,
@@ -27,6 +27,6 @@ module.exports = function (config) {
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
- restartOnFileChange: true
+ restartOnFileChange: true,
});
};
diff --git a/examples/angular2/src/main.ts b/examples/angular2/src/main.ts
index c7b673cf4..d9a2e7e4a 100644
--- a/examples/angular2/src/main.ts
+++ b/examples/angular2/src/main.ts
@@ -8,5 +8,6 @@ if (environment.production) {
enableProdMode();
}
-platformBrowserDynamic().bootstrapModule(AppModule)
- .catch(err => console.error(err));
+platformBrowserDynamic()
+ .bootstrapModule(AppModule)
+ .catch((err) => console.error(err));
diff --git a/examples/angular2/src/polyfills.ts b/examples/angular2/src/polyfills.ts
index 75d639398..d15a1152a 100644
--- a/examples/angular2/src/polyfills.ts
+++ b/examples/angular2/src/polyfills.ts
@@ -55,8 +55,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
-import 'zone.js/dist/zone'; // Included with Angular CLI.
-
+import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
diff --git a/examples/angular2/src/test.ts b/examples/angular2/src/test.ts
index 16317897b..b6d614daa 100644
--- a/examples/angular2/src/test.ts
+++ b/examples/angular2/src/test.ts
@@ -4,7 +4,7 @@ import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
- platformBrowserDynamicTesting
+ platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
declare const require: any;
@@ -12,7 +12,7 @@ declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
- platformBrowserDynamicTesting()
+ platformBrowserDynamicTesting(),
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
diff --git a/examples/angular2/src/tsconfig.app.json b/examples/angular2/src/tsconfig.app.json
index 190fd300b..fb7c566bc 100644
--- a/examples/angular2/src/tsconfig.app.json
+++ b/examples/angular2/src/tsconfig.app.json
@@ -4,8 +4,5 @@
"outDir": "../out-tsc/app",
"types": []
},
- "exclude": [
- "test.ts",
- "**/*.spec.ts"
- ]
+ "exclude": ["test.ts", "**/*.spec.ts"]
}
diff --git a/examples/angular2/src/tsconfig.spec.json b/examples/angular2/src/tsconfig.spec.json
index de7733630..70add2d52 100644
--- a/examples/angular2/src/tsconfig.spec.json
+++ b/examples/angular2/src/tsconfig.spec.json
@@ -2,17 +2,8 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
- "types": [
- "jasmine",
- "node"
- ]
+ "types": ["jasmine", "node"]
},
- "files": [
- "test.ts",
- "polyfills.ts"
- ],
- "include": [
- "**/*.spec.ts",
- "**/*.d.ts"
- ]
+ "files": ["test.ts", "polyfills.ts"],
+ "include": ["**/*.spec.ts", "**/*.d.ts"]
}
diff --git a/examples/angular2/src/tslint.json b/examples/angular2/src/tslint.json
index aa7c3eeb7..ca6ba8c9e 100644
--- a/examples/angular2/src/tslint.json
+++ b/examples/angular2/src/tslint.json
@@ -1,17 +1,7 @@
{
"extends": "../tslint.json",
"rules": {
- "directive-selector": [
- true,
- "attribute",
- "app",
- "camelCase"
- ],
- "component-selector": [
- true,
- "element",
- "app",
- "kebab-case"
- ]
+ "directive-selector": [true, "attribute", "app", "camelCase"],
+ "component-selector": [true, "element", "app", "kebab-case"]
}
}
diff --git a/examples/angular2/tsconfig.json b/examples/angular2/tsconfig.json
index 951c1748c..08df71159 100644
--- a/examples/angular2/tsconfig.json
+++ b/examples/angular2/tsconfig.json
@@ -12,12 +12,7 @@
"importHelpers": true,
"strictNullChecks": true,
"target": "es5",
- "typeRoots": [
- "node_modules/@types"
- ],
- "lib": [
- "es2018",
- "dom"
- ]
+ "typeRoots": ["node_modules/@types"],
+ "lib": ["es2018", "dom"]
}
}
diff --git a/examples/angular2/tslint.json b/examples/angular2/tslint.json
index 868ecba0d..5aadf5b50 100644
--- a/examples/angular2/tslint.json
+++ b/examples/angular2/tslint.json
@@ -1,24 +1,16 @@
{
"extends": "tslint:recommended",
- "rulesDirectory": [
- "codelyzer"
- ],
+ "rulesDirectory": ["codelyzer"],
"rules": {
"array-type": false,
"arrow-parens": false,
"deprecation": {
"severity": "warn"
},
- "import-blacklist": [
- true,
- "rxjs/Rx"
- ],
+ "import-blacklist": [true, "rxjs/Rx"],
"interface-name": false,
"max-classes-per-file": false,
- "max-line-length": [
- true,
- 140
- ],
+ "max-line-length": [true, 140],
"member-access": false,
"member-ordering": [
true,
@@ -32,34 +24,18 @@
}
],
"no-consecutive-blank-lines": false,
- "no-console": [
- true,
- "debug",
- "info",
- "time",
- "timeEnd",
- "trace"
- ],
+ "no-console": [true, "debug", "info", "time", "timeEnd", "trace"],
"no-empty": false,
- "no-inferrable-types": [
- true,
- "ignore-params"
- ],
+ "no-inferrable-types": [true, "ignore-params"],
"no-non-null-assertion": true,
"no-redundant-jsdoc": true,
"no-switch-case-fall-through": true,
"no-use-before-declare": true,
"no-var-requires": false,
- "object-literal-key-quotes": [
- true,
- "as-needed"
- ],
+ "object-literal-key-quotes": [true, "as-needed"],
"object-literal-sort-keys": false,
"ordered-imports": false,
- "quotemark": [
- true,
- "single"
- ],
+ "quotemark": [true, "single"],
"trailing-comma": false,
"no-output-on-prefix": true,
"use-input-property-decorator": true,
diff --git a/examples/bower/README.md b/examples/bower/README.md
index d4ad721f0..e50a59beb 100644
--- a/examples/bower/README.md
+++ b/examples/bower/README.md
@@ -1,33 +1,38 @@
# Using Rollbar with [Bower](http://bower.io/)
- Install rollbar.js
+
```
bower install rollbar --save
```
+
- Add the `_rollbarConfig` configuration to the `` of your page.
+
```html
```
+
- Include the Rollbar snippet just below `_rollbarConfig`.
+
```html
diff --git a/examples/bower/index.html b/examples/bower/index.html
index efa96fd43..259ddd053 100644
--- a/examples/bower/index.html
+++ b/examples/bower/index.html
@@ -2,24 +2,24 @@
diff --git a/examples/browser_extension_v2/README.md b/examples/browser_extension_v2/README.md
new file mode 100644
index 000000000..dea1da339
--- /dev/null
+++ b/examples/browser_extension_v2/README.md
@@ -0,0 +1,44 @@
+# Chrome/Firefox/Edge Chromium Extension Example
+
+This example demonstrates initializing Rollbar both in the background extension
+and in the content script of a Chrome/Chromium or Firefox manifest v2 extension.
+
+To load and run this demo:
+
+- Add your Rolllbar client token (config.js for client script, background.js for background script.)
+- Enable developer mode for extensions in Chrome
+- Click 'Load unpacked extension', and select this folder to load.
+
+The background script outputs to a separate console accessed from the extensions
+panel in Chrome.
+
+## Compatibility Notes
+
+Firefox has slightly different manifest.json requirements. This example is written
+so that the same manifest.json can be used across all browsers.
+
+### content_security_policy
+
+According to the browser extension spec, it should be OK to only set `default-src`.
+This won't work for Firefox, which requires setting both `script-src` and `object-src`.
+This example uses the Firefox compatible content security policy, since it also
+works fine on Chrome and Edge.
+
+### background.persistent
+
+Firefox emits a warning when the `background.persistent` key is set false.
+This example sets the key true, as this setting works across all browsers.
+
+### Rollbar configuration
+
+There are some limitations on Firefox in the content script. The background script
+is not affected by these limitations.
+
+Firefox requires setting `captureUncaught` false in the content script, because it doesn't allow
+Rollbar.js to wrap `window.onerror`.
+
+Firefox requires setting `autoInstrument.network` false in the content script,
+because it doesn't allow Rollbar.js to wrap `window.fetch`.
+
+The content script config is in ./config.js in this example, and is configured
+with Firefox compatible settings.
diff --git a/examples/browser_extension_v2/background.js b/examples/browser_extension_v2/background.js
new file mode 100644
index 000000000..8ffa33f87
--- /dev/null
+++ b/examples/browser_extension_v2/background.js
@@ -0,0 +1,20 @@
+console.log('Background extension is running.');
+
+// The background script can load Rollbar via the snippet as shown here, which
+// makes a network request to fetch rollbar.js. Or it can load rollbar.js from
+// the manifest.js file as shown in the content script example.
+//
+var _rollbarConfig = {
+ accessToken: 'ROLLBAR_CLIENT_TOKEN',
+ captureUncaught: true,
+ captureUnhandledRejections: true,
+};
+
+// Rollbar Snippet
+(()=>{"use strict";var r={349:r=>{r.exports={captureUncaughtExceptions:function(r,o,e){if(r){var n;if("function"==typeof o._rollbarOldOnError)n=o._rollbarOldOnError;else if(r.onerror){for(n=r.onerror;n._rollbarOldOnError;)n=n._rollbarOldOnError;o._rollbarOldOnError=n}o.handleAnonymousErrors();var t=function(){var e=Array.prototype.slice.call(arguments,0);!function(r,o,e,n){r._rollbarWrappedError&&(n[4]||(n[4]=r._rollbarWrappedError),n[5]||(n[5]=r._rollbarWrappedError._rollbarContext),r._rollbarWrappedError=null);var t=o.handleUncaughtException.apply(o,n);e&&e.apply(r,n),"anonymous"===t&&(o.anonymousErrorsPending+=1)}(r,o,n,e)};e&&(t._rollbarOldOnError=n),r.onerror=t}},captureUnhandledRejections:function(r,o,e){if(r){"function"==typeof r._rollbarURH&&r._rollbarURH.belongsToShim&&r.removeEventListener("unhandledrejection",r._rollbarURH);var n=function(r){var e,n,t;try{e=r.reason}catch(r){e=void 0}try{n=r.promise}catch(r){n="[unhandledrejection] error getting `promise` from event"}try{t=r.detail,!e&&t&&(e=t.reason,n=t.promise)}catch(r){}e||(e="[unhandledrejection] error getting `reason` from event"),o&&o.handleUnhandledRejection&&o.handleUnhandledRejection(e,n)};n.belongsToShim=e,r._rollbarURH=n,r.addEventListener("unhandledrejection",n)}}}},202:r=>{function o(r,e){this.impl=r(e,this),this.options=e,function(r){for(var o=function(r){return function(){var o=Array.prototype.slice.call(arguments,0);if(this.impl[r])return this.impl[r].apply(this.impl,o)}},e="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleAnonymousErrors,handleUnhandledRejection,_createItem,wrap,loadFull,shimId,captureEvent,captureDomContentLoaded,captureLoad".split(","),n=0;n{var n=e(349),t=e(965);function a(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}var l=0;function i(r,o){this.options=r,this._rollbarOldOnError=null;var e=l++;this.shimId=function(){return e},"undefined"!=typeof window&&window._rollbarShims&&(window._rollbarShims[e]={handler:o,messages:[]})}var s=e(202),d=function(r,o){return new i(r,o)},p=function(r){return new s(d,r)};function c(r){return a((function(){var o=Array.prototype.slice.call(arguments,0),e={shim:this,method:r,args:o,ts:new Date};window._rollbarShims[this.shimId()].messages.push(e)}))}i.prototype.loadFull=function(r,o,e,n,t){var l=!1,i=o.createElement("script"),s=o.getElementsByTagName("script")[0],d=s.parentNode;i.crossOrigin="",i.src=n.rollbarJsUrl,e||(i.async=!0),i.onload=i.onreadystatechange=a((function(){if(!(l||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){i.onload=i.onreadystatechange=null;try{d.removeChild(i)}catch(r){}l=!0,function(){var o;if(void 0===r._rollbarDidLoad){o=new Error("rollbar.js did not load");for(var e,n,a,l,i=0;e=r._rollbarShims[i++];)for(e=e.messages||[];n=e.shift();)for(a=n.args||[],i=0;i{r.exports=function(r){return function(o){if(!o&&!window._rollbarInitialized){for(var e,n,t=(r=r||{}).globalAlias||"Rollbar",a=window.rollbar,l=function(r){return new a(r)},i=0;e=window._rollbarShims[i++];)n||(n=e.handler),e.handler._swapAndProcessMessages(l,e.messages);window[t]=n,window._rollbarInitialized=!0}}}},965:r=>{function o(r,o,e){if(o.hasOwnProperty&&o.hasOwnProperty("addEventListener")){for(var n=o.addEventListener;n._rollbarOldAdd&&n.belongsToShim;)n=n._rollbarOldAdd;var t=function(o,e,t){n.call(this,o,r.wrap(e),t)};t._rollbarOldAdd=n,t.belongsToShim=e,o.addEventListener=t;for(var a=o.removeEventListener;a._rollbarOldRemove&&a.belongsToShim;)a=a._rollbarOldRemove;var l=function(r,o,e){a.call(this,r,o&&o._rollbar_wrapped||o,e)};l._rollbarOldRemove=a,l.belongsToShim=e,o.removeEventListener=l}}r.exports=function(r,e,n){if(r){var t,a,l="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(t=0;t{var r=e(758),o=e(157);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://cdn.rollbar.com/rollbarjs/refs/tags/v2.26.4/rollbar.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var n=r.setupShim(window,_rollbarConfig),t=o(_rollbarConfig);window.rollbar=r.Rollbar,n.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,t)})()})();
+// End Rollbar Snippet
+
+console.log(Rollbar);
+
+// log a generic message and send to rollbar
+Rollbar.info('Background script mesage');
diff --git a/examples/browser_extension_v2/config.js b/examples/browser_extension_v2/config.js
new file mode 100644
index 000000000..b3015639b
--- /dev/null
+++ b/examples/browser_extension_v2/config.js
@@ -0,0 +1,10 @@
+window._rollbarConfig = {
+ accessToken: 'ROLLBAR_CLIENT_TOKEN',
+ captureUncaught: false, // Only required for Firefox, other browser targets
+ // may set true. See README.
+ captureUnhandledRejections: true,
+ autoInstrument: {
+ network: false, // Only required for Firefox, other browser targets
+ // may set true. See README.
+ },
+};
diff --git a/examples/chrome_extension/content_script.js b/examples/browser_extension_v2/content_script.js
similarity index 100%
rename from examples/chrome_extension/content_script.js
rename to examples/browser_extension_v2/content_script.js
diff --git a/examples/browser_extension_v2/manifest.json b/examples/browser_extension_v2/manifest.json
new file mode 100644
index 000000000..de56b81fb
--- /dev/null
+++ b/examples/browser_extension_v2/manifest.json
@@ -0,0 +1,17 @@
+{
+ "manifest_version": 2,
+ "name": "Test Extension",
+ "version": "1.0.0",
+ "permissions": ["storage", "activeTab", "https://api.rollbar.com/"],
+ "content_security_policy": "script-src 'self' https://cdn.rollbar.com; object-src 'self' https://cdn.rollbar.com;",
+ "background": {
+ "scripts": ["background.js"],
+ "persistent": true
+ },
+ "content_scripts": [
+ {
+ "matches": ["*://*/*"],
+ "js": ["config.js", "rollbar.min.js", "content_script.js"]
+ }
+ ]
+}
diff --git a/examples/browser_extension_v2/rollbar.min.js b/examples/browser_extension_v2/rollbar.min.js
new file mode 100644
index 000000000..4d63012d3
--- /dev/null
+++ b/examples/browser_extension_v2/rollbar.min.js
@@ -0,0 +1 @@
+!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=6)}([function(t,e,r){"use strict";var n=r(11),o={};function i(t,e){return e===s(t)}function s(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return i(t,"function")}function u(t){var e=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),r=RegExp("^"+e+"$");return c(t)&&r.test(t)}function c(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function l(){var t=y();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)}))}var p={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};function f(t,e){var r,n;try{r=o.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function h(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function d(t){return function t(e,r){var n,o,a,u={};try{for(o in e)(n=e[o])&&(i(n,"object")||i(n,"array"))?r.includes(n)?u[o]="Removed circular reference: "+s(n):((a=r.slice()).push(n),u[o]=t(n,a)):u[o]=n}catch(t){u="Failed cloning custom data: "+t.message}return u}(t,[t])}var m=["log","network","dom","navigation","error","manual"],g=["critical","error","warning","info","debug"];function v(t,e){for(var r=0;ra)?(s=e.path,e.path=s.substring(0,a)+i+"&"+s.substring(a+1)):-1!==u?(s=e.path,e.path=s.substring(0,u)+i+s.substring(u)):e.path=e.path+i},createItem:function(t,e,r,n,o){for(var i,a,u,c,p,f,m=[],g=[],v=0,b=t.length;v0&&(u||(u=d({})),u.extraArgs=d(m));var k={message:i,err:a,custom:u,timestamp:y(),callback:c,notifier:r,diagnostic:{},uuid:l()};return function(t,e){e&&void 0!==e.level&&(t.level=e.level,delete e.level);e&&void 0!==e.skipFrames&&(t.skipFrames=e.skipFrames,delete e.skipFrames)}(k,u),n&&p&&(k.request=p),o&&(k.lambdaContext=o),k._originalArgs=t,k.diagnostic.original_arg_types=g,k},addErrorContext:function(t,e){var r=t.data.custom||{},o=!1;try{for(var i=0;i2){var o=n.slice(0,3),i=o[2].indexOf("/");-1!==i&&(o[2]=o[2].substring(0,i));r=o.concat("0000:0000:0000:0000:0000").join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}},formatArgsAsString:function(t){var e,r,n,o=[];for(e=0,r=t.length;e500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")},formatUrl:function(t,e){if(!(e=e||t.protocol)&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r},get:function(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o=1&&r>e}function s(t,e,r,n,o,i,s){var a=null;return r&&(r=new Error(r)),r||n||(a=function(t,e,r,n,o){var i,s=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var a={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:s,notifier:{version:e.notifier&&e.notifier.version||e.version}};"browser"===t?(a.platform="browser",a.framework="browser-js",a.notifier.name="rollbar-browser-js"):"server"===t?(a.framework=e.framework||"node-js",a.notifier.name=e.notifier.name):"react-native"===t&&(a.framework=e.framework||"react-native",a.notifier.name=e.notifier.name);return a}(t,e,o,i,s)),{error:r,shouldSend:n,payload:a}}o.globalSettings={startTime:n.now(),maxItems:void 0,itemsPerMinute:void 0},o.prototype.configureGlobal=function(t){void 0!==t.startTime&&(o.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(o.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(o.globalSettings.itemsPerMinute=t.itemsPerMinute)},o.prototype.shouldSend=function(t,e){var r=(e=e||n.now())-this.startTime;(r<0||r>=6e4)&&(this.startTime=e,this.perMinCounter=0);var a=o.globalSettings.maxItems,u=o.globalSettings.itemsPerMinute;if(i(t,a,this.counter))return s(this.platform,this.platformOptions,a+" max items reached",!1);if(i(t,u,this.perMinCounter))return s(this.platform,this.platformOptions,u+" items per minute reached",!1);this.counter++,this.perMinCounter++;var c=!i(t,a,this.counter),l=c;return c=c&&!i(t,u,this.perMinCounter),s(this.platform,this.platformOptions,null,c,a,u,l)},o.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=o},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e,r=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)};t.exports=function t(){var e,r,n,o,s,a={},u=null,c=arguments.length;for(e=0;ethis.options.maxRetries&&(o=!1))}o?this._retryApiRequest(e,r):r(t)},o.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},o.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);-1!==e&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},o.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=(r=r||n.get(t,"body.trace.exception.message"))||n.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);(r=n.get(t,"body.message.body"))&&this.logger.log(r)}},o.prototype._maybeCallWait=function(){return!(!n.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=o},function(t,e,r){"use strict";var n=r(0);function o(t,e){this.queue=t,this.options=e,this.transforms=[],this.diagnostic={}}o.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=n.merge(e,t),this},o.prototype.addTransform=function(t){return n.isFunction(t)&&this.transforms.push(t),this},o.prototype.log=function(t,e){if(e&&n.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){if(n)return this.queue.removePendingItem(t),e(n,null);this.queue.addItem(o,e,r,t)}.bind(this))},o.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,s=function(t,a){t?e(t,null):++r!==n?o[r](a,i,s):e(null,a)};s(null,t)},t.exports=o},function(t,e,r){"use strict";var n=r(0),o=r(15),i={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};function s(t,e,r,n,o){this.options=t,this.transport=e,this.url=r,this.truncation=n,this.jsonBackup=o,this.accessToken=t.accessToken,this.transportOptions=a(t,r)}function a(t,e){return o.getTransportFromOptions(t,i,e)}s.prototype.postItem=function(t,e){var r=o.transportOptions(this.transportOptions,"POST"),n=o.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,r,n,e)},s.prototype.buildJsonPayload=function(t,e){var r,i=o.buildPayload(this.accessToken,t,this.jsonBackup);return(r=this.truncation?this.truncation.truncate(i):n.stringify(i)).error?(e&&e(r.error),null):r.value},s.prototype.postJsonPayload=function(t,e){var r=o.transportOptions(this.transportOptions,"POST");this.transport.postJsonPayload(this.accessToken,r,t,e)},s.prototype.configure=function(t){var e=this.oldOptions;return this.options=n.merge(e,t),this.transportOptions=a(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=s},function(t,e,r){"use strict";var n=r(0);t.exports={buildPayload:function(t,e,r){if(!n.isType(e.context,"string")){var o=n.stringify(e.context,r);o.error?e.context="Error: could not serialize 'context'":e.context=o.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}},getTransportFromOptions:function(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,s=e.path,a=e.search,u=t.timeout,c=t.proxy;if(t.endpoint){var l=r.parse(t.endpoint);n=l.hostname,o=l.protocol,i=l.port,s=l.pathname,a=l.search}return{timeout:u,hostname:n,protocol:o,port:i,path:s,search:a,proxy:c}},transportOptions:function(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path,s=t.timeout;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{timeout:s,protocol:r,hostname:o,path:i,port:n,method:e}},appendPathToPath:function(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}}},function(t,e){!function(t){"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],s="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=s.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e,r){"use strict";var n={ieVersion:function(){if("undefined"!=typeof document){for(var t=3,e=document.createElement("div"),r=e.getElementsByTagName("i");e.innerHTML="\x3c!--[if gt IE "+ ++t+"]> 4?t:void 0}}};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null);var o=e.handleUncaughtException.apply(e,n);r&&r.apply(t,n),"anonymous"===o&&(e.anonymousErrorsPending+=1)}t.exports={captureUncaughtExceptions:function(t,e,r){if(t){var o;if("function"==typeof e._rollbarOldOnError)o=e._rollbarOldOnError;else if(t.onerror){for(o=t.onerror;o._rollbarOldOnError;)o=o._rollbarOldOnError;e._rollbarOldOnError=o}e.handleAnonymousErrors();var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};r&&(i._rollbarOldOnError=o),t.onerror=i}},captureUnhandledRejections:function(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}}},function(t,e,r){"use strict";var n=r(0),o=r(1);function i(t){this.truncation=t}function s(){var t="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,e=t&&t.Zone&&t.Zone.current,r=Array.prototype.slice.call(arguments);if(e&&"angular"===e._name){var n=e._parent;n.run((function(){a.apply(void 0,r)}))}else a.apply(void 0,r)}function a(t,e,r,i,s,a,c){if("undefined"!=typeof RollbarProxy)return function(t,e){(new RollbarProxy).sendJsonPayload(t,(function(t){}),(function(t){e(new Error(t))}))}(i,s);var l;if(!(l=a?a():function(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e=400&&t.status<600}(l)){if(403===l.status){var e=t.value&&t.value.message;o.error(e)}s(new Error(String(l.status)))}else{s(u("XHR response had no status code (likely connection failure)"))}}}catch(t){var r;r=t&&t.stack?t:new Error(t),s(r)}var i};l.open(r,e,!0),l.setRequestHeader&&(l.setRequestHeader("Content-Type","application/json"),l.setRequestHeader("X-Rollbar-Access-Token",t)),n.isFiniteNumber(c)&&(l.timeout=c),l.onreadystatechange=p,l.send(i)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return s(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var f=new XDomainRequest;f.onprogress=function(){},f.ontimeout=function(){s(u("Request timed out","ETIMEDOUT"))},f.onerror=function(){s(new Error("Error during request"))},f.onload=function(){var t=n.jsonParse(f.responseText);s(t.error,t.value)},f.open(r,e,!0),f.send(i)}else s(new Error("Cannot find a method to transport a request"))}}catch(t){s(t)}}function u(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}i.prototype.get=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){}),n.addParamsAndAccessTokenToPath(t,e,r);s(t,n.formatUrl(e),"GET",null,o,i,e.timeout)},i.prototype.post=function(t,e,r,o,i){if(o&&n.isFunction(o)||(o=function(){}),!r)return o(new Error("Cannot send empty request"));var a;if((a=this.truncation?this.truncation.truncate(r):n.stringify(r)).error)return o(a.error);var u=a.value;s(t,n.formatUrl(e),"POST",u,o,i,e.timeout)},i.prototype.postJsonPayload=function(t,e,r,o,i){o&&n.isFunction(o)||(o=function(){});s(t,n.formatUrl(e),"POST",r,o,i,e.timeout)},t.exports=i},function(t,e,r){"use strict";var n=r(0),o=r(3),i=r(1);function s(t,e,r){var o=t.message,i=t.custom;o||(o="Item sent with null or missing arguments.");var s={body:o};i&&(s.extra=n.merge(i)),n.set(t,"data.body",{message:s}),r(null,t)}function a(t){var e=t.stackInfo.stack;return e&&0===e.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(e=t._unhandledStackInfo.stack),e}function u(t,e,r){var i=t&&t.data.description,s=t&&t.custom,u=a(t),l=o.guessErrorClass(e.message),p={exception:{class:c(e,l[0],r),message:l[1]}};if(i&&(p.exception.description=i),u){var f,h,d,m,g,v,y,b;for(0===u.length&&(p.exception.stack=e.rawStack,p.exception.raw=String(e.rawException)),p.frames=[],y=0;y