!function(e,t){functionn(e,t){returnObject.prototype.hasOwnProperty.call(e,t)}functionr(e){return"undefined"==typeofe}if(e){vari={},o=e.TraceKit,s=[].slice,a="?";i.noConflict=function(){returne.TraceKit=o,i},i.wrap=function(e){functiont(){try{returne.apply(this,arguments)}catch(t){throwi.report(t),t}}returnt},i.report=function(){functiont(e){u(),h.push(e)}functionr(e){for(vart=h.length-1;t>=0;--t)h[t]===e&&h.splice(t,1)}functiono(e,t){varr=null;if(!t||i.collectWindowErrors){for(varoinh)if(n(h,o))try{h[o].apply(null,[e].concat(s.call(arguments,2)))}catch(a){r=a}if(r)throwr}}functiona(e,t,n,r,s){vara=null;if(v)i.computeStackTrace.augmentStackTraceWithInitialElement(v,t,n,e),c();elseif(s)a=i.computeStackTrace(s),o(a,!0);else{varu={url:t,line:n,column:r};u.func=i.computeStackTrace.guessFunctionName(u.url,u.line),u.context=i.computeStackTrace.gatherContext(u.url,u.line),a={mode:"onerror",message:e,stack:[u]},o(a,!0)}return!!f&&f.apply(this,arguments)}functionu(){p!==!0&&(f=e.onerror,e.onerror=a,p=!0)}functionc(){vare=v,t=d;d=null,v=null,g=null,o.apply(null,[e,!1].concat(t))}functionl(t){if(v){if(g===t)return;c()}varn=i.computeStackTrace(t);throwv=n,g=t,d=s.call(arguments,1),e.setTimeout(function(){g===t&&c()},n.incomplete?2e3:0),t}varf,p,h=[],d=null,g=null,v=null;returnl.subscribe=t,l.unsubscribe=r,l}(),i.computeStackTrace=function(){functiont(t){if(!i.remoteFetching)return"";try{varn=function(){try{returnnewe.XMLHttpRequest}catch(t){returnnewe.ActiveXObject("Microsoft.XMLHTTP")}},r=n();returnr.open("GET",t,!1),r.send(""),r.responseText}catch(o){return""}}functiono(r){if("string"!=typeofr)return[];if(!n(_,r)){vari="",o="";try{o=e.document.domain}catch(s){}vara=/(.*)\:\/\/([^:\/]+)([:\d]*)\/{0,1}([\s\S]*)/.exec(r);a&&a[2]===o&&(i=t(r)),_[r]=i?i.split("\n"):[]}return_[r]}functions(e,t){varn,i=/function ([^(]*)\(([^)]*)\)/,s=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,u="",c=10,l=o(e);if(!l.length)returna;for(varf=0;f<c;++f)if(u=l[t-f]+u,!r(u)){if(n=s.exec(u))returnn[1];if(n=i.exec(u))returnn[1]}returna}functionu(e,t){varn=o(e);if(!n.length)returnnull;vars=[],a=Math.floor(i.linesOfContext/2),u=a+i.linesOfContext%2,c=Math.max(0,t-a-1),l=Math.min(n.length,t+u-1);t-=1;for(varf=c;f<l;++f)r(n[f])||s.push(n[f]);returns.length>0?s:null}functionc(e){returne.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}functionl(e){returnc(e).replace("<","(?:<|<)").replace(">","(?:>|>)").replace("&","(?:&|&)").replace('"','(?:"|")').replace(/\s+/g,"\\s+")}functionf(e,t){for(varn,r,i=0,s=t.length;i<s;++i)if((n=o(t[i])).length&&(n=n.join("\n"),r=e.exec(n)))return{url:t[i],line:n.substring(0,r.index).split("\n").length,column:r.index-n.lastIndexOf("\n",r.index)-1};returnnull}functionp(e,t,n){varr,i=o(t),s=newRegExp("\\b"+c(e)+"\\b");returnn-=1,i&&i.length>n&&(r=s.exec(i[n]))?r.index:null}functionh(t){if(!r(e&&e.document)){for(varn,i,o,s,a=[e.location.href],u=e.document.getElementsByTagName("script"),p=""+t,h=/^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,d=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,g=0;g<u.length;++g){varv=u[g];v.src&&a.push(v.src)}if(o=h.exec(p)){varm=o[1]?"\\s+"+o[1]:"",y=o[2].split(",").join("\\s*,\\s*");n=c(o[3]).replace(/;$/,";?"),i=newRegExp("function"+m+"\\s*\\(\\s*"+y+"\\s*\\)\\s*{\\s*"+n+"\\s*}")}elsei=newRegExp(c(p).replace(/\s+/g,"\\s+"));if(s=f(i,a))returns;if(o=d.exec(p)){varb=o[1];if(n=l(o[2]),i=newRegExp("on"+b+"=[\\'\"]\\s*"+n+"\\s*[\\'\"]","i"),s=f(i,a[0]))returns;if(i=newRegExp(n),s=f(i,a))returns}returnnull}}functiond(e){if(!e.stack)returnnull;for(vart,n,i=/^\s*at (.*?)?\(((?:file|https?|blob|chrome-extension|native|webpack|eval).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,o=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|\[native).*?)(?::(\d+))?(?::(\d+))?\s*$/i,c=/^\s*at (?:((?:\[object object\])?.+))?\(?((?:ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,l=e.stack.split("\n"),f=[],h=/^(.*) is undefined$/.exec(e.message),d=0,g=l.length;d<g;++d){if(t=i.exec(l[d])){varv=t[2]&&t[2].indexOf("native")!==-1;n={url:v?null:t[2],func:t[1]||a,args:v?[t[2]]:[],line:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}elseif(t=c.exec(l[d]))n={url:t[2],func:t[1]||a,args:[],line:+t[3],column:t[4]?+t[4]:null};else{if(!(t=o.exec(l[d])))continue;n={url:t[3],func:t[1]||a,args:t[2]?t[2].split(","):[],line:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}!n.func&&n.line&&(n.func=s(n.url,n.line)),n.line&&(n.context=u(n.url,n.line)),f.push(n)}returnf.length?(f[0]&&f[0].line&&!f[0].column&&h?f[0].column=p(h[1],f[0].url,f[0].line):f[0].column||r(e.columnNumber)||(f[0].column=e.columnNumber+1),{mode:"stack",name:e.name,message:e.message,stack:f}):null}functiong(e){vart=e.stacktrace;if(t){for(varn,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,i=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,o=t.split("\n"),a=[],c=0;c<o.length;c+=2){varl=null;if((n=r.exec(o[c]))?l={url:n[2],line:+n[1],column:null,func:n[3],args:[]}:(n=i.exec(o[c]))&&(l={url:n[6],line:+n[1],column:+n[2],func:n[3]||n[4],args:n[5]?n[5].split(","):[]}),l){if(!l.func&&l.line&&(l.func=s(l.url,l.line)),l.line)try{l.context=u(l.url,l.line)}catch(f){}l.context||(l.context=[o[c+1]]),a.push(l)}}returna.length?{mode:"stacktrace",name:e.name,message:e.message,stack:a}:null}}functionv(t){varr=t.message.split("\n");if(r.length<4)returnnull;vari,a=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,c=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,p=/^\s*Line (\d+) of function script\s*$/i,h=[],d=e&&e.document&&e.document.getElementsByTagName("script"),g=[];for(varvind)n(d,v)&&!d[v].src&&g.push(d[v]);for(varm=2;m<r.length;m+=2){vary=null;if(i=a.exec(r[m]))y={url:i[2],func:i[3],args:[],line:+i[1],column:null};elseif(i=c.exec(r[m])){y={url:i[3],func:i[4],args:[],line:+i[1],column:null};varb=+i[1],S=g[i[2]-1];if(S){varx=o(y.url);if(x){x=x.join("\n");var_=x.indexOf(S.innerText);_>=0&&(y.line=b+x.substring(0,_).split("\n").length)}}}elseif(i=p.exec(r[m])){varw=e.location.href.replace(/#.*$/,""),E=newRegExp(l(r[m+1])),I=f(E,[w]);y={url:w,func:"",args:[],line:I?I.line:i[1],column:null}}if(y){y.func||(y.func=s(y.url,y.line));varP=u(y.url,y.line),C=P?P[Math.floor(P.length/2)]:null;P&&C.replace(/^\s*/,"")===r[m+1].replace(/^\s*/,"")?y.context=P:y.context=[r[m+1]],h.push(y)}}returnh.length?{mode:"multiline",name:t.name,message:r[0],stack:h}:null}functionm(e,t,n,r){vari={url:t,line:n};if(i.url&&i.line){e.incomplete=!1,i.func||(i.func=s(i.url,i.line)),i.context||(i.context=u(i.url,i.line));varo=/ '([^']+)' /.exec(r);if(o&&(i.column=p(o[1],i.url,i.line)),e.stack.length>0&&e.stack[0].url===i.url){if(e.stack[0].line===i.line)return!1;if(!e.stack[0].line&&e.stack[0].func===i.func)returne.stack[0].line=i.line,e.stack[0].context=i.context,!1}returne.stack.unshift(i),e.partial=!0,!0}returne.incomplete=!0,!1}functiony(e,t){for(varn,r,o,u=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,c=[],l={},f=!1,d=y.caller;d&&!f;d=d.caller)if(d!==b&&d!==i.report){if(r={url:null,func:a,args:[],line:null,column:null},d.name?r.func=d.name:(n=u.exec(d.toString()))&&(r.func=n[1]),"undefined"==typeofr.func)try{r.func=n.input.substring(0,n.input.indexOf("{"))}catch(g){}if(o=h(d)){r.url=o.url,r.line=o.line,r.func===a&&(r.func=s(r.url,r.line));varv=/ '([^']+)' /.exec(e.message||e.description);v&&(r.column=p(v[1],o.url,o.line))}l[""+d]?f=!0:l[""+d]=!0,c.push(r)}t&&c.splice(0,t);varS={mode:"callers",name:e.name,message:e.message,stack:c};returnm(S,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),S}functionb(e,t){varn=null;t=null==t?0:+t;try{if(n=g(e))returnn}catch(r){if(x)throwr}try{if(n=d(e))returnn}catch(r){if(x)throwr}try{if(n=v(e))returnn}catch(r){if(x)throwr}try{if(n=y(e,t+1))returnn}catch(r){if(x)throwr}return{mode:"failed"}}functionS(e){e=(null==e?0:+e)+1;try{thrownewError}catch(t){returnb(t,e+1)}}varx=!1,_={};returnb.augmentStackTraceWithInitialElement=m,b.guessFunctionName=s,b.gatherContext=u,b.ofCaller=S,b.getSource=o,b}(),i.extendToAsynchronousCallbacks=function(){vart=function(t){varn=e[t];e[t]=function(){vare=s.call(arguments),t=e[0];return"function"==typeoft&&(e[0]=i.wrap(t)),n.apply?n.apply(this,e):n(e[0],e[1])}};t("setTimeout"),t("setInterval")},i.remoteFetching||(i.remoteFetching=!0),i.collectWindowErrors||(i.collectWindowErrors=!0),(!i.linesOfContext||i.linesOfContext<1)&&(i.linesOfContext=11),"undefined"!=typeofmodule&&module.exports&&e.module!==module?module.exports=i:"function"==typeofdefine&&define.amd?define("TraceKit",[],i):e.TraceKit=i}}("undefined"!=typeofwindow?window:global),function(e,t){varn,r,i;"function"==typeofdefine&&define.amd?define("exceptionless",["require","exports","module","TraceKit"],t):"object"==typeofr?i.exports=t(n,r,i,n("TraceKit")):e.exceptionless=t(n,r,i,e.TraceKit)}(this,function(e,t,n,r){functioni(e,t){varn=/\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;if("string"==typeoft){varr=n.exec(t);if(r)returnnewDate(t)}returnt}functiono(){if(!document||!document.getElementsByTagName)returnnull;for(vare=document.getElementsByTagName("script"),t=0;t<e.length;t++)if(e[t].src&&e[t].src.indexOf("/exceptionless")>-1)returnS.parseQueryString(e[t].src.split("?").pop());returnnull}functions(e,t){varn=E["default"].createUnhandledException(newError(e.message||(t||{}).status||"Script error"),"onerror");n.pluginContextData["@@_TraceKit.StackTrace"]=e,n.submit()}if(e||(e=function(e){return("undefined"!=typeofwindow?window:global)[e]}),!t)vart={};vara=this&&this.__extends||function(e,t){functionn(){this.constructor=e}for(varrint)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,newn)},r=e("TraceKit"),u=function(){functione(e,t){this.success=!1,this.badRequest=!1,this.serviceUnavailable=!1,this.paymentRequired=!1,this.unableToAuthenticate=!1,this.notFound=!1,this.requestEntityTooLarge=!1,this.statusCode=e,this.message=t,this.success=e>=200&&e<=299,this.badRequest=400===e,this.serviceUnavailable=503===e,this.paymentRequired=402===e,this.unableToAuthenticate=401===e||403===e,this.notFound=404===e,this.requestEntityTooLarge=413===e}returne}();t.SubmissionResponse=u;varc=function(){functione(){}returne.onChanged=function(e){!!e&&this._handlers.push(e)},e.applySavedServerSettings=function(e){if(e&&e.isValid){vart=this.getSavedServerSettings(e);e.log.info("Applying saved settings: v"+t.version),e.settings=S.merge(e.settings,t.settings),this.changed(e)}},e.getVersion=function(e){if(!e||!e.isValid)return0;vart=this.getSavedServerSettings(e);returnt.version||0},e.checkVersion=function(e,t){varn=this.getVersion(t);e<=n||(t.log.info("Updating settings from v"+n+" to v"+e),this.updateSettings(t,n))},e.updateSettings=function(t,n){varr=this;if(t&&t.enabled){vari="Unable to update settings";if(!t.isValid)returnvoidt.log.error(i+": ApiKey is not set.");(!n||n<0)&&(n=this.getVersion(t)),t.log.info("Checking for updated settings from: v"+n+"."),t.submissionClient.getSettings(t,n,function(n){if(!(t&&n&&n.success&&n.settings))returnvoidt.log.warn(i+": "+n.message);t.settings=S.merge(t.settings,n.settings);varo=e.getSavedServerSettings(t);for(varsino)n.settings[s]||deletet.settings[s];vara={version:n.settingsVersion,settings:n.settings};t.storage.settings.save(a),t.log.info("Updated settings: v"+a.version),r.changed(t)})}},e.changed=function(e){for(vart=this._handlers,n=0;n<t.length;n++)try{t[n](e)}catch(r){e.log.error("Error calling onChanged handler: "+r)}},e.getSavedServerSettings=function(e){vart=e.storage.settings.get()[0];returnt&&t.value&&t.value.version&&t.value.settings?t.value:{version:0,settings:{}}},e._handlers=[],e}();t.SettingsManager=c;varl=function(){functione(){this._lastReferenceId=null}returne.prototype.getLast=function(){returnthis._lastReferenceId},e.prototype.clearLast=function(){this._lastReferenceId=null},e.prototype.setLast=function(e){this._lastReferenceId=e},e}();t.DefaultLastReferenceIdManager=l;varf=function(){functione(){}returne.prototype.trace=function(e){this.log("trace",e)},e.prototype.info=function(e){this.log("info",e)},e.prototype.warn=function(e){this.log("warn",e)},e.prototype.error=function(e){this.log("error",e)},e.prototype.log=function(e,t){if(console){varn="["+e+"] Exceptionless: "+t;console[e]?console[e](n):console.log&&console.log(n)}},e}();t.ConsoleLog=f;varp=function(){functione(){}returne.prototype.trace=function(e){},e.prototype.info=function(e){},e.prototype.warn=function(e){},e.prototype.error=function(e){},e}();t.NullLog=p;varh=function(){functione(e,t,n){this.client=e,this.event=t,this.contextData=n?n:neww}returnObject.defineProperty(e.prototype,"log",{get:function(){returnthis.client.config.log},enumerable:!0,configurable:!0}),e}();t.EventPluginContext=h;vard=function(){functione(){}returne.run=function(e,t){varn=function(n,r){returnfunction(){try{e.cancelled||n.run(e,r)}catch(i){e.cancelled=!0,e.log.error("Error running plugin '"+n.name+"': "+i.message+". Discarding Event.")}e.cancelled&&t&&t(e)}},r=e.client.config.plugins,i=[];t&&(i[r.length]=n({name:"cb",priority:9007199254740992,run:t},null));for(varo=r.length-1;o>-1;o--)i[o]=n(r[o],t||o<r.length-1?i[o+1]:null);i[0]()},e.addDefaultPlugins=function(e){e.addPlugin(newI),e.addPlugin(newP),e.addPlugin(newU),e.addPlugin(newM),e.addPlugin(newC),e.addPlugin(newT),e.addPlugin(newk),e.addPlugin(newR)},e}();t.EventPluginManager=d;varg=function(){functione(e){void0===e&&(e=3e4),this.priority=100,this.name="HeartbeatPlugin",this._interval=e}returne.prototype.run=function(e,t){clearInterval(this._intervalId);varn=e.event.data["@user"];n&&n.identity&&(this._intervalId=setInterval(function(){returne.client.submitSessionHeartbeat(n.identity)},this._interval)),t&&t()},e}();t.HeartbeatPlugin=g;varv=function(){functione(){this.priority=20,this.name="ReferenceIdPlugin"}returne.prototype.run=function(e,t){e.event.reference_id&&0!==e.event.reference_id.length||"error"!==e.event.type||(e.event.reference_id=S.guid().replace("-","").substring(0,10)),t&&t()},e}();t.ReferenceIdPlugin=v;varm=function(){functione(e){this._handlers=[],this._processingQueue=!1,this._config=e}returne.prototype.enqueue=function(e){vart="The event will not be queued.",n=this._config,r=n.log;if(!n.enabled)returnvoidr.info("Configuration is disabled. "+t);if(!n.isValid)returnvoidr.info("Invalid Api Key. "+t);if(this.areQueuedItemsDiscarded())returnvoidr.info("Queue items are currently being discarded. "+t);this.ensureQueueTimer();vari=n.storage.queue.save(e),o="type="+e.type+" "+(e.reference_id?"refid="+e.reference_id:"");i?r.info("Enqueuing event: "+i+" "+o):r.error("Could not enqueue event "+o)},e.prototype.process=function(e){vart=this,n="The queue will not be processed.",r=this._config,i=r.log;if(!this._processingQueue){if(i.info("Processing queue..."),!r.enabled)returnvoidi.info("Configuration is disabled. "+n);if(!r.isValid)returnvoidi.info("Invalid Api Key. "+n);this._processingQueue=!0,this.ensureQueueTimer();try{varo=r.storage.queue.get(r.submissionBatchSize);if(!o||0===o.length)returnvoid(this._processingQueue=!1);i.info("Sending "+o.length+" events to "+r.serverUrl+"."),r.submissionClient.postEvents(o.map(function(e){returne.value}),r,function(e){t.processSubmissionResponse(e,o),t.eventsPosted(o.map(function(e){returne.value}),e),i.info("Finished processing queue."),t._processingQueue=!1},e)}catch(s){i.error("Error processing queue: "+s),this.suspendProcessing(),this._processingQueue=!1}}},e.prototype.suspendProcessing=function(e,t,n){varr=this._config;(!e||e<=0)&&(e=5),r.log.info("Suspending processing for "+e+" minutes."),this._suspendProcessingUntil=newDate((newDate).getTime()+6e4*e),t&&(this._discardQueuedItemsUntil=this._suspendProcessingUntil),n&&r.storage.queue.clear()},e.prototype.onEventsPosted=function(e){!!e&&this._handlers.push(e)},e.prototype.eventsPosted=function(e,t){for(varn=this._handlers,r=0;r<n.length;r++)try{n[r](e,t)}catch(i){this._config.log.error("Error calling onEventsPosted handler: "+i)}},e.prototype.areQueuedItemsDiscarded=function(){returnthis._discardQueuedItemsUntil&&this._discardQueuedItemsUntil>newDate},e.prototype.ensureQueueTimer=function(){vare=this;this._queueTimer||(this._queueTimer=setInterval(function(){returne.onProcessQueue()},1e4))},e.prototype.isQueueProcessingSuspended=function(){returnthis._suspendProcessingUntil&&this._suspendProcessingUntil>newDate},e.prototype.onProcessQueue=function(){this.isQueueProcessingSuspended()||this._processingQueue||this.process()},e.prototype.processSubmissionResponse=function(e,t){varn="The event will not be submitted.",r=this._config,i=r.log;if(e.success)returni.info("Sent "+t.length+" events."),voidthis.removeEvents(t);if(e.serviceUnavailable)returni.error("Server returned service unavailable."),voidthis.suspendProcessing();if(e.paymentRequired)returni.info("Too many events have been submitted, please upgrade your plan."),voidthis.suspendProcessing(null,!0,!0);if(e.unableToAuthenticate)returni.info("Unable to authenticate, please check your configuration. "+n),this.suspendProcessing(15),voidthis.removeEvents(t);if(e.notFound||e.badRequest)returni.error("Error while trying to submit data: "+e.message),this.suspendProcessing(240),voidthis.removeEvents(t);if(e.requestEntityTooLarge){varo="Event submission discarded for being too large.";returnvoid(r.submissionBatchSize>1?(i.error(o+" Retrying with smaller batch size."),r.submissionBatchSize=Math.max(1,Math.round(r.submissionBatchSize/1.5))):(i.error(o+" "+n),this.removeEvents(t)))}e.success||(i.error("Error submitting events: "+(e.message||"Please check the network tab for more info.")),this.suspendProcessing())},e.prototype.removeEvents=function(e){for(vart=0;t<(e||[]).length;t++)this._config.storage.queue.remove(e[t].timestamp)},e}();t.DefaultEventQueue=m;vary=function(){functione(e){void0===e&&(e=250),this.queue=newA(e),this.settings=newA(1)}returne}();t.InMemoryStorageProvider=y;varb=function(){functione(){this.configurationVersionHeader="x-exceptionless-configversion"}returne.prototype.postEvents=function(e,t,n,r){vari=JSON.stringify(e),o=this.createRequest(t,"POST",t.serverUrl+"/api/v2/events",i),s=this.createSubmissionCallback(t,n);returnt.submissionAdapter.sendRequest(o,s,r)},e.prototype.postUserDescription=function(e,t,n,r){vari=n.serverUrl+"/api/v2/events/by-ref/"+encodeURIComponent(e)+"/user-description",o=JSON.stringify(t),s=this.createRequest(n,"POST",i,o),a=this.createSubmissionCallback(n,r);returnn.submissionAdapter.sendRequest(s,a)},e.prototype.getSettings=function(e,t,n){varr=this.createRequest(e,"GET",e.serverUrl+"/api/v2/projects/config?v="+t),i=function(t,r,i,o){if(200!==t)returnn(newO((!1),null,(-1),null,r));vars;try{s=JSON.parse(i)}catch(a){e.log.error("Unable to parse settings: '"+i+"'")}return!s||isNaN(s.version)?n(newO((!1),null,(-1),null,"Invalid configuration settings.")):voidn(newO((!0),s.settings||{},s.version))};returne.submissionAdapter.sendRequest(r,i)},e.prototype.sendHeartbeat=function(e,t,n){varr=this.createRequest(n,"GET",n.heartbeatServerUrl+"/api/v2/events/session/heartbeat?id="+e+"&close="+t);n.submissionAdapter.sendRequest(r)},e.prototype.createRequest=function(e,t,n,r){returnvoid0===r&&(r=null),{method:t,url:n,data:r,apiKey:e.apiKey,userAgent:e.userAgent}},e.prototype.createSubmissionCallback=function(e,t){varn=this;returnfunction(r,i,o,s){vara=s&&parseInt(s[n.configurationVersionHeader],10);c.checkVersion(a,e),t(newu(r,i))}},e}();t.DefaultSubmissionClient=b;varS=function(){functione(){}returne.addRange=function(e){for(vart=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(e||(e=[]),!t||0===t.length)returne;for(varr=0;r<t.length;r++)t[r]&&e.indexOf(t[r])<0&&e.push(t[r]);returne},e.getHashCode=function(e){if(!e||0===e.length)return0;for(vart=0,n=0;n<e.length;n++){varr=e.charCodeAt(n);t=(t<<5)-t+r,t|=0}returnt},e.getCookies=function(t,n){for(varr={},i=(t||"").split("; "),o=0;o<i.length;o++){vars=i[o].split("=");e.isMatch(s[0],n)||(r[s[0]]=s[1])}returne.isEmpty(r)?null:r},e.guid=function(){functione(){returnMath.floor(65536*(1+Math.random())).toString(16).substring(1)}returne()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},e.merge=function(e,t){varn={};for(varrine||{})e[r]&&(n[r]=e[r]);for(varrint||{})t[r]&&(n[r]=t[r]);returnn},e.parseVersion=function(e){if(!e)returnnull;vart=/(v?((\d+)\.(\d+)(\.(\d+))?)(?:-([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?(?:\+([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?)/,n=t.exec(e);returnn&&n.length>0?n[0]:null},e.parseQueryString=function(t,n){if(!t||0===t.length)returnnull;varr=t.split("&");if(0===r.length)returnnull;for(vari={},o=0;o<r.length;o++){vars=r[o].split("=");e.isMatch(s[0],n)||(i[decodeURIComponent(s[0])]=decodeURIComponent(s[1]))}returne.isEmpty(i)?null:i},e.randomNumber=function(){returnMath.floor(9007199254740992*Math.random())},e.isMatch=function(t,n,r){if(void0===r&&(r=!0),!t||"string"!=typeoft)return!1;vari=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;returnt=(r?t.toLowerCase():t).replace(i,""),(n||[]).some(function(n){if("string"!=typeofn)return!1;if(n=(r?n.toLowerCase():n).replace(i,""),n.length<=0)return!1;varo="*"===n[0];o&&(n=n.slice(1));vars="*"===n[n.length-1];returns&&(n=n.substring(0,n.length-1)),o&&s?n.length<=t.length&&t.indexOf(n,0)!==-1:o?e.endsWith(t,n):s?e.startsWith(t,n):t===n})},e.isEmpty=function(e){returnnull===e||"object"==typeofe&&0===Object.keys(e).length},e.startsWith=function(e,t){returne.substring(0,t.length)===t},e.endsWith=function(e,t){returne.indexOf(t,e.length-t.length)!==-1},e.stringify=function(t,n,r){functioni(t,n){varr=[];returnJSON.stringify(t,function(t,i){if(!e.isMatch(t,n)){if("object"==typeofi&&i){if(r.indexOf(i)!==-1)return;r.push(i)}returni}})}if("[object Object]"==={}.toString.call(t)){varo={};for(varsint){vara=t[s];a!==t&&(o[s]=t[s])}returni(o,n)}if("[object Array]"==={}.toString.call(t)){for(varu=[],c=0;c<t.length;c++)u[c]=JSON.parse(i(t[c],n));returnJSON.stringify(u)}returni(t,n)},e.toBoolean=function(e,t){if(void0===t&&(t=!1),"boolean"==typeofe)returne;if(null===e||"number"!=typeofe&&"string"!=typeofe)returnt;switch((e+"").toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":casenull:return!1}returnt},e}();t.Utils=S;varx=function(){functione(t){functionn(e){return"function"==typeofe?e(this):e}this.defaultTags=[],this.defaultData={},this.enabled=!0,this.lastReferenceIdManager=newl,this.settings={},this._serverUrl="https://collector.exceptionless.io",this._heartbeatServerUrl="https://heartbeat.exceptionless.io",this._updateSettingsWhenIdleInterval=12e4,this._dataExclusions=[],this._userAgentBotPatterns=[],this._plugins=[],this._handlers=[],t=S.merge(e.defaults,t),this.log=n(t.log)||newp,this.apiKey=t.apiKey,this.serverUrl=t.serverUrl,this.heartbeatServerUrl=t.heartbeatServerUrl,this.updateSettingsWhenIdleInterval=t.updateSettingsWhenIdleInterval,this.environmentInfoCollector=n(t.environmentInfoCollector),this.errorParser=n(t.errorParser),this.lastReferenceIdManager=n(t.lastReferenceIdManager)||newl,this.moduleCollector=n(t.moduleCollector),this.requestInfoCollector=n(t.requestInfoCollector),this.submissionBatchSize=n(t.submissionBatchSize)||50,this.submissionAdapter=n(t.submissionAdapter),this.submissionClient=n(t.submissionClient)||newb,this.storage=n(t.storage)||newy,this.queue=n(t.queue)||newm(this),c.applySavedServerSettings(this),d.addDefaultPlugins(this)}returnObject.defineProperty(e.prototype,"apiKey",{get:function(){returnthis._apiKey},set:function(e){this._apiKey=e||null,this.log.info("apiKey: "+this._apiKey),this.changed()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isValid",{get:function(){return!!this.apiKey&&this.apiKey.length>=10},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"serverUrl",{get:function(){returnthis._serverUrl},set:function(e){e&&(this._serverUrl=e,this._heartbeatServerUrl=e,this.log.info("serverUrl: "+e),this.changed())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"heartbeatServerUrl",{get:function(){returnthis._heartbeatServerUrl},set:function(e){e&&(this._heartbeatServerUrl=e,this.log.info("heartbeatServerUrl: "+e),this.changed())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"updateSettingsWhenIdleInterval",{get:function(){returnthis._updateSettingsWhenIdleInterval},set:function(e){"number"==typeofe&&(e<=0?e=-1:e>0&&e<15e3&&(e=15e3),this._updateSettingsWhenIdleInterval=e,this.log.info("updateSettingsWhenIdleInterval: "+e),this.changed())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dataExclusions",{get:function(){vare=this.settings["@@DataExclusions"];returnthis._dataExclusions.concat(e&&e.split(",")||[])},enumerable:!0,configurable:!0}),e.prototype.addDataExclusions=function(){for(vare=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];this._dataExclusions=S.addRange.apply(S,[this._dataExclusions].concat(e))},Object.defineProperty(e.prototype,"userAgentBotPatterns",{get:function(){vare=this.settings["@@UserAgentBotPatterns"];returnthis._userAgentBotPatterns.concat(e&&e.split(",")||[])},enumerable:!0,configurable:!0}),e.prototype.addUserAgentBotPatterns=function(){for(vare=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];this._userAgentBotPatterns=S.addRange.apply(S,[this._userAgentBotPatterns].concat(e))},Object.defineProperty(e.prototype,"plugins",{get:function(){returnthis._plugins.sort(function(e,t){returne.priority<t.priority?-1:e.priority>t.priority?1:0})},enumerable:!0,configurable:!0}),e.prototype.addPlugin=function(e,t,n){varr=n?{name:e,priority:t,run:n}:e;if(!r||!r.run)returnvoidthis.log.error("Add plugin failed: Run method not defined");r.name||(r.name=S.guid()),r.priority||(r.priority=0);for(vari=!1,o=this._plugins,s=0;s<o.length;s++)if(o[s].name===r.name){i=!0;break}i||o.push(r)},e.prototype.removePlugin=function(e){vart="string"==typeofe?e:e.name;if(!t)returnvoidthis.log.error("Remove plugin failed: Plugin name not defined");for(varn=this._plugins,r=0;r<n.length;r++)if(n[r].name===t){n.splice(r,1);break}},e.prototype.setVersion=function(e){e&&(this.defaultData["@version"]=e)},e.prototype.setUserIdentity=function(e,t){varn="@user",r="string"!=typeofe?e:{identity:e,name:t},i=!r||!r.identity&&!r.name;i?deletethis.defaultData[n]:this.defaultData[n]=r,this.log.info("user identity: "+(i?"null":r.identity))},Object.defineProperty(e.prototype,"userAgent",{get:function(){return"exceptionless-js/1.4.3"},enumerable:!0,configurable:!0}),e.prototype.useSessions=function(e,t){void0===e&&(e=!0),void0===t&&(t=3e4),e&&this.addPlugin(newg(t))},e.prototype.useReferenceIds=function(){this.addPlugin(newv)},e.prototype.useLocalStorage=function(){},e.prototype.useDebugLogger=function(){this.log=newf},e.prototype.onChanged=function(e){!!e&&this._handlers.push(e)},e.prototype.changed=function(){for(vare=this._handlers,t=0;t<e.length;t++)try{e[t](this)}catch(n){this.log.error("Error calling onChanged handler: "+n)}},Object.defineProperty(e,"defaults",{get:function(){returnnull===e._defaultSettings&&(e._defaultSettings={}),e._defaultSettings},enumerable:!0,configurable:!0}),e._defaultSettings=null,e}();t.Configuration=x;var_=function(){functione(e,t,n){this._validIdentifierErrorMessage="must contain between 8 and 100 alphanumeric or '-' characters.",this.target=e,this.client=t,this.pluginContextData=n||neww}returne.prototype.setType=function(e){returne&&(this.target.type=e),this},e.prototype.setSource=function(e){returne&&(this.target.source=e),this},e.prototype.setReferenceId=function(e){if(!this.isValidIdentifier(e))thrownewError("ReferenceId "+this._validIdentifierErrorMessage);returnthis.target.reference_id=e,this},e.prototype.setEventReference=function(e,t){if(!e)thrownewError("Invalid name");if(!t||!this.isValidIdentifier(t))thrownewError("Id "+this._validIdentifierErrorMessage);returnthis.setProperty("@ref:"+e,t),this},e.prototype.setMessage=function(e){returne&&(this.target.message=e),this},e.prototype.setGeo=function(e,t){if(e<-90||e>90)thrownewError("Must be a valid latitude value between -90.0 and 90.0.");if(t<-180||t>180)thrownewError("Must be a valid longitude value between -180.0 and 180.0.");returnthis.target.geo=e+","+t,this},e.prototype.setUserIdentity=function(e,t){varn="string"!=typeofe?e:{identity:e,name:t};returnn&&(n.identity||n.name)?(this.setProperty("@user",n),this):this},e.prototype.setUserDescription=function(e,t){returne&&t&&this.setProperty("@user_description",{email_address:e,description:t}),this},e.prototype.setManualStackingInfo=function(e,t){if(e){varn={signature_data:e};t&&(n.title=t),this.setProperty("@stack",n)}returnthis},e.prototype.setManualStackingKey=function(e,t){if(e){varn={ManualStackingKey:e};this.setManualStackingInfo(n,t)}returnthis},e.prototype.setValue=function(e){returne&&(this.target.value=e),this},e.prototype.addTags=function(){for(vare=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];returnthis.target.tags=S.addRange.apply(S,[this.target.tags].concat(e)),this},e.prototype.setProperty=function(e,t,n,r){if(!e||void0===t||null==t)returnthis;this.target.data||(this.target.data={});vari=JSON.parse(S.stringify(t,this.client.config.dataExclusions.concat(r||[]),n));returnS.isEmpty(i)||(this.target.data[e]=i),this},e.prototype.markAsCritical=function(e){returne&&this.addTags("Critical"),this},e.prototype.addRequestInfo=function(e){returne&&(this.pluginContextData["@request"]=e),this},e.prototype.submit=function(e){this.client.submitEvent(this.target,this.pluginContextData,e)},e.prototype.isValidIdentifier=function(e){if(!e)return!0;if(e.length<8||e.length>100)return!1;for(vart=0;t<e.length;t++){varn=e.charCodeAt(t),r=n>=48&&n<=57,i=n>=65&&n<=90||n>=97&&n<=122,o=45===n;if(!r&&!i&&!o)return!1}return!0},e}();t.EventBuilder=_;varw=function(){functione(){}returne.prototype.setException=function(e){e&&(this["@@_Exception"]=e)},Object.defineProperty(e.prototype,"hasException",{get:function(){return!!this["@@_Exception"]},enumerable:!0,configurable:!0}),e.prototype.getException=function(){returnthis["@@_Exception"]||null},e.prototype.markAsUnhandledError=function(){this["@@_IsUnhandledError"]=!0},Object.defineProperty(e.prototype,"isUnhandledError",{get:function(){return!!this["@@_IsUnhandledError"]},enumerable:!0,configurable:!0}),e.prototype.setSubmissionMethod=function(e){e&&(this["@@_SubmissionMethod"]=e)},e.prototype.getSubmissionMethod=function(){returnthis["@@_SubmissionMethod"]||null},e}();t.ContextData=w;varE=function(){functione(e,t){varn=this;"object"==typeofe?this.config=newx(e):this.config=newx({apiKey:e,serverUrl:t}),this.updateSettingsTimer(5e3),this.config.onChanged(function(e){returnn.updateSettingsTimer(n._timeoutId>0?5e3:0)}),this.config.queue.onEventsPosted(function(e,t){returnn.updateSettingsTimer()})}returne.prototype.createException=function(e){vart=neww;returnt.setException(e),this.createEvent(t).setType("error")},e.prototype.submitException=function(e,t){this.createException(e).submit(t)},e.prototype.createUnhandledException=function(e,t){varn=this.createException(e);returnn.pluginContextData.markAsUnhandledError(),n.pluginContextData.setSubmissionMethod(t),n},e.prototype.submitUnhandledException=function(e,t,n){this.createUnhandledException(e,t).submit(n)},e.prototype.createFeatureUsage=function(e){returnthis.createEvent().setType("usage").setSource(e)},e.prototype.submitFeatureUsage=function(e,t){this.createFeatureUsage(e).submit(t)},e.prototype.createLog=function(e,t,n){varr=this.createEvent().setType("log");if(t&&n)r=r.setSource(e).setMessage(t).setProperty("@level",n);elseif(t)r=r.setSource(e).setMessage(t);else{r=r.setMessage(e);try{vari=this.createLog.caller;r=r.setSource(i&&i.caller&&i.caller.name)}catch(o){this.config.log.trace("Unable to resolve log source: "+o.message)}}returnr},e.prototype.submitLog=function(e,t,n,r){this.createLog(e,t,n).submit(r)},e.prototype.createNotFound=function(e){returnthis.createEvent().setType("404").setSource(e)},e.prototype.submitNotFound=function(e,t){this.createNotFound(e).submit(t)},e.prototype.createSessionStart=function(){returnthis.createEvent().setType("session")},e.prototype.submitSessionStart=function(e){this.createSessionStart().submit(e)},e.prototype.submitSessionEnd=function(e){e&&(this.config.log.info("Submitting session end: "+e),this.config.submissionClient.sendHeartbeat(e,!0,this.config))},e.prototype.submitSessionHeartbeat=function(e){e&&(this.config.log.info("Submitting session heartbeat: "+e),this.config.submissionClient.sendHeartbeat(e,!1,this.config))},e.prototype.createEvent=function(e){returnnew_({date:newDate},this,e)},e.prototype.submitEvent=function(e,t,n){functionr(e){returne&&(e.cancelled=!0),!!n&&n(e)}vari=newh(this,e,t);returne?this.config.enabled?(e.data||(e.data={}),e.tags&&e.tags.length||(e.tags=[]),voidd.run(i,function(e){vart=e.client.config,r=e.event;e.cancelled||(r.type&&0!==r.type.length||(r.type="log"),r.date||(r.date=newDate),t.queue.enqueue(r),r.reference_id&&r.reference_id.length>0&&(e.log.info("Setting last reference id '"+r.reference_id+"'"),t.lastReferenceIdManager.setLast(r.reference_id))),!!n&&n(e)})):(this.config.log.info("Event submission is currently disabled."),r(i)):r(i)},e.prototype.updateUserEmailAndDescription=function(e,t,n,r){vari=this;if(!(e&&t&&n&&this.config.enabled))return!!r&&r(newu(500,"cancelled"));varo={email_address:t,description:n};this.config.submissionClient.postUserDescription(e,o,this.config,function(t){t.success||i.config.log.error("Failed to submit user email and description for event '"+e+"': "+t.statusCode+" "+t.message),!!r&&r(t)})},e.prototype.getLastReferenceId=function(){returnthis.config.lastReferenceIdManager.getLast()},e.prototype.updateSettingsTimer=function(e){vart=this;this.config.log.info("Updating settings timer with delay: "+e),this._timeoutId=clearTimeout(this._timeoutId),this._timeoutId=clearInterval(this._intervalId);varn=this.config.updateSettingsWhenIdleInterval;if(n>0){varr=function(){returnc.updateSettings(t.config)};e>0&&(this._timeoutId=setTimeout(r,e)),this._intervalId=setInterval(r,n)}},Object.defineProperty(e,"default",{get:function(){returnnull===e._instance&&(e._instance=newe(null)),e._instance},enumerable:!0,configurable:!0}),e._instance=null,e}();t.ExceptionlessClient=E;varI=function(){functione(){this.priority=10,this.name="ConfigurationDefaultsPlugin"}returne.prototype.run=function(e,t){for(varn=e.client.config,r=n.defaultTags||[],i=0;i<r.length;i++){varo=r[i];o&&e.event.tags.indexOf(o)<0&&e.event.tags.push(o)}vars=n.defaultData||{};for(varains)if(s[a]){varu=JSON.parse(S.stringify(s[a],n.dataExclusions));S.isEmpty(u)||(e.event.data[a]=u)}t&&t()},e}();t.ConfigurationDefaultsPlugin=I;varP=function(){functione(){this.priority=30,this.name="ErrorPlugin"}returne.prototype.run=function(e,t){varn="@error",r=["arguments","column","columnNumber","description","fileName","message","name","number","line","lineNumber","opera#sourceloc","sourceId","sourceURL","stack","stackArray","stacktrace"],i=e.contextData.getException();if(i&&(e.event.type="error",!e.event.data[n])){varo=e.client.config,s=o.errorParser;if(!s)thrownewError("No error parser was defined.");vara=s.parse(e,i);if(a){varu=JSON.parse(S.stringify(i,o.dataExclusions.concat(r)));S.isEmpty(u)||(a.data||(a.data={}),a.data["@ext"]=u),e.event.data[n]=a}}t&&t()},e}();t.ErrorPlugin=P;varC=function(){functione(){this.priority=50,this.name="ModuleInfoPlugin"}returne.prototype.run=function(e,t){varn="@error",r=e.client.config.moduleCollector;if(e.event.data[n]&&!e.event.data["@error"].modules&&r){vari=r.getModules(e);i&&i.length>0&&(e.event.data[n].modules=i)}t&&t()},e}();t.ModuleInfoPlugin=C;varT=function(){functione(){this.priority=70,this.name="RequestInfoPlugin"}returne.prototype.run=function(e,t){varn="@request",r=e.client.config,i=r.requestInfoCollector;if(!e.event.data[n]&&i){varo=i.getRequestInfo(e);o&&(S.isMatch(o.user_agent,r.userAgentBotPatterns)?(e.log.info("Cancelling event as the request user agent matches a known bot pattern"),e.cancelled=!0):e.event.data[n]=o)}t&&t()},e}();t.RequestInfoPlugin=T;vark=function(){functione(){this.priority=80,this.name="EnvironmentInfoPlugin"}returne.prototype.run=function(e,t){varn="@environment",r=e.client.config.environmentInfoCollector;if(!e.event.data[n]&&r){vari=r.getEnvironmentInfo(e);i&&(e.event.data[n]=i)}t&&t()},e}();t.EnvironmentInfoPlugin=k;varR=function(){functione(){this.priority=100,this.name="SubmissionMethodPlugin"}returne.prototype.run=function(e,t){varn=e.contextData.getSubmissionMethod();n&&(e.event.data["@submission_method"]=n),t&&t()},e}();t.SubmissionMethodPlugin=R;varU=function(){functione(e,t){varn=this;void0===e&&(e=function(){returnDate.now()}),void0===t&&(t=3e4),this.priority=1010,this.name="DuplicateCheckerPlugin",this._mergedEvents=[],this._processedHashcodes=[],this._getCurrentTime=e,this._interval=t,setInterval(function(){for(;n._mergedEvents.length>0;)n._mergedEvents.shift().resubmit()},t)}returne.prototype.run=function(e,t){functionn(e){for(vart=0;e;)e.message&&e.message.length&&(t+=397*t^S.getHashCode(e.message)),e.stack_trace&&e.stack_trace.length&&(t+=397*t^S.getHashCode(JSON.stringify(e.stack_trace))),e=e.inner;returnt}varr=this,i=e.event.data["@error"],o=n(i);if(o){vars=e.event.count||1,a=this._getCurrentTime(),u=this._mergedEvents.filter(function(e){returne.hashCode===o})[0];if(u&&(u.incrementCount(s),u.updateDate(e.event.date),e.log.info("Ignoring duplicate event with hash: "+o),e.cancelled=!0),!e.cancelled&&this._processedHashcodes.some(function(e){returne.hash===o&&e.timestamp>=a-r._interval})&&(e.log.trace("Adding event with hash: "+o),this._mergedEvents.push(newq(o,e,s)),e.cancelled=!0),!e.cancelled)for(e.log.trace("Enqueueing event with hash: "+o+"to cache."),this._processedHashcodes.push({hash:o,timestamp:a});this._processedHashcodes.length>50;)this._processedHashcodes.shift()}t&&t()},e}();t.DuplicateCheckerPlugin=U;varq=function(){functione(e,t,n){this.hashCode=e,this._context=t,this._count=n}returne.prototype.incrementCount=function(e){this._count+=e},e.prototype.resubmit=function(){this._context.event.count=this._count,this._context.client.config.queue.enqueue(this._context.event)},e.prototype.updateDate=function(e){e>this._context.event.date&&(this._context.event.date=e)},e}(),M=function(){functione(){this.priority=45,this.name="EventExclusionPlugin"}returne.prototype.run=function(e,t){functionn(e){switch((e||"").toLowerCase().trim()){case"trace":case"true":case"1":case"yes":return0;case"debug":return1;case"info":return2;case"warn":return3;case"error":return4;case"fatal":return5;case"off":case"false":case"0":case"no":return6;default:return-1}}functionr(e,t){returnvoid0===t&&(t="*"),n(i(e,"log",t,"Trace")+"")}functioni(e,t,n,r){if(void0===e&&(e={}),void0===r&&(r=void0),!t)returnr;vari="log"===t,o="@@"+t+":",s=e[o+n];if(s)returni?s:S.toBoolean(s);for(varaine)if(S.startsWith(a.toLowerCase(),o.toLowerCase())&&S.isMatch(n,[a.substring(o.length)]))returni?e[a]:S.toBoolean(e[a]);returnr}varo=e.event,s=e.log,a=e.client.config.settings;if("log"===o.type){varu=r(a,o.source),c=n(o.data["@level"]);c>=0&&(c>5||c<u)&&(s.info("Cancelling log event due to minimum log level."),e.cancelled=!0)}elseif("error"===o.type)for(varl=o.data["@error"];!e.cancelled&&l;)i(a,o.type,l.type,!0)===!1&&(s.info("Cancelling error from excluded exception type: "+l.type),e.cancelled=!0),l=l.inner;elsei(a,o.type,o.source,!0)===!1&&(s.info("Cancelling event from excluded type: "+o.type+" and source: "+o.source),e.cancelled=!0);t&&t()},e}();t.EventExclusionPlugin=M;varO=function(){functione(e,t,n,r,i){void0===n&&(n=-1),void0===r&&(r=null),void0===i&&(i=null),this.success=!1,this.settingsVersion=-1,this.success=e,this.settings=t,this.settingsVersion=n,this.exception=r,this.message=i}returne}();t.SettingsResponse=O;varA=function(){functione(e){this.items=[],this.lastTimestamp=0,this.maxItems=e}returne.prototype.save=function(e){if(!e)returnnull;vart=this.items,n=Math.max(Date.now(),this.lastTimestamp+1),r={timestamp:n,value:e};returnt.push(r)>this.maxItems&&t.shift(),this.lastTimestamp=n,r.timestamp},e.prototype.get=function(e){returnthis.items.slice(0,e)},e.prototype.remove=function(e){for(vart=this.items,n=0;n<t.length;n++)if(t[n].timestamp===e)returnvoidt.splice(n,1)},e.prototype.clear=function(){this.items=[]},e}();t.InMemoryStorage=A;varD=function(){functione(e){this.lastTimestamp=0,this.maxItems=e}returne.prototype.save=function(e,t){if(!e)returnnull;this.ensureIndex();varn=this.items,r=Math.max(Date.now(),this.lastTimestamp+1),i=this.getKey(r),o=JSON.stringify(e);try{this.write(i,o),this.lastTimestamp=r,n.push(r)>this.maxItems&&this["delete"](this.getKey(n.shift()))}catch(s){returnnull}returnr},e.prototype.get=function(e){vart=this;returnthis.ensureIndex(),this.items.slice(0,e).map(function(e){varn=t.getKey(e);try{varr=t.read(n),o=JSON.parse(r,i);return{timestamp:e,value:o}}catch(s){returnt.safeDelete(n),null}}).filter(function(e){returnnull!=e})},e.prototype.remove=function(e){this.ensureIndex();vart=this.items,n=t.indexOf(e);if(n>=0){varr=this.getKey(e);this.safeDelete(r),t.splice(n,1)}},e.prototype.clear=function(){vare=this;this.items.forEach(function(t){returne.safeDelete(e.getKey(t))}),this.items=[]},e.prototype.ensureIndex=function(){this.items||(this.items=this.createIndex(),this.lastTimestamp=Math.max.apply(Math,[0].concat(this.items))+1)},e.prototype.safeDelete=function(e){try{this["delete"](e)}catch(t){}},e.prototype.createIndex=function(){vare=this;try{vart=this.readAllKeys();returnt.map(function(t){try{varn=e.getTimestamp(t);returnn?n:(e.safeDelete(t),null)}catch(r){returne.safeDelete(t),null}}).filter(function(e){returnnull!=e}).sort(function(e,t){returne-t})}catch(n){return[]}},e}();t.KeyValueStorageBase=D;varK=function(e){functiont(t,n,r){void0===n&&(n="com.exceptionless."),void0===r&&(r=20),e.call(this,r),this.prefix=n+t+"-"}returna(t,e),t.isAvailable=function(){try{vare=window.localStorage,t="__storage_test__";returne.setItem(t,t),e.removeItem(t),!0}catch(n){return!1}},t.prototype.write=function(e,t){window.localStorage.setItem(e,t)},t.prototype.read=function(e){returnwindow.localStorage.getItem(e)},t.prototype.readAllKeys=function(){vare=this;returnObject.keys(window.localStorage).filter(function(t){return0===t.indexOf(e.prefix)})},t.prototype["delete"]=function(e){window.localStorage.removeItem(e)},t.prototype.getKey=function(e){returnthis.prefix+e},t.prototype.getTimestamp=function(e){returnparseInt(e.substr(this.prefix.length),10)},t}(D);t.BrowserStorage=K;varF=function(){functione(){}returne.prototype.parse=function(e,t){functionn(e){for(vart=("string"==typeofe?[e]:e)||[],n=[],r=0;r<t.length;r++)n.push({name:t[r]});returnn}functioni(e){for(vart="<anonymous>",r=[],i=0;i<e.length;i++){varo=e[i];r.push({name:(o.func||t).replace("?",t),parameters:n(o.args),file_name:o.url,line_number:o.line||0,column:o.column||0})}returnr}varo="@@_TraceKit.StackTrace",s=e.contextData[o]?e.contextData[o]:r.computeStackTrace(t,25);if(!s)thrownewError("Unable to parse the exceptions stack trace.");vara="string"==typeoft?t:void0;return{type:s.name,message:s.message||t.message||a,stack_trace:i(s.stack||[])}},e}();t.DefaultErrorParser=F;varL=function(){functione(){}returne.prototype.getModules=function(e){if(document&&document.getElementsByTagName)returnnull;vart=[],n=document.getElementsByTagName("script");if(n&&n.length>0)for(varr=0;r<n.length;r++)n[r].src?t.push({module_id:r,name:n[r].src,version:S.parseVersion(n[r].src)}):n[r].innerHTML&&t.push({module_id:r,name:"Script Tag",version:S.getHashCode(n[r].innerHTML).toString()});returnt},e}();t.DefaultModuleCollector=L;varN=function(){functione(){}returne.prototype.getRequestInfo=function(e){if(!document||!navigator||!location)returnnull;vart=e.client.config.dataExclusions,n={user_agent:navigator.userAgent,is_secure:"https:"===location.protocol,host:location.hostname,port:location.port&&""!==location.port?parseInt(location.port,10):80,path:location.pathname,cookies:S.getCookies(document.cookie,t),query_string:S.parseQueryString(location.search.substring(1),t)};returndocument.referrer&&""!==document.referrer&&(n.referrer=document.referrer),n},e}();t.DefaultRequestInfoCollector=N;varj=function(){functione(){}returne.prototype.sendRequest=function(e,t,n){functionr(n,r){functioni(e){functiont(e){returne.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}for(varn={},r=(e||"").split("\r\n"),i=0;i<r.length;i++){varo=r[i],s=o.indexOf(": ");s>0&&(n[t(o.substring(0,s).toLowerCase())]=o.substring(s+2))}returnn}if(!u){u=!0;vara=r.statusText,c=r.responseText,l=r.status;if(n===o||0===l)a="Unable to connect to server.",l=0;elseif(n!==s||l){if(l<200||l>299){varf=r.responseBody;if(f&&f.message)a=f.message;elseif(c&&c.indexOf("message")!==-1)try{a=JSON.parse(c).message}catch(p){a=c}}}elsel="POST"===e.method?202:200;t&&t(l||500,a||"",c,i(r.getAllResponseHeaders&&r.getAllResponseHeaders()))}}functioni(e,t,n){varr=newXMLHttpRequest;returnainr?(r.open(t,n,!0),r.setRequestHeader("X-Exceptionless-Client",e),"POST"===t&&r.setRequestHeader("Content-Type","application/json")):"undefined"!=typeofXDomainRequest?(c=!0,r=newXDomainRequest,r.open(t,"http:"===location.protocol?n.replace("https:","http:"):n)):r=null,r&&(r.timeout=1e4),r}varo="timeout",s="loaded",a="withCredentials",u=!1,c=!1,l=""+e.url+(e.url.indexOf("?")===-1?"?":"&")+"access_token="+encodeURIComponent(e.apiKey),f=i(e.userAgent,e.method||"POST",l);returnf?(ainf&&(f.onreadystatechange=function(){4===f.readyState&&r(s,f)}),f.onprogress=function(){},f.ontimeout=function(){returnr(o,f)},f.onerror=function(){returnr("error",f)},f.onload=function(){returnr(s,f)},void(c?setTimeout(function(){returnf.send(e.data)},500):f.send(e.data))):t&&t(503,"CORS not supported.")},e}();t.DefaultSubmissionAdapter=j;varB=function(){functione(e,t){void0===t&&(t=250),this.queue=newK("q",e,t),this.settings=newK("settings",e,1)}returne}();t.BrowserStorageProvider=B,x.prototype.useLocalStorage=function(){K.isAvailable()&&(this.storage=newB,c.applySavedServerSettings(this),this.changed())};varH=x.defaults,Q=o();returnQ&&(Q.apiKey||Q.serverUrl)&&(H.apiKey=Q.apiKey,H.serverUrl=Q.serverUrl),H.errorParser=newF,H.moduleCollector=newL,H.requestInfoCollector=newN,H.submissionAdapter=newj,r.report.subscribe(s),r.extendToAsynchronousCallbacks(),Error.stackTraceLimit=1/0,t});//# sourceMappingURL=exceptionless.min.js.map