Socket
Socket
Sign inDemoInstall

raven-js

Package Overview
Dependencies
Maintainers
3
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

raven-js - npm Package Compare versions

Comparing version 3.7.0 to 3.8.0

.github/ISSUE_TEMPLATE.md

2

bower.json
{
"name": "raven-js",
"version": "3.7.0",
"version": "3.8.0",
"dependencies": {},

@@ -5,0 +5,0 @@ "main": "dist/raven.js",

# Changelog
## 3.8.0
* NEW: Record fetch request breadcrumbs. See: https://github.com/getsentry/raven-js/pull/744
* NEW: Record contentEditable input event breadcrumbs. See: https://github.com/getsentry/raven-js/pull/748
* BUGFIX: Updated Typescript declaration file. See: https://github.com/getsentry/raven-js/pull/746
* NEW: File size improvements for raven.min.js See: https://github.com/getsentry/raven-js/pull/721
## 3.7.0

@@ -4,0 +10,0 @@ * BUGFIX: Add missing return types from TypeScript declaration file. See: https://github.com/getsentry/raven-js/pull/718

# Contributing
## Setting up an Environment
## Reporting Issues and Asking Questions
Before opening an issue, please search the issue tracker to make sure your issue hasn't already been reported.
## Bugs and Improvements
We use the issue tracker to keep track of bugs and improvements to Raven.js itself, plugins, and the documentation. We encourage you to open issues to discuss improvements, architecture, implementation, etc. If a topic has been discussed before, we will ask you to join the previous discussion.
## Getting Help
For support or usage questions like “how do I do X with Raven.js and “my code doesn't work”, please search and ask on the [Sentry forum](https://forum.sentry.io).
## Help Us Help You
On both GitHub and the Sentry forum, it is a good idea to structure your code and question in a way that is easy to read and understand. For example, we encourage you to use syntax highlighting, indentation, and split text in paragraphs.
Additionally, it is helpful if you can let us know:
* The version of Raven.js affected
* The browser and OS affected
* Which Raven.js plugins are enabled, if any
* If you are using [hosted Sentry](https://sentry.io) or on-premises, and if the latter, which version (e.g. 8.7.0)
* If you are using the Raven CDN (http://ravenjs.com)
Lastly, it is strongly encouraged to provide a small project reproducing your issue. You can put your code on [JSFiddle](https://jsfiddle.net/) or, for bigger projects, on GitHub. Make sure all the necessary dependencies are declared in package.json so anyone can run npm install && npm start and reproduce your issue.
## Development
### Setting up an Environment
To run the test suite and run our code linter, node.js and npm are required. If you don't have node installed, [get it here](http://nodejs.org/download/) first.

@@ -19,3 +47,3 @@

## Running the Test Suite
### Running the Test Suite

@@ -38,3 +66,3 @@ The test suite is powered by [Mocha](http://visionmedia.github.com/mocha/) and can both run from the command line or in the browser.

## Compiling Raven.js
### Compiling Raven.js

@@ -84,18 +112,20 @@ The simplest way to compile your own version of Raven.js is with the supplied grunt command:

* Verify TypeScript [language definition file](https://github.com/getsentry/raven-js/blob/master/typescript/raven.d.ts) is up to date
* Bump version numbers in both `package.json` and `bower.json`.
* Bump version across all docs under `docs/`
* Put together [CHANGELOG](https://github.com/getsentry/raven-js/blob/master/CHANGELOG.md)
* `$ grunt dist` This will compile a new version and update it in the `dist/` folder.
* Confirm that build was fine, etc.
* Commit new version, create a tag. Push to GitHub.
* Copy CHANGELOG entry into a new GH Release: https://github.com/getsentry/raven-js/releases
* `$ grunt publish` to recompile all plugins and all permutations and upload to S3.
* `$ npm publish` to push to npm.
* Confirm that the new version exists behind `cdn.ravenjs.com`
* Bump version in the `gh-pages` branch specifically for http://ravenjs.com/.
* Bump marketing pages on sentry.io, e.g. https://sentry.io/for/javascript/
* Bump sentry.io `<script>` tag of raven.js
* Bump `package.json` in Sentry repo https://github.com/getsentry/sentry/blob/master/package.json
* Bump version for Segment integration since they don't: https://github.com/segment-integrations/analytics.js-integration-sentry
* glhf
_This is a checklist for core contributors when releasing a new version._
* [ ] Verify TypeScript [language definition file](https://github.com/getsentry/raven-js/blob/master/typescript/raven.d.ts) is up to date
* [ ] Bump version numbers in both `package.json` and `bower.json`.
* [ ] Bump version across all docs under `docs/`
* [ ] Put together [CHANGELOG](https://github.com/getsentry/raven-js/blob/master/CHANGELOG.md)
* [ ] `$ grunt dist` This will compile a new version and update it in the `dist/` folder.
* [ ] Confirm that build was fine, etc.
* [ ] Commit new version, create a tag. Push to GitHub.
* [ ] Copy CHANGELOG entry into a new GH Release: https://github.com/getsentry/raven-js/releases
* [ ] `$ grunt publish` to recompile all plugins and all permutations and upload to S3.
* [ ] `$ npm publish` to push to npm.
* [ ] Confirm that the new version exists behind `cdn.ravenjs.com`
* [ ] Bump version in the `gh-pages` branch specifically for http://ravenjs.com/.
* [ ] Bump marketing pages on sentry.io, e.g. https://sentry.io/for/javascript/
* [ ] Bump sentry.io `<script>` tag of raven.js
* [ ] Bump `package.json` in Sentry repo https://github.com/getsentry/sentry/blob/master/package.json
* [ ] Bump version for Segment integration since they don't: https://github.com/segment-integrations/analytics.js-integration-sentry
* [ ] glhf

@@ -1,2 +0,2 @@

/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */
/*! Raven.js 3.8.0 (d78f15c) | github.com/getsentry/raven-js */

@@ -3,0 +3,0 @@ /*

@@ -1,3 +0,3 @@

/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Angular=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b){function c(){this.$get=["$window",function(b){return a}]}function e(a){a.decorator("$exceptionHandler",["Raven","$delegate",f])}function f(a,b){return function(c,d){a.captureException(c,{extra:{cause:d}}),b(c,d)}}b=b||window.angular,b&&(b.module("ngRaven",[]).provider("Raven",c).config(["$provide",e]),a.setDataCallback(function(a,b){d.a(a),b&&b(a)}))}var e=/^\[((?:[$a-zA-Z0-9]+:)?(?:[$a-zA-Z0-9]+))\] (.*?)\n?(\S+)$/;d.a=function(a){var b=a.exception;if(b){b=b.values[0];var c=e.exec(b.value);c&&(b.type=c[1],b.value=c[2],a.message=b.type+": "+b.value,a.extra.angularDocs=c[3].substr(0,250))}},b.exports=d},{}]},{},[1])(1)});
/*! Raven.js 3.8.0 (d78f15c) | github.com/getsentry/raven-js */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Angular=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b){function c(){this.$get=["$window",function(b){return a}]}function e(a){a.decorator("$exceptionHandler",["Raven","$delegate",f])}function f(a,b){return function(c,d){a.captureException(c,{extra:{cause:d}}),b(c,d)}}b=b||window.angular,b&&(b.module("ngRaven",[]).provider("Raven",c).config(["$provide",e]),a.setDataCallback(function(a,b){d.a(a),b&&b(a)}))}var e=/^\[((?:[$a-zA-Z0-9]+:)?(?:[$a-zA-Z0-9]+))\] (.*?)\n?(\S+)$/;d.a=function(a){var b=a.exception;if(b){b=b.values[0];var c=e.exec(b.value);c&&(b.type=c[1],b.value=c[2],a.message=b.type+": "+b.value,a.extra.angularDocs=c[3].substr(0,250))}},b.exports=d},{}]},{},[1])(1)});
//# sourceMappingURL=angular.min.js.map

@@ -1,2 +0,2 @@

/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */
/*! Raven.js 3.8.0 (d78f15c) | github.com/getsentry/raven-js */

@@ -3,0 +3,0 @@ /*

@@ -1,3 +0,3 @@

/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Console=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b,c){b=b||window.console||{},c=c||{};for(var d=c.levels||["debug","info","warn","error"],f=d.pop(),g=function(b,c){a.captureMessage(b,c)};f;)e(b,f,g),f=d.pop()}var e=a(2).wrapMethod;b.exports=d},{2:2}],2:[function(a,b,c){"use strict";var d=function(a,b,c){var d=a[b],e=a;if(b in a){var f="warn"===b?"warning":b;a[b]=function(){var a=[].slice.call(arguments),b=""+a.join(" "),g={level:f,logger:"console",extra:{arguments:a}};c&&c(b,g),d&&Function.prototype.apply.call(d,e,a)}}};b.exports={wrapMethod:d}},{}]},{},[1])(1)});
/*! Raven.js 3.8.0 (d78f15c) | github.com/getsentry/raven-js */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Console=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b,c){b=b||window.console||{},c=c||{};for(var d=c.levels||["debug","info","warn","error"],f=d.pop(),g=function(b,c){a.captureMessage(b,c)};f;)e(b,f,g),f=d.pop()}var e=a(2).wrapMethod;b.exports=d},{2:2}],2:[function(a,b,c){"use strict";var d=function(a,b,c){var d=a[b],e=a;if(b in a){var f="warn"===b?"warning":b;a[b]=function(){var a=[].slice.call(arguments),b=""+a.join(" "),g={level:f,logger:"console",extra:{arguments:a}};c&&c(b,g),d&&Function.prototype.apply.call(d,e,a)}}};b.exports={wrapMethod:d}},{}]},{},[1])(1)});
//# sourceMappingURL=console.min.js.map

@@ -1,2 +0,2 @@

/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */
/*! Raven.js 3.8.0 (d78f15c) | github.com/getsentry/raven-js */

@@ -3,0 +3,0 @@ /*

@@ -1,3 +0,3 @@

/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Ember=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b){if(b=b||window.Ember){var c=b.onerror;b.onerror=function(b){a.captureException(b),"function"==typeof c&&c.call(this,b)},b.RSVP.on("error",function(b){b instanceof Error?a.captureException(b,{extra:{context:"Unhandled Promise error detected"}}):a.captureMessage("Unhandled Promise error detected",{extra:{reason:b}})})}}b.exports=d},{}]},{},[1])(1)});
/*! Raven.js 3.8.0 (d78f15c) | github.com/getsentry/raven-js */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Ember=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b){if(b=b||window.Ember){var c=b.onerror;b.onerror=function(b){a.captureException(b),"function"==typeof c&&c.call(this,b)},b.RSVP.on("error",function(b){b instanceof Error?a.captureException(b,{extra:{context:"Unhandled Promise error detected"}}):a.captureMessage("Unhandled Promise error detected",{extra:{reason:b}})})}}b.exports=d},{}]},{},[1])(1)});
//# sourceMappingURL=ember.min.js.map

@@ -1,2 +0,2 @@

/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */
/*! Raven.js 3.8.0 (d78f15c) | github.com/getsentry/raven-js */

@@ -3,0 +3,0 @@ /*

@@ -1,3 +0,3 @@

/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Require=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(b,c,d){"use strict";function e(c){"function"==typeof a&&a.amd&&(window.define=c.wrap({deep:!1},a),window.require=c.wrap({deep:!1},b))}c.exports=e},{}]},{},[1])(1)});
/*! Raven.js 3.8.0 (d78f15c) | github.com/getsentry/raven-js */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Require=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(b,c,d){"use strict";function e(c){"function"==typeof a&&a.amd&&(window.define=c.wrap({deep:!1},a),window.require=c.wrap({deep:!1},b))}c.exports=e},{}]},{},[1])(1)});
//# sourceMappingURL=require.min.js.map

@@ -1,2 +0,2 @@

/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */
/*! Raven.js 3.8.0 (d78f15c) | github.com/getsentry/raven-js */

@@ -3,0 +3,0 @@ /*

@@ -1,3 +0,3 @@

/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Vue=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b){if(b=b||window.Vue,b&&b.config){var c=b.config.errorHandler;b.config.errorHandler=function(d,e){a.captureException(d,{extra:{componentName:b.util.formatComponentName(e),propsData:e.$options.propsData}}),"function"==typeof c&&c.call(this,d,e)}}}b.exports=d},{}]},{},[1])(1)});
/*! Raven.js 3.8.0 (d78f15c) | github.com/getsentry/raven-js */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b=b.Raven||(b.Raven={}),b=b.Plugins||(b.Plugins={}),b.Vue=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";function d(a,b){if(b=b||window.Vue,b&&b.config){var c=b.config.errorHandler;b.config.errorHandler=function(d,e){a.captureException(d,{extra:{componentName:b.util.formatComponentName(e),propsData:e.$options.propsData}}),"function"==typeof c&&c.call(this,d,e)}}}b.exports=d},{}]},{},[1])(1)});
//# sourceMappingURL=vue.min.js.map

@@ -1,3 +0,3 @@

/*! Raven.js 3.7.0 (cf2ddee) | github.com/getsentry/raven-js */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Raven=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(a,b,c){function d(a,b,c,d){return JSON.stringify(a,e(b,d),c)}function e(a,b){var c=[],d=[];return null==b&&(b=function(a,b){return c[0]===b?"[Circular ~]":"[Circular ~."+d.slice(0,c.indexOf(b)).join(".")+"]"}),function(e,f){if(c.length>0){var g=c.indexOf(this);~g?c.splice(g+1):c.push(this),~g?d.splice(g,1/0,e):d.push(e),~c.indexOf(f)&&(f=b.call(this,e,f))}else c.push(f);return null==a?f:a.call(this,e,f)}}c=b.exports=d,c.getSerialize=e},{}],2:[function(a,b,c){"use strict";function d(a){this.name="RavenConfigError",this.message=a}d.prototype=new Error,d.prototype.constructor=d,b.exports=d},{}],3:[function(a,b,c){"use strict";var d=function(a,b,c){var d=a[b],e=a;if(b in a){var f="warn"===b?"warning":b;a[b]=function(){var a=[].slice.call(arguments),b=""+a.join(" "),g={level:f,logger:"console",extra:{arguments:a}};c&&c(b,g),d&&Function.prototype.apply.call(d,e,a)}}};b.exports={wrapMethod:d}},{}],4:[function(a,b,c){"use strict";function d(){return+new Date}function e(){this.a=!("object"!=typeof JSON||!JSON.stringify),this.b="undefined"!=typeof document,this.c=null,this.d=null,this.e=null,this.f=null,this.g=null,this.h={},this.i={logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],crossOrigin:"anonymous",collectWindowErrors:!0,maxMessageLength:0,stackTraceLimit:50,autoBreadcrumbs:!0},this.j=0,this.k=!1,this.l=Error.stackTraceLimit,this.m=window.console||{},this.n={},this.o=[],this.p=d(),this.q=[],this.r=[],this.s=null,this.t=window.location,this.u=this.t&&this.t.href;for(var a in this.m)this.n[a]=this.m[a]}var f=a(7),g=a(2),h=a(6),i=a(1),j=h.isFunction,k=h.isUndefined,l=h.isError,m=h.isEmptyObject,n=h.hasKey,o=h.joinRegExp,p=h.each,q=h.objectMerge,r=h.truncate,s=h.urlencode,t=h.uuid4,u=h.htmlTreeAsString,v=h.parseUrl,w=h.isString,x=h.fill,y=a(3).wrapMethod,z="source protocol user pass host port path".split(" "),A=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;e.prototype={VERSION:"3.7.0",debug:!1,TraceKit:f,config:function(a,b){var c=this;if(this.e)return this.v("error","Error: Raven has already been configured"),this;if(!a)return this;b&&p(b,function(a,b){"tags"===a||"extra"===a?c.h[a]=b:c.i[a]=b}),this.setDSN(a),this.i.ignoreErrors.push(/^Script error\.?$/),this.i.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),this.i.ignoreErrors=o(this.i.ignoreErrors),this.i.ignoreUrls=this.i.ignoreUrls.length?o(this.i.ignoreUrls):!1,this.i.whitelistUrls=this.i.whitelistUrls.length?o(this.i.whitelistUrls):!1,this.i.includePaths=o(this.i.includePaths),this.i.maxBreadcrumbs=Math.max(0,Math.min(this.i.maxBreadcrumbs||100,100));var d={xhr:!0,console:!0,dom:!0,location:!0},e=this.i.autoBreadcrumbs;return"[object Object]"==={}.toString.call(e)?e=q(d,e):e!==!1&&(e=d),this.i.autoBreadcrumbs=e,f.collectWindowErrors=!!this.i.collectWindowErrors,this},install:function(){var a=this;return this.isSetup()&&!this.k&&(f.report.subscribe(function(){a.w.apply(a,arguments)}),this.x(),a.i.autoBreadcrumbs&&this.y(),this.z(),this.k=!0),Error.stackTraceLimit=this.i.stackTraceLimit,this},setDSN:function(a){var b=this.A(a),c=b.path.lastIndexOf("/"),d=b.path.substr(1,c);this.B=a,this.f=b.user,this.C=b.pass&&b.pass.substr(1),this.g=b.path.substr(c+1),this.e=this.D(b),this.E=this.e+"/"+d+"api/"+this.g+"/store/"},context:function(a,b,c){return j(a)&&(c=b||[],b=a,a=void 0),this.wrap(a,b).apply(this,c)},wrap:function(a,b,c){function d(){var d=[],f=arguments.length,g=!a||a&&a.deep!==!1;for(c&&j(c)&&c.apply(this,arguments);f--;)d[f]=g?e.wrap(a,arguments[f]):arguments[f];try{return b.apply(this,d)}catch(h){throw e.F(),e.captureException(h,a),h}}var e=this;if(k(b)&&!j(a))return a;if(j(a)&&(b=a,a=void 0),!j(b))return b;try{if(b.G)return b;if(b.H)return b.H}catch(f){return b}for(var g in b)n(b,g)&&(d[g]=b[g]);return d.prototype=b.prototype,b.H=d,d.G=!0,d.I=b,d},uninstall:function(){return f.report.uninstall(),this.J(),Error.stackTraceLimit=this.l,this.k=!1,this},captureException:function(a,b){if(!l(a))return this.captureMessage(a,q({trimHeadFrames:1,stacktrace:!0},b));this.c=a;try{var c=f.computeStackTrace(a);this.K(c,b)}catch(d){if(a!==d)throw d}return this},captureMessage:function(a,b){if(!this.i.ignoreErrors.test||!this.i.ignoreErrors.test(a)){var c=q({message:a+""},b);if(b&&b.stacktrace){var d;try{throw new Error(a)}catch(e){d=e}d.name=null,b=q({fingerprint:a,trimHeadFrames:(b.trimHeadFrames||0)+1},b);var g=f.computeStackTrace(d),h=this.L(g,b);c.stacktrace={frames:h.reverse()}}return this.M(c),this}},captureBreadcrumb:function(a){var b=q({timestamp:d()/1e3},a);return this.r.push(b),this.r.length>this.i.maxBreadcrumbs&&this.r.shift(),this},addPlugin:function(a){var b=Array.prototype.slice.call(arguments,1);return this.o.push([a,b]),this.k&&this.z(),this},setUserContext:function(a){return this.h.user=a,this},setExtraContext:function(a){return this.N("extra",a),this},setTagsContext:function(a){return this.N("tags",a),this},clearContext:function(){return this.h={},this},getContext:function(){return JSON.parse(i(this.h))},setEnvironment:function(a){return this.i.environment=a,this},setRelease:function(a){return this.i.release=a,this},setDataCallback:function(a){var b=this.i.dataCallback;return this.i.dataCallback=j(a)?function(c){return a(c,b)}:a,this},setShouldSendCallback:function(a){var b=this.i.shouldSendCallback;return this.i.shouldSendCallback=j(a)?function(c){return a(c,b)}:a,this},setTransport:function(a){return this.i.transport=a,this},lastException:function(){return this.c},lastEventId:function(){return this.d},isSetup:function(){return this.a?this.e?!0:(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this.v("error","Error: Raven has not been configured.")),!1):!1},afterLoad:function(){var a=window.RavenConfig;a&&this.config(a.dsn,a.config).install()},showReportDialog:function(a){if(window.document){a=a||{};var b=a.eventId||this.lastEventId();if(!b)throw new g("Missing eventId");var c=a.dsn||this.B;if(!c)throw new g("Missing DSN");var d=encodeURIComponent,e="";e+="?eventId="+d(b),e+="&dsn="+d(c);var f=a.user||this.h.user;f&&(f.name&&(e+="&name="+d(f.name)),f.email&&(e+="&email="+d(f.email)));var h=this.D(this.A(c)),i=document.createElement("script");i.async=!0,i.src=h+"/api/embed/error-page/"+e,(document.head||document.body).appendChild(i)}},F:function(){var a=this;this.j+=1,setTimeout(function(){a.j-=1})},O:function(a,b){var c,d;if(this.b){b=b||{},a="raven"+a.substr(0,1).toUpperCase()+a.substr(1),document.createEvent?(c=document.createEvent("HTMLEvents"),c.initEvent(a,!0,!0)):(c=document.createEventObject(),c.eventType=a);for(d in b)n(b,d)&&(c[d]=b[d]);if(document.createEvent)document.dispatchEvent(c);else try{document.fireEvent("on"+c.eventType.toLowerCase(),c)}catch(e){}}},P:function(a){var b=this;return function(c){if(b.Q=null,b.s!==c){b.s=c;var d,e=c.target;try{d=u(e)}catch(f){d="<unknown>"}b.captureBreadcrumb({category:"ui."+a,message:d})}}},R:function(){var a=this,b=1e3;return function(c){var d=c.target,e=d&&d.tagName;if(e&&("INPUT"===e||"TEXTAREA"===e)){var f=a.Q;f||a.P("input")(c),clearTimeout(f),a.Q=setTimeout(function(){a.Q=null},b)}}},S:function(a,b){var c=v(this.t.href),d=v(b),e=v(a);this.u=b,c.protocol===d.protocol&&c.host===d.host&&(b=d.relative),c.protocol===e.protocol&&c.host===e.host&&(a=e.relative),this.captureBreadcrumb({category:"navigation",data:{to:b,from:a}})},x:function(){function a(a){return function(b,d){for(var e=new Array(arguments.length),f=0;e.length>f;++f)e[f]=arguments[f];var g=e[0];return j(g)&&(e[0]=c.wrap(g)),a.apply?a.apply(this,e):a(e[0],e[1])}}function b(a){var b=window[a]&&window[a].prototype;b&&b.hasOwnProperty&&b.hasOwnProperty("addEventListener")&&(x(b,"addEventListener",function(b){return function(d,f,g,h){try{f&&f.handleEvent&&(f.handleEvent=c.wrap(f.handleEvent))}catch(i){}var j;return e&&e.dom&&("EventTarget"===a||"Node"===a)&&("click"===d?j=c.P(d):"keypress"===d&&(j=c.R())),b.call(this,d,c.wrap(f,void 0,j),g,h)}},d),x(b,"removeEventListener",function(a){return function(b,c,d,e){try{c=c&&(c.H?c.H:c)}catch(f){}return a.call(this,b,c,d,e)}},d))}var c=this,d=c.q,e=this.i.autoBreadcrumbs;x(window,"setTimeout",a,d),x(window,"setInterval",a,d),window.requestAnimationFrame&&x(window,"requestAnimationFrame",function(a){return function(b){return a(c.wrap(b))}},d);for(var f=["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"],g=0;f.length>g;g++)b(f[g]);var h=window.jQuery||window.$;h&&h.fn&&h.fn.ready&&x(h.fn,"ready",function(a){return function(b){return a.call(this,c.wrap(b))}},d)},y:function(){function a(a,c){a in c&&j(c[a])&&x(c,a,function(a){return b.wrap(a)})}var b=this,c=this.i.autoBreadcrumbs,d=b.q;if(c.xhr&&"XMLHttpRequest"in window){var e=XMLHttpRequest.prototype;x(e,"open",function(a){return function(c,d){return w(d)&&-1===d.indexOf(b.f)&&(this.T={method:c,url:d,status_code:null}),a.apply(this,arguments)}},d),x(e,"send",function(c){return function(d){function e(){if(f.T&&(1===f.readyState||4===f.readyState)){try{f.T.status_code=f.status}catch(a){}b.captureBreadcrumb({type:"http",category:"xhr",data:f.T})}}for(var f=this,g=["onload","onerror","onprogress"],h=0;g.length>h;h++)a(g[h],f);return"onreadystatechange"in f&&j(f.onreadystatechange)?x(f,"onreadystatechange",function(a){return b.wrap(a,void 0,e)}):f.onreadystatechange=e,c.apply(this,arguments)}},d)}c.dom&&this.b&&(document.addEventListener?(document.addEventListener("click",b.P("click"),!1),document.addEventListener("keypress",b.R(),!1)):(document.attachEvent("onclick",b.P("click")),document.attachEvent("onkeypress",b.R())));var f=window.chrome,g=f&&f.app&&f.app.runtime,h=!g&&window.history&&history.pushState;if(c.location&&h){var i=window.onpopstate;window.onpopstate=function(){var a=b.t.href;return b.S(b.u,a),i?i.apply(this,arguments):void 0},x(history,"pushState",function(a){return function(){var c=arguments.length>2?arguments[2]:void 0;return c&&b.S(b.u,c+""),a.apply(this,arguments)}},d)}if(c.console&&"console"in window&&console.log){var k=function(a,c){b.captureBreadcrumb({message:a,level:c.level,category:"console"})};p(["debug","info","warn","error","log"],function(a,b){y(console,b,k)})}},J:function(){for(var a;this.q.length;){a=this.q.shift();var b=a[0],c=a[1],d=a[2];b[c]=d}},z:function(){var a=this;p(this.o,function(b,c){var d=c[0],e=c[1];d.apply(a,[a].concat(e))})},A:function(a){var b=A.exec(a),c={},d=7;try{for(;d--;)c[z[d]]=b[d]||""}catch(e){throw new g("Invalid DSN: "+a)}if(c.pass&&!this.i.allowSecretKey)throw new g("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return c},D:function(a){var b="//"+a.host+(a.port?":"+a.port:"");return a.protocol&&(b=a.protocol+":"+b),b},w:function(){this.j||this.K.apply(this,arguments)},K:function(a,b){var c=this.L(a,b);this.O("handle",{stackInfo:a,options:b}),this.U(a.name,a.message,a.url,a.lineno,c,b)},L:function(a,b){var c=this,d=[];if(a.stack&&a.stack.length&&(p(a.stack,function(a,b){var e=c.V(b);e&&d.push(e)}),b&&b.trimHeadFrames))for(var e=0;b.trimHeadFrames>e&&d.length>e;e++)d[e].in_app=!1;return d=d.slice(0,this.i.stackTraceLimit)},V:function(a){if(a.url){var b={filename:a.url,lineno:a.line,colno:a.column,"function":a.func||"?"};return b.in_app=!(this.i.includePaths.test&&!this.i.includePaths.test(b.filename)||/(Raven|TraceKit)\./.test(b["function"])||/raven\.(min\.)?js$/.test(b.filename)),b}},U:function(a,b,c,d,e,f){var g;if((!this.i.ignoreErrors.test||!this.i.ignoreErrors.test(b))&&(b+="",e&&e.length?(c=e[0].filename||c,e.reverse(),g={frames:e}):c&&(g={frames:[{filename:c,lineno:d,in_app:!0}]}),(!this.i.ignoreUrls.test||!this.i.ignoreUrls.test(c))&&(!this.i.whitelistUrls.test||this.i.whitelistUrls.test(c)))){var h=q({exception:{values:[{type:a,value:b,stacktrace:g}]},culprit:c},f);this.M(h)}},W:function(a){var b=this.i.maxMessageLength;if(a.message&&(a.message=r(a.message,b)),a.exception){var c=a.exception.values[0];c.value=r(c.value,b)}return a},X:function(){if(this.b&&document.location&&document.location.href){var a={headers:{"User-Agent":navigator.userAgent}};return a.url=document.location.href,document.referrer&&(a.headers.Referer=document.referrer),a}},M:function(a){var b=this.i,c={project:this.g,logger:b.logger,platform:"javascript"},e=this.X();e&&(c.request=e),a.trimHeadFrames&&delete a.trimHeadFrames,a=q(c,a),a.tags=q(q({},this.h.tags),a.tags),a.extra=q(q({},this.h.extra),a.extra),a.extra["session:duration"]=d()-this.p,this.r&&this.r.length>0&&(a.breadcrumbs={values:[].slice.call(this.r,0)}),m(a.tags)&&delete a.tags,this.h.user&&(a.user=this.h.user),b.environment&&(a.environment=b.environment),b.release&&(a.release=b.release),b.serverName&&(a.server_name=b.serverName),j(b.dataCallback)&&(a=b.dataCallback(a)||a),a&&!m(a)&&(!j(b.shouldSendCallback)||b.shouldSendCallback(a))&&this.Y(a)},Y:function(a,b){var c=this,d=this.i;if(this.d=a.event_id||(a.event_id=t()),a=this.W(a),this.v("debug","Raven about to send:",a),this.isSetup()){var e={sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this.f};this.C&&(e.sentry_secret=this.C);var f=a.exception&&a.exception.values[0];this.captureBreadcrumb({category:"sentry",message:f?(f.type?f.type+": ":"")+f.value:a.message,event_id:a.event_id,level:a.level||"error"});var g=this.E;(d.transport||this.Z).call(this,{url:g,auth:e,data:a,options:d,onSuccess:function(){c.O("success",{data:a,src:g}),b&&b()},onError:function(d){c.O("failure",{data:a,src:g}),d=d||new Error("Raven send failed (no additional details provided)"),b&&b(d)}})}},Z:function(a){function b(){200===c.status?a.onSuccess&&a.onSuccess():a.onError&&a.onError(new Error("Sentry error code: "+c.status))}var c=new XMLHttpRequest,d="withCredentials"in c||"undefined"!=typeof XDomainRequest;if(d){var e=a.url;"withCredentials"in c?c.onreadystatechange=function(){4===c.readyState&&b()}:(c=new XDomainRequest,e=e.replace(/^https?:/,""),c.onload=b),c.open("POST",e+"?"+s(a.auth)),c.send(i(a.data))}},v:function(a){this.n[a]&&this.debug&&Function.prototype.apply.call(this.n[a],this.m,[].slice.call(arguments,1))},N:function(a,b){k(b)?delete this.h[a]:this.h[a]=q(this.h[a]||{},b)}},e.prototype.setUser=e.prototype.setUserContext,e.prototype.setReleaseContext=e.prototype.setRelease,b.exports=e},{1:1,2:2,3:3,6:6,7:7}],5:[function(a,b,c){"use strict";var d=a(4),e=window.Raven,f=new d;f.noConflict=function(){return window.Raven=e,f},f.afterLoad(),b.exports=f},{4:4}],6:[function(a,b,c){"use strict";function d(a){return void 0===a}function e(a){return"function"==typeof a}function f(a){return"[object String]"===u.toString.call(a)}function g(a){return"object"==typeof a&&null!==a}function h(a){for(var b in a)return!1;return!0}function i(a){var b=u.toString.call(a);return g(a)&&"[object Error]"===b||"[object Exception]"===b||a instanceof Error}function j(a,b){var c,e;if(d(a.length))for(c in a)m(a,c)&&b.call(null,c,a[c]);else if(e=a.length)for(c=0;e>c;c++)b.call(null,c,a[c])}function k(a,b){return b?(j(b,function(b,c){a[b]=c}),a):a}function l(a,b){return!b||b>=a.length?a:a.substr(0,b)+"…"}function m(a,b){return u.hasOwnProperty.call(a,b)}function n(a){for(var b,c=[],d=0,e=a.length;e>d;d++)b=a[d],f(b)?c.push(b.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):b&&b.source&&c.push(b.source);return new RegExp(c.join("|"),"i")}function o(a){var b=[];return j(a,function(a,c){b.push(encodeURIComponent(a)+"="+encodeURIComponent(c))}),b.join("&")}function p(a){var b=a.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!b)return{};var c=b[6]||"",d=b[8]||"";return{protocol:b[2],host:b[4],path:b[5],relative:b[5]+c+d}}function q(){var a=window.crypto||window.msCrypto;if(!d(a)&&a.getRandomValues){var b=new Uint16Array(8);a.getRandomValues(b),b[3]=4095&b[3]|16384,b[4]=16383&b[4]|32768;var c=function(a){for(var b=a.toString(16);4>b.length;)b="0"+b;return b};return c(b[0])+c(b[1])+c(b[2])+c(b[3])+c(b[4])+c(b[5])+c(b[6])+c(b[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0,c="x"===a?b:3&b|8;return c.toString(16)})}function r(a){for(var b,c=5,d=80,e=[],f=0,g=0,h=" > ",i=h.length;a&&f++<c&&(b=s(a),!("html"===b||f>1&&g+e.length*i+b.length>=d));)e.push(b),g+=b.length,a=a.parentNode;return e.reverse().join(h)}function s(a){var b,c,d,e,g,h=[];if(!a||!a.tagName)return"";if(h.push(a.tagName.toLowerCase()),a.id&&h.push("#"+a.id),b=a.className,b&&f(b))for(c=b.split(" "),g=0;c.length>g;g++)h.push("."+c[g]);var i=["type","name","title","alt"];for(g=0;i.length>g;g++)d=i[g],e=a.getAttribute(d),e&&h.push("["+d+'="'+e+'"]');return h.join("")}function t(a,b,c,d){var e=a[b];a[b]=c(e),d&&d.push([a,b,e])}var u=Object.prototype;b.exports={isUndefined:d,isFunction:e,isString:f,isObject:g,isEmptyObject:h,isError:i,each:j,objectMerge:k,truncate:l,hasKey:m,joinRegExp:n,urlencode:o,uuid4:q,htmlTreeAsString:r,htmlElementAsString:s,parseUrl:p,fill:t}},{}],7:[function(a,b,c){"use strict";function d(){return"undefined"==typeof document?"":document.location.href}var e=a(6),f=e.hasKey,g=e.isString,h=e.isUndefined,i={collectWindowErrors:!0,debug:!1},j=[].slice,k="?",l=/^(?:Uncaught (?:exception: )?)?((?:Eval|Internal|Range|Reference|Syntax|Type|URI)Error): ?(.*)$/;i.report=function(){function a(a){m(),s.push(a)}function b(a){for(var b=s.length-1;b>=0;--b)s[b]===a&&s.splice(b,1)}function c(){n(),s=[]}function e(a,b){var c=null;if(!b||i.collectWindowErrors){for(var d in s)if(f(s,d))try{s[d].apply(null,[a].concat(j.call(arguments,2)))}catch(e){c=e}if(c)throw c}}function h(a,b,c,f,h){var j=null;if(v)i.computeStackTrace.augmentStackTraceWithInitialElement(v,b,c,a),o();else if(h)j=i.computeStackTrace(h),e(j,!0);else{var m,n={url:b,line:c,column:f},p=void 0,r=a;if(g(a)){var m=a.match(l);m&&(p=m[1],r=m[2])}n.func=k,j={name:p,message:r,url:d(),stack:[n]},e(j,!0)}return q?q.apply(this,arguments):!1}function m(){r||(q=window.onerror,window.onerror=h,r=!0)}function n(){r&&(window.onerror=q,r=!1,q=void 0)}function o(){var a=v,b=t;t=null,v=null,u=null,e.apply(null,[a,!1].concat(b))}function p(a,b){var c=j.call(arguments,1);if(v){if(u===a)return;o()}var d=i.computeStackTrace(a);if(v=d,u=a,t=c,window.setTimeout(function(){u===a&&o()},d.incomplete?2e3:0),b!==!1)throw a}var q,r,s=[],t=null,u=null,v=null;return p.subscribe=a,p.unsubscribe=b,p.uninstall=c,p}(),i.computeStackTrace=function(){function a(a){if(!h(a.stack)&&a.stack){for(var b,c,e=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|<anonymous>).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,f=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|\[native).*?)(?::(\d+))?(?::(\d+))?\s*$/i,g=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,i=a.stack.split("\n"),j=[],l=(/^(.*) is undefined$/.exec(a.message),0),m=i.length;m>l;++l){if(b=e.exec(i[l])){var n=b[2]&&-1!==b[2].indexOf("native");c={url:n?null:b[2],func:b[1]||k,args:n?[b[2]]:[],line:b[3]?+b[3]:null,column:b[4]?+b[4]:null}}else if(b=g.exec(i[l]))c={url:b[2],func:b[1]||k,args:[],line:+b[3],column:b[4]?+b[4]:null};else{if(!(b=f.exec(i[l])))continue;c={url:b[3],func:b[1]||k,args:b[2]?b[2].split(","):[],line:b[4]?+b[4]:null,column:b[5]?+b[5]:null}}!c.func&&c.line&&(c.func=k),j.push(c)}return j.length?(j[0].column||h(a.columnNumber)||(j[0].column=a.columnNumber+1),{name:a.name,message:a.message,url:d(),stack:j}):null}}function b(a,b,c,d){var e={url:b,line:c};if(e.url&&e.line){if(a.incomplete=!1,e.func||(e.func=k),a.stack.length>0&&a.stack[0].url===e.url){if(a.stack[0].line===e.line)return!1;if(!a.stack[0].line&&a.stack[0].func===e.func)return a.stack[0].line=e.line,!1}return a.stack.unshift(e),a.partial=!0,!0}return a.incomplete=!0,!1}function c(a,f){for(var g,h,j=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,l=[],m={},n=!1,o=c.caller;o&&!n;o=o.caller)if(o!==e&&o!==i.report){if(h={url:null,func:k,line:null,column:null},o.name?h.func=o.name:(g=j.exec(o.toString()))&&(h.func=g[1]),"undefined"==typeof h.func)try{h.func=g.input.substring(0,g.input.indexOf("{"))}catch(p){}m[""+o]?n=!0:m[""+o]=!0,l.push(h)}f&&l.splice(0,f);var q={name:a.name,message:a.message,url:d(),stack:l};return b(q,a.sourceURL||a.fileName,a.line||a.lineNumber,a.message||a.description),q}function e(b,e){var f=null;e=null==e?0:+e;try{if(f=a(b))return f}catch(g){if(i.debug)throw g}try{if(f=c(b,e+1))return f}catch(g){if(i.debug)throw g}return{name:b.name,message:b.message,url:d()}}return e.augmentStackTraceWithInitialElement=b,e.computeStackTraceFromStackProp=a,e}(),b.exports=i},{6:6}]},{},[5])(5)});
/*! Raven.js 3.8.0 (d78f15c) | github.com/getsentry/raven-js */
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.Raven=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){function d(a,b,c,d){return JSON.stringify(a,e(b,d),c)}function e(a,b){var c=[],d=[];return null==b&&(b=function(a,b){return c[0]===b?"[Circular ~]":"[Circular ~."+d.slice(0,c.indexOf(b)).join(".")+"]"}),function(e,f){if(c.length>0){var g=c.indexOf(this);~g?c.splice(g+1):c.push(this),~g?d.splice(g,1/0,e):d.push(e),~c.indexOf(f)&&(f=b.call(this,e,f))}else c.push(f);return null==a?f:a.call(this,e,f)}}c=b.exports=d,c.getSerialize=e},{}],2:[function(a,b,c){"use strict";function d(a){this.name="RavenConfigError",this.message=a}d.prototype=new Error,d.prototype.constructor=d,b.exports=d},{}],3:[function(a,b,c){"use strict";var d=function(a,b,c){var d=a[b],e=a;if(b in a){var f="warn"===b?"warning":b;a[b]=function(){var a=[].slice.call(arguments),b=""+a.join(" "),g={level:f,logger:"console",extra:{arguments:a}};c&&c(b,g),d&&Function.prototype.apply.call(d,e,a)}}};b.exports={wrapMethod:d}},{}],4:[function(a,b,c){"use strict";function d(){return+new Date}function e(){this.a=!("object"!=typeof JSON||!JSON.stringify),this.b=!f(D),this.c=null,this.d=null,this.e=null,this.f=null,this.g=null,this.h={},this.i={logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],crossOrigin:"anonymous",collectWindowErrors:!0,maxMessageLength:0,stackTraceLimit:50,autoBreadcrumbs:!0},this.j=0,this.k=!1,this.l=Error.stackTraceLimit,this.m=C.console||{},this.n={},this.o=[],this.p=d(),this.q=[],this.r=[],this.s=null,this.t=C.location,this.u=this.t&&this.t.href;for(var a in this.m)this.n[a]=this.m[a]}function f(a){return void 0===a}function g(a){return"function"==typeof a}function h(a){return"[object String]"===E.toString.call(a)}function i(a){return"object"==typeof a&&null!==a}function j(a){for(var b in a)return!1;return!0}function k(a){var b=E.toString.call(a);return i(a)&&"[object Error]"===b||"[object Exception]"===b||a instanceof Error}function l(a,b){var c,d;if(f(a.length))for(c in a)o(a,c)&&b.call(null,c,a[c]);else if(d=a.length)for(c=0;c<d;c++)b.call(null,c,a[c])}function m(a,b){return b?(l(b,function(b,c){a[b]=c}),a):a}function n(a,b){return!b||a.length<=b?a:a.substr(0,b)+"…"}function o(a,b){return E.hasOwnProperty.call(a,b)}function p(a){for(var b,c=[],d=0,e=a.length;d<e;d++)b=a[d],h(b)?c.push(b.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):b&&b.source&&c.push(b.source);return new RegExp(c.join("|"),"i")}function q(a){var b=[];return l(a,function(a,c){b.push(encodeURIComponent(a)+"="+encodeURIComponent(c))}),b.join("&")}function r(a){var b=a.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!b)return{};var c=b[6]||"",d=b[8]||"";return{protocol:b[2],host:b[4],path:b[5],relative:b[5]+c+d}}function s(){var a=window.crypto||window.msCrypto;if(!f(a)&&a.getRandomValues){var b=new Uint16Array(8);a.getRandomValues(b),b[3]=4095&b[3]|16384,b[4]=16383&b[4]|32768;var c=function(a){for(var b=a.toString(16);b.length<4;)b="0"+b;return b};return c(b[0])+c(b[1])+c(b[2])+c(b[3])+c(b[4])+c(b[5])+c(b[6])+c(b[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0,c="x"===a?b:3&b|8;return c.toString(16)})}function t(a){for(var b,c=5,d=80,e=[],f=0,g=0,h=" > ",i=h.length;a&&f++<c&&(b=u(a),!("html"===b||f>1&&g+e.length*i+b.length>=d));)e.push(b),g+=b.length,a=a.parentNode;return e.reverse().join(h)}function u(a){var b,c,d,e,f,g=[];if(!a||!a.tagName)return"";if(g.push(a.tagName.toLowerCase()),a.id&&g.push("#"+a.id),b=a.className,b&&h(b))for(c=b.split(" "),f=0;f<c.length;f++)g.push("."+c[f]);var i=["type","name","title","alt"];for(f=0;f<i.length;f++)d=i[f],e=a.getAttribute(d),e&&g.push("["+d+'="'+e+'"]');return g.join("")}function v(a,b,c,d){var e=a[b];a[b]=c(e),d&&d.push([a,b,e])}var w=a(6),x=a(2),y=a(1),z=a(3).wrapMethod,A="source protocol user pass host port path".split(" "),B=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/,C="undefined"!=typeof window?window:void 0,D=C&&C.document;e.prototype={VERSION:"3.8.0",debug:!1,TraceKit:w,config:function(a,b){var c=this;if(c.e)return this.v("error","Error: Raven has already been configured"),c;if(!a)return c;var d=c.i;b&&l(b,function(a,b){"tags"===a||"extra"===a?c.h[a]=b:d[a]=b}),c.setDSN(a),d.ignoreErrors.push(/^Script error\.?$/),d.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),d.ignoreErrors=p(d.ignoreErrors),d.ignoreUrls=!!d.ignoreUrls.length&&p(d.ignoreUrls),d.whitelistUrls=!!d.whitelistUrls.length&&p(d.whitelistUrls),d.includePaths=p(d.includePaths),d.maxBreadcrumbs=Math.max(0,Math.min(d.maxBreadcrumbs||100,100));var e={xhr:!0,console:!0,dom:!0,location:!0},f=d.autoBreadcrumbs;return"[object Object]"==={}.toString.call(f)?f=m(e,f):f!==!1&&(f=e),d.autoBreadcrumbs=f,w.collectWindowErrors=!!d.collectWindowErrors,c},install:function(){var a=this;return a.isSetup()&&!a.k&&(w.report.subscribe(function(){a.w.apply(a,arguments)}),a.x(),a.i.autoBreadcrumbs&&a.y(),a.z(),a.k=!0),Error.stackTraceLimit=a.i.stackTraceLimit,this},setDSN:function(a){var b=this,c=b.A(a),d=c.path.lastIndexOf("/"),e=c.path.substr(1,d);b.B=a,b.f=c.user,b.C=c.pass&&c.pass.substr(1),b.g=c.path.substr(d+1),b.e=b.D(c),b.E=b.e+"/"+e+"api/"+b.g+"/store/"},context:function(a,b,c){return g(a)&&(c=b||[],b=a,a=void 0),this.wrap(a,b).apply(this,c)},wrap:function(a,b,c){function d(){var d=[],f=arguments.length,h=!a||a&&a.deep!==!1;for(c&&g(c)&&c.apply(this,arguments);f--;)d[f]=h?e.wrap(a,arguments[f]):arguments[f];try{return b.apply(this,d)}catch(i){throw e.F(),e.captureException(i,a),i}}var e=this;if(f(b)&&!g(a))return a;if(g(a)&&(b=a,a=void 0),!g(b))return b;try{if(b.G)return b;if(b.H)return b.H}catch(h){return b}for(var i in b)o(b,i)&&(d[i]=b[i]);return d.prototype=b.prototype,b.H=d,d.G=!0,d.I=b,d},uninstall:function(){return w.report.uninstall(),this.J(),Error.stackTraceLimit=this.l,this.k=!1,this},captureException:function(a,b){if(!k(a))return this.captureMessage(a,m({trimHeadFrames:1,stacktrace:!0},b));this.c=a;try{var c=w.computeStackTrace(a);this.K(c,b)}catch(d){if(a!==d)throw d}return this},captureMessage:function(a,b){if(!this.i.ignoreErrors.test||!this.i.ignoreErrors.test(a)){var c=m({message:a+""},b);if(b&&b.stacktrace){var d;try{throw new Error(a)}catch(e){d=e}d.name=null,b=m({fingerprint:a,trimHeadFrames:(b.trimHeadFrames||0)+1},b);var f=w.computeStackTrace(d),g=this.L(f,b);c.stacktrace={frames:g.reverse()}}return this.M(c),this}},captureBreadcrumb:function(a){var b=m({timestamp:d()/1e3},a);return this.r.push(b),this.r.length>this.i.maxBreadcrumbs&&this.r.shift(),this},addPlugin:function(a){var b=[].slice.call(arguments,1);return this.o.push([a,b]),this.k&&this.z(),this},setUserContext:function(a){return this.h.user=a,this},setExtraContext:function(a){return this.N("extra",a),this},setTagsContext:function(a){return this.N("tags",a),this},clearContext:function(){return this.h={},this},getContext:function(){return JSON.parse(y(this.h))},setEnvironment:function(a){return this.i.environment=a,this},setRelease:function(a){return this.i.release=a,this},setDataCallback:function(a){var b=this.i.dataCallback;return this.i.dataCallback=g(a)?function(c){return a(c,b)}:a,this},setShouldSendCallback:function(a){var b=this.i.shouldSendCallback;return this.i.shouldSendCallback=g(a)?function(c){return a(c,b)}:a,this},setTransport:function(a){return this.i.transport=a,this},lastException:function(){return this.c},lastEventId:function(){return this.d},isSetup:function(){return!!this.a&&(!!this.e||(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this.v("error","Error: Raven has not been configured.")),!1))},afterLoad:function(){var a=C.RavenConfig;a&&this.config(a.dsn,a.config).install()},showReportDialog:function(a){if(D){a=a||{};var b=a.eventId||this.lastEventId();if(!b)throw new x("Missing eventId");var c=a.dsn||this.B;if(!c)throw new x("Missing DSN");var d=encodeURIComponent,e="";e+="?eventId="+d(b),e+="&dsn="+d(c);var f=a.user||this.h.user;f&&(f.name&&(e+="&name="+d(f.name)),f.email&&(e+="&email="+d(f.email)));var g=this.D(this.A(c)),h=D.createElement("script");h.async=!0,h.src=g+"/api/embed/error-page/"+e,(D.head||D.body).appendChild(h)}},F:function(){var a=this;this.j+=1,setTimeout(function(){a.j-=1})},O:function(a,b){var c,d;if(this.b){b=b||{},a="raven"+a.substr(0,1).toUpperCase()+a.substr(1),D.createEvent?(c=D.createEvent("HTMLEvents"),c.initEvent(a,!0,!0)):(c=D.createEventObject(),c.eventType=a);for(d in b)o(b,d)&&(c[d]=b[d]);if(D.createEvent)D.dispatchEvent(c);else try{D.fireEvent("on"+c.eventType.toLowerCase(),c)}catch(e){}}},P:function(a){var b=this;return function(c){if(b.Q=null,b.s!==c){b.s=c;var d,e=c.target;try{d=t(e)}catch(f){d="<unknown>"}b.captureBreadcrumb({category:"ui."+a,message:d})}}},R:function(){var a=this,b=1e3;return function(c){var d=c.target,e=d&&d.tagName;if(e&&("INPUT"===e||"TEXTAREA"===e||d.isContentEditable)){var f=a.Q;f||a.P("input")(c),clearTimeout(f),a.Q=setTimeout(function(){a.Q=null},b)}}},S:function(a,b){var c=r(this.t.href),d=r(b),e=r(a);this.u=b,c.protocol===d.protocol&&c.host===d.host&&(b=d.relative),c.protocol===e.protocol&&c.host===e.host&&(a=e.relative),this.captureBreadcrumb({category:"navigation",data:{to:b,from:a}})},x:function(){function a(a){return function(b,d){for(var e=new Array(arguments.length),f=0;f<e.length;++f)e[f]=arguments[f];var h=e[0];return g(h)&&(e[0]=c.wrap(h)),a.apply?a.apply(this,e):a(e[0],e[1])}}function b(a){var b=C[a]&&C[a].prototype;b&&b.hasOwnProperty&&b.hasOwnProperty("addEventListener")&&(v(b,"addEventListener",function(b){return function(d,f,g,h){try{f&&f.handleEvent&&(f.handleEvent=c.wrap(f.handleEvent))}catch(i){}var j;return e&&e.dom&&("EventTarget"===a||"Node"===a)&&("click"===d?j=c.P(d):"keypress"===d&&(j=c.R())),b.call(this,d,c.wrap(f,void 0,j),g,h)}},d),v(b,"removeEventListener",function(a){return function(b,c,d,e){try{c=c&&(c.H?c.H:c)}catch(f){}return a.call(this,b,c,d,e)}},d))}var c=this,d=c.q,e=this.i.autoBreadcrumbs;v(C,"setTimeout",a,d),v(C,"setInterval",a,d),C.requestAnimationFrame&&v(C,"requestAnimationFrame",function(a){return function(b){return a(c.wrap(b))}},d);for(var f=["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"],h=0;h<f.length;h++)b(f[h]);var i=C.jQuery||C.$;i&&i.fn&&i.fn.ready&&v(i.fn,"ready",function(a){return function(b){return a.call(this,c.wrap(b))}},d)},y:function(){function a(a,c){a in c&&g(c[a])&&v(c,a,function(a){return b.wrap(a)})}var b=this,c=this.i.autoBreadcrumbs,d=b.q;if(c.xhr&&"XMLHttpRequest"in C){var e=XMLHttpRequest.prototype;v(e,"open",function(a){return function(c,d){return h(d)&&d.indexOf(b.f)===-1&&(this.T={method:c,url:d,status_code:null}),a.apply(this,arguments)}},d),v(e,"send",function(c){return function(d){function e(){if(f.T&&(1===f.readyState||4===f.readyState)){try{f.T.status_code=f.status}catch(a){}b.captureBreadcrumb({type:"http",category:"xhr",data:f.T})}}for(var f=this,h=["onload","onerror","onprogress"],i=0;i<h.length;i++)a(h[i],f);return"onreadystatechange"in f&&g(f.onreadystatechange)?v(f,"onreadystatechange",function(a){return b.wrap(a,void 0,e)}):f.onreadystatechange=e,c.apply(this,arguments)}},d)}c.xhr&&"fetch"in C&&v(C,"fetch",function(a){return function(c,d){for(var e=new Array(arguments.length),f=0;f<e.length;++f)e[f]=arguments[f];var g="GET";e[1]&&e[1].method&&(g=e[1].method);var h={method:g,url:e[0],status_code:null};return b.captureBreadcrumb({type:"http",category:"fetch",data:h}),a.apply(this,e).then(function(a){return h.status_code=a.status,a})}},d),c.dom&&this.b&&(D.addEventListener?(D.addEventListener("click",b.P("click"),!1),D.addEventListener("keypress",b.R(),!1)):(D.attachEvent("onclick",b.P("click")),D.attachEvent("onkeypress",b.R())));var f=C.chrome,i=f&&f.app&&f.app.runtime,j=!i&&C.history&&history.pushState;if(c.location&&j){var k=C.onpopstate;C.onpopstate=function(){var a=b.t.href;if(b.S(b.u,a),k)return k.apply(this,arguments)},v(history,"pushState",function(a){return function(){var c=arguments.length>2?arguments[2]:void 0;return c&&b.S(b.u,c+""),a.apply(this,arguments)}},d)}if(c.console&&"console"in C&&console.log){var m=function(a,c){b.captureBreadcrumb({message:a,level:c.level,category:"console"})};l(["debug","info","warn","error","log"],function(a,b){z(console,b,m)})}},J:function(){for(var a;this.q.length;){a=this.q.shift();var b=a[0],c=a[1],d=a[2];b[c]=d}},z:function(){var a=this;l(this.o,function(b,c){var d=c[0],e=c[1];d.apply(a,[a].concat(e))})},A:function(a){var b=B.exec(a),c={},d=7;try{for(;d--;)c[A[d]]=b[d]||""}catch(e){throw new x("Invalid DSN: "+a)}if(c.pass&&!this.i.allowSecretKey)throw new x("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return c},D:function(a){var b="//"+a.host+(a.port?":"+a.port:"");return a.protocol&&(b=a.protocol+":"+b),b},w:function(){this.j||this.K.apply(this,arguments)},K:function(a,b){var c=this.L(a,b);this.O("handle",{stackInfo:a,options:b}),this.U(a.name,a.message,a.url,a.lineno,c,b)},L:function(a,b){var c=this,d=[];if(a.stack&&a.stack.length&&(l(a.stack,function(a,b){var e=c.V(b);e&&d.push(e)}),b&&b.trimHeadFrames))for(var e=0;e<b.trimHeadFrames&&e<d.length;e++)d[e].in_app=!1;return d=d.slice(0,this.i.stackTraceLimit)},V:function(a){if(a.url){var b={filename:a.url,lineno:a.line,colno:a.column,"function":a.func||"?"};return b.in_app=!(this.i.includePaths.test&&!this.i.includePaths.test(b.filename)||/(Raven|TraceKit)\./.test(b["function"])||/raven\.(min\.)?js$/.test(b.filename)),b}},U:function(a,b,c,d,e,f){var g;if((!this.i.ignoreErrors.test||!this.i.ignoreErrors.test(b))&&(b+="",e&&e.length?(c=e[0].filename||c,e.reverse(),g={frames:e}):c&&(g={frames:[{filename:c,lineno:d,in_app:!0}]}),(!this.i.ignoreUrls.test||!this.i.ignoreUrls.test(c))&&(!this.i.whitelistUrls.test||this.i.whitelistUrls.test(c)))){var h=m({exception:{values:[{type:a,value:b,stacktrace:g}]},culprit:c},f);this.M(h)}},W:function(a){var b=this.i.maxMessageLength;if(a.message&&(a.message=n(a.message,b)),a.exception){var c=a.exception.values[0];c.value=n(c.value,b)}return a},X:function(){if(this.b&&D.location&&D.location.href){var a={headers:{"User-Agent":navigator.userAgent}};return a.url=D.location.href,D.referrer&&(a.headers.Referer=D.referrer),a}},M:function(a){var b=this.i,c={project:this.g,logger:b.logger,platform:"javascript"},e=this.X();e&&(c.request=e),a.trimHeadFrames&&delete a.trimHeadFrames,a=m(c,a),a.tags=m(m({},this.h.tags),a.tags),a.extra=m(m({},this.h.extra),a.extra),a.extra["session:duration"]=d()-this.p,this.r&&this.r.length>0&&(a.breadcrumbs={values:[].slice.call(this.r,0)}),j(a.tags)&&delete a.tags,this.h.user&&(a.user=this.h.user),b.environment&&(a.environment=b.environment),b.release&&(a.release=b.release),b.serverName&&(a.server_name=b.serverName),g(b.dataCallback)&&(a=b.dataCallback(a)||a),a&&!j(a)&&(g(b.shouldSendCallback)&&!b.shouldSendCallback(a)||this.Y(a))},Z:function(){return s()},Y:function(a,b){var c=this,d=this.i;if(this.d=a.event_id||(a.event_id=this.Z()),a=this.W(a),this.v("debug","Raven about to send:",a),this.isSetup()){var e={sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this.f};this.C&&(e.sentry_secret=this.C);var f=a.exception&&a.exception.values[0];this.captureBreadcrumb({category:"sentry",message:f?(f.type?f.type+": ":"")+f.value:a.message,event_id:a.event_id,level:a.level||"error"});var g=this.E;(d.transport||this.$).call(this,{url:g,auth:e,data:a,options:d,onSuccess:function(){c.O("success",{data:a,src:g}),b&&b()},onError:function(d){c.O("failure",{data:a,src:g}),d=d||new Error("Raven send failed (no additional details provided)"),b&&b(d)}})}},$:function(a){function b(){200===c.status?a.onSuccess&&a.onSuccess():a.onError&&a.onError(new Error("Sentry error code: "+c.status))}var c=new XMLHttpRequest,d="withCredentials"in c||"undefined"!=typeof XDomainRequest;if(d){var e=a.url;"withCredentials"in c?c.onreadystatechange=function(){4===c.readyState&&b()}:(c=new XDomainRequest,e=e.replace(/^https?:/,""),c.onload=b),c.open("POST",e+"?"+q(a.auth)),c.send(y(a.data))}},v:function(a){this.n[a]&&this.debug&&Function.prototype.apply.call(this.n[a],this.m,[].slice.call(arguments,1))},N:function(a,b){f(b)?delete this.h[a]:this.h[a]=m(this.h[a]||{},b)}};var E=Object.prototype;e.prototype.setUser=e.prototype.setUserContext,e.prototype.setReleaseContext=e.prototype.setRelease,b.exports=e},{1:1,2:2,3:3,6:6}],5:[function(a,b,c){"use strict";var d=a(4),e=window.Raven,f=new d;f.noConflict=function(){return window.Raven=e,f},f.afterLoad(),b.exports=f},{4:4}],6:[function(a,b,c){"use strict";function d(){return"undefined"==typeof document?"":document.location.href}var e={collectWindowErrors:!0,debug:!1},f=[].slice,g="?",h=/^(?:Uncaught (?:exception: )?)?((?:Eval|Internal|Range|Reference|Syntax|Type|URI)Error): ?(.*)$/;e.report=function(){function a(a){k(),q.push(a)}function b(a){for(var b=q.length-1;b>=0;--b)q[b]===a&&q.splice(b,1)}function c(){l(),q=[]}function i(a,b){var c=null;if(!b||e.collectWindowErrors){for(var d in q)if(q.hasOwnProperty(d))try{q[d].apply(null,[a].concat(f.call(arguments,2)))}catch(g){c=g}if(c)throw c}}function j(a,b,c,f,j){var k=null;if(t)e.computeStackTrace.augmentStackTraceWithInitialElement(t,b,c,a),m();else if(j)k=e.computeStackTrace(j),i(k,!0);else{var l,n={url:b,line:c,column:f},p=void 0,q=a;if("[object String]"==={}.toString.call(a)){var l=a.match(h);l&&(p=l[1],q=l[2])}n.func=g,k={name:p,message:q,url:d(),stack:[n]},i(k,!0)}return!!o&&o.apply(this,arguments)}function k(){p||(o=window.onerror,window.onerror=j,p=!0)}function l(){p&&(window.onerror=o,p=!1,o=void 0)}function m(){var a=t,b=r;r=null,t=null,s=null,i.apply(null,[a,!1].concat(b))}function n(a,b){var c=f.call(arguments,1);if(t){if(s===a)return;m()}var d=e.computeStackTrace(a);if(t=d,s=a,r=c,setTimeout(function(){s===a&&m()},d.incomplete?2e3:0),b!==!1)throw a}var o,p,q=[],r=null,s=null,t=null;return n.subscribe=a,n.unsubscribe=b,n.uninstall=c,n}(),e.computeStackTrace=function(){function a(a){if("undefined"!=typeof a.stack&&a.stack){for(var b,c,e=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|<anonymous>).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,f=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|\[native).*?)(?::(\d+))?(?::(\d+))?\s*$/i,h=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,i=a.stack.split("\n"),j=[],k=(/^(.*) is undefined$/.exec(a.message),0),l=i.length;k<l;++k){if(b=e.exec(i[k])){var m=b[2]&&b[2].indexOf("native")!==-1;c={url:m?null:b[2],func:b[1]||g,args:m?[b[2]]:[],line:b[3]?+b[3]:null,column:b[4]?+b[4]:null}}else if(b=h.exec(i[k]))c={url:b[2],func:b[1]||g,args:[],line:+b[3],column:b[4]?+b[4]:null};else{if(!(b=f.exec(i[k])))continue;c={url:b[3],func:b[1]||g,args:b[2]?b[2].split(","):[],line:b[4]?+b[4]:null,column:b[5]?+b[5]:null}}!c.func&&c.line&&(c.func=g),j.push(c)}return j.length?(j[0].column||"undefined"==typeof a.columnNumber||(j[0].column=a.columnNumber+1),{name:a.name,message:a.message,url:d(),stack:j}):null}}function b(a,b,c,d){var e={url:b,line:c};if(e.url&&e.line){if(a.incomplete=!1,e.func||(e.func=g),a.stack.length>0&&a.stack[0].url===e.url){if(a.stack[0].line===e.line)return!1;if(!a.stack[0].line&&a.stack[0].func===e.func)return a.stack[0].line=e.line,!1}return a.stack.unshift(e),a.partial=!0,!0}return a.incomplete=!0,!1}function c(a,h){for(var i,j,k=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,l=[],m={},n=!1,o=c.caller;o&&!n;o=o.caller)if(o!==f&&o!==e.report){if(j={url:null,func:g,line:null,column:null},o.name?j.func=o.name:(i=k.exec(o.toString()))&&(j.func=i[1]),"undefined"==typeof j.func)try{j.func=i.input.substring(0,i.input.indexOf("{"))}catch(p){}m[""+o]?n=!0:m[""+o]=!0,l.push(j)}h&&l.splice(0,h);var q={name:a.name,message:a.message,url:d(),stack:l};return b(q,a.sourceURL||a.fileName,a.line||a.lineNumber,a.message||a.description),q}function f(b,f){var g=null;f=null==f?0:+f;try{if(g=a(b))return g}catch(h){if(e.debug)throw h}try{if(g=c(b,f+1))return g}catch(h){if(e.debug)throw h}return{name:b.name,message:b.message,url:d()}}return f.augmentStackTraceWithInitialElement=b,f.computeStackTraceFromStackProp=a,f}(),b.exports=e},{}]},{},[5])(5)});
//# sourceMappingURL=raven.min.js.map
{
"@dist/raven.js": {
"hashes": {
"sha256": "8w74dun2R8nzK1pIpqvuiHpesGXgBuqS15iCDzdxXUE=",
"sha512": "I02dMJiw7GzEeeulDDbZepZc0MWNTOPIoGPc2XH0IbWPjOUWHoEHxK6IOxUGART1EIDb2FYpLUUHkrEb/Y6z7A=="
"sha256": "FrxLhXXHOV+DYkzItSfGcSobkDFVwj+M+mSxaJCivQ0=",
"sha512": "VyK0qlkjSk9ZkvP+bGzAIwyaJBl7xt459Oy3GrM27JXJjgeVdZh7o42g1sxbLRa7MPy+eIH+B9N4O3WgrxEzCg=="
},
"type": null,
"integrity": "sha256-8w74dun2R8nzK1pIpqvuiHpesGXgBuqS15iCDzdxXUE= sha512-I02dMJiw7GzEeeulDDbZepZc0MWNTOPIoGPc2XH0IbWPjOUWHoEHxK6IOxUGART1EIDb2FYpLUUHkrEb/Y6z7A==",
"integrity": "sha256-FrxLhXXHOV+DYkzItSfGcSobkDFVwj+M+mSxaJCivQ0= sha512-VyK0qlkjSk9ZkvP+bGzAIwyaJBl7xt459Oy3GrM27JXJjgeVdZh7o42g1sxbLRa7MPy+eIH+B9N4O3WgrxEzCg==",
"path": "dist/raven.js"

@@ -13,9 +13,9 @@ },

"hashes": {
"sha256": "uCHaQ1E26fWBtMtos5BZpowPGZopSfsJM7n0PAOSzo8=",
"sha512": "Umw+gSg7aL2QUNiF2SROJziXE3RNe8S8GB57fwEMyvcTxc11YoSfj7zMXvHTkcKquYuSZ8ggZaYFspTgL9QO2Q=="
"sha256": "+yYIjpPFiV07KYvJMdryZtBh4hbeDNB439BdQQCxUyg=",
"sha512": "SrGjiEgFWo56jtMU3WpQcUIEI9jOUlSVcuqYaLbkGSc4gke/Pri+mtTKRCBpPABY3vtJ54ED4C7ppg/9lQY4+Q=="
},
"type": null,
"integrity": "sha256-uCHaQ1E26fWBtMtos5BZpowPGZopSfsJM7n0PAOSzo8= sha512-Umw+gSg7aL2QUNiF2SROJziXE3RNe8S8GB57fwEMyvcTxc11YoSfj7zMXvHTkcKquYuSZ8ggZaYFspTgL9QO2Q==",
"integrity": "sha256-+yYIjpPFiV07KYvJMdryZtBh4hbeDNB439BdQQCxUyg= sha512-SrGjiEgFWo56jtMU3WpQcUIEI9jOUlSVcuqYaLbkGSc4gke/Pri+mtTKRCBpPABY3vtJ54ED4C7ppg/9lQY4+Q==",
"path": "dist/raven.min.js"
}
}

@@ -199,3 +199,3 @@ 'use strict';

global_defs: {
'TEST': false
'__DEV__': false
}

@@ -202,0 +202,0 @@ }

{
"name": "raven-js",
"version": "3.7.0",
"version": "3.8.0",
"license": "BSD-2-Clause",

@@ -25,2 +25,3 @@ "homepage": "https://github.com/getsentry/raven-js",

"derequire": "2.0.3",
"es6-promise": "^4.0.5",
"grunt": "^0.4.5",

@@ -47,3 +48,4 @@ "grunt-browserify": "^4.0.1",

"through2": "^2.0.0",
"typescript": "^1.8.10"
"typescript": "^1.8.10",
"whatwg-fetch": "^1.0.0"
},

@@ -50,0 +52,0 @@ "keywords": [

@@ -1,2 +0,2 @@

/*global XDomainRequest:false*/
/*global XDomainRequest:false, __DEV__:false*/
'use strict';

@@ -6,21 +6,4 @@

var RavenConfigError = require('./configError');
var utils = require('./utils');
var stringify = require('json-stringify-safe');
var isFunction = utils.isFunction;
var isUndefined = utils.isUndefined;
var isError = utils.isError;
var isEmptyObject = utils.isEmptyObject;
var hasKey = utils.hasKey;
var joinRegExp = utils.joinRegExp;
var each = utils.each;
var objectMerge = utils.objectMerge;
var truncate = utils.truncate;
var urlencode = utils.urlencode;
var uuid4 = utils.uuid4;
var htmlTreeAsString = utils.htmlTreeAsString;
var parseUrl = utils.parseUrl;
var isString = utils.isString;
var fill = utils.fill;
var wrapConsoleMethod = require('./console').wrapMethod;

@@ -35,2 +18,4 @@

var _window = typeof window !== 'undefined' ? window : undefined;
var _document = _window && _window.document;

@@ -43,3 +28,3 @@ // First, check for JSON support

// Raven can run in contexts where there's no document (react-native)
this._hasDocument = typeof document !== 'undefined';
this._hasDocument = !isUndefined(_document);
this._lastCapturedException = null;

@@ -68,3 +53,3 @@ this._lastEventId = null;

// before the console plugin has a chance to monkey patch
this._originalConsole = window.console || {};
this._originalConsole = _window.console || {};
this._originalConsoleMethods = {};

@@ -77,3 +62,3 @@ this._plugins = [];

this._keypressTimeout;
this._location = window.location;
this._location = _window.location;
this._lastHref = this._location && this._location.href;

@@ -97,3 +82,3 @@

// See: https://github.com/getsentry/raven-js/issues/465
VERSION: '3.7.0',
VERSION: '3.8.0',

@@ -114,8 +99,10 @@ debug: false,

if (this._globalServer) {
if (self._globalServer) {
this._logDebug('error', 'Error: Raven has already been configured');
return this;
return self;
}
if (!dsn) return this;
if (!dsn) return self;
var globalOptions = self._globalOptions;
// merge in options

@@ -128,3 +115,3 @@ if (options) {

} else {
self._globalOptions[key] = value;
globalOptions[key] = value;
}

@@ -134,15 +121,15 @@ });

this.setDSN(dsn);
self.setDSN(dsn);
// "Script error." is hard coded into browsers for errors that it can't read.
// this is the result of a script being pulled in from an external domain and CORS.
this._globalOptions.ignoreErrors.push(/^Script error\.?$/);
this._globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/);
globalOptions.ignoreErrors.push(/^Script error\.?$/);
globalOptions.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/);
// join regexp rules into one big rule
this._globalOptions.ignoreErrors = joinRegExp(this._globalOptions.ignoreErrors);
this._globalOptions.ignoreUrls = this._globalOptions.ignoreUrls.length ? joinRegExp(this._globalOptions.ignoreUrls) : false;
this._globalOptions.whitelistUrls = this._globalOptions.whitelistUrls.length ? joinRegExp(this._globalOptions.whitelistUrls) : false;
this._globalOptions.includePaths = joinRegExp(this._globalOptions.includePaths);
this._globalOptions.maxBreadcrumbs = Math.max(0, Math.min(this._globalOptions.maxBreadcrumbs || 100, 100)); // default and hard limit is 100
globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors);
globalOptions.ignoreUrls = globalOptions.ignoreUrls.length ? joinRegExp(globalOptions.ignoreUrls) : false;
globalOptions.whitelistUrls = globalOptions.whitelistUrls.length ? joinRegExp(globalOptions.whitelistUrls) : false;
globalOptions.includePaths = joinRegExp(globalOptions.includePaths);
globalOptions.maxBreadcrumbs = Math.max(0, Math.min(globalOptions.maxBreadcrumbs || 100, 100)); // default and hard limit is 100

@@ -153,6 +140,6 @@ var autoBreadcrumbDefaults = {

dom: true,
location: true
location: true,
};
var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;
var autoBreadcrumbs = globalOptions.autoBreadcrumbs;
if ({}.toString.call(autoBreadcrumbs) === '[object Object]') {

@@ -163,8 +150,8 @@ autoBreadcrumbs = objectMerge(autoBreadcrumbDefaults, autoBreadcrumbs);

}
this._globalOptions.autoBreadcrumbs = autoBreadcrumbs;
globalOptions.autoBreadcrumbs = autoBreadcrumbs;
TraceKit.collectWindowErrors = !!this._globalOptions.collectWindowErrors;
TraceKit.collectWindowErrors = !!globalOptions.collectWindowErrors;
// return for chaining
return this;
return self;
},

@@ -182,17 +169,17 @@

var self = this;
if (this.isSetup() && !this._isRavenInstalled) {
if (self.isSetup() && !self._isRavenInstalled) {
TraceKit.report.subscribe(function () {
self._handleOnErrorStackInfo.apply(self, arguments);
});
this._instrumentTryCatch();
self._instrumentTryCatch();
if (self._globalOptions.autoBreadcrumbs)
this._instrumentBreadcrumbs();
self._instrumentBreadcrumbs();
// Install all of the plugins
this._drainPlugins();
self._drainPlugins();
this._isRavenInstalled = true;
self._isRavenInstalled = true;
}
Error.stackTraceLimit = this._globalOptions.stackTraceLimit;
Error.stackTraceLimit = self._globalOptions.stackTraceLimit;
return this;

@@ -207,15 +194,16 @@ },

setDSN: function(dsn) {
var uri = this._parseDSN(dsn),
var self = this,
uri = self._parseDSN(dsn),
lastSlash = uri.path.lastIndexOf('/'),
path = uri.path.substr(1, lastSlash);
this._dsn = dsn;
this._globalKey = uri.user;
this._globalSecret = uri.pass && uri.pass.substr(1);
this._globalProject = uri.path.substr(lastSlash + 1);
self._dsn = dsn;
self._globalKey = uri.user;
self._globalSecret = uri.pass && uri.pass.substr(1);
self._globalProject = uri.path.substr(lastSlash + 1);
this._globalServer = this._getGlobalServer(uri);
self._globalServer = self._getGlobalServer(uri);
this._globalEndpoint = this._globalServer +
'/' + path + 'api/' + this._globalProject + '/store/';
self._globalEndpoint = self._globalServer +
'/' + path + 'api/' + self._globalProject + '/store/';
},

@@ -443,3 +431,3 @@

addPlugin: function(plugin /*arg1, arg2, ... argN*/) {
var pluginArgs = Array.prototype.slice.call(arguments, 1);
var pluginArgs = [].slice.call(arguments, 1);

@@ -623,3 +611,3 @@ this._plugins.push([plugin, pluginArgs]);

// Attempt to initialize Raven on load
var RavenConfig = window.RavenConfig;
var RavenConfig = _window.RavenConfig;
if (RavenConfig) {

@@ -631,3 +619,3 @@ this.config(RavenConfig.dsn, RavenConfig.config).install();

showReportDialog: function (options) {
if (!window.document) // doesn't work without a document (React native)
if (!_document) // doesn't work without a document (React native)
return;

@@ -660,6 +648,6 @@

var script = document.createElement('script');
var script = _document.createElement('script');
script.async = true;
script.src = globalServer + '/api/embed/error-page/' + qs;
(document.head || document.body).appendChild(script);
(_document.head || _document.body).appendChild(script);
},

@@ -688,7 +676,7 @@

if (document.createEvent) {
evt = document.createEvent('HTMLEvents');
if (_document.createEvent) {
evt = _document.createEvent('HTMLEvents');
evt.initEvent(eventType, true, true);
} else {
evt = document.createEventObject();
evt = _document.createEventObject();
evt.eventType = eventType;

@@ -701,5 +689,5 @@ }

if (document.createEvent) {
if (_document.createEvent) {
// IE9 if standards
document.dispatchEvent(evt);
_document.dispatchEvent(evt);
} else {

@@ -709,3 +697,3 @@ // IE8 regardless of Quirks or Standards

try {
document.fireEvent('on' + evt.eventType.toLowerCase(), evt);
_document.fireEvent('on' + evt.eventType.toLowerCase(), evt);
} catch(e) {

@@ -777,3 +765,3 @@ // Do nothing

// through elements, hotkeys, etc)
if (!tagName || tagName !== 'INPUT' && tagName !== 'TEXTAREA')
if (!tagName || tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable)
return;

@@ -861,3 +849,3 @@

function wrapEventTarget(global) {
var proto = window[global] && window[global].prototype;
var proto = _window[global] && _window[global].prototype;
if (proto && proto.hasOwnProperty && proto.hasOwnProperty('addEventListener')) {

@@ -900,6 +888,6 @@ fill(proto, 'addEventListener', function(orig) {

fill(window, 'setTimeout', wrapTimeFn, wrappedBuiltIns);
fill(window, 'setInterval', wrapTimeFn, wrappedBuiltIns);
if (window.requestAnimationFrame) {
fill(window, 'requestAnimationFrame', function (orig) {
fill(_window, 'setTimeout', wrapTimeFn, wrappedBuiltIns);
fill(_window, 'setInterval', wrapTimeFn, wrappedBuiltIns);
if (_window.requestAnimationFrame) {
fill(_window, 'requestAnimationFrame', function (orig) {
return function (cb) {

@@ -918,3 +906,3 @@ return orig(self.wrap(cb));

var $ = window.jQuery || window.$;
var $ = _window.jQuery || _window.$;
if ($ && $.fn && $.fn.ready) {

@@ -953,3 +941,3 @@ fill($.fn, 'ready', function (orig) {

if (autoBreadcrumbs.xhr && 'XMLHttpRequest' in window) {
if (autoBreadcrumbs.xhr && 'XMLHttpRequest' in _window) {
var xhrproto = XMLHttpRequest.prototype;

@@ -1011,13 +999,50 @@ fill(xhrproto, 'open', function(origOpen) {

if (autoBreadcrumbs.xhr && 'fetch' in _window) {
fill(_window, 'fetch', function(origFetch) {
return function (fn, t) { // preserve arity
// Make a copy of the arguments to prevent deoptimization
// https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments
var args = new Array(arguments.length);
for(var i = 0; i < args.length; ++i) {
args[i] = arguments[i];
}
var method = 'GET';
if (args[1] && args[1].method) {
method = args[1].method;
}
var fetchData = {
method: method,
url: args[0],
status_code: null
};
self.captureBreadcrumb({
type: 'http',
category: 'fetch',
data: fetchData
});
return origFetch.apply(this, args).then(function (response) {
fetchData.status_code = response.status;
return response;
});
};
}, wrappedBuiltIns);
}
// Capture breadcrumbs from any click that is unhandled / bubbled up all the way
// to the document. Do this before we instrument addEventListener.
if (autoBreadcrumbs.dom && this._hasDocument) {
if (document.addEventListener) {
document.addEventListener('click', self._breadcrumbEventHandler('click'), false);
document.addEventListener('keypress', self._keypressEventHandler(), false);
if (_document.addEventListener) {
_document.addEventListener('click', self._breadcrumbEventHandler('click'), false);
_document.addEventListener('keypress', self._keypressEventHandler(), false);
}
else {
// IE8 Compatibility
document.attachEvent('onclick', self._breadcrumbEventHandler('click'));
document.attachEvent('onkeypress', self._keypressEventHandler());
_document.attachEvent('onclick', self._breadcrumbEventHandler('click'));
_document.attachEvent('onkeypress', self._keypressEventHandler());
}

@@ -1030,9 +1055,9 @@ }

// borrowed from: https://github.com/angular/angular.js/pull/13945/files
var chrome = window.chrome;
var chrome = _window.chrome;
var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;
var hasPushState = !isChromePackagedApp && window.history && history.pushState;
var hasPushState = !isChromePackagedApp && _window.history && history.pushState;
if (autoBreadcrumbs.location && hasPushState) {
// TODO: remove onpopstate handler on uninstall()
var oldOnPopState = window.onpopstate;
window.onpopstate = function () {
var oldOnPopState = _window.onpopstate;
_window.onpopstate = function () {
var currentHref = self._location.href;

@@ -1063,3 +1088,3 @@ self._captureUrlChange(self._lastHref, currentHref);

if (autoBreadcrumbs.console && 'console' in window && console.log) {
if (autoBreadcrumbs.console && 'console' in _window && console.log) {
// console

@@ -1263,3 +1288,3 @@ var consoleMethodCallback = function (msg, data) {

_getHttpData: function() {
if (!this._hasDocument || !document.location || !document.location.href) {
if (!this._hasDocument || !_document.location || !_document.location.href) {
return;

@@ -1274,6 +1299,6 @@ }

httpData.url = document.location.href;
httpData.url = _document.location.href;
if (document.referrer) {
httpData.headers.Referer = document.referrer;
if (_document.referrer) {
httpData.headers.Referer = _document.referrer;
}

@@ -1352,2 +1377,6 @@

_getUuid: function () {
return uuid4();
},
_sendProcessedPayload: function(data, callback) {

@@ -1360,3 +1389,3 @@ var self = this;

// Set lastEventId after we know the error should actually be sent
this._lastEventId = data.event_id || (data.event_id = uuid4());
this._lastEventId = data.event_id || (data.event_id = this._getUuid());

@@ -1477,2 +1506,281 @@ // Try and clean up the packet before sending by truncating long values

/*------------------------------------------------
* utils
*
* conditionally exported for test via Raven.utils
=================================================
*/
var objectPrototype = Object.prototype;
function isUndefined(what) {
return what === void 0;
}
function isFunction(what) {
return typeof what === 'function';
}
function isString(what) {
return objectPrototype.toString.call(what) === '[object String]';
}
function isObject(what) {
return typeof what === 'object' && what !== null;
}
function isEmptyObject(what) {
for (var _ in what) return false; // eslint-disable-line guard-for-in, no-unused-vars
return true;
}
// Sorta yanked from https://github.com/joyent/node/blob/aa3b4b4/lib/util.js#L560
// with some tiny modifications
function isError(what) {
var toString = objectPrototype.toString.call(what);
return isObject(what) &&
toString === '[object Error]' ||
toString === '[object Exception]' || // Firefox NS_ERROR_FAILURE Exceptions
what instanceof Error;
}
function each(obj, callback) {
var i, j;
if (isUndefined(obj.length)) {
for (i in obj) {
if (hasKey(obj, i)) {
callback.call(null, i, obj[i]);
}
}
} else {
j = obj.length;
if (j) {
for (i = 0; i < j; i++) {
callback.call(null, i, obj[i]);
}
}
}
}
function objectMerge(obj1, obj2) {
if (!obj2) {
return obj1;
}
each(obj2, function(key, value){
obj1[key] = value;
});
return obj1;
}
function truncate(str, max) {
return !max || str.length <= max ? str : str.substr(0, max) + '\u2026';
}
/**
* hasKey, a better form of hasOwnProperty
* Example: hasKey(MainHostObject, property) === true/false
*
* @param {Object} host object to check property
* @param {string} key to check
*/
function hasKey(object, key) {
return objectPrototype.hasOwnProperty.call(object, key);
}
function joinRegExp(patterns) {
// Combine an array of regular expressions and strings into one large regexp
// Be mad.
var sources = [],
i = 0, len = patterns.length,
pattern;
for (; i < len; i++) {
pattern = patterns[i];
if (isString(pattern)) {
// If it's a string, we need to escape it
// Taken from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
sources.push(pattern.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, '\\$1'));
} else if (pattern && pattern.source) {
// If it's a regexp already, we want to extract the source
sources.push(pattern.source);
}
// Intentionally skip other cases
}
return new RegExp(sources.join('|'), 'i');
}
function urlencode(o) {
var pairs = [];
each(o, function(key, value) {
pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));
});
return pairs.join('&');
}
// borrowed from https://tools.ietf.org/html/rfc3986#appendix-B
// intentionally using regex and not <a/> href parsing trick because React Native and other
// environments where DOM might not be available
function parseUrl(url) {
var match = url.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);
if (!match) return {};
// coerce to undefined values to empty string so we don't get 'undefined'
var query = match[6] || '';
var fragment = match[8] || '';
return {
protocol: match[2],
host: match[4],
path: match[5],
relative: match[5] + query + fragment // everything minus origin
};
}
function uuid4() {
var crypto = window.crypto || window.msCrypto;
if (!isUndefined(crypto) && crypto.getRandomValues) {
// Use window.crypto API if available
var arr = new Uint16Array(8);
crypto.getRandomValues(arr);
// set 4 in byte 7
arr[3] = arr[3] & 0xFFF | 0x4000;
// set 2 most significant bits of byte 9 to '10'
arr[4] = arr[4] & 0x3FFF | 0x8000;
var pad = function(num) {
var v = num.toString(16);
while (v.length < 4) {
v = '0' + v;
}
return v;
};
return pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) +
pad(arr[5]) + pad(arr[6]) + pad(arr[7]);
} else {
// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random()*16|0,
v = c === 'x' ? r : r&0x3|0x8;
return v.toString(16);
});
}
}
/**
* Given a child DOM element, returns a query-selector statement describing that
* and its ancestors
* e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]
* @param elem
* @returns {string}
*/
function htmlTreeAsString(elem) {
/* eslint no-extra-parens:0*/
var MAX_TRAVERSE_HEIGHT = 5,
MAX_OUTPUT_LEN = 80,
out = [],
height = 0,
len = 0,
separator = ' > ',
sepLength = separator.length,
nextStr;
while (elem && height++ < MAX_TRAVERSE_HEIGHT) {
nextStr = htmlElementAsString(elem);
// bail out if
// - nextStr is the 'html' element
// - the length of the string that would be created exceeds MAX_OUTPUT_LEN
// (ignore this limit if we are on the first iteration)
if (nextStr === 'html' || height > 1 && len + (out.length * sepLength) + nextStr.length >= MAX_OUTPUT_LEN) {
break;
}
out.push(nextStr);
len += nextStr.length;
elem = elem.parentNode;
}
return out.reverse().join(separator);
}
/**
* Returns a simple, query-selector representation of a DOM element
* e.g. [HTMLElement] => input#foo.btn[name=baz]
* @param HTMLElement
* @returns {string}
*/
function htmlElementAsString(elem) {
var out = [],
className,
classes,
key,
attr,
i;
if (!elem || !elem.tagName) {
return '';
}
out.push(elem.tagName.toLowerCase());
if (elem.id) {
out.push('#' + elem.id);
}
className = elem.className;
if (className && isString(className)) {
classes = className.split(' ');
for (i = 0; i < classes.length; i++) {
out.push('.' + classes[i]);
}
}
var attrWhitelist = ['type', 'name', 'title', 'alt'];
for (i = 0; i < attrWhitelist.length; i++) {
key = attrWhitelist[i];
attr = elem.getAttribute(key);
if (attr) {
out.push('[' + key + '="' + attr + '"]');
}
}
return out.join('');
}
/**
* Polyfill a method
* @param obj object e.g. `document`
* @param name method name present on object e.g. `addEventListener`
* @param replacement replacement function
* @param track {optional} record instrumentation to an array
*/
function fill(obj, name, replacement, track) {
var orig = obj[name];
obj[name] = replacement(orig);
if (track) {
track.push([obj, name, orig]);
}
}
if (typeof __DEV__ !== 'undefined' && __DEV__) {
Raven.utils = {
isUndefined: isUndefined,
isFunction: isFunction,
isString: isString,
isObject: isObject,
isEmptyObject: isEmptyObject,
isError: isError,
each: each,
objectMerge: objectMerge,
truncate: truncate,
hasKey: hasKey,
joinRegExp: joinRegExp,
urlencode: urlencode,
uuid4: uuid4,
htmlTreeAsString: htmlTreeAsString,
htmlElementAsString: htmlElementAsString,
parseUrl: parseUrl,
fill: fill
};
};
// Deprecations

@@ -1479,0 +1787,0 @@ Raven.prototype.setUser = Raven.prototype.setUserContext;

@@ -408,2 +408,3 @@ /*global assert*/

assert.equal(breadcrumbs[0].type, 'http');
assert.equal(breadcrumbs[0].category, 'xhr');
assert.equal(breadcrumbs[0].data.method, 'GET');

@@ -445,2 +446,42 @@ // NOTE: not checking status code because we seem to get

it('should record a fetch request', function (done) {
var iframe = this.iframe;
iframeExecute(iframe, done,
function () {
// some browsers trigger onpopstate for load / reset breadcrumb state
Raven._breadcrumbs = [];
fetch('/test/integration/example.json').then(function () {
setTimeout(done);
}, function () {
setTimeout(done);
});
},
function () {
var Raven = iframe.contentWindow.Raven,
breadcrumbs = Raven._breadcrumbs;
if ('fetch' in window) {
assert.equal(breadcrumbs.length, 1);
assert.equal(breadcrumbs[0].type, 'http');
assert.equal(breadcrumbs[0].category, 'fetch');
assert.equal(breadcrumbs[0].data.method, 'GET');
} else {
// otherwise we use a fetch polyfill based on xhr
assert.equal(breadcrumbs.length, 2);
assert.equal(breadcrumbs[0].type, 'http');
assert.equal(breadcrumbs[0].category, 'fetch');
assert.equal(breadcrumbs[0].data.method, 'GET');
assert.equal(breadcrumbs[1].type, 'http');
assert.equal(breadcrumbs[1].category, 'xhr');
assert.equal(breadcrumbs[1].data.method, 'GET');
}
}
);
});
it('should record a mouse click on element WITH click handler present', function (done) {

@@ -699,2 +740,35 @@ var iframe = this.iframe;

it('should record consecutive keypress events in a contenteditable into a single "input" breadcrumb', function (done) {
var iframe = this.iframe;
iframeExecute(iframe, done,
function () {
setTimeout(done);
// some browsers trigger onpopstate for load / reset breadcrumb state
Raven._breadcrumbs = [];
// keypress <input/> twice
var keypress1 = document.createEvent('KeyboardEvent');
keypress1.initKeyboardEvent("keypress", true, true, window, "b", 66, 0, "", false);
var keypress2 = document.createEvent('KeyboardEvent');
keypress2.initKeyboardEvent("keypress", true, true, window, "a", 65, 0, "", false);
var div = document.querySelector('[contenteditable]');
div.dispatchEvent(keypress1);
div.dispatchEvent(keypress2);
},
function () {
var Raven = iframe.contentWindow.Raven,
breadcrumbs = Raven._breadcrumbs;
assert.equal(breadcrumbs.length, 1);
assert.equal(breadcrumbs[0].category, 'ui.input');
assert.equal(breadcrumbs[0].message, 'body > form#foo-form > div.contenteditable');
}
);
});
it('should record history.[pushState|back] changes as navigation breadcrumbs', function (done) {

@@ -701,0 +775,0 @@ var iframe = this.iframe;

@@ -5,4 +5,4 @@ /*jshint mocha:true*/

var utils = require('../src/utils');
var Raven = require('../src/raven');
var utils = Raven.utils;
var RavenConfigError = require('../src/configError');

@@ -9,0 +9,0 @@

@@ -57,2 +57,3 @@ import Raven = require('..');

Raven.captureMessage('Broken!', {tags: { key: "value" }});
+Raven.captureMessage('Broken!', { stacktrace: true });
Raven.captureBreadcrumb({});

@@ -59,0 +60,0 @@

@@ -42,2 +42,5 @@ // Type definitions for Raven.js

/** set to true to get the strack trace of your message */
stacktrace?: boolean;
extra?: any;

@@ -44,0 +47,0 @@

'use strict';
var utils = require('../../src/utils');
var hasKey = utils.hasKey;
var isString = utils.isString;
var isUndefined = utils.isUndefined;
/*

@@ -117,3 +111,3 @@ TraceKit - Cross brower stack traces - github.com/occ/TraceKit

for (var i in handlers) {
if (hasKey(handlers, i)) {
if (handlers.hasOwnProperty(i)) {
try {

@@ -167,3 +161,3 @@ handlers[i].apply(null, [stack].concat(_slice.call(arguments, 2)));

var groups;
if (isString(message)) {
if ({}.toString.call(message) === '[object String]') {
var groups = message.match(ERROR_TYPES_RE);

@@ -249,3 +243,3 @@ if (groups) {

// stack trace
window.setTimeout(function () {
setTimeout(function () {
if (lastException === ex) {

@@ -384,3 +378,3 @@ processLastException();

function computeStackTraceFromStackProp(ex) {
if (isUndefined(ex.stack) || !ex.stack) return;
if (typeof ex.stack === 'undefined' || !ex.stack) return;

@@ -437,3 +431,3 @@ var chrome = /^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|<anonymous>).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,

if (!stack[0].column && !isUndefined(ex.columnNumber)) {
if (!stack[0].column && typeof ex.columnNumber !== 'undefined') {
// FireFox uses this awesome columnNumber property for its top frame

@@ -440,0 +434,0 @@ // Also note, Firefox's column number is 0-based and everything else expects 1-based,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc