@sentry/browser
Advanced tools
Comparing version 0.2.1 to 0.3.0
@@ -7,3 +7,3 @@ /// <reference types="node" /> | ||
import * as path from 'path'; | ||
import * as Puppeteer from 'puppeteer'; | ||
const Puppeteer = require('puppeteer'); | ||
import { SentryBrowser } from '../index'; | ||
@@ -33,9 +33,12 @@ | ||
const browser = await Puppeteer.launch({ headless: true }); | ||
const browser = await Puppeteer.launch({ | ||
headless: true, | ||
args: ['--no-sandbox', '--disable-setuid-sandbox'], | ||
}); | ||
const page = await browser.newPage(); | ||
page.on('request', async request => { | ||
page.on('request', async (request: any) => { | ||
// @ts-ignore | ||
if (request.resourceType === 'other' || request.resourceType === 'xhr') { | ||
const data = JSON.parse(request.postData as any); | ||
if (request.resourceType() === 'other' || request.resourceType() === 'xhr') { | ||
const data = JSON.parse(request.postData() as any); | ||
if (data.exception) { | ||
@@ -42,0 +45,0 @@ expect(data.exception).not.toBeUndefined(); |
# Changelog | ||
## v0.3.0 | ||
- Update dependencies | ||
## v0.1.0 | ||
- Initial release |
@@ -42,3 +42,3 @@ "use strict"; | ||
var path = require("path"); | ||
var Puppeteer = require("puppeteer"); | ||
var Puppeteer = require('puppeteer'); | ||
describe('Browser Interface', function () { | ||
@@ -69,3 +69,6 @@ test('sending a message', function (done) { return __awaiter(_this, void 0, void 0, function () { | ||
.listen(8999); | ||
return [4 /*yield*/, Puppeteer.launch({ headless: true })]; | ||
return [4 /*yield*/, Puppeteer.launch({ | ||
headless: true, | ||
args: ['--no-sandbox', '--disable-setuid-sandbox'], | ||
})]; | ||
case 1: | ||
@@ -82,4 +85,4 @@ browser = _a.sent(); | ||
// @ts-ignore | ||
if (request.resourceType === 'other' || request.resourceType === 'xhr') { | ||
data = JSON.parse(request.postData); | ||
if (request.resourceType() === 'other' || request.resourceType() === 'xhr') { | ||
data = JSON.parse(request.postData()); | ||
if (data.exception) { | ||
@@ -86,0 +89,0 @@ expect(data.exception).not.toBeUndefined(); |
@@ -1,1 +0,1 @@ | ||
"use strict";function unwrapExports(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function createCommonjsModule(t,e){return e={exports:{}},t(e,e.exports),e.exports}function isObject$1(t){return"object"==typeof t&&null!==t}function isError$1(t){switch({}.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return t instanceof Error}}function isErrorEvent$1(t){return supportsErrorEvent()&&"[object ErrorEvent]"==={}.toString.call(t)}function isUndefined$1(t){return void 0===t}function isFunction$1(t){return"function"==typeof t}function isString$1(t){return"[object String]"===Object.prototype.toString.call(t)}function isArray$1(t){return"[object Array]"===Object.prototype.toString.call(t)}function isEmptyObject$1(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}function supportsErrorEvent(){try{return new ErrorEvent(""),!0}catch(t){return!1}}function supportsFetch$1(){if(!("fetch"in _window$3))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function wrappedCallback(t){return function(e,n){var r=t(e)||e;return n?n(r)||r:r}}function each$1(t,e){var n,r;if(isUndefined$1(t.length))for(n in t)hasKey$1(t,n)&&e.call(null,n,t[n]);else if(r=t.length)for(n=0;n<r;n++)e.call(null,n,t[n])}function objectMerge$1(t,e){return e?(each$1(e,function(e,n){t[e]=n}),t):t}function objectFrozen$1(t){return!!Object.isFrozen&&Object.isFrozen(t)}function truncate$1(t,e){return!e||t.length<=e?t:t.substr(0,e)+"…"}function hasKey$1(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function joinRegExp$1(t){for(var e,n=[],r=0,o=t.length;r<o;r++)isString$1(e=t[r])?n.push(e.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):e&&e.source&&n.push(e.source);return new RegExp(n.join("|"),"i")}function urlencode$1(t){var e=[];return each$1(t,function(t,n){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}),e.join("&")}function parseUrl$1(t){var e=t.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};var n=e[6]||"",r=e[8]||"";return{protocol:e[2],host:e[4],path:e[5],relative:e[5]+n+r}}function uuid4$1(){var t=_window$3.crypto||_window$3.msCrypto;if(!isUndefined$1(t)&&t.getRandomValues){var e=new Uint16Array(8);t.getRandomValues(e),e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;var n=function(t){for(var e=t.toString(16);e.length<4;)e="0"+e;return e};return n(e[0])+n(e[1])+n(e[2])+n(e[3])+n(e[4])+n(e[5])+n(e[6])+n(e[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}function htmlTreeAsString$1(t){for(var e,n=[],r=0,o=0,i=" > ".length;t&&r++<5&&!("html"===(e=htmlElementAsString(t))||r>1&&o+n.length*i+e.length>=80);)n.push(e),o+=e.length,t=t.parentNode;return n.reverse().join(" > ")}function htmlElementAsString(t){var e,n,r,o,i,a=[];if(!t||!t.tagName)return"";if(a.push(t.tagName.toLowerCase()),t.id&&a.push("#"+t.id),(e=t.className)&&isString$1(e))for(n=e.split(/\s+/),i=0;i<n.length;i++)a.push("."+n[i]);var s=["type","name","title","alt"];for(i=0;i<s.length;i++)r=s[i],(o=t.getAttribute(r))&&a.push("["+r+'="'+o+'"]');return a.join("")}function isOnlyOneTruthy(t,e){return!!(!!t^!!e)}function isBothUndefined(t,e){return isUndefined$1(t)&&isUndefined$1(e)}function isSameException$1(t,e){return!isOnlyOneTruthy(t,e)&&(t=t.values[0],e=e.values[0],t.type===e.type&&t.value===e.value&&(!isBothUndefined(t.stacktrace,e.stacktrace)&&isSameStacktrace$1(t.stacktrace,e.stacktrace)))}function isSameStacktrace$1(t,e){if(isOnlyOneTruthy(t,e))return!1;var n=t.frames,r=e.frames;if(n.length!==r.length)return!1;for(var o,i,a=0;a<n.length;a++)if(o=n[a],i=r[a],o.filename!==i.filename||o.lineno!==i.lineno||o.colno!==i.colno||o.function!==i.function)return!1;return!0}function fill$1(t,e,n,r){var o=t[e];t[e]=n(o),t[e].__raven__=!0,t[e].__orig__=o,r&&r.push([t,e,o])}function getLocationHref(){return"undefined"==typeof document||null==document.location?"":document.location.href}function RavenConfigError(t){this.name="RavenConfigError",this.message=t}function now(){return+new Date}function keepOriginalCallback(t,e){return isFunction(e)?function(n){return e(n,t)}:e}function Raven$1(){this._hasJSON=!("object"!=typeof JSON||!JSON.stringify),this._hasDocument=!isUndefined(_document),this._hasNavigator=!isUndefined(_navigator),this._lastCapturedException=null,this._lastData=null,this._lastEventId=null,this._globalServer=null,this._globalKey=null,this._globalProject=null,this._globalContext={},this._globalOptions={logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],headers:null,collectWindowErrors:!0,maxMessageLength:0,maxUrlLength:250,stackTraceLimit:50,autoBreadcrumbs:!0,instrument:!0,sampleRate:1},this._ignoreOnError=0,this._isRavenInstalled=!1,this._originalErrorStackTraceLimit=Error.stackTraceLimit,this._originalConsole=_window$1.console||{},this._originalConsoleMethods={},this._plugins=[],this._startTime=now(),this._wrappedBuiltIns=[],this._breadcrumbs=[],this._lastCapturedEvent=null,this._keypressTimeout,this._location=_window$1.location,this._lastHref=this._location&&this._location.href,this._resetBackoff();for(var t in this._originalConsole)this._originalConsoleMethods[t]=this._originalConsole[t]}Object.defineProperty(exports,"__esModule",{value:!0});var commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Event_1=createCommonjsModule(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){return function(){this.message=""}}();e.Event=n});unwrapExports(Event_1);var Event_2=Event_1.Event,LogLevel_1=createCommonjsModule(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});!function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Debug=2]="Debug",t[t.Verbose=3]="Verbose"}(e.LogLevel||(e.LogLevel={}))});unwrapExports(LogLevel_1);var LogLevel_2=LogLevel_1.LogLevel,Interfaces=createCommonjsModule(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Event=Event_1.Event,e.LogLevel=LogLevel_1.LogLevel});unwrapExports(Interfaces);var Interfaces_1=Interfaces.Event,Interfaces_2=Interfaces.LogLevel,Context=createCommonjsModule(function(t,e){function n(t,e,n){t[e]=n}Object.defineProperty(e,"__esModule",{value:!0}),e.getDefaultContext=function(){return{}},e.set=n,e.mergeIn=function(t,e,r){t[e]||n(t,e,{}),void 0===r?delete t[e]:Object.assign(t[e],r)}});unwrapExports(Context);var Context_1=Context.getDefaultContext,Context_2=Context.set,Context_3=Context.mergeIn,DSN_1=createCommonjsModule(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=/^(?:(\w+):)\/\/(?:(\w+)(:\w+)?@)([\w\.-]+)(?::(\d+))?(\/.*)/,r=function(){function t(t){return this.dsnString=t,this.parseDsn(),this}return t.prototype.getDsn=function(t){return this.dsn.protocol+"://"+this.dsn.user+(t?this.dsn.pass:"")+"@"+this.dsn.host+(this.dsn.port?":"+this.dsn.port:"")+this.dsn.path},t.prototype.parseDsn=function(){var t=n.exec(this.dsnString);if(!t)throw new Sentry.SentryError("invalid dsn");this.dsn={source:t[0],protocol:t[1],user:t[2],pass:t[3]||"",host:t[4],port:t[5]||"",path:t[6]}},t}();e.DSN=r});unwrapExports(DSN_1);var DSN_2=DSN_1.DSN,Client_1=createCommonjsModule(function(t,e){var n=commonjsGlobal&&commonjsGlobal.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(a,s)}l((r=r.apply(t,e||[])).next())})},r=commonjsGlobal&&commonjsGlobal.__generator||function(t,e){function n(n){return function(a){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,o&&(i=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[0,i.value]),n[0]){case 0:case 1:i=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,o=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!(i=i.length>0&&i[i.length-1])&&(6===n[0]||2===n[0])){s=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){s.label=n[1];break}if(6===n[0]&&s.label<i[1]){s.label=i[1],i=n;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(n);break}i[2]&&s.ops.pop(),s.trys.pop();continue}n=e.call(t,s)}catch(t){n=[6,t],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,a])}}var r,o,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){return void 0===e&&(e={logLevel:Interfaces.LogLevel.Error,maxBreadcrumbs:100}),this.options=e,this.dsn=new DSN_1.DSN(t),this._context=Context.getDefaultContext(),this}return t.prototype.getAdapter=function(){if(!this._adapter)throw new Sentry.SentryError("No adapter in use, please call .use(<Adapter>)");return this._adapter},t.prototype.use=function(t,e){if(this._adapter)throw new RangeError("There is already a Adapter registered, call unregister() to remove current adapter");return this._adapter=new t(this,e),this},t.prototype.install=function(){var t=this;return this._isInstalled||(this._isInstalled=this.getAdapter().install()),this._isInstalled.then(function(){return t})},t.prototype.captureException=function(t){return n(this,void 0,void 0,function(){var e,n;return r(this,function(r){switch(r.label){case 0:return[4,this.awaitAdapter()];case 1:return e=r.sent(),n=this.send,[4,e.captureException(t)];case 2:return[2,n.apply(this,[r.sent()])]}})})},t.prototype.captureMessage=function(t){return n(this,void 0,void 0,function(){var e,n;return r(this,function(r){switch(r.label){case 0:return[4,this.awaitAdapter()];case 1:return e=r.sent(),n=this.send,[4,e.captureMessage(t)];case 2:return[2,n.apply(this,[r.sent()])]}})})},t.prototype.captureBreadcrumb=function(t){return n(this,void 0,void 0,function(){var e;return r(this,function(n){switch(n.label){case 0:return[4,this.awaitAdapter()];case 1:return e=n.sent(),[2,e.captureBreadcrumb(t)]}})})},t.prototype.send=function(t){return n(this,void 0,void 0,function(){var e;return r(this,function(n){switch(n.label){case 0:return[4,this.awaitAdapter()];case 1:return e=n.sent(),[2,e.send(t)]}})})},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.options.logLevel>=Interfaces.LogLevel.Debug&&console.log.apply(console,t)},t.prototype.setRelease=function(t){return n(this,void 0,void 0,function(){var e;return r(this,function(n){switch(n.label){case 0:return[4,this.awaitAdapter()];case 1:return e=n.sent(),[4,e.setRelease(t)];case 2:return n.sent(),[2,this]}})})},t.prototype.getContext=function(){return JSON.parse(JSON.stringify(this._context))},t.prototype.setUserContext=function(t){return n(this,void 0,void 0,function(){var e;return r(this,function(n){switch(n.label){case 0:return Context.set(this._context,"user",t),[4,this.awaitAdapter()];case 1:return e=n.sent(),[4,e.setUserContext(t)];case 2:return n.sent(),[2,this]}})})},t.prototype.setTagsContext=function(t){return n(this,void 0,void 0,function(){var e;return r(this,function(n){switch(n.label){case 0:return Context.mergeIn(this._context,"tags",t),[4,this.awaitAdapter()];case 1:return e=n.sent(),[4,e.setTagsContext(t)];case 2:return n.sent(),[2,this]}})})},t.prototype.setExtraContext=function(t){return n(this,void 0,void 0,function(){var e;return r(this,function(n){switch(n.label){case 0:return Context.mergeIn(this._context,"extra",t),[4,this.awaitAdapter()];case 1:return e=n.sent(),[4,e.setExtraContext(t)];case 2:return n.sent(),[2,this]}})})},t.prototype.clearContext=function(){return n(this,void 0,void 0,function(){var t;return r(this,function(e){switch(e.label){case 0:return this._context=Context.getDefaultContext(),[4,this.awaitAdapter()];case 1:return t=e.sent(),[4,t.clearContext()];case 2:return e.sent(),[2,this]}})})},t.prototype.awaitAdapter=function(){var t=this;this.getAdapter();if(!this._isInstalled)throw new Sentry.SentryError("Please call install() before calling other methods on Sentry");return this._isInstalled.then(function(){return t._adapter})},t}();e.Client=o});unwrapExports(Client_1);var Client_2=Client_1.Client,Sentry=createCommonjsModule(function(t,e){function n(t){return r=t,t}Object.defineProperty(e,"__esModule",{value:!0});var r;e.create=function(t,e){return n(new Client_1.Client(t,e))},e.setSharedClient=n,e.getSharedClient=function(){return r};var o=function(){return function(t){this.message=t,this.name="SentryError"}}();e.SentryError=o});unwrapExports(Sentry);var Sentry_1=Sentry.create,Sentry_2=Sentry.setSharedClient,Sentry_3=Sentry.getSharedClient,Sentry_4=Sentry.SentryError,dist=createCommonjsModule(function(t,e){function n(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),n(Sentry),n(Interfaces),e.Client=Client_1.Client});unwrapExports(dist);var dist_1=dist.Client,_window$3="undefined"!=typeof window?window:void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:{},utils={isObject:isObject$1,isError:isError$1,isErrorEvent:isErrorEvent$1,isUndefined:isUndefined$1,isFunction:isFunction$1,isString:isString$1,isArray:isArray$1,isEmptyObject:isEmptyObject$1,supportsErrorEvent:supportsErrorEvent,supportsFetch:supportsFetch$1,wrappedCallback:wrappedCallback,each:each$1,objectMerge:objectMerge$1,truncate:truncate$1,objectFrozen:objectFrozen$1,hasKey:hasKey$1,joinRegExp:joinRegExp$1,urlencode:urlencode$1,uuid4:uuid4$1,htmlTreeAsString:htmlTreeAsString$1,htmlElementAsString:htmlElementAsString,isSameException:isSameException$1,isSameStacktrace:isSameStacktrace$1,parseUrl:parseUrl$1,fill:fill$1},TraceKit={collectWindowErrors:!0,debug:!1},_window$2="undefined"!=typeof window?window:void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:{},_slice=[].slice,UNKNOWN_FUNCTION="?",ERROR_TYPES_RE=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;TraceKit.report=function(){function t(t,e){var n=null;if(!e||TraceKit.collectWindowErrors){for(var r in a)if(a.hasOwnProperty(r))try{a[r].apply(null,[t].concat(_slice.call(arguments,2)))}catch(t){n=t}if(n)throw n}}function e(e,r,i,a,s){var l=utils.isErrorEvent(s)?s.error:s,u=utils.isErrorEvent(e)?e.message:e;if(c)TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(c,r,i,u),n();else if(l&&utils.isError(l))t(TraceKit.computeStackTrace(l),!0);else{var p={url:r,line:i,column:a},h=void 0;if("[object String]"==={}.toString.call(u)){var f;(f=u.match(ERROR_TYPES_RE))&&(h=f[1],u=f[2])}p.func=UNKNOWN_FUNCTION,t({name:h,message:u,url:getLocationHref(),stack:[p]},!0)}return!!o&&o.apply(this,arguments)}function n(){var e=c,n=s;s=null,c=null,l=null,t.apply(null,[e,!1].concat(n))}function r(t,e){var r=_slice.call(arguments,1);if(c){if(l===t)return;n()}var o=TraceKit.computeStackTrace(t);if(c=o,l=t,s=r,setTimeout(function(){l===t&&n()},o.incomplete?2e3:0),!1!==e)throw t}var o,i,a=[],s=null,l=null,c=null;return r.subscribe=function(t){i||(o=_window$2.onerror,_window$2.onerror=e,i=!0),a.push(t)},r.unsubscribe=function(t){for(var e=a.length-1;e>=0;--e)a[e]===t&&a.splice(e,1)},r.uninstall=function(){i&&(_window$2.onerror=o,i=!1,o=void 0),a=[]},r}(),TraceKit.computeStackTrace=function(){function t(t){if(void 0!==t.stack&&t.stack){for(var e,n,r,o=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,i=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,a=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,s=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,l=/\((\S*)(?::(\d+))(?::(\d+))\)/,c=t.stack.split("\n"),u=[],p=(/^(.*) is undefined$/.exec(t.message),0),h=c.length;p<h;++p){if(n=o.exec(c[p])){var f=n[2]&&0===n[2].indexOf("native");n[2]&&0===n[2].indexOf("eval")&&(e=l.exec(n[2]))&&(n[2]=e[1],n[3]=e[2],n[4]=e[3]),r={url:f?null:n[2],func:n[1]||UNKNOWN_FUNCTION,args:f?[n[2]]:[],line:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}else if(n=a.exec(c[p]))r={url:n[2],func:n[1]||UNKNOWN_FUNCTION,args:[],line:+n[3],column:n[4]?+n[4]:null};else{if(!(n=i.exec(c[p])))continue;n[3]&&n[3].indexOf(" > eval")>-1&&(e=s.exec(n[3]))?(n[3]=e[1],n[4]=e[2],n[5]=null):0!==p||n[5]||void 0===t.columnNumber||(u[0].column=t.columnNumber+1),r={url:n[3],func:n[1]||UNKNOWN_FUNCTION,args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}!r.func&&r.line&&(r.func=UNKNOWN_FUNCTION),u.push(r)}return u.length?{name:t.name,message:t.message,url:getLocationHref(),stack:u}:null}}function e(t,e,n,r){var o={url:e,line:n};if(o.url&&o.line){if(t.incomplete=!1,o.func||(o.func=UNKNOWN_FUNCTION),t.stack.length>0&&t.stack[0].url===o.url){if(t.stack[0].line===o.line)return!1;if(!t.stack[0].line&&t.stack[0].func===o.func)return t.stack[0].line=o.line,!1}return t.stack.unshift(o),t.partial=!0,!0}return t.incomplete=!0,!1}function n(t,o){for(var i,a,s=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,l=[],c={},u=!1,p=n.caller;p&&!u;p=p.caller)if(p!==r&&p!==TraceKit.report){if(a={url:null,func:UNKNOWN_FUNCTION,line:null,column:null},p.name?a.func=p.name:(i=s.exec(p.toString()))&&(a.func=i[1]),void 0===a.func)try{a.func=i.input.substring(0,i.input.indexOf("{"))}catch(t){}c[""+p]?u=!0:c[""+p]=!0,l.push(a)}o&&l.splice(0,o);var h={name:t.name,message:t.message,url:getLocationHref(),stack:l};return e(h,t.sourceURL||t.fileName,t.line||t.lineNumber,t.message||t.description),h}function r(e,r){var o=null;r=null==r?0:+r;try{if(o=t(e))return o}catch(t){if(TraceKit.debug)throw t}try{if(o=n(e,r+1))return o}catch(t){if(TraceKit.debug)throw t}return{name:e.name,message:e.message,url:getLocationHref()}}return r.augmentStackTraceWithInitialElement=e,r.computeStackTraceFromStackProp=t,r}();var tracekit=TraceKit,stringify_1=createCommonjsModule(function(t,e){function n(t,e){for(var n=0;n<t.length;++n)if(t[n]===e)return n;return-1}function r(t,e){var r=[],o=[];return null==e&&(e=function(t,e){return r[0]===e?"[Circular ~]":"[Circular ~."+o.slice(0,n(r,e)).join(".")+"]"}),function(i,a){if(r.length>0){var s=n(r,this);~s?r.splice(s+1):r.push(this),~s?o.splice(s,1/0,i):o.push(i),~n(r,a)&&(a=e.call(this,i,a))}else r.push(a);return null==t?a instanceof Error?function(t){var e={stack:t.stack,message:t.message,name:t.name};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}(a):a:t.call(this,i,a)}}(t.exports=function(t,e,n,o){return JSON.stringify(t,r(e,o),n)}).getSerialize=r}),stringify_2=stringify_1.getSerialize;RavenConfigError.prototype=new Error,RavenConfigError.prototype.constructor=RavenConfigError;var configError=RavenConfigError,wrapMethod=function(t,e,n){var r=t[e],o=t;if(e in t){var i="warn"===e?"warning":e;t[e]=function(){var t=[].slice.call(arguments),a=""+t.join(" "),s={level:i,logger:"console",extra:{arguments:t}};"assert"===e?!1===t[0]&&(a="Assertion failed: "+(t.slice(1).join(" ")||"console.assert"),s.extra.arguments=t.slice(1),n&&n(a,s)):n&&n(a,s),r&&Function.prototype.apply.call(r,o,t)}}},console$1={wrapMethod:wrapMethod},isError=utils.isError,isObject=utils.isObject,isErrorEvent=utils.isErrorEvent,isUndefined=utils.isUndefined,isFunction=utils.isFunction,isString=utils.isString,isArray=utils.isArray,isEmptyObject=utils.isEmptyObject,each=utils.each,objectMerge=utils.objectMerge,truncate=utils.truncate,objectFrozen=utils.objectFrozen,hasKey=utils.hasKey,joinRegExp=utils.joinRegExp,urlencode=utils.urlencode,uuid4=utils.uuid4,htmlTreeAsString=utils.htmlTreeAsString,isSameException=utils.isSameException,isSameStacktrace=utils.isSameStacktrace,parseUrl=utils.parseUrl,fill=utils.fill,supportsFetch=utils.supportsFetch,wrapConsoleMethod=console$1.wrapMethod,dsnKeys="source protocol user pass host port path".split(" "),dsnPattern=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/,_window$1="undefined"!=typeof window?window:void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:{},_document=_window$1.document,_navigator=_window$1.navigator;Raven$1.prototype={VERSION:"3.21.0",debug:!1,TraceKit:tracekit,config:function(t,e){var n=this;if(n._globalServer)return this._logDebug("error","Error: Raven has already been configured"),n;if(!t)return n;var r=n._globalOptions;e&&each(e,function(t,e){"tags"===t||"extra"===t||"user"===t?n._globalContext[t]=e:r[t]=e}),n.setDSN(t),r.ignoreErrors.push(/^Script error\.?$/),r.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),r.ignoreErrors=joinRegExp(r.ignoreErrors),r.ignoreUrls=!!r.ignoreUrls.length&&joinRegExp(r.ignoreUrls),r.whitelistUrls=!!r.whitelistUrls.length&&joinRegExp(r.whitelistUrls),r.includePaths=joinRegExp(r.includePaths),r.maxBreadcrumbs=Math.max(0,Math.min(r.maxBreadcrumbs||100,100));var o={xhr:!0,console:!0,dom:!0,location:!0,sentry:!0},i=r.autoBreadcrumbs;"[object Object]"==={}.toString.call(i)?i=objectMerge(o,i):!1!==i&&(i=o),r.autoBreadcrumbs=i;var a={tryCatch:!0},s=r.instrument;return"[object Object]"==={}.toString.call(s)?s=objectMerge(a,s):!1!==s&&(s=a),r.instrument=s,tracekit.collectWindowErrors=!!r.collectWindowErrors,n},install:function(){var t=this;return t.isSetup()&&!t._isRavenInstalled&&(tracekit.report.subscribe(function(){t._handleOnErrorStackInfo.apply(t,arguments)}),t._patchFunctionToString(),t._globalOptions.instrument&&t._globalOptions.instrument.tryCatch&&t._instrumentTryCatch(),t._globalOptions.autoBreadcrumbs&&t._instrumentBreadcrumbs(),t._drainPlugins(),t._isRavenInstalled=!0),Error.stackTraceLimit=t._globalOptions.stackTraceLimit,this},setDSN:function(t){var e=this._parseDSN(t),n=e.path.lastIndexOf("/"),r=e.path.substr(1,n);this._dsn=t,this._globalKey=e.user,this._globalSecret=e.pass&&e.pass.substr(1),this._globalProject=e.path.substr(n+1),this._globalServer=this._getGlobalServer(e),this._globalEndpoint=this._globalServer+"/"+r+"api/"+this._globalProject+"/store/",this._resetBackoff()},context:function(t,e,n){return isFunction(t)&&(n=e||[],e=t,t=void 0),this.wrap(t,e).apply(this,n)},wrap:function(t,e,n){function r(){var r=[],i=arguments.length,a=!t||t&&!1!==t.deep;for(n&&isFunction(n)&&n.apply(this,arguments);i--;)r[i]=a?o.wrap(t,arguments[i]):arguments[i];try{return e.apply(this,r)}catch(e){throw o._ignoreNextOnError(),o.captureException(e,t),e}}var o=this;if(isUndefined(e)&&!isFunction(t))return t;if(isFunction(t)&&(e=t,t=void 0),!isFunction(e))return e;try{if(e.__raven__)return e;if(e.__raven_wrapper__)return e.__raven_wrapper__}catch(t){return e}for(var i in e)hasKey(e,i)&&(r[i]=e[i]);return r.prototype=e.prototype,e.__raven_wrapper__=r,r.__raven__=!0,r.__orig__=e,r},uninstall:function(){return tracekit.report.uninstall(),this._unpatchFunctionToString(),this._restoreBuiltIns(),Error.stackTraceLimit=this._originalErrorStackTraceLimit,this._isRavenInstalled=!1,this},captureException:function(t,e){var n=!isError(t),r=!isErrorEvent(t),o=isErrorEvent(t)&&!t.error;if(n&&r||o)return this.captureMessage(t,objectMerge({trimHeadFrames:1,stacktrace:!0},e));isErrorEvent(t)&&(t=t.error),this._lastCapturedException=t;try{var i=tracekit.computeStackTrace(t);this._handleStackInfo(i,e)}catch(e){if(t!==e)throw e}return this},captureMessage:function(t,e){if(!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(t)){var n,r=objectMerge({message:t+""},e=e||{});try{throw new Error(t)}catch(t){n=t}n.name=null;var o=tracekit.computeStackTrace(n),i=isArray(o.stack)&&o.stack[1],a=i&&i.url||"";if((!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(a))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(a))){if(this._globalOptions.stacktrace||e&&e.stacktrace){e=objectMerge({fingerprint:t,trimHeadFrames:(e.trimHeadFrames||0)+1},e);var s=this._prepareFrames(o,e);r.stacktrace={frames:s.reverse()}}return this._send(r),this}}},captureBreadcrumb:function(t){var e=objectMerge({timestamp:now()/1e3},t);if(isFunction(this._globalOptions.breadcrumbCallback)){var n=this._globalOptions.breadcrumbCallback(e);if(isObject(n)&&!isEmptyObject(n))e=n;else if(!1===n)return this}return this._breadcrumbs.push(e),this._breadcrumbs.length>this._globalOptions.maxBreadcrumbs&&this._breadcrumbs.shift(),this},addPlugin:function(t){var e=[].slice.call(arguments,1);return this._plugins.push([t,e]),this._isRavenInstalled&&this._drainPlugins(),this},setUserContext:function(t){return this._globalContext.user=t,this},setExtraContext:function(t){return this._mergeContext("extra",t),this},setTagsContext:function(t){return this._mergeContext("tags",t),this},clearContext:function(){return this._globalContext={},this},getContext:function(){return JSON.parse(stringify_1(this._globalContext))},setEnvironment:function(t){return this._globalOptions.environment=t,this},setRelease:function(t){return this._globalOptions.release=t,this},setDataCallback:function(t){var e=this._globalOptions.dataCallback;return this._globalOptions.dataCallback=keepOriginalCallback(e,t),this},setBreadcrumbCallback:function(t){var e=this._globalOptions.breadcrumbCallback;return this._globalOptions.breadcrumbCallback=keepOriginalCallback(e,t),this},setShouldSendCallback:function(t){var e=this._globalOptions.shouldSendCallback;return this._globalOptions.shouldSendCallback=keepOriginalCallback(e,t),this},setTransport:function(t){return this._globalOptions.transport=t,this},lastException:function(){return this._lastCapturedException},lastEventId:function(){return this._lastEventId},isSetup:function(){return!!this._hasJSON&&(!!this._globalServer||(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this._logDebug("error","Error: Raven has not been configured.")),!1))},afterLoad:function(){var t=_window$1.RavenConfig;t&&this.config(t.dsn,t.config).install()},showReportDialog:function(t){if(_document){var e=(t=t||{}).eventId||this.lastEventId();if(!e)throw new configError("Missing eventId");var n=t.dsn||this._dsn;if(!n)throw new configError("Missing DSN");var r=encodeURIComponent,o="";o+="?eventId="+r(e),o+="&dsn="+r(n);var i=t.user||this._globalContext.user;i&&(i.name&&(o+="&name="+r(i.name)),i.email&&(o+="&email="+r(i.email)));var a=this._getGlobalServer(this._parseDSN(n)),s=_document.createElement("script");s.async=!0,s.src=a+"/api/embed/error-page/"+o,(_document.head||_document.body).appendChild(s)}},_ignoreNextOnError:function(){var t=this;this._ignoreOnError+=1,setTimeout(function(){t._ignoreOnError-=1})},_triggerEvent:function(t,e){var n,r;if(this._hasDocument){e=e||{},t="raven"+t.substr(0,1).toUpperCase()+t.substr(1),_document.createEvent?(n=_document.createEvent("HTMLEvents")).initEvent(t,!0,!0):(n=_document.createEventObject()).eventType=t;for(r in e)hasKey(e,r)&&(n[r]=e[r]);if(_document.createEvent)_document.dispatchEvent(n);else try{_document.fireEvent("on"+n.eventType.toLowerCase(),n)}catch(t){}}},_breadcrumbEventHandler:function(t){var e=this;return function(n){if(e._keypressTimeout=null,e._lastCapturedEvent!==n){e._lastCapturedEvent=n;var r;try{r=htmlTreeAsString(n.target)}catch(t){r="<unknown>"}e.captureBreadcrumb({category:"ui."+t,message:r})}}},_keypressEventHandler:function(){var t=this;return function(e){var n;try{n=e.target}catch(t){return}var r=n&&n.tagName;if(r&&("INPUT"===r||"TEXTAREA"===r||n.isContentEditable)){var o=t._keypressTimeout;o||t._breadcrumbEventHandler("input")(e),clearTimeout(o),t._keypressTimeout=setTimeout(function(){t._keypressTimeout=null},1e3)}}},_captureUrlChange:function(t,e){var n=parseUrl(this._location.href),r=parseUrl(e),o=parseUrl(t);this._lastHref=e,n.protocol===r.protocol&&n.host===r.host&&(e=r.relative),n.protocol===o.protocol&&n.host===o.host&&(t=o.relative),this.captureBreadcrumb({category:"navigation",data:{to:e,from:t}})},_patchFunctionToString:function(){var t=this;t._originalFunctionToString=Function.prototype.toString,Function.prototype.toString=function(){return"function"==typeof this&&this.__raven__?t._originalFunctionToString.apply(this.__orig__,arguments):t._originalFunctionToString.apply(this,arguments)}},_unpatchFunctionToString:function(){this._originalFunctionToString&&(Function.prototype.toString=this._originalFunctionToString)},_instrumentTryCatch:function(){function t(t){return function(e,r){for(var o=new Array(arguments.length),i=0;i<o.length;++i)o[i]=arguments[i];var a=o[0];return isFunction(a)&&(o[0]=n.wrap(a)),t.apply?t.apply(this,o):t(o[0],o[1])}}function e(t){var e=_window$1[t]&&_window$1[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(fill(e,"addEventListener",function(e){return function(r,i,a,s){try{i&&i.handleEvent&&(i.handleEvent=n.wrap(i.handleEvent))}catch(t){}var l,c,u;return o&&o.dom&&("EventTarget"===t||"Node"===t)&&(c=n._breadcrumbEventHandler("click"),u=n._keypressEventHandler(),l=function(t){if(t){var e;try{e=t.type}catch(t){return}return"click"===e?c(t):"keypress"===e?u(t):void 0}}),e.call(this,r,n.wrap(i,void 0,l),a,s)}},r),fill(e,"removeEventListener",function(t){return function(e,n,r,o){try{n=n&&(n.__raven_wrapper__?n.__raven_wrapper__:n)}catch(t){}return t.call(this,e,n,r,o)}},r))}var n=this,r=n._wrappedBuiltIns,o=this._globalOptions.autoBreadcrumbs;fill(_window$1,"setTimeout",t,r),fill(_window$1,"setInterval",t,r),_window$1.requestAnimationFrame&&fill(_window$1,"requestAnimationFrame",function(t){return function(e){return t(n.wrap(e))}},r);for(var i=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],a=0;a<i.length;a++)e(i[a])},_instrumentBreadcrumbs:function(){function t(t,n){t in n&&isFunction(n[t])&&fill(n,t,function(t){return e.wrap(t)})}var e=this,n=this._globalOptions.autoBreadcrumbs,r=e._wrappedBuiltIns;if(n.xhr&&"XMLHttpRequest"in _window$1){var o=XMLHttpRequest.prototype;fill(o,"open",function(t){return function(n,r){return isString(r)&&-1===r.indexOf(e._globalKey)&&(this.__raven_xhr={method:n,url:r,status_code:null}),t.apply(this,arguments)}},r),fill(o,"send",function(n){return function(){function r(){if(o.__raven_xhr&&4===o.readyState){try{o.__raven_xhr.status_code=o.status}catch(t){}e.captureBreadcrumb({type:"http",category:"xhr",data:o.__raven_xhr})}}for(var o=this,i=["onload","onerror","onprogress"],a=0;a<i.length;a++)t(i[a],o);return"onreadystatechange"in o&&isFunction(o.onreadystatechange)?fill(o,"onreadystatechange",function(t){return e.wrap(t,void 0,r)}):o.onreadystatechange=r,n.apply(this,arguments)}},r)}n.xhr&&supportsFetch()&&fill(_window$1,"fetch",function(t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;++r)n[r]=arguments[r];var o,i=n[0],a="GET";if("string"==typeof i?o=i:"Request"in _window$1&&i instanceof _window$1.Request?(o=i.url,i.method&&(a=i.method)):o=""+i,-1!==o.indexOf(e._globalKey))return t.apply(this,n);n[1]&&n[1].method&&(a=n[1].method);var s={method:a,url:o,status_code:null};return e.captureBreadcrumb({type:"http",category:"fetch",data:s}),t.apply(this,n).then(function(t){return s.status_code=t.status,t})}},r),n.dom&&this._hasDocument&&(_document.addEventListener?(_document.addEventListener("click",e._breadcrumbEventHandler("click"),!1),_document.addEventListener("keypress",e._keypressEventHandler(),!1)):(_document.attachEvent("onclick",e._breadcrumbEventHandler("click")),_document.attachEvent("onkeypress",e._keypressEventHandler())));var i=_window$1.chrome,a=!(i&&i.app&&i.app.runtime)&&_window$1.history&&history.pushState&&history.replaceState;if(n.location&&a){var s=_window$1.onpopstate;_window$1.onpopstate=function(){var t=e._location.href;if(e._captureUrlChange(e._lastHref,t),s)return s.apply(this,arguments)};var l=function(t){return function(){var n=arguments.length>2?arguments[2]:void 0;return n&&e._captureUrlChange(e._lastHref,n+""),t.apply(this,arguments)}};fill(history,"pushState",l,r),fill(history,"replaceState",l,r)}if(n.console&&"console"in _window$1&&console.log){var c=function(t,n){e.captureBreadcrumb({message:t,level:n.level,category:"console"})};each(["debug","info","warn","error","log"],function(t,e){wrapConsoleMethod(console,e,c)})}},_restoreBuiltIns:function(){for(var t;this._wrappedBuiltIns.length;){var e=(t=this._wrappedBuiltIns.shift())[0],n=t[1],r=t[2];e[n]=r}},_drainPlugins:function(){var t=this;each(this._plugins,function(e,n){var r=n[0],o=n[1];r.apply(t,[t].concat(o))})},_parseDSN:function(t){var e=dsnPattern.exec(t),n={},r=7;try{for(;r--;)n[dsnKeys[r]]=e[r]||""}catch(e){throw new configError("Invalid DSN: "+t)}if(n.pass&&!this._globalOptions.allowSecretKey)throw new configError("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return n},_getGlobalServer:function(t){var e="//"+t.host+(t.port?":"+t.port:"");return t.protocol&&(e=t.protocol+":"+e),e},_handleOnErrorStackInfo:function(){this._ignoreOnError||this._handleStackInfo.apply(this,arguments)},_handleStackInfo:function(t,e){var n=this._prepareFrames(t,e);this._triggerEvent("handle",{stackInfo:t,options:e}),this._processException(t.name,t.message,t.url,t.lineno,n,e)},_prepareFrames:function(t,e){var n=this,r=[];if(t.stack&&t.stack.length&&(each(t.stack,function(e,o){var i=n._normalizeFrame(o,t.url);i&&r.push(i)}),e&&e.trimHeadFrames))for(var o=0;o<e.trimHeadFrames&&o<r.length;o++)r[o].in_app=!1;return r=r.slice(0,this._globalOptions.stackTraceLimit)},_normalizeFrame:function(t,e){var n={filename:t.url,lineno:t.line,colno:t.column,function:t.func||"?"};return t.url||(n.filename=e),n.in_app=!(this._globalOptions.includePaths.test&&!this._globalOptions.includePaths.test(n.filename)||/(Raven|TraceKit)\./.test(n.function)||/raven\.(min\.)?js$/.test(n.filename)),n},_processException:function(t,e,n,r,o,i){var a=(t?t+": ":"")+(e||"");if(!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(e)&&!this._globalOptions.ignoreErrors.test(a)){var s;if(o&&o.length?(n=o[0].filename||n,o.reverse(),s={frames:o}):n&&(s={frames:[{filename:n,lineno:r,in_app:!0}]}),(!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(n))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(n))){var l=objectMerge({exception:{values:[{type:t,value:e,stacktrace:s}]},culprit:n},i);this._send(l)}}},_trimPacket:function(t){var e=this._globalOptions.maxMessageLength;if(t.message&&(t.message=truncate(t.message,e)),t.exception){var n=t.exception.values[0];n.value=truncate(n.value,e)}var r=t.request;return r&&(r.url&&(r.url=truncate(r.url,this._globalOptions.maxUrlLength)),r.Referer&&(r.Referer=truncate(r.Referer,this._globalOptions.maxUrlLength))),t.breadcrumbs&&t.breadcrumbs.values&&this._trimBreadcrumbs(t.breadcrumbs),t},_trimBreadcrumbs:function(t){for(var e,n,r,o=["to","from","url"],i=0;i<t.values.length;++i)if((n=t.values[i]).hasOwnProperty("data")&&isObject(n.data)&&!objectFrozen(n.data)){r=objectMerge({},n.data);for(var a=0;a<o.length;++a)e=o[a],r.hasOwnProperty(e)&&r[e]&&(r[e]=truncate(r[e],this._globalOptions.maxUrlLength));t.values[i].data=r}},_getHttpData:function(){if(this._hasNavigator||this._hasDocument){var t={};return this._hasNavigator&&_navigator.userAgent&&(t.headers={"User-Agent":navigator.userAgent}),this._hasDocument&&(_document.location&&_document.location.href&&(t.url=_document.location.href),_document.referrer&&(t.headers||(t.headers={}),t.headers.Referer=_document.referrer)),t}},_resetBackoff:function(){this._backoffDuration=0,this._backoffStart=null},_shouldBackoff:function(){return this._backoffDuration&&now()-this._backoffStart<this._backoffDuration},_isRepeatData:function(t){var e=this._lastData;return!(!e||t.message!==e.message||t.culprit!==e.culprit)&&(t.stacktrace||e.stacktrace?isSameStacktrace(t.stacktrace,e.stacktrace):!t.exception&&!e.exception||isSameException(t.exception,e.exception))},_setBackoffState:function(t){if(!this._shouldBackoff()){var e=t.status;if(400===e||401===e||429===e){var n;try{n=supportsFetch()?t.headers.get("Retry-After"):t.getResponseHeader("Retry-After"),n=1e3*parseInt(n,10)}catch(t){}this._backoffDuration=n||(2*this._backoffDuration||1e3),this._backoffStart=now()}}},_send:function(t){var e=this._globalOptions,n={project:this._globalProject,logger:e.logger,platform:"javascript"},r=this._getHttpData();r&&(n.request=r),t.trimHeadFrames&&delete t.trimHeadFrames,(t=objectMerge(n,t)).tags=objectMerge(objectMerge({},this._globalContext.tags),t.tags),t.extra=objectMerge(objectMerge({},this._globalContext.extra),t.extra),t.extra["session:duration"]=now()-this._startTime,this._breadcrumbs&&this._breadcrumbs.length>0&&(t.breadcrumbs={values:[].slice.call(this._breadcrumbs,0)}),isEmptyObject(t.tags)&&delete t.tags,this._globalContext.user&&(t.user=this._globalContext.user),e.environment&&(t.environment=e.environment),e.release&&(t.release=e.release),e.serverName&&(t.server_name=e.serverName),isFunction(e.dataCallback)&&(t=e.dataCallback(t)||t),t&&!isEmptyObject(t)&&(isFunction(e.shouldSendCallback)&&!e.shouldSendCallback(t)||(this._shouldBackoff()?this._logDebug("warn","Raven dropped error due to backoff: ",t):"number"==typeof e.sampleRate?Math.random()<e.sampleRate&&this._sendProcessedPayload(t):this._sendProcessedPayload(t)))},_getUuid:function(){return uuid4()},_sendProcessedPayload:function(t,e){var n=this,r=this._globalOptions;if(this.isSetup())if(t=this._trimPacket(t),this._globalOptions.allowDuplicates||!this._isRepeatData(t)){this._lastEventId=t.event_id||(t.event_id=this._getUuid()),this._lastData=t,this._logDebug("debug","Raven about to send:",t);var o={sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this._globalKey};this._globalSecret&&(o.sentry_secret=this._globalSecret);var i=t.exception&&t.exception.values[0];this._globalOptions.autoBreadcrumbs&&this._globalOptions.autoBreadcrumbs.sentry&&this.captureBreadcrumb({category:"sentry",message:i?(i.type?i.type+": ":"")+i.value:t.message,event_id:t.event_id,level:t.level||"error"});var a=this._globalEndpoint;(r.transport||this._makeRequest).call(this,{url:a,auth:o,data:t,options:r,onSuccess:function(){n._resetBackoff(),n._triggerEvent("success",{data:t,src:a}),e&&e()},onError:function(r){n._logDebug("error","Raven transport failed to send: ",r),r.request&&n._setBackoffState(r.request),n._triggerEvent("failure",{data:t,src:a}),r=r||new Error("Raven send failed (no additional details provided)"),e&&e(r)}})}else this._logDebug("warn","Raven dropped repeat event: ",t)},_makeRequest:function(t){var e=t.url+"?"+urlencode(t.auth),n=null;if(t.options.headers&&(n=this._evaluateHeaders(t.options.headers)),supportsFetch()){var r={method:"POST",body:stringify_1(t.data)};return n&&(r.headers=n),_window$1.fetch(e,r).then(function(e){if(e.ok)t.onSuccess&&t.onSuccess();else{var n=new Error("Sentry error code: "+e.status);n.request=e,t.onError&&t.onError(n)}}).catch(function(){t.onError&&t.onError(new Error("Sentry error code: network unavailable"))})}var o=_window$1.XMLHttpRequest&&new _window$1.XMLHttpRequest;if(o){("withCredentials"in o||"undefined"!=typeof XDomainRequest)&&("withCredentials"in o?o.onreadystatechange=function(){if(4===o.readyState)if(200===o.status)t.onSuccess&&t.onSuccess();else if(t.onError){var e=new Error("Sentry error code: "+o.status);e.request=o,t.onError(e)}}:(o=new XDomainRequest,e=e.replace(/^https?:/,""),t.onSuccess&&(o.onload=t.onSuccess),t.onError&&(o.onerror=function(){var e=new Error("Sentry error code: XDomainRequest");e.request=o,t.onError(e)})),o.open("POST",e),n&&each(n,function(t,e){o.setRequestHeader(t,e)}),o.send(stringify_1(t.data)))}},_evaluateHeaders:function(t){var e={};for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];e[n]="function"==typeof r?r():r}return e},_logDebug:function(t){this._originalConsoleMethods[t]&&this.debug&&Function.prototype.apply.call(this._originalConsoleMethods[t],this._originalConsole,[].slice.call(arguments,1))},_mergeContext:function(t,e){isUndefined(e)?delete this._globalContext[t]:this._globalContext[t]=objectMerge(this._globalContext[t]||{},e)}},Raven$1.prototype.setUser=Raven$1.prototype.setUserContext,Raven$1.prototype.setReleaseContext=Raven$1.prototype.setRelease;var raven=Raven$1,_window="undefined"!=typeof window?window:void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:{},_Raven=_window.Raven,Raven=new raven;Raven.noConflict=function(){return _window.Raven=_Raven,Raven},Raven.afterLoad();var singleton=Raven,SentryBrowser_1=createCommonjsModule(function(t,e){var n=commonjsGlobal&&commonjsGlobal.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{l(r.next(t))}catch(t){i(t)}}function s(t){try{l(r.throw(t))}catch(t){i(t)}}function l(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(a,s)}l((r=r.apply(t,e||[])).next())})},r=commonjsGlobal&&commonjsGlobal.__generator||function(t,e){function n(n){return function(a){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,o&&(i=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[0,i.value]),n[0]){case 0:case 1:i=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,o=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!(i=i.length>0&&i[i.length-1])&&(6===n[0]||2===n[0])){s=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){s.label=n[1];break}if(6===n[0]&&s.label<i[1]){s.label=i[1],i=n;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(n);break}i[2]&&s.ops.pop(),s.trys.pop();continue}n=e.call(t,s)}catch(t){n=[6,t],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,a])}}var r,o,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){void 0===e&&(e={}),this.options=e,this.client=t}return t.prototype.install=function(){return singleton.config(this.client.dsn.getDsn(!1),this.options).install(),Promise.resolve(!0)},t.prototype.getRaven=function(){return singleton},t.prototype.setOptions=function(t){return n(this,void 0,void 0,function(){return r(this,function(e){return Object.assign(this.options,t),Object.assign(singleton._globalOptions,this.options),[2,this]})})},t.prototype.captureException=function(t){return new Promise(function(e,n){var r=singleton._sendProcessedPayload;singleton._sendProcessedPayload=function(t){singleton._sendProcessedPayload=r,e(t)},singleton.captureException(t)})},t.prototype.captureMessage=function(t){return new Promise(function(e,n){var r=singleton._sendProcessedPayload;singleton._sendProcessedPayload=function(t){singleton._sendProcessedPayload=r,e(t)},singleton.captureMessage(t)})},t.prototype.setBreadcrumbCallback=function(t){singleton.setBreadcrumbCallback(t)},t.prototype.captureBreadcrumb=function(t){return new Promise(function(e,n){singleton.captureBreadcrumb(t),e(t)})},t.prototype.send=function(t){return new Promise(function(e,n){singleton._sendProcessedPayload(t,function(r){r?n(r):e(t)})})},t.prototype.setUserContext=function(t){return n(this,void 0,void 0,function(){return r(this,function(e){return singleton.setUserContext(t),[2,this]})})},t.prototype.setTagsContext=function(t){return n(this,void 0,void 0,function(){return r(this,function(e){return singleton.setTagsContext(t),[2,this]})})},t.prototype.setExtraContext=function(t){return n(this,void 0,void 0,function(){return r(this,function(e){return singleton.setExtraContext(t),[2,this]})})},t.prototype.clearContext=function(){return n(this,void 0,void 0,function(){return r(this,function(t){return singleton.clearContext(),[2,this]})})},t.prototype.setRelease=function(t){return n(this,void 0,void 0,function(){return r(this,function(e){return singleton.setRelease(t),[2,this]})})},t}();e.SentryBrowser=o});unwrapExports(SentryBrowser_1);var SentryBrowser_2=SentryBrowser_1.SentryBrowser,standalone=createCommonjsModule(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(dist),e.SentryBrowser=SentryBrowser_1.SentryBrowser}),standalone$1=unwrapExports(standalone),standalone_1=standalone.SentryBrowser;exports.default=standalone$1,exports.SentryBrowser=standalone_1; | ||
"use strict";function unwrapExports(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function createCommonjsModule(t,e){return e={exports:{}},t(e,e.exports),e.exports}function isObject(t){return"object"==typeof t&&null!==t}function isError(t){switch({}.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return t instanceof Error}}function isErrorEvent(t){return supportsErrorEvent()&&"[object ErrorEvent]"==={}.toString.call(t)}function isUndefined(t){return void 0===t}function isFunction(t){return"function"==typeof t}function isPlainObject(t){return"[object Object]"===Object.prototype.toString.call(t)}function isString(t){return"[object String]"===Object.prototype.toString.call(t)}function isArray(t){return"[object Array]"===Object.prototype.toString.call(t)}function isEmptyObject(t){if(!isPlainObject(t))return!1;for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}function supportsErrorEvent(){try{return new ErrorEvent(""),!0}catch(t){return!1}}function supportsFetch(){if(!("fetch"in _window))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function wrappedCallback(t){return function(e,n){var r=t(e)||e;return n?n(r)||r:r}}function each(t,e){var n,r;if(isUndefined(t.length))for(n in t)hasKey(t,n)&&e.call(null,n,t[n]);else if(r=t.length)for(n=0;n<r;n++)e.call(null,n,t[n])}function objectMerge(t,e){return e?(each(e,function(e,n){t[e]=n}),t):t}function objectFrozen(t){return!!Object.isFrozen&&Object.isFrozen(t)}function truncate(t,e){return!e||t.length<=e?t:t.substr(0,e)+"…"}function hasKey(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function joinRegExp(t){for(var e,n=[],r=0,o=t.length;r<o;r++)isString(e=t[r])?n.push(e.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):e&&e.source&&n.push(e.source);return new RegExp(n.join("|"),"i")}function urlencode(t){var e=[];return each(t,function(t,n){e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}),e.join("&")}function parseUrl(t){if("string"!=typeof t)return{};var e=t.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/),n=e[6]||"",r=e[8]||"";return{protocol:e[2],host:e[4],path:e[5],relative:e[5]+n+r}}function uuid4(){var t=_window.crypto||_window.msCrypto;if(!isUndefined(t)&&t.getRandomValues){var e=new Uint16Array(8);t.getRandomValues(e),e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;var n=function(t){for(var e=t.toString(16);e.length<4;)e="0"+e;return e};return n(e[0])+n(e[1])+n(e[2])+n(e[3])+n(e[4])+n(e[5])+n(e[6])+n(e[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}function htmlTreeAsString(t){for(var e,n=[],r=0,o=0,i=" > ".length;t&&r++<5&&!("html"===(e=htmlElementAsString(t))||r>1&&o+n.length*i+e.length>=80);)n.push(e),o+=e.length,t=t.parentNode;return n.reverse().join(" > ")}function htmlElementAsString(t){var e,n,r,o,i,a=[];if(!t||!t.tagName)return"";if(a.push(t.tagName.toLowerCase()),t.id&&a.push("#"+t.id),(e=t.className)&&isString(e))for(n=e.split(/\s+/),i=0;i<n.length;i++)a.push("."+n[i]);var s=["type","name","title","alt"];for(i=0;i<s.length;i++)r=s[i],(o=t.getAttribute(r))&&a.push("["+r+'="'+o+'"]');return a.join("")}function isOnlyOneTruthy(t,e){return!!(!!t^!!e)}function isBothUndefined(t,e){return isUndefined(t)&&isUndefined(e)}function isSameException(t,e){return!isOnlyOneTruthy(t,e)&&(t=t.values[0],e=e.values[0],t.type===e.type&&t.value===e.value&&(!isBothUndefined(t.stacktrace,e.stacktrace)&&isSameStacktrace(t.stacktrace,e.stacktrace)))}function isSameStacktrace(t,e){if(isOnlyOneTruthy(t,e))return!1;var n=t.frames,r=e.frames;if(n.length!==r.length)return!1;for(var o,i,a=0;a<n.length;a++)if(o=n[a],i=r[a],o.filename!==i.filename||o.lineno!==i.lineno||o.colno!==i.colno||o.function!==i.function)return!1;return!0}function fill(t,e,n,r){var o=t[e];t[e]=n(o),t[e].__raven__=!0,t[e].__orig__=o,r&&r.push([t,e,o])}function getLocationHref(){return"undefined"==typeof document||null==document.location?"":document.location.href}function RavenConfigError(t){this.name="RavenConfigError",this.message=t}function now(){return+new Date}function keepOriginalCallback(t,e){return isFunction$1(e)?function(n){return e(n,t)}:e}function Raven(){this._hasJSON=!("object"!=typeof JSON||!JSON.stringify),this._hasDocument=!isUndefined$1(_document),this._hasNavigator=!isUndefined$1(_navigator),this._lastCapturedException=null,this._lastData=null,this._lastEventId=null,this._globalServer=null,this._globalKey=null,this._globalProject=null,this._globalContext={},this._globalOptions={release:_window$2.SENTRY_RELEASE&&_window$2.SENTRY_RELEASE.id,logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],headers:null,collectWindowErrors:!0,maxMessageLength:0,maxUrlLength:250,stackTraceLimit:50,autoBreadcrumbs:!0,instrument:!0,sampleRate:1},this._fetchDefaults={method:"POST",keepalive:!0,referrerPolicy:"origin"},this._ignoreOnError=0,this._isRavenInstalled=!1,this._originalErrorStackTraceLimit=Error.stackTraceLimit,this._originalConsole=_window$2.console||{},this._originalConsoleMethods={},this._plugins=[],this._startTime=now(),this._wrappedBuiltIns=[],this._breadcrumbs=[],this._lastCapturedEvent=null,this._keypressTimeout,this._location=_window$2.location,this._lastHref=this._location&&this._location.href,this._resetBackoff();for(var t in this._originalConsole)this._originalConsoleMethods[t]=this._originalConsole[t]}Object.defineProperty(exports,"__esModule",{value:!0});var commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Event_1=createCommonjsModule(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(){return function(){this.message=""}}();e.Event=n});unwrapExports(Event_1);var Event_2=Event_1.Event,LogLevel_1=createCommonjsModule(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});!function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Debug=2]="Debug",t[t.Verbose=3]="Verbose"}(e.LogLevel||(e.LogLevel={}))});unwrapExports(LogLevel_1);var LogLevel_2=LogLevel_1.LogLevel,Interfaces=createCommonjsModule(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Event=Event_1.Event,e.LogLevel=LogLevel_1.LogLevel});unwrapExports(Interfaces);var Interfaces_1=Interfaces.Event,Interfaces_2=Interfaces.LogLevel,Context=createCommonjsModule(function(t,e){function n(t,e,n){t[e]=n}Object.defineProperty(e,"__esModule",{value:!0}),e.getDefaultContext=function(){return{}},e.set=n,e.mergeIn=function(t,e,r){t[e]||n(t,e,{}),void 0===r?delete t[e]:Object.assign(t[e],r)}});unwrapExports(Context);var Context_1=Context.getDefaultContext,Context_2=Context.set,Context_3=Context.mergeIn,DSN_1=createCommonjsModule(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=/^(?:(\w+):)\/\/(?:(\w+)(:\w+)?@)([\w\.-]+)(?::(\d+))?(\/.*)/,r=function(){function t(t){return this.dsnString=t,this.parseDsn(),this}return t.prototype.getDsn=function(t){return this.dsn.protocol+"://"+this.dsn.user+(t?this.dsn.pass:"")+"@"+this.dsn.host+(this.dsn.port?":"+this.dsn.port:"")+this.dsn.path},t.prototype.parseDsn=function(){var t=n.exec(this.dsnString);if(!t)throw new Sentry.SentryError("invalid dsn");this.dsn={source:t[0],protocol:t[1],user:t[2],pass:t[3]||"",host:t[4],port:t[5]||"",path:t[6]}},t}();e.DSN=r});unwrapExports(DSN_1);var DSN_2=DSN_1.DSN,Client_1=createCommonjsModule(function(t,e){var n=commonjsGlobal&&commonjsGlobal.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(a,s)}c((r=r.apply(t,e||[])).next())})},r=commonjsGlobal&&commonjsGlobal.__generator||function(t,e){function n(n){return function(a){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,o&&(i=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[0,i.value]),n[0]){case 0:case 1:i=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,o=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!(i=i.length>0&&i[i.length-1])&&(6===n[0]||2===n[0])){s=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){s.label=n[1];break}if(6===n[0]&&s.label<i[1]){s.label=i[1],i=n;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(n);break}i[2]&&s.ops.pop(),s.trys.pop();continue}n=e.call(t,s)}catch(t){n=[6,t],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,a])}}var r,o,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){return void 0===e&&(e={logLevel:Interfaces.LogLevel.Error,maxBreadcrumbs:100}),this.options=e,this.dsn=new DSN_1.DSN(t),this._context=Context.getDefaultContext(),this}return t.prototype.getAdapter=function(){if(!this._adapter)throw new Sentry.SentryError("No adapter in use, please call .use(<Adapter>)");return this._adapter},t.prototype.use=function(t,e){if(this._adapter)throw new RangeError("There is already a Adapter registered, call unregister() to remove current adapter");return this._adapter=new t(this,e),this},t.prototype.install=function(){var t=this;return this._isInstalled||(this._isInstalled=this.getAdapter().install()),this._isInstalled.then(function(){return t})},t.prototype.captureException=function(t){return n(this,void 0,void 0,function(){var e,n;return r(this,function(r){switch(r.label){case 0:return[4,this.awaitAdapter()];case 1:return e=r.sent(),n=this.send,[4,e.captureException(t)];case 2:return[2,n.apply(this,[r.sent()])]}})})},t.prototype.captureMessage=function(t){return n(this,void 0,void 0,function(){var e,n;return r(this,function(r){switch(r.label){case 0:return[4,this.awaitAdapter()];case 1:return e=r.sent(),n=this.send,[4,e.captureMessage(t)];case 2:return[2,n.apply(this,[r.sent()])]}})})},t.prototype.captureBreadcrumb=function(t){return n(this,void 0,void 0,function(){var e;return r(this,function(n){switch(n.label){case 0:return[4,this.awaitAdapter()];case 1:return e=n.sent(),[2,e.captureBreadcrumb(t)]}})})},t.prototype.send=function(t){return n(this,void 0,void 0,function(){var e;return r(this,function(n){switch(n.label){case 0:return[4,this.awaitAdapter()];case 1:return e=n.sent(),[2,e.send(t)]}})})},t.prototype.log=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.options.logLevel>=Interfaces.LogLevel.Debug&&console.log.apply(console,t)},t.prototype.setRelease=function(t){return n(this,void 0,void 0,function(){var e;return r(this,function(n){switch(n.label){case 0:return[4,this.awaitAdapter()];case 1:return e=n.sent(),[4,e.setRelease(t)];case 2:return n.sent(),[2,this]}})})},t.prototype.getContext=function(){return JSON.parse(JSON.stringify(this._context))},t.prototype.setUserContext=function(t){return n(this,void 0,void 0,function(){var e;return r(this,function(n){switch(n.label){case 0:return Context.set(this._context,"user",t),[4,this.awaitAdapter()];case 1:return e=n.sent(),[4,e.setUserContext(t)];case 2:return n.sent(),[2,this]}})})},t.prototype.setTagsContext=function(t){return n(this,void 0,void 0,function(){var e;return r(this,function(n){switch(n.label){case 0:return Context.mergeIn(this._context,"tags",t),[4,this.awaitAdapter()];case 1:return e=n.sent(),[4,e.setTagsContext(t)];case 2:return n.sent(),[2,this]}})})},t.prototype.setExtraContext=function(t){return n(this,void 0,void 0,function(){var e;return r(this,function(n){switch(n.label){case 0:return Context.mergeIn(this._context,"extra",t),[4,this.awaitAdapter()];case 1:return e=n.sent(),[4,e.setExtraContext(t)];case 2:return n.sent(),[2,this]}})})},t.prototype.clearContext=function(){return n(this,void 0,void 0,function(){var t;return r(this,function(e){switch(e.label){case 0:return this._context=Context.getDefaultContext(),[4,this.awaitAdapter()];case 1:return t=e.sent(),[4,t.clearContext()];case 2:return e.sent(),[2,this]}})})},t.prototype.awaitAdapter=function(){var t=this;this.getAdapter();if(!this._isInstalled)throw new Sentry.SentryError("Please call install() before calling other methods on Sentry");return this._isInstalled.then(function(){return t._adapter})},t}();e.Client=o});unwrapExports(Client_1);var Client_2=Client_1.Client,Sentry=createCommonjsModule(function(t,e){function n(t){return r=t,t}Object.defineProperty(e,"__esModule",{value:!0});var r;e.create=function(t,e){return n(new Client_1.Client(t,e))},e.setSharedClient=n,e.getSharedClient=function(){return r};var o=function(){return function(t){this.message=t,this.name="SentryError"}}();e.SentryError=o});unwrapExports(Sentry);var Sentry_1=Sentry.create,Sentry_2=Sentry.setSharedClient,Sentry_3=Sentry.getSharedClient,Sentry_4=Sentry.SentryError,dist=createCommonjsModule(function(t,e){function n(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),n(Sentry),n(Interfaces),e.Client=Client_1.Client});unwrapExports(dist);var dist_1=dist.Client,_window="undefined"!=typeof window?window:void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:{},utils={isObject:isObject,isError:isError,isErrorEvent:isErrorEvent,isUndefined:isUndefined,isFunction:isFunction,isPlainObject:isPlainObject,isString:isString,isArray:isArray,isEmptyObject:isEmptyObject,supportsErrorEvent:supportsErrorEvent,supportsFetch:supportsFetch,wrappedCallback:wrappedCallback,each:each,objectMerge:objectMerge,truncate:truncate,objectFrozen:objectFrozen,hasKey:hasKey,joinRegExp:joinRegExp,urlencode:urlencode,uuid4:uuid4,htmlTreeAsString:htmlTreeAsString,htmlElementAsString:htmlElementAsString,isSameException:isSameException,isSameStacktrace:isSameStacktrace,parseUrl:parseUrl,fill:fill},TraceKit={collectWindowErrors:!0,debug:!1},_window$1="undefined"!=typeof window?window:void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:{},_slice=[].slice,UNKNOWN_FUNCTION="?",ERROR_TYPES_RE=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;TraceKit.report=function(){function t(t,e){var n=null;if(!e||TraceKit.collectWindowErrors){for(var r in a)if(a.hasOwnProperty(r))try{a[r].apply(null,[t].concat(_slice.call(arguments,2)))}catch(t){n=t}if(n)throw n}}function e(e,r,i,a,s){var c=utils.isErrorEvent(s)?s.error:s,u=utils.isErrorEvent(e)?e.message:e;if(l)TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(l,r,i,u),n();else if(c&&utils.isError(c))t(TraceKit.computeStackTrace(c),!0);else{var p={url:r,line:i,column:a},h=void 0;if("[object String]"==={}.toString.call(u)){var f;(f=u.match(ERROR_TYPES_RE))&&(h=f[1],u=f[2])}p.func=UNKNOWN_FUNCTION,t({name:h,message:u,url:getLocationHref(),stack:[p]},!0)}return!!o&&o.apply(this,arguments)}function n(){var e=l,n=s;s=null,l=null,c=null,t.apply(null,[e,!1].concat(n))}function r(t,e){var r=_slice.call(arguments,1);if(l){if(c===t)return;n()}var o=TraceKit.computeStackTrace(t);if(l=o,c=t,s=r,setTimeout(function(){c===t&&n()},o.incomplete?2e3:0),!1!==e)throw t}var o,i,a=[],s=null,c=null,l=null;return r.subscribe=function(t){i||(o=_window$1.onerror,_window$1.onerror=e,i=!0),a.push(t)},r.unsubscribe=function(t){for(var e=a.length-1;e>=0;--e)a[e]===t&&a.splice(e,1)},r.uninstall=function(){i&&(_window$1.onerror=o,i=!1,o=void 0),a=[]},r}(),TraceKit.computeStackTrace=function(){function t(t){if(void 0!==t.stack&&t.stack){for(var e,n,r,o=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,i=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,a=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx(?:-web)|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,s=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,c=/\((\S*)(?::(\d+))(?::(\d+))\)/,l=t.stack.split("\n"),u=[],p=(/^(.*) is undefined$/.exec(t.message),0),h=l.length;p<h;++p){if(n=o.exec(l[p])){var f=n[2]&&0===n[2].indexOf("native");n[2]&&0===n[2].indexOf("eval")&&(e=c.exec(n[2]))&&(n[2]=e[1],n[3]=e[2],n[4]=e[3]),r={url:f?null:n[2],func:n[1]||UNKNOWN_FUNCTION,args:f?[n[2]]:[],line:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}else if(n=a.exec(l[p]))r={url:n[2],func:n[1]||UNKNOWN_FUNCTION,args:[],line:+n[3],column:n[4]?+n[4]:null};else{if(!(n=i.exec(l[p])))continue;n[3]&&n[3].indexOf(" > eval")>-1&&(e=s.exec(n[3]))?(n[3]=e[1],n[4]=e[2],n[5]=null):0!==p||n[5]||void 0===t.columnNumber||(u[0].column=t.columnNumber+1),r={url:n[3],func:n[1]||UNKNOWN_FUNCTION,args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}!r.func&&r.line&&(r.func=UNKNOWN_FUNCTION),u.push(r)}return u.length?{name:t.name,message:t.message,url:getLocationHref(),stack:u}:null}}function e(t,e,n,r){var o={url:e,line:n};if(o.url&&o.line){if(t.incomplete=!1,o.func||(o.func=UNKNOWN_FUNCTION),t.stack.length>0&&t.stack[0].url===o.url){if(t.stack[0].line===o.line)return!1;if(!t.stack[0].line&&t.stack[0].func===o.func)return t.stack[0].line=o.line,!1}return t.stack.unshift(o),t.partial=!0,!0}return t.incomplete=!0,!1}function n(t,o){for(var i,a,s=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,c=[],l={},u=!1,p=n.caller;p&&!u;p=p.caller)if(p!==r&&p!==TraceKit.report){if(a={url:null,func:UNKNOWN_FUNCTION,line:null,column:null},p.name?a.func=p.name:(i=s.exec(p.toString()))&&(a.func=i[1]),void 0===a.func)try{a.func=i.input.substring(0,i.input.indexOf("{"))}catch(t){}l[""+p]?u=!0:l[""+p]=!0,c.push(a)}o&&c.splice(0,o);var h={name:t.name,message:t.message,url:getLocationHref(),stack:c};return e(h,t.sourceURL||t.fileName,t.line||t.lineNumber,t.message||t.description),h}function r(e,r){var o=null;r=null==r?0:+r;try{if(o=t(e))return o}catch(t){if(TraceKit.debug)throw t}try{if(o=n(e,r+1))return o}catch(t){if(TraceKit.debug)throw t}return{name:e.name,message:e.message,url:getLocationHref()}}return r.augmentStackTraceWithInitialElement=e,r.computeStackTraceFromStackProp=t,r}();var tracekit=TraceKit,stringify_1=createCommonjsModule(function(t,e){function n(t,e){for(var n=0;n<t.length;++n)if(t[n]===e)return n;return-1}function r(t,e){var r=[],o=[];return null==e&&(e=function(t,e){return r[0]===e?"[Circular ~]":"[Circular ~."+o.slice(0,n(r,e)).join(".")+"]"}),function(i,a){if(r.length>0){var s=n(r,this);~s?r.splice(s+1):r.push(this),~s?o.splice(s,1/0,i):o.push(i),~n(r,a)&&(a=e.call(this,i,a))}else r.push(a);return null==t?a instanceof Error?function(t){var e={stack:t.stack,message:t.message,name:t.name};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}(a):a:t.call(this,i,a)}}(t.exports=function(t,e,n,o){return JSON.stringify(t,r(e,o),n)}).getSerialize=r}),stringify_2=stringify_1.getSerialize;RavenConfigError.prototype=new Error,RavenConfigError.prototype.constructor=RavenConfigError;var configError=RavenConfigError,wrapMethod=function(t,e,n){var r=t[e],o=t;if(e in t){var i="warn"===e?"warning":e;t[e]=function(){var t=[].slice.call(arguments),a=""+t.join(" "),s={level:i,logger:"console",extra:{arguments:t}};"assert"===e?!1===t[0]&&(a="Assertion failed: "+(t.slice(1).join(" ")||"console.assert"),s.extra.arguments=t.slice(1),n&&n(a,s)):n&&n(a,s),r&&Function.prototype.apply.call(r,o,t)}}},console$1={wrapMethod:wrapMethod},isError$1=utils.isError,isObject$1=utils.isObject,isErrorEvent$1=utils.isErrorEvent,isUndefined$1=utils.isUndefined,isFunction$1=utils.isFunction,isString$1=utils.isString,isArray$1=utils.isArray,isEmptyObject$1=utils.isEmptyObject,each$1=utils.each,objectMerge$1=utils.objectMerge,truncate$1=utils.truncate,objectFrozen$1=utils.objectFrozen,hasKey$1=utils.hasKey,joinRegExp$1=utils.joinRegExp,urlencode$1=utils.urlencode,uuid4$1=utils.uuid4,htmlTreeAsString$1=utils.htmlTreeAsString,isSameException$1=utils.isSameException,isSameStacktrace$1=utils.isSameStacktrace,parseUrl$1=utils.parseUrl,fill$1=utils.fill,supportsFetch$1=utils.supportsFetch,wrapConsoleMethod=console$1.wrapMethod,dsnKeys="source protocol user pass host port path".split(" "),dsnPattern=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/,_window$2="undefined"!=typeof window?window:void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:{},_document=_window$2.document,_navigator=_window$2.navigator;Raven.prototype={VERSION:"3.22.1",debug:!1,TraceKit:tracekit,config:function(t,e){var n=this;if(n._globalServer)return this._logDebug("error","Error: Raven has already been configured"),n;if(!t)return n;var r=n._globalOptions;e&&each$1(e,function(t,e){"tags"===t||"extra"===t||"user"===t?n._globalContext[t]=e:r[t]=e}),n.setDSN(t),r.ignoreErrors.push(/^Script error\.?$/),r.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),r.ignoreErrors=joinRegExp$1(r.ignoreErrors),r.ignoreUrls=!!r.ignoreUrls.length&&joinRegExp$1(r.ignoreUrls),r.whitelistUrls=!!r.whitelistUrls.length&&joinRegExp$1(r.whitelistUrls),r.includePaths=joinRegExp$1(r.includePaths),r.maxBreadcrumbs=Math.max(0,Math.min(r.maxBreadcrumbs||100,100));var o={xhr:!0,console:!0,dom:!0,location:!0,sentry:!0},i=r.autoBreadcrumbs;"[object Object]"==={}.toString.call(i)?i=objectMerge$1(o,i):!1!==i&&(i=o),r.autoBreadcrumbs=i;var a={tryCatch:!0},s=r.instrument;return"[object Object]"==={}.toString.call(s)?s=objectMerge$1(a,s):!1!==s&&(s=a),r.instrument=s,tracekit.collectWindowErrors=!!r.collectWindowErrors,n},install:function(){var t=this;return t.isSetup()&&!t._isRavenInstalled&&(tracekit.report.subscribe(function(){t._handleOnErrorStackInfo.apply(t,arguments)}),t._patchFunctionToString(),t._globalOptions.instrument&&t._globalOptions.instrument.tryCatch&&t._instrumentTryCatch(),t._globalOptions.autoBreadcrumbs&&t._instrumentBreadcrumbs(),t._drainPlugins(),t._isRavenInstalled=!0),Error.stackTraceLimit=t._globalOptions.stackTraceLimit,this},setDSN:function(t){var e=this._parseDSN(t),n=e.path.lastIndexOf("/"),r=e.path.substr(1,n);this._dsn=t,this._globalKey=e.user,this._globalSecret=e.pass&&e.pass.substr(1),this._globalProject=e.path.substr(n+1),this._globalServer=this._getGlobalServer(e),this._globalEndpoint=this._globalServer+"/"+r+"api/"+this._globalProject+"/store/",this._resetBackoff()},context:function(t,e,n){return isFunction$1(t)&&(n=e||[],e=t,t=void 0),this.wrap(t,e).apply(this,n)},wrap:function(t,e,n){function r(){var r=[],i=arguments.length,a=!t||t&&!1!==t.deep;for(n&&isFunction$1(n)&&n.apply(this,arguments);i--;)r[i]=a?o.wrap(t,arguments[i]):arguments[i];try{return e.apply(this,r)}catch(e){throw o._ignoreNextOnError(),o.captureException(e,t),e}}var o=this;if(isUndefined$1(e)&&!isFunction$1(t))return t;if(isFunction$1(t)&&(e=t,t=void 0),!isFunction$1(e))return e;try{if(e.__raven__)return e;if(e.__raven_wrapper__)return e.__raven_wrapper__}catch(t){return e}for(var i in e)hasKey$1(e,i)&&(r[i]=e[i]);return r.prototype=e.prototype,e.__raven_wrapper__=r,r.__raven__=!0,r.__orig__=e,r},uninstall:function(){return tracekit.report.uninstall(),this._unpatchFunctionToString(),this._restoreBuiltIns(),Error.stackTraceLimit=this._originalErrorStackTraceLimit,this._isRavenInstalled=!1,this},captureException:function(t,e){var n=!isError$1(t),r=!isErrorEvent$1(t),o=isErrorEvent$1(t)&&!t.error;if(n&&r||o)return this.captureMessage(t,objectMerge$1({trimHeadFrames:1,stacktrace:!0},e));isErrorEvent$1(t)&&(t=t.error),this._lastCapturedException=t;try{var i=tracekit.computeStackTrace(t);this._handleStackInfo(i,e)}catch(e){if(t!==e)throw e}return this},captureMessage:function(t,e){if(!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(t)){var n,r=objectMerge$1({message:t+""},e=e||{});try{throw new Error(t)}catch(t){n=t}n.name=null;var o=tracekit.computeStackTrace(n),i=isArray$1(o.stack)&&o.stack[1],a=i&&i.url||"";if((!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(a))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(a))){if(this._globalOptions.stacktrace||e&&e.stacktrace){e=objectMerge$1({fingerprint:t,trimHeadFrames:(e.trimHeadFrames||0)+1},e);var s=this._prepareFrames(o,e);r.stacktrace={frames:s.reverse()}}return this._send(r),this}}},captureBreadcrumb:function(t){var e=objectMerge$1({timestamp:now()/1e3},t);if(isFunction$1(this._globalOptions.breadcrumbCallback)){var n=this._globalOptions.breadcrumbCallback(e);if(isObject$1(n)&&!isEmptyObject$1(n))e=n;else if(!1===n)return this}return this._breadcrumbs.push(e),this._breadcrumbs.length>this._globalOptions.maxBreadcrumbs&&this._breadcrumbs.shift(),this},addPlugin:function(t){var e=[].slice.call(arguments,1);return this._plugins.push([t,e]),this._isRavenInstalled&&this._drainPlugins(),this},setUserContext:function(t){return this._globalContext.user=t,this},setExtraContext:function(t){return this._mergeContext("extra",t),this},setTagsContext:function(t){return this._mergeContext("tags",t),this},clearContext:function(){return this._globalContext={},this},getContext:function(){return JSON.parse(stringify_1(this._globalContext))},setEnvironment:function(t){return this._globalOptions.environment=t,this},setRelease:function(t){return this._globalOptions.release=t,this},setDataCallback:function(t){var e=this._globalOptions.dataCallback;return this._globalOptions.dataCallback=keepOriginalCallback(e,t),this},setBreadcrumbCallback:function(t){var e=this._globalOptions.breadcrumbCallback;return this._globalOptions.breadcrumbCallback=keepOriginalCallback(e,t),this},setShouldSendCallback:function(t){var e=this._globalOptions.shouldSendCallback;return this._globalOptions.shouldSendCallback=keepOriginalCallback(e,t),this},setTransport:function(t){return this._globalOptions.transport=t,this},lastException:function(){return this._lastCapturedException},lastEventId:function(){return this._lastEventId},isSetup:function(){return!!this._hasJSON&&(!!this._globalServer||(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this._logDebug("error","Error: Raven has not been configured.")),!1))},afterLoad:function(){var t=_window$2.RavenConfig;t&&this.config(t.dsn,t.config).install()},showReportDialog:function(t){if(_document){var e=(t=t||{}).eventId||this.lastEventId();if(!e)throw new configError("Missing eventId");var n=t.dsn||this._dsn;if(!n)throw new configError("Missing DSN");var r=encodeURIComponent,o="";o+="?eventId="+r(e),o+="&dsn="+r(n);var i=t.user||this._globalContext.user;i&&(i.name&&(o+="&name="+r(i.name)),i.email&&(o+="&email="+r(i.email)));var a=this._getGlobalServer(this._parseDSN(n)),s=_document.createElement("script");s.async=!0,s.src=a+"/api/embed/error-page/"+o,(_document.head||_document.body).appendChild(s)}},_ignoreNextOnError:function(){var t=this;this._ignoreOnError+=1,setTimeout(function(){t._ignoreOnError-=1})},_triggerEvent:function(t,e){var n,r;if(this._hasDocument){e=e||{},t="raven"+t.substr(0,1).toUpperCase()+t.substr(1),_document.createEvent?(n=_document.createEvent("HTMLEvents")).initEvent(t,!0,!0):(n=_document.createEventObject()).eventType=t;for(r in e)hasKey$1(e,r)&&(n[r]=e[r]);if(_document.createEvent)_document.dispatchEvent(n);else try{_document.fireEvent("on"+n.eventType.toLowerCase(),n)}catch(t){}}},_breadcrumbEventHandler:function(t){var e=this;return function(n){if(e._keypressTimeout=null,e._lastCapturedEvent!==n){e._lastCapturedEvent=n;var r;try{r=htmlTreeAsString$1(n.target)}catch(t){r="<unknown>"}e.captureBreadcrumb({category:"ui."+t,message:r})}}},_keypressEventHandler:function(){var t=this;return function(e){var n;try{n=e.target}catch(t){return}var r=n&&n.tagName;if(r&&("INPUT"===r||"TEXTAREA"===r||n.isContentEditable)){var o=t._keypressTimeout;o||t._breadcrumbEventHandler("input")(e),clearTimeout(o),t._keypressTimeout=setTimeout(function(){t._keypressTimeout=null},1e3)}}},_captureUrlChange:function(t,e){var n=parseUrl$1(this._location.href),r=parseUrl$1(e),o=parseUrl$1(t);this._lastHref=e,n.protocol===r.protocol&&n.host===r.host&&(e=r.relative),n.protocol===o.protocol&&n.host===o.host&&(t=o.relative),this.captureBreadcrumb({category:"navigation",data:{to:e,from:t}})},_patchFunctionToString:function(){var t=this;t._originalFunctionToString=Function.prototype.toString,Function.prototype.toString=function(){return"function"==typeof this&&this.__raven__?t._originalFunctionToString.apply(this.__orig__,arguments):t._originalFunctionToString.apply(this,arguments)}},_unpatchFunctionToString:function(){this._originalFunctionToString&&(Function.prototype.toString=this._originalFunctionToString)},_instrumentTryCatch:function(){function t(t){return function(e,r){for(var o=new Array(arguments.length),i=0;i<o.length;++i)o[i]=arguments[i];var a=o[0];return isFunction$1(a)&&(o[0]=n.wrap(a)),t.apply?t.apply(this,o):t(o[0],o[1])}}function e(t){var e=_window$2[t]&&_window$2[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(fill$1(e,"addEventListener",function(e){return function(r,i,a,s){try{i&&i.handleEvent&&(i.handleEvent=n.wrap(i.handleEvent))}catch(t){}var c,l,u;return o&&o.dom&&("EventTarget"===t||"Node"===t)&&(l=n._breadcrumbEventHandler("click"),u=n._keypressEventHandler(),c=function(t){if(t){var e;try{e=t.type}catch(t){return}return"click"===e?l(t):"keypress"===e?u(t):void 0}}),e.call(this,r,n.wrap(i,void 0,c),a,s)}},r),fill$1(e,"removeEventListener",function(t){return function(e,n,r,o){try{n=n&&(n.__raven_wrapper__?n.__raven_wrapper__:n)}catch(t){}return t.call(this,e,n,r,o)}},r))}var n=this,r=n._wrappedBuiltIns,o=this._globalOptions.autoBreadcrumbs;fill$1(_window$2,"setTimeout",t,r),fill$1(_window$2,"setInterval",t,r),_window$2.requestAnimationFrame&&fill$1(_window$2,"requestAnimationFrame",function(t){return function(e){return t(n.wrap(e))}},r);for(var i=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],a=0;a<i.length;a++)e(i[a])},_instrumentBreadcrumbs:function(){function t(t,n){t in n&&isFunction$1(n[t])&&fill$1(n,t,function(t){return e.wrap(t)})}var e=this,n=this._globalOptions.autoBreadcrumbs,r=e._wrappedBuiltIns;if(n.xhr&&"XMLHttpRequest"in _window$2){var o=XMLHttpRequest.prototype;fill$1(o,"open",function(t){return function(n,r){return isString$1(r)&&-1===r.indexOf(e._globalKey)&&(this.__raven_xhr={method:n,url:r,status_code:null}),t.apply(this,arguments)}},r),fill$1(o,"send",function(n){return function(){function r(){if(o.__raven_xhr&&4===o.readyState){try{o.__raven_xhr.status_code=o.status}catch(t){}e.captureBreadcrumb({type:"http",category:"xhr",data:o.__raven_xhr})}}for(var o=this,i=["onload","onerror","onprogress"],a=0;a<i.length;a++)t(i[a],o);return"onreadystatechange"in o&&isFunction$1(o.onreadystatechange)?fill$1(o,"onreadystatechange",function(t){return e.wrap(t,void 0,r)}):o.onreadystatechange=r,n.apply(this,arguments)}},r)}n.xhr&&supportsFetch$1()&&fill$1(_window$2,"fetch",function(t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;++r)n[r]=arguments[r];var o,i=n[0],a="GET";if("string"==typeof i?o=i:"Request"in _window$2&&i instanceof _window$2.Request?(o=i.url,i.method&&(a=i.method)):o=""+i,-1!==o.indexOf(e._globalKey))return t.apply(this,n);n[1]&&n[1].method&&(a=n[1].method);var s={method:a,url:o,status_code:null};return t.apply(this,n).then(function(t){return s.status_code=t.status,e.captureBreadcrumb({type:"http",category:"fetch",data:s}),t})}},r),n.dom&&this._hasDocument&&(_document.addEventListener?(_document.addEventListener("click",e._breadcrumbEventHandler("click"),!1),_document.addEventListener("keypress",e._keypressEventHandler(),!1)):(_document.attachEvent("onclick",e._breadcrumbEventHandler("click")),_document.attachEvent("onkeypress",e._keypressEventHandler())));var i=_window$2.chrome,a=!(i&&i.app&&i.app.runtime)&&_window$2.history&&history.pushState&&history.replaceState;if(n.location&&a){var s=_window$2.onpopstate;_window$2.onpopstate=function(){var t=e._location.href;if(e._captureUrlChange(e._lastHref,t),s)return s.apply(this,arguments)};var c=function(t){return function(){var n=arguments.length>2?arguments[2]:void 0;return n&&e._captureUrlChange(e._lastHref,n+""),t.apply(this,arguments)}};fill$1(history,"pushState",c,r),fill$1(history,"replaceState",c,r)}if(n.console&&"console"in _window$2&&console.log){var l=function(t,n){e.captureBreadcrumb({message:t,level:n.level,category:"console"})};each$1(["debug","info","warn","error","log"],function(t,e){wrapConsoleMethod(console,e,l)})}},_restoreBuiltIns:function(){for(var t;this._wrappedBuiltIns.length;){var e=(t=this._wrappedBuiltIns.shift())[0],n=t[1],r=t[2];e[n]=r}},_drainPlugins:function(){var t=this;each$1(this._plugins,function(e,n){var r=n[0],o=n[1];r.apply(t,[t].concat(o))})},_parseDSN:function(t){var e=dsnPattern.exec(t),n={},r=7;try{for(;r--;)n[dsnKeys[r]]=e[r]||""}catch(e){throw new configError("Invalid DSN: "+t)}if(n.pass&&!this._globalOptions.allowSecretKey)throw new configError("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return n},_getGlobalServer:function(t){var e="//"+t.host+(t.port?":"+t.port:"");return t.protocol&&(e=t.protocol+":"+e),e},_handleOnErrorStackInfo:function(){this._ignoreOnError||this._handleStackInfo.apply(this,arguments)},_handleStackInfo:function(t,e){var n=this._prepareFrames(t,e);this._triggerEvent("handle",{stackInfo:t,options:e}),this._processException(t.name,t.message,t.url,t.lineno,n,e)},_prepareFrames:function(t,e){var n=this,r=[];if(t.stack&&t.stack.length&&(each$1(t.stack,function(e,o){var i=n._normalizeFrame(o,t.url);i&&r.push(i)}),e&&e.trimHeadFrames))for(var o=0;o<e.trimHeadFrames&&o<r.length;o++)r[o].in_app=!1;return r=r.slice(0,this._globalOptions.stackTraceLimit)},_normalizeFrame:function(t,e){var n={filename:t.url,lineno:t.line,colno:t.column,function:t.func||"?"};return t.url||(n.filename=e),n.in_app=!(this._globalOptions.includePaths.test&&!this._globalOptions.includePaths.test(n.filename)||/(Raven|TraceKit)\./.test(n.function)||/raven\.(min\.)?js$/.test(n.filename)),n},_processException:function(t,e,n,r,o,i){var a=(t?t+": ":"")+(e||"");if(!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(e)&&!this._globalOptions.ignoreErrors.test(a)){var s;if(o&&o.length?(n=o[0].filename||n,o.reverse(),s={frames:o}):n&&(s={frames:[{filename:n,lineno:r,in_app:!0}]}),(!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(n))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(n))){var c=objectMerge$1({exception:{values:[{type:t,value:e,stacktrace:s}]},culprit:n},i);this._send(c)}}},_trimPacket:function(t){var e=this._globalOptions.maxMessageLength;if(t.message&&(t.message=truncate$1(t.message,e)),t.exception){var n=t.exception.values[0];n.value=truncate$1(n.value,e)}var r=t.request;return r&&(r.url&&(r.url=truncate$1(r.url,this._globalOptions.maxUrlLength)),r.Referer&&(r.Referer=truncate$1(r.Referer,this._globalOptions.maxUrlLength))),t.breadcrumbs&&t.breadcrumbs.values&&this._trimBreadcrumbs(t.breadcrumbs),t},_trimBreadcrumbs:function(t){for(var e,n,r,o=["to","from","url"],i=0;i<t.values.length;++i)if((n=t.values[i]).hasOwnProperty("data")&&isObject$1(n.data)&&!objectFrozen$1(n.data)){r=objectMerge$1({},n.data);for(var a=0;a<o.length;++a)e=o[a],r.hasOwnProperty(e)&&r[e]&&(r[e]=truncate$1(r[e],this._globalOptions.maxUrlLength));t.values[i].data=r}},_getHttpData:function(){if(this._hasNavigator||this._hasDocument){var t={};return this._hasNavigator&&_navigator.userAgent&&(t.headers={"User-Agent":navigator.userAgent}),_window$2.location&&_window$2.location.href&&(t.url=_window$2.location.href),this._hasDocument&&_document.referrer&&(t.headers||(t.headers={}),t.headers.Referer=_document.referrer),t}},_resetBackoff:function(){this._backoffDuration=0,this._backoffStart=null},_shouldBackoff:function(){return this._backoffDuration&&now()-this._backoffStart<this._backoffDuration},_isRepeatData:function(t){var e=this._lastData;return!(!e||t.message!==e.message||t.culprit!==e.culprit)&&(t.stacktrace||e.stacktrace?isSameStacktrace$1(t.stacktrace,e.stacktrace):!t.exception&&!e.exception||isSameException$1(t.exception,e.exception))},_setBackoffState:function(t){if(!this._shouldBackoff()){var e=t.status;if(400===e||401===e||429===e){var n;try{n=supportsFetch$1()?t.headers.get("Retry-After"):t.getResponseHeader("Retry-After"),n=1e3*parseInt(n,10)}catch(t){}this._backoffDuration=n||(2*this._backoffDuration||1e3),this._backoffStart=now()}}},_send:function(t){var e=this._globalOptions,n={project:this._globalProject,logger:e.logger,platform:"javascript"},r=this._getHttpData();r&&(n.request=r),t.trimHeadFrames&&delete t.trimHeadFrames,(t=objectMerge$1(n,t)).tags=objectMerge$1(objectMerge$1({},this._globalContext.tags),t.tags),t.extra=objectMerge$1(objectMerge$1({},this._globalContext.extra),t.extra),t.extra["session:duration"]=now()-this._startTime,this._breadcrumbs&&this._breadcrumbs.length>0&&(t.breadcrumbs={values:[].slice.call(this._breadcrumbs,0)}),this._globalContext.user&&(t.user=this._globalContext.user),e.environment&&(t.environment=e.environment),e.release&&(t.release=e.release),e.serverName&&(t.server_name=e.serverName),Object.keys(t).forEach(function(e){(null==t[e]||""===t[e]||isEmptyObject$1(t[e]))&&delete t[e]}),isFunction$1(e.dataCallback)&&(t=e.dataCallback(t)||t),t&&!isEmptyObject$1(t)&&(isFunction$1(e.shouldSendCallback)&&!e.shouldSendCallback(t)||(this._shouldBackoff()?this._logDebug("warn","Raven dropped error due to backoff: ",t):"number"==typeof e.sampleRate?Math.random()<e.sampleRate&&this._sendProcessedPayload(t):this._sendProcessedPayload(t)))},_getUuid:function(){return uuid4$1()},_sendProcessedPayload:function(t,e){var n=this,r=this._globalOptions;if(this.isSetup())if(t=this._trimPacket(t),this._globalOptions.allowDuplicates||!this._isRepeatData(t)){this._lastEventId=t.event_id||(t.event_id=this._getUuid()),this._lastData=t,this._logDebug("debug","Raven about to send:",t);var o={sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this._globalKey};this._globalSecret&&(o.sentry_secret=this._globalSecret);var i=t.exception&&t.exception.values[0];this._globalOptions.autoBreadcrumbs&&this._globalOptions.autoBreadcrumbs.sentry&&this.captureBreadcrumb({category:"sentry",message:i?(i.type?i.type+": ":"")+i.value:t.message,event_id:t.event_id,level:t.level||"error"});var a=this._globalEndpoint;(r.transport||this._makeRequest).call(this,{url:a,auth:o,data:t,options:r,onSuccess:function(){n._resetBackoff(),n._triggerEvent("success",{data:t,src:a}),e&&e()},onError:function(r){n._logDebug("error","Raven transport failed to send: ",r),r.request&&n._setBackoffState(r.request),n._triggerEvent("failure",{data:t,src:a}),r=r||new Error("Raven send failed (no additional details provided)"),e&&e(r)}})}else this._logDebug("warn","Raven dropped repeat event: ",t)},_makeRequest:function(t){var e=t.url+"?"+urlencode$1(t.auth),n=null,r={};if(t.options.headers&&(n=this._evaluateHash(t.options.headers)),t.options.fetchParameters&&(r=this._evaluateHash(t.options.fetchParameters)),supportsFetch$1()){r.body=stringify_1(t.data);var o=objectMerge$1({},this._fetchDefaults),i=objectMerge$1(o,r);return n&&(i.headers=n),_window$2.fetch(e,i).then(function(e){if(e.ok)t.onSuccess&&t.onSuccess();else{var n=new Error("Sentry error code: "+e.status);n.request=e,t.onError&&t.onError(n)}}).catch(function(){t.onError&&t.onError(new Error("Sentry error code: network unavailable"))})}var a=_window$2.XMLHttpRequest&&new _window$2.XMLHttpRequest;if(a){("withCredentials"in a||"undefined"!=typeof XDomainRequest)&&("withCredentials"in a?a.onreadystatechange=function(){if(4===a.readyState)if(200===a.status)t.onSuccess&&t.onSuccess();else if(t.onError){var e=new Error("Sentry error code: "+a.status);e.request=a,t.onError(e)}}:(a=new XDomainRequest,e=e.replace(/^https?:/,""),t.onSuccess&&(a.onload=t.onSuccess),t.onError&&(a.onerror=function(){var e=new Error("Sentry error code: XDomainRequest");e.request=a,t.onError(e)})),a.open("POST",e),n&&each$1(n,function(t,e){a.setRequestHeader(t,e)}),a.send(stringify_1(t.data)))}},_evaluateHash:function(t){var e={};for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];e[n]="function"==typeof r?r():r}return e},_logDebug:function(t){this._originalConsoleMethods[t]&&this.debug&&Function.prototype.apply.call(this._originalConsoleMethods[t],this._originalConsole,[].slice.call(arguments,1))},_mergeContext:function(t,e){isUndefined$1(e)?delete this._globalContext[t]:this._globalContext[t]=objectMerge$1(this._globalContext[t]||{},e)}},Raven.prototype.setUser=Raven.prototype.setUserContext,Raven.prototype.setReleaseContext=Raven.prototype.setRelease;var raven=Raven,_window$3="undefined"!=typeof window?window:void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:{},_Raven=_window$3.Raven,Raven$1=new raven;Raven$1.noConflict=function(){return _window$3.Raven=_Raven,Raven$1},Raven$1.afterLoad();var singleton=Raven$1,SentryBrowser_1=createCommonjsModule(function(t,e){var n=commonjsGlobal&&commonjsGlobal.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(a,s)}c((r=r.apply(t,e||[])).next())})},r=commonjsGlobal&&commonjsGlobal.__generator||function(t,e){function n(n){return function(a){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,o&&(i=o[2&n[0]?"return":n[0]?"throw":"next"])&&!(i=i.call(o,n[1])).done)return i;switch(o=0,i&&(n=[0,i.value]),n[0]){case 0:case 1:i=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,o=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(i=s.trys,!(i=i.length>0&&i[i.length-1])&&(6===n[0]||2===n[0])){s=0;continue}if(3===n[0]&&(!i||n[1]>i[0]&&n[1]<i[3])){s.label=n[1];break}if(6===n[0]&&s.label<i[1]){s.label=i[1],i=n;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(n);break}i[2]&&s.ops.pop(),s.trys.pop();continue}n=e.call(t,s)}catch(t){n=[6,t],o=0}finally{r=i=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,a])}}var r,o,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a};Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){void 0===e&&(e={}),this.options=e,this.client=t}return t.prototype.install=function(){return singleton.config(this.client.dsn.getDsn(!1),this.options).install(),Promise.resolve(!0)},t.prototype.getRaven=function(){return singleton},t.prototype.setOptions=function(t){return n(this,void 0,void 0,function(){return r(this,function(e){return Object.assign(this.options,t),Object.assign(singleton._globalOptions,this.options),[2,this]})})},t.prototype.captureException=function(t){return new Promise(function(e,n){var r=singleton._sendProcessedPayload;singleton._sendProcessedPayload=function(t){singleton._sendProcessedPayload=r,e(t)},singleton.captureException(t)})},t.prototype.captureMessage=function(t){return new Promise(function(e,n){var r=singleton._sendProcessedPayload;singleton._sendProcessedPayload=function(t){singleton._sendProcessedPayload=r,e(t)},singleton.captureMessage(t)})},t.prototype.setBreadcrumbCallback=function(t){singleton.setBreadcrumbCallback(t)},t.prototype.captureBreadcrumb=function(t){return new Promise(function(e,n){singleton.captureBreadcrumb(t),e(t)})},t.prototype.send=function(t){return new Promise(function(e,n){singleton._sendProcessedPayload(t,function(r){r?n(r):e(t)})})},t.prototype.setUserContext=function(t){return n(this,void 0,void 0,function(){return r(this,function(e){return singleton.setUserContext(t),[2,this]})})},t.prototype.setTagsContext=function(t){return n(this,void 0,void 0,function(){return r(this,function(e){return singleton.setTagsContext(t),[2,this]})})},t.prototype.setExtraContext=function(t){return n(this,void 0,void 0,function(){return r(this,function(e){return singleton.setExtraContext(t),[2,this]})})},t.prototype.clearContext=function(){return n(this,void 0,void 0,function(){return r(this,function(t){return singleton.clearContext(),[2,this]})})},t.prototype.setRelease=function(t){return n(this,void 0,void 0,function(){return r(this,function(e){return singleton.setRelease(t),[2,this]})})},t}();e.SentryBrowser=o});unwrapExports(SentryBrowser_1);var SentryBrowser_2=SentryBrowser_1.SentryBrowser,standalone=createCommonjsModule(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(dist),e.SentryBrowser=SentryBrowser_1.SentryBrowser}),standalone$1=unwrapExports(standalone),standalone_1=standalone.SentryBrowser;exports.default=standalone$1,exports.SentryBrowser=standalone_1; |
{ | ||
"name": "@sentry/browser", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"description": "Offical Sentry SDK for browsers", | ||
@@ -11,21 +11,21 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@sentry/core": "^0.2.1", | ||
"raven-js": "^3.21.0" | ||
"@sentry/core": "^0.3.0", | ||
"raven-js": "^3.22.1" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^21.1.8", | ||
"@types/node": "^8.5.1", | ||
"@types/puppeteer": "^0.13.8", | ||
"jest": "^21.2.1", | ||
"@types/jest": "^22.0.1", | ||
"@types/node": "^9.3.0", | ||
"@types/puppeteer": "^0.13.9", | ||
"jest": "^22.1.0", | ||
"npm-run-all": "^4.1.2", | ||
"prettier": "^1.9.2", | ||
"puppeteer": "^0.13.0", | ||
"rollup": "^0.52.1", | ||
"prettier": "^1.10.2", | ||
"puppeteer": "^1.0.0", | ||
"rollup": "^0.54.0", | ||
"rollup-plugin-commonjs": "^8.2.6", | ||
"rollup-plugin-node-resolve": "^3.0.0", | ||
"rollup-plugin-node-resolve": "^3.0.2", | ||
"rollup-plugin-uglify": "^2.0.1", | ||
"ts-jest": "^21.2.4", | ||
"ts-jest": "^22.0.1", | ||
"ts-loader": "^3.2.0", | ||
"ts-node": "^4.0.2", | ||
"tslint": "^5.8.0", | ||
"ts-node": "^4.1.0", | ||
"tslint": "^5.9.1", | ||
"tslint-config-prettier": "^1.6.0", | ||
@@ -32,0 +32,0 @@ "tslint-eslint-rules": "^4.1.1", |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
441223
4102
12
20
2
124
+ Added@sentry/core@0.3.0(transitive)
- Removed@sentry/core@0.2.1(transitive)
Updated@sentry/core@^0.3.0
Updatedraven-js@^3.22.1