From 2ad46a0452c52781e1ca18044d8827f30aab9cd6 Mon Sep 17 00:00:00 2001 From: Blake Niemyjski Date: Tue, 18 Jun 2019 09:43:33 -0500 Subject: [PATCH] Fixed #86 - unable to run npm i --- .gitignore | 1 + README.md | 4 ++-- bower.json | 2 +- dist/exceptionless.js | 2 +- dist/exceptionless.min.js | 2 +- dist/exceptionless.node.js | 2 +- dist/exceptionless.universal.js | 2 +- dist/exceptionless.universal.min.js | 2 +- package-lock.json | 2 +- package.json | 2 +- 10 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 014770b2..ab26422c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .DS_Store .idea +.git node_modules jspm_packages public diff --git a/README.md b/README.md index 32647170..faac0eb3 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The definition of the word exceptionless is: to be without exception. Exceptionl ## Show me the code! ## ```html - + + ``` - **Bower:** diff --git a/bower.json b/bower.json index 329d5a15..25d165ae 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "exceptionless", - "version": "1.6.2", + "version": "1.6.3", "description": "JavaScript client for Exceptionless", "license": "Apache-2.0", "main": "dist/exceptionless.js", diff --git a/dist/exceptionless.js b/dist/exceptionless.js index 11c02a2d..3a6f7e03 100644 --- a/dist/exceptionless.js +++ b/dist/exceptionless.js @@ -2525,7 +2525,7 @@ var Configuration = (function () { }; Object.defineProperty(Configuration.prototype, "userAgent", { get: function () { - return 'exceptionless-js/1.6.2'; + return 'exceptionless-js/1.6.3'; }, enumerable: true, configurable: true diff --git a/dist/exceptionless.min.js b/dist/exceptionless.min.js index 16df4de8..20b29385 100644 --- a/dist/exceptionless.min.js +++ b/dist/exceptionless.min.js @@ -1,2 +1,2 @@ -!function(S){if(S){var c,n,o,r,l,i,s,p={},e=S.TraceKit,a=[].slice,g="?",f=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;p.noConflict=function(){return S.TraceKit=e,p},p.wrap=function(e){return function(){try{return e.apply(this,arguments)}catch(e){throw p.report(e),e}}},p.report=(o=[],l=r=null,u.subscribe=function(e){!0!==n&&(c=S.onerror,S.onerror=t,n=!0),o.push(e)},u.unsubscribe=function(e){for(var t=o.length-1;0<=t;--t)o[t]===e&&o.splice(t,1);0===o.length&&(S.onerror=c,n=!1)},u),p.computeStackTrace=(i=!1,s={},k.augmentStackTraceWithInitialElement=T,k.computeStackTraceFromStackProp=C,k.guessFunctionName=w,k.gatherContext=E,k.ofCaller=function(t){t=1+(null==t?0:+t);try{throw new Error}catch(e){return k(e,t+1)}},k.getSource=x,k),p.extendToAsynchronousCallbacks=function(){function e(e){var n=S[e];S[e]=function(){var e=a.call(arguments),t=e[0];return"function"==typeof t&&(e[0]=p.wrap(t)),n.apply?n.apply(this,e):n(e[0],e[1])}}e("setTimeout"),e("setInterval")},p.remoteFetching||(p.remoteFetching=!0),p.collectWindowErrors||(p.collectWindowErrors=!0),(!p.linesOfContext||p.linesOfContext<1)&&(p.linesOfContext=11),"function"==typeof define&&define.amd?define("TraceKit",[],p):"undefined"!=typeof module&&module.exports&&S.module!==module?module.exports=p:S.TraceKit=p}function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function v(e){return void 0===e}function h(e,t,n){var r=null;if(!t||p.collectWindowErrors){for(var i in o)if(_(o,i))try{o[i](e,t,n)}catch(e){r=e}if(r)throw r}}function t(e,t,n,r,i){if(l)p.computeStackTrace.augmentStackTraceWithInitialElement(l,t,n,e),d();else if(i)h(p.computeStackTrace(i),!0,i);else{var o,s={url:t,line:n,column:r},a=e;if("[object String]"==={}.toString.call(e)){var u=e.match(f);u&&(o=u[1],a=u[2])}s.func=p.computeStackTrace.guessFunctionName(s.url,s.line),s.context=p.computeStackTrace.gatherContext(s.url,s.line),h({name:o,message:a,mode:"onerror",stack:[s]},!0,null)}return!!c&&c.apply(this,arguments)}function d(){var e=l,t=r;r=l=null,h(e,!1,t)}function u(e){if(l){if(r===e)return;d()}var t=p.computeStackTrace(e);throw l=t,r=e,setTimeout(function(){r===e&&d()},t.incomplete?2e3:0),e}function x(e){if("string"!=typeof e)return[];if(!_(s,e)){var t="",n="";try{n=S.document.domain}catch(e){}var r=/(.*)\:\/\/([^:\/]+)([:\d]*)\/{0,1}([\s\S]*)/.exec(e);r&&r[2]===n&&(t=function(e){if(!p.remoteFetching)return"";try{var t=function(){try{return new S.XMLHttpRequest}catch(e){return new S.ActiveXObject("Microsoft.XMLHTTP")}}();return t.open("GET",e,!1),t.send(""),t.responseText}catch(e){return""}}(e)),s[e]=t?t.split("\n"):[]}return s[e]}function w(e,t){var n,r=/function ([^(]*)\(([^)]*)\)/,i=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,o="",s=x(e);if(!s.length)return g;for(var a=0;a<10;++a)if(!v(o=s[t-a]+o)){if(n=i.exec(o))return n[1];if(n=r.exec(o))return n[1]}return g}function E(e,t){var n=x(e);if(!n.length)return null;var r=[],i=Math.floor(p.linesOfContext/2),o=i+p.linesOfContext%2,s=Math.max(0,t-i-1),a=Math.min(n.length,t+o-1);t-=1;for(var u=s;u","(?:>|>)").replace("&","(?:&|&)").replace('"','(?:"|")').replace(/\s+/g,"\\s+")}function P(e,t){for(var n,r,i=0,o=t.length;in&&(r=o.exec(i[n]))?r.index:null}function b(e){if(!v(S&&S.document)){for(var t,n,r,i,o=[S.location.href],s=S.document.getElementsByTagName("script"),a=""+e,u=0;u|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,o=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,s=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,a=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,u=/\((\S*)(?::(\d+))(?::(\d+))\)/,c=e.stack.split("\n"),l=[],f=/^(.*) is undefined$/.exec(e.message),p=0,h=c.length;p eval")&&(t=a.exec(n[3]))?(n[3]=t[1],n[4]=t[2],n[5]=null):0!==p||n[5]||v(e.columnNumber)||(l[0].column=e.columnNumber+1),r={url:n[3],func:n[1]||g,args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}!r.func&&r.line&&(r.func=w(r.url,r.line)),r.context=r.line?E(r.url,r.line):null,l.push(r)}return l.length?(l[0]&&l[0].line&&!l[0].column&&f&&(l[0].column=y(f[1],l[0].url,l[0].line)),{mode:"stack",name:e.name,message:e.message,stack:l}):null}function T(e,t,n,r){var i={url:t,line:n};if(i.url&&i.line){e.incomplete=!1,i.func||(i.func=w(i.url,i.line)),i.context||(i.context=E(i.url,i.line));var o=/ '([^']+)' /.exec(r);if(o&&(i.column=y(o[1],i.url,i.line)),0]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,o=t.split("\n"),s=[],a=0;anew Date},S.prototype.ensureQueueTimer=function(){var e=this;this._queueTimer||(this._queueTimer=setInterval(function(){return e.onProcessQueue()},1e4))},S.prototype.isQueueProcessingSuspended=function(){return this._suspendProcessingUntil&&this._suspendProcessingUntil>new Date},S.prototype.onProcessQueue=function(){this.isQueueProcessingSuspended()||this._processingQueue||this.process()},S.prototype.processSubmissionResponse=function(e,t){var n="The event will not be submitted.",r=this._config,i=r.log;if(e.success)return i.info("Sent "+t.length+" events."),void this.removeEvents(t);if(e.serviceUnavailable)return i.error("Server returned service unavailable."),void this.suspendProcessing();if(e.paymentRequired)return i.info("Too many events have been submitted, please upgrade your plan."),void this.suspendProcessing(null,!0,!0);if(e.unableToAuthenticate)return i.info("Unable to authenticate, please check your configuration. "+n),this.suspendProcessing(15),void this.removeEvents(t);if(e.notFound||e.badRequest)return i.error("Error while trying to submit data: "+e.message),this.suspendProcessing(240),void this.removeEvents(t);if(e.requestEntityTooLarge){var o="Event submission discarded for being too large.";1t.priority?1:0})},enumerable:!0,configurable:!0}),q.prototype.addPlugin=function(e,t,n){var r=n?{name:e,priority:t,run:n}:e;if(r&&r.run){r.name||(r.name=E.guid()),r.priority||(r.priority=0);for(var i=!1,o=this._plugins,s=0,a=o;s=o-n._interval})&&(e.log.trace("Adding event with hash: "+r),this._mergedEvents.push(new Q(r,e,i)),e.cancelled=!0),!e.cancelled)for(e.log.trace("Enqueueing event with hash: "+r+"to cache."),this._processedHashcodes.push({hash:r,timestamp:o});50this._context.event.date&&(this._context.event.date=e)},B);function B(e,t,n){this.hashCode=e,this._context=t,this._count=n}var H=(V.prototype.run=function(e,t){var n="@environment",r=e.client.config.environmentInfoCollector;if(!e.event.data[n]&&r){var i=r.getEnvironmentInfo(e);i&&(e.event.data[n]=i)}t&&t()},V);function V(){this.priority=80,this.name="EnvironmentInfoPlugin"}t.EnvironmentInfoPlugin=H;var $=(W.prototype.run=function(e,t){var n=e.contextData.getException();if(n&&(e.event.type="error",!e.event.data["@error"])){var r=e.client.config,i=r.errorParser;if(!i)throw new Error("No error parser was defined.");var o=i.parse(e,n);if(o){var s=JSON.parse(E.stringify(n,r.dataExclusions.concat(["arguments","column","columnNumber","description","fileName","message","name","number","line","lineNumber","opera#sourceloc","sourceId","sourceURL","stack","stackArray","stacktrace"])));E.isEmpty(s)||(o.data||(o.data={}),o.data["@ext"]=s),e.event.data["@error"]=o}}t&&t()},W);function W(){this.priority=30,this.name="ErrorPlugin"}t.ErrorPlugin=$;var z=(J.prototype.run=function(e,t){function n(e){switch((e||"").toLowerCase().trim()){case"trace":case"true":case"1":case"yes":return 0;case"debug":return 1;case"info":return 2;case"warn":return 3;case"error":return 4;case"fatal":return 5;case"off":case"false":case"0":case"no":return 6;default:return-1}}function r(e,t,n,r){if(void 0===e&&(e={}),!t)return r;var i="log"===t,o="@@"+t+":",s=e[o+n];if(s)return i?s:E.toBoolean(s);for(var a in e)if(E.startsWith(a.toLowerCase(),o.toLowerCase())&&E.isMatch(n,[a.substring(o.length)]))return i?e[a]:E.toBoolean(e[a]);return r}var i,o,s=e.event,a=e.log,u=e.client.config.settings;if("log"===s.type){var c=(i=u,void 0===(o=s.source)&&(o="*"),n(r(i,"log",o,"Trace")+"")),l=n(s.data["@level"]);0<=l&&(5this.maxItems&&t.shift(),this.lastTimestamp=n,r.timestamp},re.prototype.get=function(e){return this.items.slice(0,e)},re.prototype.remove=function(e){for(var t=this.items,n=0;nthis.maxItems&&this.delete(this.getKey(n.shift()))}catch(e){return null}return r},oe.prototype.get=function(e){var r=this;return this.ensureIndex(),this.items.slice(0,e).map(function(e){var t=r.getKey(e);try{var n=r.read(t);return{timestamp:e,value:JSON.parse(n,se)}}catch(e){return r.safeDelete(t),null}}).filter(function(e){return null!=e})},oe.prototype.remove=function(e){this.ensureIndex();var t=this.items,n=t.indexOf(e);if(0<=n){var r=this.getKey(e);this.safeDelete(r),t.splice(n,1)}},oe.prototype.clear=function(){var t=this;this.items.forEach(function(e){return t.safeDelete(t.getKey(e))}),this.items=[]},oe.prototype.ensureIndex=function(){this.items||(this.items=this.createIndex(),this.lastTimestamp=Math.max.apply(Math,[0].concat(this.items))+1)},oe.prototype.safeDelete=function(e){try{this.delete(e)}catch(e){}},oe.prototype.createIndex=function(){var n=this;try{return this.readAllKeys().map(function(t){try{var e=n.getTimestamp(t);return e||(n.safeDelete(t),null)}catch(e){return n.safeDelete(t),null}}).filter(function(e){return null!=e}).sort(function(e,t){return e-t})}catch(e){return[]}},oe);function oe(e){this.lastTimestamp=0,this.maxItems=e}function se(e,t){if("string"==typeof t&&/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/g.exec(t))return new Date(t);return t}t.KeyValueStorageBase=ie;var ae,ue=(n(ce,ae=ie),ce.isAvailable=function(){try{var e=window.localStorage,t="__storage_test__";return e.setItem(t,t),e.removeItem(t),!0}catch(e){return!1}},ce.prototype.write=function(e,t){window.localStorage.setItem(e,t)},ce.prototype.read=function(e){return window.localStorage.getItem(e)},ce.prototype.readAllKeys=function(){var t=this;return Object.keys(window.localStorage).filter(function(e){return 0===e.indexOf(t.prefix)})},ce.prototype.delete=function(e){window.localStorage.removeItem(e)},ce.prototype.getKey=function(e){return this.prefix+e},ce.prototype.getTimestamp=function(e){return parseInt(e.substr(this.prefix.length),10)},ce);function ce(e,t,n){void 0===t&&(t="com.exceptionless."),void 0===n&&(n=20);var r=ae.call(this,n)||this;return r.prefix=t+e+"-",r}t.BrowserStorage=ue;var le=(fe.prototype.parse=function(e,t){function s(e){for(var t=[],n=0,r=("string"==typeof e?[e]:e)||[];n","(?:>|>)").replace("&","(?:&|&)").replace('"','(?:"|")').replace(/\s+/g,"\\s+")}function P(e,t){for(var n,r,i=0,o=t.length;in&&(r=o.exec(i[n]))?r.index:null}function b(e){if(!v(S&&S.document)){for(var t,n,r,i,o=[S.location.href],s=S.document.getElementsByTagName("script"),a=""+e,u=0;u|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,o=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,s=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,a=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,u=/\((\S*)(?::(\d+))(?::(\d+))\)/,c=e.stack.split("\n"),l=[],f=/^(.*) is undefined$/.exec(e.message),p=0,h=c.length;p eval")&&(t=a.exec(n[3]))?(n[3]=t[1],n[4]=t[2],n[5]=null):0!==p||n[5]||v(e.columnNumber)||(l[0].column=e.columnNumber+1),r={url:n[3],func:n[1]||g,args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}!r.func&&r.line&&(r.func=w(r.url,r.line)),r.context=r.line?E(r.url,r.line):null,l.push(r)}return l.length?(l[0]&&l[0].line&&!l[0].column&&f&&(l[0].column=y(f[1],l[0].url,l[0].line)),{mode:"stack",name:e.name,message:e.message,stack:l}):null}function T(e,t,n,r){var i={url:t,line:n};if(i.url&&i.line){e.incomplete=!1,i.func||(i.func=w(i.url,i.line)),i.context||(i.context=E(i.url,i.line));var o=/ '([^']+)' /.exec(r);if(o&&(i.column=y(o[1],i.url,i.line)),0]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,o=t.split("\n"),s=[],a=0;anew Date},S.prototype.ensureQueueTimer=function(){var e=this;this._queueTimer||(this._queueTimer=setInterval(function(){return e.onProcessQueue()},1e4))},S.prototype.isQueueProcessingSuspended=function(){return this._suspendProcessingUntil&&this._suspendProcessingUntil>new Date},S.prototype.onProcessQueue=function(){this.isQueueProcessingSuspended()||this._processingQueue||this.process()},S.prototype.processSubmissionResponse=function(e,t){var n="The event will not be submitted.",r=this._config,i=r.log;if(e.success)return i.info("Sent "+t.length+" events."),void this.removeEvents(t);if(e.serviceUnavailable)return i.error("Server returned service unavailable."),void this.suspendProcessing();if(e.paymentRequired)return i.info("Too many events have been submitted, please upgrade your plan."),void this.suspendProcessing(null,!0,!0);if(e.unableToAuthenticate)return i.info("Unable to authenticate, please check your configuration. "+n),this.suspendProcessing(15),void this.removeEvents(t);if(e.notFound||e.badRequest)return i.error("Error while trying to submit data: "+e.message),this.suspendProcessing(240),void this.removeEvents(t);if(e.requestEntityTooLarge){var o="Event submission discarded for being too large.";1t.priority?1:0})},enumerable:!0,configurable:!0}),q.prototype.addPlugin=function(e,t,n){var r=n?{name:e,priority:t,run:n}:e;if(r&&r.run){r.name||(r.name=E.guid()),r.priority||(r.priority=0);for(var i=!1,o=this._plugins,s=0,a=o;s=o-n._interval})&&(e.log.trace("Adding event with hash: "+r),this._mergedEvents.push(new Q(r,e,i)),e.cancelled=!0),!e.cancelled)for(e.log.trace("Enqueueing event with hash: "+r+"to cache."),this._processedHashcodes.push({hash:r,timestamp:o});50this._context.event.date&&(this._context.event.date=e)},B);function B(e,t,n){this.hashCode=e,this._context=t,this._count=n}var H=(V.prototype.run=function(e,t){var n="@environment",r=e.client.config.environmentInfoCollector;if(!e.event.data[n]&&r){var i=r.getEnvironmentInfo(e);i&&(e.event.data[n]=i)}t&&t()},V);function V(){this.priority=80,this.name="EnvironmentInfoPlugin"}t.EnvironmentInfoPlugin=H;var $=(W.prototype.run=function(e,t){var n=e.contextData.getException();if(n&&(e.event.type="error",!e.event.data["@error"])){var r=e.client.config,i=r.errorParser;if(!i)throw new Error("No error parser was defined.");var o=i.parse(e,n);if(o){var s=JSON.parse(E.stringify(n,r.dataExclusions.concat(["arguments","column","columnNumber","description","fileName","message","name","number","line","lineNumber","opera#sourceloc","sourceId","sourceURL","stack","stackArray","stacktrace"])));E.isEmpty(s)||(o.data||(o.data={}),o.data["@ext"]=s),e.event.data["@error"]=o}}t&&t()},W);function W(){this.priority=30,this.name="ErrorPlugin"}t.ErrorPlugin=$;var z=(J.prototype.run=function(e,t){function n(e){switch((e||"").toLowerCase().trim()){case"trace":case"true":case"1":case"yes":return 0;case"debug":return 1;case"info":return 2;case"warn":return 3;case"error":return 4;case"fatal":return 5;case"off":case"false":case"0":case"no":return 6;default:return-1}}function r(e,t,n,r){if(void 0===e&&(e={}),!t)return r;var i="log"===t,o="@@"+t+":",s=e[o+n];if(s)return i?s:E.toBoolean(s);for(var a in e)if(E.startsWith(a.toLowerCase(),o.toLowerCase())&&E.isMatch(n,[a.substring(o.length)]))return i?e[a]:E.toBoolean(e[a]);return r}var i,o,s=e.event,a=e.log,u=e.client.config.settings;if("log"===s.type){var c=(i=u,void 0===(o=s.source)&&(o="*"),n(r(i,"log",o,"Trace")+"")),l=n(s.data["@level"]);0<=l&&(5this.maxItems&&t.shift(),this.lastTimestamp=n,r.timestamp},re.prototype.get=function(e){return this.items.slice(0,e)},re.prototype.remove=function(e){for(var t=this.items,n=0;nthis.maxItems&&this.delete(this.getKey(n.shift()))}catch(e){return null}return r},oe.prototype.get=function(e){var r=this;return this.ensureIndex(),this.items.slice(0,e).map(function(e){var t=r.getKey(e);try{var n=r.read(t);return{timestamp:e,value:JSON.parse(n,se)}}catch(e){return r.safeDelete(t),null}}).filter(function(e){return null!=e})},oe.prototype.remove=function(e){this.ensureIndex();var t=this.items,n=t.indexOf(e);if(0<=n){var r=this.getKey(e);this.safeDelete(r),t.splice(n,1)}},oe.prototype.clear=function(){var t=this;this.items.forEach(function(e){return t.safeDelete(t.getKey(e))}),this.items=[]},oe.prototype.ensureIndex=function(){this.items||(this.items=this.createIndex(),this.lastTimestamp=Math.max.apply(Math,[0].concat(this.items))+1)},oe.prototype.safeDelete=function(e){try{this.delete(e)}catch(e){}},oe.prototype.createIndex=function(){var n=this;try{return this.readAllKeys().map(function(t){try{var e=n.getTimestamp(t);return e||(n.safeDelete(t),null)}catch(e){return n.safeDelete(t),null}}).filter(function(e){return null!=e}).sort(function(e,t){return e-t})}catch(e){return[]}},oe);function oe(e){this.lastTimestamp=0,this.maxItems=e}function se(e,t){if("string"==typeof t&&/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/g.exec(t))return new Date(t);return t}t.KeyValueStorageBase=ie;var ae,ue=(n(ce,ae=ie),ce.isAvailable=function(){try{var e=window.localStorage,t="__storage_test__";return e.setItem(t,t),e.removeItem(t),!0}catch(e){return!1}},ce.prototype.write=function(e,t){window.localStorage.setItem(e,t)},ce.prototype.read=function(e){return window.localStorage.getItem(e)},ce.prototype.readAllKeys=function(){var t=this;return Object.keys(window.localStorage).filter(function(e){return 0===e.indexOf(t.prefix)})},ce.prototype.delete=function(e){window.localStorage.removeItem(e)},ce.prototype.getKey=function(e){return this.prefix+e},ce.prototype.getTimestamp=function(e){return parseInt(e.substr(this.prefix.length),10)},ce);function ce(e,t,n){void 0===t&&(t="com.exceptionless."),void 0===n&&(n=20);var r=ae.call(this,n)||this;return r.prefix=t+e+"-",r}t.BrowserStorage=ue;var le=(fe.prototype.parse=function(e,t){function s(e){for(var t=[],n=0,r=("string"==typeof e?[e]:e)||[];n","(?:>|>)").replace("&","(?:&|&)").replace('"','(?:"|")').replace(/\s+/g,"\\s+")}function P(e,t){for(var n,r,i=0,o=t.length;in&&(r=o.exec(i[n]))?r.index:null}function b(e){if(!m(S&&S.document)){for(var t,n,r,i,o=[S.location.href],s=S.document.getElementsByTagName("script"),a=""+e,u=0;u|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,o=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,s=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,a=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,u=/\((\S*)(?::(\d+))(?::(\d+))\)/,c=e.stack.split("\n"),l=[],f=/^(.*) is undefined$/.exec(e.message),p=0,d=c.length;p eval")&&(t=a.exec(n[3]))?(n[3]=t[1],n[4]=t[2],n[5]=null):0!==p||n[5]||m(e.columnNumber)||(l[0].column=e.columnNumber+1),r={url:n[3],func:n[1]||g,args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}!r.func&&r.line&&(r.func=w(r.url,r.line)),r.context=r.line?E(r.url,r.line):null,l.push(r)}return l.length?(l[0]&&l[0].line&&!l[0].column&&f&&(l[0].column=y(f[1],l[0].url,l[0].line)),{mode:"stack",name:e.name,message:e.message,stack:l}):null}function T(e,t,n,r){var i={url:t,line:n};if(i.url&&i.line){e.incomplete=!1,i.func||(i.func=w(i.url,i.line)),i.context||(i.context=E(i.url,i.line));var o=/ '([^']+)' /.exec(r);if(o&&(i.column=y(o[1],i.url,i.line)),0]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,o=t.split("\n"),s=[],a=0;anew Date},k.prototype.ensureQueueTimer=function(){var e=this;this._queueTimer||(this._queueTimer=setInterval(function(){return e.onProcessQueue()},1e4))},k.prototype.isQueueProcessingSuspended=function(){return this._suspendProcessingUntil&&this._suspendProcessingUntil>new Date},k.prototype.onProcessQueue=function(){this.isQueueProcessingSuspended()||this._processingQueue||this.process()},k.prototype.processSubmissionResponse=function(e,t){var n="The event will not be submitted.",r=this._config,i=r.log;if(e.success)return i.info("Sent "+t.length+" events."),void this.removeEvents(t);if(e.serviceUnavailable)return i.error("Server returned service unavailable."),void this.suspendProcessing();if(e.paymentRequired)return i.info("Too many events have been submitted, please upgrade your plan."),void this.suspendProcessing(null,!0,!0);if(e.unableToAuthenticate)return i.info("Unable to authenticate, please check your configuration. "+n),this.suspendProcessing(15),void this.removeEvents(t);if(e.notFound||e.badRequest)return i.error("Error while trying to submit data: "+e.message),this.suspendProcessing(240),void this.removeEvents(t);if(e.requestEntityTooLarge){var o="Event submission discarded for being too large.";1t.priority?1:0})},enumerable:!0,configurable:!0}),B.prototype.addPlugin=function(e,t,n){var r=n?{name:e,priority:t,run:n}:e;if(r&&r.run){r.name||(r.name=q.guid()),r.priority||(r.priority=0);for(var i=!1,o=this._plugins,s=0,a=o;s=o-n._interval})&&(e.log.trace("Adding event with hash: "+r),this._mergedEvents.push(new X(r,e,i)),e.cancelled=!0),!e.cancelled)for(e.log.trace("Enqueueing event with hash: "+r+"to cache."),this._processedHashcodes.push({hash:r,timestamp:o});50this._context.event.date&&(this._context.event.date=e)},G);function G(e,t,n){this.hashCode=e,this._context=t,this._count=n}var Y=(ee.prototype.run=function(e,t){var n="@environment",r=e.client.config.environmentInfoCollector;if(!e.event.data[n]&&r){var i=r.getEnvironmentInfo(e);i&&(e.event.data[n]=i)}t&&t()},ee);function ee(){this.priority=80,this.name="EnvironmentInfoPlugin"}e.EnvironmentInfoPlugin=Y;var te=(ne.prototype.run=function(e,t){var n=e.contextData.getException();if(n&&(e.event.type="error",!e.event.data["@error"])){var r=e.client.config,i=r.errorParser;if(!i)throw new Error("No error parser was defined.");var o=i.parse(e,n);if(o){var s=JSON.parse(q.stringify(n,r.dataExclusions.concat(["arguments","column","columnNumber","description","fileName","message","name","number","line","lineNumber","opera#sourceloc","sourceId","sourceURL","stack","stackArray","stacktrace"])));q.isEmpty(s)||(o.data||(o.data={}),o.data["@ext"]=s),e.event.data["@error"]=o}}t&&t()},ne);function ne(){this.priority=30,this.name="ErrorPlugin"}e.ErrorPlugin=te;var re=(ie.prototype.run=function(e,t){function n(e){switch((e||"").toLowerCase().trim()){case"trace":case"true":case"1":case"yes":return 0;case"debug":return 1;case"info":return 2;case"warn":return 3;case"error":return 4;case"fatal":return 5;case"off":case"false":case"0":case"no":return 6;default:return-1}}function r(e,t,n,r){if(void 0===e&&(e={}),!t)return r;var i="log"===t,o="@@"+t+":",s=e[o+n];if(s)return i?s:q.toBoolean(s);for(var a in e)if(q.startsWith(a.toLowerCase(),o.toLowerCase())&&q.isMatch(n,[a.substring(o.length)]))return i?e[a]:q.toBoolean(e[a]);return r}var i,o,s=e.event,a=e.log,u=e.client.config.settings;if("log"===s.type){var c=(i=u,void 0===(o=s.source)&&(o="*"),n(r(i,"log",o,"Trace")+"")),l=n(s.data["@level"]);0<=l&&(5this.maxItems&&t.shift(),this.lastTimestamp=n,r.timestamp},pe.prototype.get=function(e){return this.items.slice(0,e)},pe.prototype.remove=function(e){for(var t=this.items,n=0;nthis.maxItems&&this.delete(this.getKey(n.shift()))}catch(e){return null}return r},he.prototype.get=function(e){var r=this;return this.ensureIndex(),this.items.slice(0,e).map(function(e){var t=r.getKey(e);try{var n=r.read(t);return{timestamp:e,value:JSON.parse(n,ge)}}catch(e){return r.safeDelete(t),null}}).filter(function(e){return null!=e})},he.prototype.remove=function(e){this.ensureIndex();var t=this.items,n=t.indexOf(e);if(0<=n){var r=this.getKey(e);this.safeDelete(r),t.splice(n,1)}},he.prototype.clear=function(){var t=this;this.items.forEach(function(e){return t.safeDelete(t.getKey(e))}),this.items=[]},he.prototype.ensureIndex=function(){this.items||(this.items=this.createIndex(),this.lastTimestamp=Math.max.apply(Math,[0].concat(this.items))+1)},he.prototype.safeDelete=function(e){try{this.delete(e)}catch(e){}},he.prototype.createIndex=function(){var n=this;try{return this.readAllKeys().map(function(t){try{var e=n.getTimestamp(t);return e||(n.safeDelete(t),null)}catch(e){return n.safeDelete(t),null}}).filter(function(e){return null!=e}).sort(function(e,t){return e-t})}catch(e){return[]}},he);function he(e){this.lastTimestamp=0,this.maxItems=e}function ge(e,t){if("string"==typeof t&&/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/g.exec(t))return new Date(t);return t}e.KeyValueStorageBase=de;var me,ve=(t(ye,me=de),ye.isAvailable=function(){try{var e=window.localStorage,t="__storage_test__";return e.setItem(t,t),e.removeItem(t),!0}catch(e){return!1}},ye.prototype.write=function(e,t){window.localStorage.setItem(e,t)},ye.prototype.read=function(e){return window.localStorage.getItem(e)},ye.prototype.readAllKeys=function(){var t=this;return Object.keys(window.localStorage).filter(function(e){return 0===e.indexOf(t.prefix)})},ye.prototype.delete=function(e){window.localStorage.removeItem(e)},ye.prototype.getKey=function(e){return this.prefix+e},ye.prototype.getTimestamp=function(e){return parseInt(e.substr(this.prefix.length),10)},ye);function ye(e,t,n){void 0===t&&(t="com.exceptionless."),void 0===n&&(n=20);var r=me.call(this,n)||this;return r.prefix=t+e+"-",r}e.BrowserStorage=ve;var be=(Se.prototype.parse=function(e,t){function s(e){for(var t=[],n=0,r=("string"==typeof e?[e]:e)||[];n","(?:>|>)").replace("&","(?:&|&)").replace('"','(?:"|")').replace(/\s+/g,"\\s+")}function P(e,t){for(var n,r,i=0,o=t.length;in&&(r=o.exec(i[n]))?r.index:null}function b(e){if(!m(S&&S.document)){for(var t,n,r,i,o=[S.location.href],s=S.document.getElementsByTagName("script"),a=""+e,u=0;u|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,o=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,s=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,a=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,u=/\((\S*)(?::(\d+))(?::(\d+))\)/,c=e.stack.split("\n"),l=[],f=/^(.*) is undefined$/.exec(e.message),p=0,d=c.length;p eval")&&(t=a.exec(n[3]))?(n[3]=t[1],n[4]=t[2],n[5]=null):0!==p||n[5]||m(e.columnNumber)||(l[0].column=e.columnNumber+1),r={url:n[3],func:n[1]||g,args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}!r.func&&r.line&&(r.func=w(r.url,r.line)),r.context=r.line?E(r.url,r.line):null,l.push(r)}return l.length?(l[0]&&l[0].line&&!l[0].column&&f&&(l[0].column=y(f[1],l[0].url,l[0].line)),{mode:"stack",name:e.name,message:e.message,stack:l}):null}function T(e,t,n,r){var i={url:t,line:n};if(i.url&&i.line){e.incomplete=!1,i.func||(i.func=w(i.url,i.line)),i.context||(i.context=E(i.url,i.line));var o=/ '([^']+)' /.exec(r);if(o&&(i.column=y(o[1],i.url,i.line)),0]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,o=t.split("\n"),s=[],a=0;anew Date},k.prototype.ensureQueueTimer=function(){var e=this;this._queueTimer||(this._queueTimer=setInterval(function(){return e.onProcessQueue()},1e4))},k.prototype.isQueueProcessingSuspended=function(){return this._suspendProcessingUntil&&this._suspendProcessingUntil>new Date},k.prototype.onProcessQueue=function(){this.isQueueProcessingSuspended()||this._processingQueue||this.process()},k.prototype.processSubmissionResponse=function(e,t){var n="The event will not be submitted.",r=this._config,i=r.log;if(e.success)return i.info("Sent "+t.length+" events."),void this.removeEvents(t);if(e.serviceUnavailable)return i.error("Server returned service unavailable."),void this.suspendProcessing();if(e.paymentRequired)return i.info("Too many events have been submitted, please upgrade your plan."),void this.suspendProcessing(null,!0,!0);if(e.unableToAuthenticate)return i.info("Unable to authenticate, please check your configuration. "+n),this.suspendProcessing(15),void this.removeEvents(t);if(e.notFound||e.badRequest)return i.error("Error while trying to submit data: "+e.message),this.suspendProcessing(240),void this.removeEvents(t);if(e.requestEntityTooLarge){var o="Event submission discarded for being too large.";1t.priority?1:0})},enumerable:!0,configurable:!0}),B.prototype.addPlugin=function(e,t,n){var r=n?{name:e,priority:t,run:n}:e;if(r&&r.run){r.name||(r.name=q.guid()),r.priority||(r.priority=0);for(var i=!1,o=this._plugins,s=0,a=o;s=o-n._interval})&&(e.log.trace("Adding event with hash: "+r),this._mergedEvents.push(new X(r,e,i)),e.cancelled=!0),!e.cancelled)for(e.log.trace("Enqueueing event with hash: "+r+"to cache."),this._processedHashcodes.push({hash:r,timestamp:o});50this._context.event.date&&(this._context.event.date=e)},G);function G(e,t,n){this.hashCode=e,this._context=t,this._count=n}var Y=(ee.prototype.run=function(e,t){var n="@environment",r=e.client.config.environmentInfoCollector;if(!e.event.data[n]&&r){var i=r.getEnvironmentInfo(e);i&&(e.event.data[n]=i)}t&&t()},ee);function ee(){this.priority=80,this.name="EnvironmentInfoPlugin"}e.EnvironmentInfoPlugin=Y;var te=(ne.prototype.run=function(e,t){var n=e.contextData.getException();if(n&&(e.event.type="error",!e.event.data["@error"])){var r=e.client.config,i=r.errorParser;if(!i)throw new Error("No error parser was defined.");var o=i.parse(e,n);if(o){var s=JSON.parse(q.stringify(n,r.dataExclusions.concat(["arguments","column","columnNumber","description","fileName","message","name","number","line","lineNumber","opera#sourceloc","sourceId","sourceURL","stack","stackArray","stacktrace"])));q.isEmpty(s)||(o.data||(o.data={}),o.data["@ext"]=s),e.event.data["@error"]=o}}t&&t()},ne);function ne(){this.priority=30,this.name="ErrorPlugin"}e.ErrorPlugin=te;var re=(ie.prototype.run=function(e,t){function n(e){switch((e||"").toLowerCase().trim()){case"trace":case"true":case"1":case"yes":return 0;case"debug":return 1;case"info":return 2;case"warn":return 3;case"error":return 4;case"fatal":return 5;case"off":case"false":case"0":case"no":return 6;default:return-1}}function r(e,t,n,r){if(void 0===e&&(e={}),!t)return r;var i="log"===t,o="@@"+t+":",s=e[o+n];if(s)return i?s:q.toBoolean(s);for(var a in e)if(q.startsWith(a.toLowerCase(),o.toLowerCase())&&q.isMatch(n,[a.substring(o.length)]))return i?e[a]:q.toBoolean(e[a]);return r}var i,o,s=e.event,a=e.log,u=e.client.config.settings;if("log"===s.type){var c=(i=u,void 0===(o=s.source)&&(o="*"),n(r(i,"log",o,"Trace")+"")),l=n(s.data["@level"]);0<=l&&(5this.maxItems&&t.shift(),this.lastTimestamp=n,r.timestamp},pe.prototype.get=function(e){return this.items.slice(0,e)},pe.prototype.remove=function(e){for(var t=this.items,n=0;nthis.maxItems&&this.delete(this.getKey(n.shift()))}catch(e){return null}return r},he.prototype.get=function(e){var r=this;return this.ensureIndex(),this.items.slice(0,e).map(function(e){var t=r.getKey(e);try{var n=r.read(t);return{timestamp:e,value:JSON.parse(n,ge)}}catch(e){return r.safeDelete(t),null}}).filter(function(e){return null!=e})},he.prototype.remove=function(e){this.ensureIndex();var t=this.items,n=t.indexOf(e);if(0<=n){var r=this.getKey(e);this.safeDelete(r),t.splice(n,1)}},he.prototype.clear=function(){var t=this;this.items.forEach(function(e){return t.safeDelete(t.getKey(e))}),this.items=[]},he.prototype.ensureIndex=function(){this.items||(this.items=this.createIndex(),this.lastTimestamp=Math.max.apply(Math,[0].concat(this.items))+1)},he.prototype.safeDelete=function(e){try{this.delete(e)}catch(e){}},he.prototype.createIndex=function(){var n=this;try{return this.readAllKeys().map(function(t){try{var e=n.getTimestamp(t);return e||(n.safeDelete(t),null)}catch(e){return n.safeDelete(t),null}}).filter(function(e){return null!=e}).sort(function(e,t){return e-t})}catch(e){return[]}},he);function he(e){this.lastTimestamp=0,this.maxItems=e}function ge(e,t){if("string"==typeof t&&/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/g.exec(t))return new Date(t);return t}e.KeyValueStorageBase=de;var me,ve=(t(ye,me=de),ye.isAvailable=function(){try{var e=window.localStorage,t="__storage_test__";return e.setItem(t,t),e.removeItem(t),!0}catch(e){return!1}},ye.prototype.write=function(e,t){window.localStorage.setItem(e,t)},ye.prototype.read=function(e){return window.localStorage.getItem(e)},ye.prototype.readAllKeys=function(){var t=this;return Object.keys(window.localStorage).filter(function(e){return 0===e.indexOf(t.prefix)})},ye.prototype.delete=function(e){window.localStorage.removeItem(e)},ye.prototype.getKey=function(e){return this.prefix+e},ye.prototype.getTimestamp=function(e){return parseInt(e.substr(this.prefix.length),10)},ye);function ye(e,t,n){void 0===t&&(t="com.exceptionless."),void 0===n&&(n=20);var r=me.call(this,n)||this;return r.prefix=t+e+"-",r}e.BrowserStorage=ve;var be=(Se.prototype.parse=function(e,t){function s(e){for(var t=[],n=0,r=("string"==typeof e?[e]:e)||[];n