From 58be43749f39dd2f30802439a9d7638bdbcf8a6e Mon Sep 17 00:00:00 2001 From: Taylor Lodge Date: Tue, 1 May 2018 09:06:39 +1200 Subject: [PATCH 1/2] Add missing undefined check for url.indexOf call --- src/raygun.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/raygun.js b/src/raygun.js index 224125f2..fd40be75 100644 --- a/src/raygun.js +++ b/src/raygun.js @@ -610,7 +610,11 @@ var raygunFactory = function (window, $, undefined) { } - if (stackTrace.stack[0].url !== null && stackTrace.stack[0] !== undefined && stackTrace.stack[0].url.indexOf(domain) === -1) { + if (stackTrace.stack[0] !== null && + stackTrace.stack[0] !== undefined && + stackTrace.stack[0].url !== null && + stackTrace.stack[0].url !== undefined && + stackTrace.stack[0].url.indexOf(domain) === -1) { var allowedDomainFound = false; for (var i in _whitelistedScriptDomains) { From 2cbbc2356ae4bb3c1490bbbb805df281bde99fcd Mon Sep 17 00:00:00 2001 From: Taylor Lodge Date: Tue, 1 May 2018 09:07:19 +1200 Subject: [PATCH 2/2] Bump version & dist --- bower.json | 2 +- dist/raygun.js | 10 +++++++--- dist/raygun.min.js | 6 +++--- dist/raygun.min.js.map | 2 +- dist/raygun.umd.js | 10 +++++++--- dist/raygun.umd.min.js | 6 +++--- dist/raygun.umd.min.js.map | 2 +- dist/raygun.vanilla.js | 10 +++++++--- dist/raygun.vanilla.min.js | 6 +++--- dist/raygun.vanilla.min.js.map | 2 +- package.json | 2 +- raygun4js.nuspec | 2 +- 12 files changed, 36 insertions(+), 24 deletions(-) diff --git a/bower.json b/bower.json index 7d9e310f..2b2c9184 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "raygun4js", - "version": "2.9.3", + "version": "2.9.4", "homepage": "http://raygun.io", "authors": [ "Mindscape " diff --git a/dist/raygun.js b/dist/raygun.js index fe60e330..555044e1 100644 --- a/dist/raygun.js +++ b/dist/raygun.js @@ -1,4 +1,4 @@ -/*! Raygun4js - v2.9.3 - 2018-04-27 +/*! Raygun4js - v2.9.4 - 2018-05-01 * https://github.com/MindscapeHQ/raygun4js * Copyright (c) 2018 MindscapeHQ; Licensed MIT */ (function(window, undefined) { @@ -2808,7 +2808,11 @@ var raygunFactory = function (window, $, undefined) { } - if (stackTrace.stack[0].url !== null && stackTrace.stack[0] !== undefined && stackTrace.stack[0].url.indexOf(domain) === -1) { + if (stackTrace.stack[0] !== null && + stackTrace.stack[0] !== undefined && + stackTrace.stack[0].url !== null && + stackTrace.stack[0].url !== undefined && + stackTrace.stack[0].url.indexOf(domain) === -1) { var allowedDomainFound = false; for (var i in _whitelistedScriptDomains) { @@ -2984,7 +2988,7 @@ var raygunFactory = function (window, $, undefined) { }, 'Client': { 'Name': 'raygun-js', - 'Version': '2.9.3' + 'Version': '2.9.4' }, 'UserCustomData': finalCustomData, 'Tags': options.tags, diff --git a/dist/raygun.min.js b/dist/raygun.min.js index cd28bf55..b3ded1d8 100644 --- a/dist/raygun.min.js +++ b/dist/raygun.min.js @@ -1,7 +1,7 @@ -/*! Raygun4js - v2.9.3 - 2018-04-27 +/*! Raygun4js - v2.9.4 - 2018-05-01 * https://github.com/MindscapeHQ/raygun4js * Copyright (c) 2018 MindscapeHQ; Licensed MIT */ -!function(a,b){function c(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function d(a){return"undefined"==typeof a}var e,f={},g=a.TraceKit,h=[].slice,i="?";f.setRaygun=function(a){e||(e=a)},f.noConflict=function(){return a.TraceKit=g,f},f.wrap=function(a){function b(){try{return a.apply(this,arguments)}catch(b){throw f.report(b),b}}return b},f.report=function(){function b(a){j(),n.push(a)}function d(a){for(var b=n.length-1;b>=0;--b)n[b]===a&&n.splice(b,1)}function g(a,b){var d=null;if(!b||f.collectWindowErrors){for(var e in n)if(c(n,e))try{n[e].apply(null,[a].concat(h.call(arguments,2)))}catch(g){d=g}if(d)throw d}}function i(a,b,c,d,e){var h=null;if(e)h=f.computeStackTrace(e);else if(p)f.computeStackTrace.augmentStackTraceWithInitialElement(p,b,c,a),h=p,p=null,o=null;else{var i={url:b,line:c,column:d};i.func=f.computeStackTrace.guessFunctionName(i.url,i.line),i.context=f.computeStackTrace.gatherContext(i.url,i.line),h={mode:"onerror",message:a,url:document.location.href,stack:[i],useragent:navigator.userAgent}}return g(h,"from window.onerror"),!!l&&l.apply(this,arguments)}function j(){m!==!0&&(l=a.onerror,a.onerror=i,m=!0)}function k(b){var c;if("undefined"!=typeof document&&(c=h.call(arguments,1)),p){if(o===b)return;var d=p;p=null,o=null,g.apply(null,[d,null].concat(c))}var i=f.computeStackTrace(b);if(p=i,o=b,a.setTimeout(function(){o===b&&(p=null,o=null,g.apply(null,[i,null].concat(c)))},i.incomplete?2e3:0),!e.Utilities.isReactNative())throw b}var l,m,n=[],o=null,p=null;return k.subscribe=b,k.unsubscribe=d,k}(),f.computeStackTrace=function(){function b(a){return"string"!=typeof a?[]:""}function g(d){if(!c(x,d)){var e="";d=d||"";var f;f="undefined"!=typeof document?document.domain:a.location.hostname,d.indexOf&&d.indexOf(f)!==-1&&(e=b(d)),x[d]=e?e.split("\n"):[]}return x[d]}function h(a,b){var c,e=/function ([^(]*)\(([^)]*)\)/,f=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,h="",j=10,k=g(a);if(!k.length)return i;for(var l=0;l0?e:null}function k(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function l(a){return k(a).replace("<","(?:<|<)").replace(">","(?:>|>)").replace("&","(?:&|&)").replace('"','(?:"|")').replace(/\s+/g,"\\s+")}function m(a,b){for(var c,d,e=0,f=b.length;ec&&(d=f.exec(e[c]))?d.index:null}function o(b){for(var c,d,e,f,g=[a.location.href],h=document.getElementsByTagName("script"),i=""+b,j=/^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,n=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,o=0;o|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,f=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,g=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,k=a.stack.split("\n"),l=[],m=/^(.*) is undefined$/.exec(a.message);if(e.Utilities.isReactNative())for(var o=/^(.*@)?.*\/[^\.]+(\.app|CodePush)\/?(.*)/,p="file://reactnative.local/",q=0;q]+)>|([^\)]+))\((.*)\) in (.*):\s*$/i,e=c?c.split("\n"):[],f=[],g=0,i=e.length;g=0&&(t.line=u+k.substring(0,w).split("\n").length)}}else if(e=p.exec(d[f])){var x=a.location.href.replace(/#.*$/,""),y=e[1],z=new RegExp(l(d[f+1]));k=m(z,[x]),t={url:x,line:k?k.line:y,func:""}}if(t){t.func||(t.func=h(t.url,t.line));var A=j(t.url,t.line),B=A?A[Math.floor(A.length/2)]:null;A&&B.replace(/^\s*/,"")===d[f+1].replace(/^\s*/,"")?t.context=A:t.context=[d[f+1]],q.push(t)}}return q.length?{mode:"multiline",name:b.name,message:d[0],url:document.location.href,stack:q,useragent:navigator.userAgent}:null}function s(a,b,c,d){var e={url:b,line:c};if(e.url&&e.line){a.incomplete=!1,e.func||(e.func=h(e.url,e.line)),e.context||(e.context=j(e.url,e.line));var f=/ '([^']+)' /.exec(d);if(f&&(e.column=n(f[1],e.url,e.line)),a.stack.length>0&&a.stack[0].url===e.url){if(a.stack[0].line===e.line)return!1;if(!a.stack[0].line&&a.stack[0].func===e.func)return a.stack[0].line=e.line,a.stack[0].context=e.context,!1}return a.stack.unshift(e),a.partial=!0,!0}return a.incomplete=!0,!1}function t(a,b){for(var c,d,e,g=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,j=[],k={},l=!1,m=t.caller;m&&!l;m=m.caller)if(m!==u&&m!==f.report){if(d={url:null,func:i,line:null,column:null},m.name?d.func=m.name:(c=g.exec(m.toString()))&&(d.func=c[1]),"undefined"==typeof d.func)try{d.func=c.input.substring(0,c.input.indexOf("{"))}catch(p){}if(e=o(m)){d.url=e.url,d.line=e.line,d.func===i&&(d.func=h(d.url,d.line));var q=/ '([^']+)' /.exec(a.message||a.description);q&&(d.column=n(q[1],e.url,e.line))}k[""+m]?l=!0:k[""+m]=!0,j.push(d)}b&&j.splice(0,b);var r={mode:"callers",name:a.name,message:a.message,url:document.location.href,stack:j,useragent:navigator.userAgent};return s(r,a.sourceURL||a.fileName,a.line||a.lineNumber,a.message||a.description),r}function u(a,b){var c=null;b=null==b?0:+b;try{if(c=q(a))return c}catch(d){if(w)throw d}try{if(c=p(a))return c}catch(d){if(w)throw d}try{if(c=r(a))return c}catch(d){if(w)throw d}try{if(c=t(a,b+1))return c}catch(d){if(w)throw d}return{tracekitResult:"failedToComputeAnyStackTrace"}}function v(a){a=(null==a?0:+a)+1;try{throw new Error}catch(b){return u(b,a+1)}}var w=!1,x={};return u.augmentStackTraceWithInitialElement=s,u.guessFunctionName=h,u.gatherContext=j,u.ofCaller=v,u}(),f.extendToAsynchronousCallbacks=function(){var b=function(b){var c=a[b];a[b]=function(){var a=h.call(arguments),b=a[0];return"function"==typeof b&&(a[0]=f.wrap(b)),c.apply?c.apply(this,a):c(a[0],a[1])}};b("setTimeout"),b("setInterval")},f.remoteFetching||(f.remoteFetching=!0),f.collectWindowErrors||(f.collectWindowErrors=!0),(!f.linesOfContext||f.linesOfContext<1)&&(f.linesOfContext=11),a.TraceKit=f}(window),function(a,b){"use strict";if(a&&a.event&&a.event.add){var c=a.event.add;a.event.add=function(d,e,f,g,h){if("function"!=typeof f&&"function"!=typeof f.handler)return c.call(this,d,e,f,g,h);var i;return f.handler?(i=f.handler,f.handler=b.wrap(f.handler)):(i=f,f=b.wrap(f)),i.guid?f.guid=i.guid:f.guid=i.guid=a.guid++,c.call(this,d,e,f,g,h)};var d=a.fn.ready;a.fn.ready=function(a){return d.call(this,b.wrap(a))};var e=a.ajax;a.ajax=function(c,d){"object"==typeof c&&(d=c,c=void 0),d=d||{};for(var f,g=["complete","error","success"];f=g.pop();)a.isFunction(d[f])&&(d[f]=b.wrap(d[f]));try{return c?e.call(this,c,d):e.call(this,d)}catch(h){throw b.report(h),h}}}}(window.jQuery,window.TraceKit),Date.prototype.toISOString||!function(){function a(a){var b=String(a);return 1===b.length&&(b="0"+b),b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}(),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;var f=0|b;if(f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);c>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(b=arguments[1]),c=new Array(f),d=0;d>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(b=arguments[1]),c=0;c3?"/":"")+c.slice(3,c.length).join("/").split("?")[0].split("#")[0];var h=f.pathname;"/"===h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));var i=f.hostname,j=i.split("."),k=h.split("/");if("hostname"===b)return i;if("domain"===b)return/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/.test(i)?i:j.slice(-2).join(".");if("sub"===b)return j.slice(0,j.length-2).join(".");if("port"===b)return f.port;if("protocol"===b)return f.protocol.split(":")[0];if("auth"===b)return f.auth;if("user"===b)return f.auth.split(":")[0];if("pass"===b)return f.auth.split(":")[1]||"";if("path"===b)return f.pathname;if("."===b.charAt(0)){if(b=b.substring(1),d(b))return b=parseInt(b,10),j[b<0?j.length+b:b-1]||""}else{if(d(b))return b=parseInt(b,10),k[b<0?k.length+b:b]||"";if("file"===b)return k.slice(-1)[0];if("filename"===b)return k.slice(-1)[0].split(".")[0];if("fileext"===b)return k.slice(-1)[0].split(".")[1]||"";if("?"===b.charAt(0)||"#"===b.charAt(0)){var l=e,m=null;if("?"===b.charAt(0)?l=(l.split("?")[1]||"").split("#")[0]:"#"===b.charAt(0)&&(l=l.split("#")[1]||""),!b.charAt(1))return l;b=b.substring(1),l=l.split("&");for(var n=0,o=l.length;nb?a.slice(0,b-c.length)+c:a}};return d.isReactNative()&&__DEV__!==!0&&a.ErrorUtils&&a.ErrorUtils.getGlobalHandler&&(c=a.ErrorUtils.getGlobalHandler()),d},window.raygunBreadcrumbsFactory=function(a,b){function c(a,b){for(var c=0;c-1)return!0;if("object"==typeof d&&d.exec(a))return!0}return!1}var d=function(){this.MAX_BREADCRUMBS=32,this.MAX_MESSAGE_SIZE=1024,this.BREADCRUMB_LEVELS=["debug","info","warning","error"],this.DEFAULT_BREADCRUMB_LEVEL="info",this.DEFAULT_XHR_IGNORED_HOSTS=["raygun"],this.breadcrumbLevel="info",this.logXhrContents=!1,this.xhrIgnoredHosts=[].concat(this.DEFAULT_XHR_IGNORED_HOSTS),this.breadcrumbs=[],this.wrapWithHandler=function(a){return function(){try{return a.apply(this,arguments)}catch(c){b.Utilities.log(c)}}},this.disableConsoleFunctions=[],this.disableNavigationFunctions=[],this.disableXHRLogging=function(){},this.disableClicksTracking=function(){},this.enableAutoBreadcrumbs(),this.wrapPrototypeWithHandlers()};return d.prototype.recordBreadcrumb=function(a,c){var d={level:this.DEFAULT_BREADCRUMB_LEVEL,timestamp:(new Date).getTime(),type:"manual"};switch(typeof a){case"object":d=b.Utilities.merge(d,a);break;case"string":d=b.Utilities.merge(b.Utilities.merge(d,{message:a,metadata:c}));break;default:return void b.Utilities.log("expected first argument to recordBreadcrumb to be a 'string' or 'object', got "+typeof a)}this.BREADCRUMB_LEVELS.indexOf(d.level)===-1&&(b.Utilities.log("unknown breadcrumb level "+d.level+" setting to default of '"+this.DEFAULT_BREADCRUMB_LEVEL+"'"),d.level=this.DEFAULT_BREADCRUMB_LEVEL),this.shouldRecord(d)&&(d.message=b.Utilities.truncate(d.message,this.MAX_MESSAGE_SIZE),this.breadcrumbs.push(d),this.breadcrumbs=this.breadcrumbs.slice(-this.MAX_BREADCRUMBS))},d.prototype.shouldRecord=function(a){var b=this.BREADCRUMB_LEVELS.indexOf(a.level),c=this.BREADCRUMB_LEVELS.indexOf(this.breadcrumbLevel);return b>=c},d.prototype.setBreadcrumbLevel=function(a){return this.BREADCRUMB_LEVELS.indexOf(a)===-1?void b.Utilities.log("Breadcrumb level of '"+a+"' is invalid, setting to default of '"+this.DEFAULT_BREADCRUMB_LEVEL+"'"):void(this.breadcrumbLevel=a)},d.prototype.setOption=function(a,b){if("breadcrumbsLevel"===a)this.setBreadcrumbLevel(b);else if("xhrIgnoredHosts"===a){this.xhrIgnoredHosts=b.concat(this.DEFAULT_XHR_IGNORED_HOSTS);var d=this;this.removeBreadcrumbsWithPredicate(function(a){return"request"===a.type&&c(a.metadata.requestURL||a.metadata.responseURL,d.xhrIgnoredHosts)})}else"logXhrContents"===a&&(this.logXhrContents=b)},d.prototype.any=function(){return this.breadcrumbs.length>0},d.prototype.all=function(){for(var a=[],b=0;b-1&&(m=!0);if(!m)return void r.Utilities.log("Raygun4JS: cancelling send due to error on non-origin, non-whitelisted domain")}}if(U instanceof Array)for(var p in U)if(U.hasOwnProperty(p)&&a.location.hostname&&a.location.hostname.match(U[p]))return void r.Utilities.log("Raygun4JS: cancelling send as error originates from an excluded hostname");if(V instanceof Array&&!r.Utilities.isReactNative())for(var q in V)if(V.hasOwnProperty(q)&&navigator.userAgent.match(V[q]))return void r.Utilities.log("Raygun4JS: cancelling send as error originates from an excluded user agent");if(r.Utilities.isReactNative()||!navigator.userAgent.match("RaygunPulseInsightsCrawler")){b.stack&&b.stack.length&&r.Utilities.forEach(b.stack,function(a,b){g.push({LineNumber:b.line,ColumnNumber:b.column,ClassName:"line "+b.line+", column "+b.column,FileName:b.url,MethodName:b.func||"[anonymous]"})});var u=r.Utilities.parseUrl("?");u.length>0&&r.Utilities.forEach(u.split("&"),function(a,b){var c=b.split("=");if(c&&2===c.length){var d=decodeURIComponent(c[0]),e=k(d,c[1]);h[d]=e}}),d===c&&(d={}),r.Utilities.isEmpty(d.customData)&&("function"==typeof Q?d.customData=Q():d.customData=Q),r.Utilities.isEmpty(d.tags)&&("function"==typeof R?d.tags=R():"string"==typeof R?d.tags=[R]:d.tags=R),e||(d.tags||(d.tags=[]),r.Utilities.contains(d.tags,"UnhandledException")||d.tags.push("UnhandledException")),r.Utilities.isReactNative()&&!r.Utilities.contains(d.tags,"React Native")&&d.tags.push("React Native");var w,y=a.screen||{width:r.Utilities.getViewPort().width,height:r.Utilities.getViewPort().height,colorDepth:8},z=d.customData&&d.customData.ajaxErrorMessage;w="customData"===W?l(d.customData,"UserCustomData"):d.customData;try{JSON.stringify(w)}catch(A){var B="Cannot add custom data; may contain circular reference";w={error:B},r.Utilities.log("Raygun4JS: "+B)}var D=f;z?D=z:b.message?D=b.message:d&&d.status&&(D=d.status),"undefined"==typeof D&&(D=f),D&&"string"==typeof D&&(D=D.substring(0,512));var E;E=r.Utilities.isReactNative()?"/":[location.protocol,"//",location.host,location.pathname,location.hash].join("");var F={OccurredOn:new Date,Details:{Error:{ClassName:b.name,Message:D,StackTrace:g,StackString:b.stackstring},Environment:{UtcOffset:(new Date).getTimezoneOffset()/-60,"User-Language":navigator.userLanguage,"Document-Mode":r.Utilities.isReactNative()?"Not available":document.documentMode,"Browser-Width":r.Utilities.getViewPort().width,"Browser-Height":r.Utilities.getViewPort().height,"Screen-Width":y.width,"Screen-Height":y.height,"Color-Depth":y.colorDepth,Browser:navigator.appCodeName,"Browser-Name":navigator.appName,"Browser-Version":navigator.appVersion,Platform:navigator.platform},Client:{Name:"raygun-js",Version:"2.9.3"},UserCustomData:w,Tags:d.tags,Request:{Url:E,QueryString:h,Headers:{"User-Agent":navigator.userAgent,Referer:r.Utilities.isReactNative()?"Not available":document.referrer,Host:r.Utilities.isReactNative()?"Not available":document.domain}},Version:t||"Not supplied"}};if(F.Details.User=s,Y.any()){F.Details.Breadcrumbs=[];var G=Y.all()||[];G.forEach(function(a){a.metadata&&(a.CustomData=a.metadata,delete a.metadata),F.Details.Breadcrumbs.push(a)})}if("all"===W&&(F=l(F)),"function"==typeof x&&(r.Utilities.log("Raygun4JS: calling custom grouping key"),F.Details.GroupingKey=x(F,b,d)),"function"==typeof v){var H=v(F);H&&o(H)}else o(F)}}function o(a){if(r.Utilities.isApiKeyConfigured()){r.Utilities.log("Sending exception data to Raygun:",a);var b=T+"/entries?apikey="+encodeURIComponent(r.Options._raygunApiKey);q(b,JSON.stringify(a)); -}}function p(b,c){var d;return d=new a.XMLHttpRequest,"withCredentials"in d||r.Utilities.isReactNative()?d.open(b,c,!0):a.XDomainRequest&&(H&&(c=c.slice(6)),d=new a.XDomainRequest,d.open(b,c)),d.timeout=1e4,d}function q(b,c,e,f){var g=p("POST",b,c);return"function"==typeof y&&y(g),r.Utilities.log("Is offline enabled? "+K),"withCredentials"in g||r.Utilities.isReactNative()?(g.onreadystatechange=function(){4===g.readyState&&(202===g.status?j():K&&403!==g.status&&400!==g.status&&429!==g.status&&i(b,c))},g.onload=function(){r.Utilities.log("posted to Raygun"),d(this),e&&"function"==typeof e&&e(g,b,c)}):a.XDomainRequest&&(g.ontimeout=function(){K&&(r.Utilities.log("Raygun: saved locally"),i(b,c))},g.onload=function(){r.Utilities.log("posted to Raygun"),j(),d(this),e&&"function"==typeof e&&e(g,b,c)}),g.onerror=function(){r.Utilities.log("failed to post to Raygun"),d(this),f&&"function"==typeof f&&f(g,b,c)},g?(r.Utilities.isReactNative()&&g.setRequestHeader("Content-type","application/json;charset=UTF-8"),void g.send(c)):void r.Utilities.log("CORS not supported")}var r={};r.Utilities=raygunUtilityFactory(a,r),r.Breadcrumbs=raygunBreadcrumbsFactory(a,r);var s,t,u,v,w,x,y,z,A,B,C={LOADING:0,READY:1},D="raygun4js-userid",E=TraceKit,F=a.Raygun,G=!1,H=!1,I=!1,J=!1,K=!1,L=!1,M=!1,N=!1,O=!0,P=!1,Q={},R=[],S=[],T="https://api.raygun.io",U=null,V=null,W="customData",X=null,Y=new r.Breadcrumbs,Z=null,$=!0,_=C.LOADING,aa=[],ba=[],ca=null,da=Math.random(),ea={Rand:da,Options:{},noConflict:function(){return F&&(a.Raygun=F),r},constructNewRaygun:function(){var b=raygunFactory(a,a.jQuery);return b},init:function(a,d,f){return E.remoteFetching=!1,this.Options._raygunApiKey=a,f&&(Q=f),b&&(B=b(document)),d&&(H=d.allowInsecureSubmissions||!1,I=d.ignoreAjaxAbort||!1,J=d.ignoreAjaxError||!1,M=d.disableAnonymousUserTracking||!1,N=d.disableErrorTracking||!1,O=d.disablePulse===c||d.disablePulse,U=d.excludedHostnames||!1,V=d.excludedUserAgents||!1,Z=d.pulseMaxVirtualPageDuration||null,$=d.pulseIgnoreUrlCasing||!1,ca=d.pulseCustomLoadTimeEnabled||!1,d.apiUrl&&(T=d.apiUrl),"undefined"!=typeof d.wrapAsynchronousCallbacks&&(P=d.wrapAsynchronousCallbacks),d.debugMode&&(G=d.debugMode),this.Options._debugMode=G,d.ignore3rdPartyErrors&&(L=!0),d.apiEndpoint&&(T=d.apiEndpoint),d.from&&(A=d.from)),e(),r},withCustomData:function(a){return Q=a,r},withTags:function(a){return R=a,X!==c&&null!==X&&X.withTags(a),r},attach:function(){return!r.Utilities.isApiKeyConfigured()||N?r:(a.RaygunObject&&a[a.RaygunObject]&&a[a.RaygunObject].q&&(a.onerror=null),r.Utilities.isReactNative()&&__DEV__!==!0&&a.ErrorUtils&&a.ErrorUtils.setGlobalHandler&&a.ErrorUtils.setGlobalHandler(function(a,b){var c=z;z=function(){"function"==typeof c&&c(),r.Utilities.defaultReactNativeGlobalHandler(a,b),z=c},TraceKit.report(a)}),E.report.subscribe(n),P&&E.extendToAsynchronousCallbacks(),B&&B.ajaxError&&!J&&B.ajaxError(m),r)},detach:function(){return E.report.unsubscribe(n),B&&B.unbind("ajaxError",m),r},send:function(a,b,c){if(N)return r.Utilities.log("Error not sent due to disabled error tracking"),r;try{n(E.computeStackTrace(a),{customData:"function"==typeof Q?r.Utilities.merge(Q(),b):r.Utilities.merge(Q,b),tags:"function"==typeof R?r.Utilities.mergeArray(R(),c):r.Utilities.mergeArray(R,c)},!0)}catch(d){if(a!==d)throw d}return r},setUser:function(a,b,d,e,f,g){return s={Identifier:a},"boolean"==typeof b&&(s.IsAnonymous=b),d&&(s.Email=d),e&&(s.FullName=e),f&&(s.FirstName=f),g&&(s.UUID=g),X!==c&&null!==X&&X.setUser(s),r},resetAnonymousUser:function(){r.Utilities.clearCookie("raygun4js-userid")},setVersion:function(a){return t=a,r},saveIfOffline:function(a){return"undefined"!=typeof a&&"boolean"==typeof a&&(K=a),r},filterSensitiveData:function(a){return u=a,r},setFilterScope:function(a){return"customData"!==a&&"all"!==a||(W=a),r},whitelistCrossOriginDomains:function(a){return S=a,r},onBeforeSend:function(a){return v=a,r},onBeforeSendRum:function(a){return w=a,r},groupingKey:function(a){return x=a,r},onBeforeXHR:function(a){return y=a,r},onAfterSend:function(a){return z=a,r},endSession:function(){r.RealUserMonitoring!==c&&X&&X.endSession()},trackEvent:function(a,b){return _!==C.READY?void ba.push({type:a,options:b}):void(r.RealUserMonitoring!==c&&X&&("pageView"===a&&b.path?X.virtualPageLoaded(b.path):"customTimings"===a&&b.timings&&X.sendCustomTimings(b.timings)))},recordBreadcrumb:function(){Y.recordBreadcrumb.apply(Y,arguments)},enableAutoBreadcrumbs:function(a){a?Y["enableAutoBreadcrumbs"+a]():Y.enableAutoBreadcrumbs()},disableAutoBreadcrumbs:function(a){a?Y["disableAutoBreadcrumbs"+a]():Y.disableAutoBreadcrumbs()},setBreadcrumbOption:function(a,b){Y.setOption(a,b)},setBreadcrumbs:function(a){Y=a},getBreadcrumbs:function(){return Y.all()}};return r=r.Utilities.mergeMutate(r,ea),a.__raygunNoConflict||(a.Raygun=r),TraceKit.setRaygun(r),r};window.__instantiatedRaygun=raygunFactory(window,window.jQuery);var raygunRumFactory=function(a,b,c){c.RealUserMonitoring=function(b,c,d,e,f,g,h,i,j,k,l,m,n){function o(a){if(!R.pendingPayloadData||a){var b,c,d=[],e=[],f=!1,g=function(){e.push(q(d)),d=[],f=!1},h=function(){d.length>0&&g(),e.length>0&&(R.sendItemsImmediately(e),d=[],f=!1)};for(c=0;c0&&i&&g(),i&&s(),b.timing.t===T.VirtualPage&&b.timing.pending)return h(),void R.queuedPerformanceTimings.splice(0,c);d.push(b),f=f||b.timing.t===T.Page||b.timing.t===T.VirtualPage}h(),R.queuedPerformanceTimings=[]}}function p(a,b){R.queuedPerformanceTimings=R.queuedPerformanceTimings.concat(a),o(b)}function q(a){return{sessionId:R.sessionId,requestId:R.requestId,timestamp:(new Date).toISOString(),type:"web_request_timing",user:R.user,version:R.version||"Not supplied",device:navigator.userAgent,tags:R.tags,data:a}}function r(a){var b=v(R.cookieName),c=null===b,d="string"==typeof exisitingCookie&&b.length>0&&b.indexOf("timestamp")===-1,e=null;if(!c&&!d){var f=new Date(u(b,"timestamp")),g=new Date(new Date-18e5);e=f0&&(c.b=b+a.domainLookupStart-c.a),a.domainLookupEnd&&a.domainLookupEnd>0&&(c.c=b+a.domainLookupEnd-c.a),a.connectStart&&a.connectStart>0&&(c.d=b+a.connectStart-c.a),a.connectEnd&&a.connectEnd>0&&(c.e=b+a.connectEnd-c.a),a.responseStart&&a.responseStart>0&&(c.f=b+a.responseStart-c.a),a.responseEnd&&a.responseEnd>0&&(c.g=b+a.responseEnd-c.a),a.domLoading&&a.domLoading>0&&(c.h=b+a.domLoading-c.a),a.domInteractive&&a.domInteractive>0&&(c.i=b+a.domInteractive-c.a),a.domContentLoadedEventEnd&&a.domContentLoadedEventEnd>0&&(c.j=b+a.domContentLoadedEventEnd-c.a),a.domComplete&&a.domComplete>0&&(c.k=N(b+a.domComplete-c.a)),a.loadEventStart&&a.loadEventStart>0&&(c.l=b+a.loadEventStart-c.a),a.loadEventEnd&&a.loadEventEnd>0&&(c.m=b+a.loadEventEnd-c.a),a.secureConnectionStart&&a.secureConnectionStart>0&&(c.n=b+(a.secureConnectionStart-a.connectStart)-c.a),c=J(c)}function B(a){return"xmlhttprequest"===a.initiatorType?T.XHR:0===a.duration?T.CachedChildAsset:T.ChildAsset}function C(a,b){var c={du:N(a.duration).toFixed(2),t:B(a),a:b+a.fetchStart};return a.domainLookupStart&&a.domainLookupStart>0&&(c.b=b+a.domainLookupStart-c.a),a.domainLookupEnd&&a.domainLookupEnd>0&&(c.c=b+a.domainLookupEnd-c.a),a.connectStart&&a.connectStart>0&&(c.d=b+a.connectStart-c.a),a.connectEnd&&a.connectEnd>0&&(c.e=b+a.connectEnd-c.a),a.responseStart&&a.responseStart>0&&(c.f=b+a.responseStart-c.a),a.responseEnd&&a.responseEnd>0&&(c.g=b+a.responseEnd-c.a),a.secureConnectionStart&&a.secureConnectionStart>0&&(c.n=b+(a.secureConnectionStart-a.connectStart)-c.a),c.a=c.a.toFixed(2),c=J(c)}function D(){var b=a.location.pathname;R.ignoreUrlCasing&&(b=b.toLowerCase());var c=a.location.protocol+"//"+a.location.host+b;return c.length>800&&(c=c.substring(0,800)),{url:c,userAgent:navigator.userAgent,timing:A(a.performance.timing,0),size:0}}function E(b,c){R.ignoreUrlCasing&&(b=b.toLowerCase()),b.indexOf("?")!==-1&&(b=b.split("?")[0]);var d=a.location.protocol+"//"+a.location.host+b;return d.length>800&&(d=d.substring(0,800)),{url:d,userAgent:navigator.userAgent,timing:x(c),size:0}}function F(b,c){var d=b.name.split("?")[0];return R.ignoreUrlCasing&&(d=d.toLowerCase()),d.length>800&&(d=d.substring(0,800)),{url:d,timing:C(b,c?0:a.performance.timing.navigationStart),size:b.decodedBodySize||0}}function G(a){return 0===a.indexOf(R.apiUrl)||(a.indexOf("favicon.ico")>0||(0===a.indexOf("about:blank")||("j"===a[0]&&1===a.indexOf("avascript:")||(0===a.indexOf("chrome-extension://")||(0===a.indexOf("res://")||0===a.indexOf("file://"))))))}function H(b,c){if(L("getEntries","function"))try{for(var d=a.performance.getEntries(),e=R.offset;ee?f=1:d0&&"/"!==a[0]&&(a+="/"),a.length>800&&(a=a.substring(0,800)),this.virtualPage=a),y(),this.sendPerformance(!1)},this.heartBeat=function(){return null!==R.heartBeatInterval?void O("Raygun4JS: Heartbeat already exists. Skipping heartbeat creation."):void(R.heartBeatInterval=setInterval(function(){R.sendChildAssets(),R.sendQueuedItems()},R.heartBeatIntervalTime))},this.setUser=function(a){R.user=a},this.withTags=function(a){R.tags=a},this.endSession=function(){R.sendItemImmediately({sessionId:R.sessionId,requestId:R.requestId,timestamp:(new Date).toISOString(),type:"session_end"})},this.sendNewSessionStart=function(){R.sendItemImmediately({sessionId:R.sessionId,timestamp:(new Date).toISOString(),type:"session_start",user:R.user,version:R.version||"Not supplied",tags:R.tags,device:navigator.userAgent})},this.sendCustomTimings=function(a){"object"!=typeof a||"number"!=typeof a.custom1&&"number"!=typeof a.custom2&&"number"!=typeof a.custom3&&"number"!=typeof a.custom4&&"number"!=typeof a.custom5&&"number"!=typeof a.custom6&&"number"!=typeof a.custom7&&"number"!=typeof a.custom8&&"number"!=typeof a.custom9&&"number"!=typeof a.custom10||R.pendingPayloadData&&R.queuedPerformanceTimings.length>0&&(R.pendingPayloadData=!1,R.queuedPerformanceTimings[0].customTiming=a,o())},this.sendPerformance=function(a){var b=I(this.virtualPage,a);null===b||b.length<0||p(b,!1)},this.sendChildAssets=function(a){a&&y();var b=[];H(b),p(b,a)},this.sendQueuedItems=function(){if(R.queuedItems.length>0){R.queuedItems=Q(R.queuedItems,"timestamp");var a=R.queuedItems.splice(0,R.maxQueueItemsSent);R.sendItemsImmediately(a)}},this.sendItemImmediately=function(a){var b=[a];R.sendItemsImmediately(b)},this.sendItemsImmediately=function(a){var b={eventData:a},c=function(){O("Raygun4JS: Items sent successfully. Queue length: "+R.queuedItems.length)},d=function(b){R.requeueItemsToFront(a),O("Raygun4JS: Items failed to send. Queue length: "+R.queuedItems.length+" Response status code: "+b.status)};this.postPayload(b,c,d)},this.requeueItemsToFront=function(a){R.queuedItems=a.concat(R.queuedItems)},this.postPayload=function(a,b,c){"function"!=typeof b&&(b=function(){}),"function"!=typeof c&&(c=function(){}),R.makePostCorsRequest(R.apiUrl+"/events?apikey="+encodeURIComponent(R.apiKey),a,b,c)},this.makePostCorsRequest=function(b,c,e,f){if(R.excludedUserAgents instanceof Array)for(var g in R.excludedUserAgents)if(R.excludedUserAgents.hasOwnProperty(g)&&navigator.userAgent.match(R.excludedUserAgents[g]))return void O("Raygun4JS: cancelling send as error originates from an excluded user agent");if(R.excludedHostNames instanceof Array)for(var h in R.excludedHostNames)if(R.excludedHostNames.hasOwnProperty(h)&&a.location.hostname&&a.location.hostname.match(R.excludedHostNames[h]))return void O("Raygun4JS: cancelling send as error originates from an excluded hostname");if(!navigator.userAgent.match("RaygunPulseInsightsCrawler")){var i=R.beforeSend(c);if(!i)return void O("Raygun4JS: cancelling send because onBeforeSendRUM returned falsy value");if(i.eventData)for(var j=0;j=0;--b)n[b]===a&&n.splice(b,1)}function g(a,b){var d=null;if(!b||f.collectWindowErrors){for(var e in n)if(c(n,e))try{n[e].apply(null,[a].concat(h.call(arguments,2)))}catch(g){d=g}if(d)throw d}}function i(a,b,c,d,e){var h=null;if(e)h=f.computeStackTrace(e);else if(p)f.computeStackTrace.augmentStackTraceWithInitialElement(p,b,c,a),h=p,p=null,o=null;else{var i={url:b,line:c,column:d};i.func=f.computeStackTrace.guessFunctionName(i.url,i.line),i.context=f.computeStackTrace.gatherContext(i.url,i.line),h={mode:"onerror",message:a,url:document.location.href,stack:[i],useragent:navigator.userAgent}}return g(h,"from window.onerror"),!!l&&l.apply(this,arguments)}function j(){m!==!0&&(l=a.onerror,a.onerror=i,m=!0)}function k(b){var c;if("undefined"!=typeof document&&(c=h.call(arguments,1)),p){if(o===b)return;var d=p;p=null,o=null,g.apply(null,[d,null].concat(c))}var i=f.computeStackTrace(b);if(p=i,o=b,a.setTimeout(function(){o===b&&(p=null,o=null,g.apply(null,[i,null].concat(c)))},i.incomplete?2e3:0),!e.Utilities.isReactNative())throw b}var l,m,n=[],o=null,p=null;return k.subscribe=b,k.unsubscribe=d,k}(),f.computeStackTrace=function(){function b(a){return"string"!=typeof a?[]:""}function g(d){if(!c(x,d)){var e="";d=d||"";var f;f="undefined"!=typeof document?document.domain:a.location.hostname,d.indexOf&&d.indexOf(f)!==-1&&(e=b(d)),x[d]=e?e.split("\n"):[]}return x[d]}function h(a,b){var c,e=/function ([^(]*)\(([^)]*)\)/,f=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,h="",j=10,k=g(a);if(!k.length)return i;for(var l=0;l0?e:null}function k(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function l(a){return k(a).replace("<","(?:<|<)").replace(">","(?:>|>)").replace("&","(?:&|&)").replace('"','(?:"|")').replace(/\s+/g,"\\s+")}function m(a,b){for(var c,d,e=0,f=b.length;ec&&(d=f.exec(e[c]))?d.index:null}function o(b){for(var c,d,e,f,g=[a.location.href],h=document.getElementsByTagName("script"),i=""+b,j=/^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,n=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,o=0;o|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,f=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,g=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,k=a.stack.split("\n"),l=[],m=/^(.*) is undefined$/.exec(a.message);if(e.Utilities.isReactNative())for(var o=/^(.*@)?.*\/[^\.]+(\.app|CodePush)\/?(.*)/,p="file://reactnative.local/",q=0;q]+)>|([^\)]+))\((.*)\) in (.*):\s*$/i,e=c?c.split("\n"):[],f=[],g=0,i=e.length;g=0&&(t.line=u+k.substring(0,w).split("\n").length)}}else if(e=p.exec(d[f])){var x=a.location.href.replace(/#.*$/,""),y=e[1],z=new RegExp(l(d[f+1]));k=m(z,[x]),t={url:x,line:k?k.line:y,func:""}}if(t){t.func||(t.func=h(t.url,t.line));var A=j(t.url,t.line),B=A?A[Math.floor(A.length/2)]:null;A&&B.replace(/^\s*/,"")===d[f+1].replace(/^\s*/,"")?t.context=A:t.context=[d[f+1]],q.push(t)}}return q.length?{mode:"multiline",name:b.name,message:d[0],url:document.location.href,stack:q,useragent:navigator.userAgent}:null}function s(a,b,c,d){var e={url:b,line:c};if(e.url&&e.line){a.incomplete=!1,e.func||(e.func=h(e.url,e.line)),e.context||(e.context=j(e.url,e.line));var f=/ '([^']+)' /.exec(d);if(f&&(e.column=n(f[1],e.url,e.line)),a.stack.length>0&&a.stack[0].url===e.url){if(a.stack[0].line===e.line)return!1;if(!a.stack[0].line&&a.stack[0].func===e.func)return a.stack[0].line=e.line,a.stack[0].context=e.context,!1}return a.stack.unshift(e),a.partial=!0,!0}return a.incomplete=!0,!1}function t(a,b){for(var c,d,e,g=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,j=[],k={},l=!1,m=t.caller;m&&!l;m=m.caller)if(m!==u&&m!==f.report){if(d={url:null,func:i,line:null,column:null},m.name?d.func=m.name:(c=g.exec(m.toString()))&&(d.func=c[1]),"undefined"==typeof d.func)try{d.func=c.input.substring(0,c.input.indexOf("{"))}catch(p){}if(e=o(m)){d.url=e.url,d.line=e.line,d.func===i&&(d.func=h(d.url,d.line));var q=/ '([^']+)' /.exec(a.message||a.description);q&&(d.column=n(q[1],e.url,e.line))}k[""+m]?l=!0:k[""+m]=!0,j.push(d)}b&&j.splice(0,b);var r={mode:"callers",name:a.name,message:a.message,url:document.location.href,stack:j,useragent:navigator.userAgent};return s(r,a.sourceURL||a.fileName,a.line||a.lineNumber,a.message||a.description),r}function u(a,b){var c=null;b=null==b?0:+b;try{if(c=q(a))return c}catch(d){if(w)throw d}try{if(c=p(a))return c}catch(d){if(w)throw d}try{if(c=r(a))return c}catch(d){if(w)throw d}try{if(c=t(a,b+1))return c}catch(d){if(w)throw d}return{tracekitResult:"failedToComputeAnyStackTrace"}}function v(a){a=(null==a?0:+a)+1;try{throw new Error}catch(b){return u(b,a+1)}}var w=!1,x={};return u.augmentStackTraceWithInitialElement=s,u.guessFunctionName=h,u.gatherContext=j,u.ofCaller=v,u}(),f.extendToAsynchronousCallbacks=function(){var b=function(b){var c=a[b];a[b]=function(){var a=h.call(arguments),b=a[0];return"function"==typeof b&&(a[0]=f.wrap(b)),c.apply?c.apply(this,a):c(a[0],a[1])}};b("setTimeout"),b("setInterval")},f.remoteFetching||(f.remoteFetching=!0),f.collectWindowErrors||(f.collectWindowErrors=!0),(!f.linesOfContext||f.linesOfContext<1)&&(f.linesOfContext=11),a.TraceKit=f}(window),function(a,b){"use strict";if(a&&a.event&&a.event.add){var c=a.event.add;a.event.add=function(d,e,f,g,h){if("function"!=typeof f&&"function"!=typeof f.handler)return c.call(this,d,e,f,g,h);var i;return f.handler?(i=f.handler,f.handler=b.wrap(f.handler)):(i=f,f=b.wrap(f)),i.guid?f.guid=i.guid:f.guid=i.guid=a.guid++,c.call(this,d,e,f,g,h)};var d=a.fn.ready;a.fn.ready=function(a){return d.call(this,b.wrap(a))};var e=a.ajax;a.ajax=function(c,d){"object"==typeof c&&(d=c,c=void 0),d=d||{};for(var f,g=["complete","error","success"];f=g.pop();)a.isFunction(d[f])&&(d[f]=b.wrap(d[f]));try{return c?e.call(this,c,d):e.call(this,d)}catch(h){throw b.report(h),h}}}}(window.jQuery,window.TraceKit),Date.prototype.toISOString||!function(){function a(a){var b=String(a);return 1===b.length&&(b="0"+b),b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}(),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;var f=0|b;if(f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);c>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(b=arguments[1]),c=new Array(f),d=0;d>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(b=arguments[1]),c=0;c3?"/":"")+c.slice(3,c.length).join("/").split("?")[0].split("#")[0];var h=f.pathname;"/"===h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));var i=f.hostname,j=i.split("."),k=h.split("/");if("hostname"===b)return i;if("domain"===b)return/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/.test(i)?i:j.slice(-2).join(".");if("sub"===b)return j.slice(0,j.length-2).join(".");if("port"===b)return f.port;if("protocol"===b)return f.protocol.split(":")[0];if("auth"===b)return f.auth;if("user"===b)return f.auth.split(":")[0];if("pass"===b)return f.auth.split(":")[1]||"";if("path"===b)return f.pathname;if("."===b.charAt(0)){if(b=b.substring(1),d(b))return b=parseInt(b,10),j[b<0?j.length+b:b-1]||""}else{if(d(b))return b=parseInt(b,10),k[b<0?k.length+b:b]||"";if("file"===b)return k.slice(-1)[0];if("filename"===b)return k.slice(-1)[0].split(".")[0];if("fileext"===b)return k.slice(-1)[0].split(".")[1]||"";if("?"===b.charAt(0)||"#"===b.charAt(0)){var l=e,m=null;if("?"===b.charAt(0)?l=(l.split("?")[1]||"").split("#")[0]:"#"===b.charAt(0)&&(l=l.split("#")[1]||""),!b.charAt(1))return l;b=b.substring(1),l=l.split("&");for(var n=0,o=l.length;nb?a.slice(0,b-c.length)+c:a}};return d.isReactNative()&&__DEV__!==!0&&a.ErrorUtils&&a.ErrorUtils.getGlobalHandler&&(c=a.ErrorUtils.getGlobalHandler()),d},window.raygunBreadcrumbsFactory=function(a,b){function c(a,b){for(var c=0;c-1)return!0;if("object"==typeof d&&d.exec(a))return!0}return!1}var d=function(){this.MAX_BREADCRUMBS=32,this.MAX_MESSAGE_SIZE=1024,this.BREADCRUMB_LEVELS=["debug","info","warning","error"],this.DEFAULT_BREADCRUMB_LEVEL="info",this.DEFAULT_XHR_IGNORED_HOSTS=["raygun"],this.breadcrumbLevel="info",this.logXhrContents=!1,this.xhrIgnoredHosts=[].concat(this.DEFAULT_XHR_IGNORED_HOSTS),this.breadcrumbs=[],this.wrapWithHandler=function(a){return function(){try{return a.apply(this,arguments)}catch(c){b.Utilities.log(c)}}},this.disableConsoleFunctions=[],this.disableNavigationFunctions=[],this.disableXHRLogging=function(){},this.disableClicksTracking=function(){},this.enableAutoBreadcrumbs(),this.wrapPrototypeWithHandlers()};return d.prototype.recordBreadcrumb=function(a,c){var d={level:this.DEFAULT_BREADCRUMB_LEVEL,timestamp:(new Date).getTime(),type:"manual"};switch(typeof a){case"object":d=b.Utilities.merge(d,a);break;case"string":d=b.Utilities.merge(b.Utilities.merge(d,{message:a,metadata:c}));break;default:return void b.Utilities.log("expected first argument to recordBreadcrumb to be a 'string' or 'object', got "+typeof a)}this.BREADCRUMB_LEVELS.indexOf(d.level)===-1&&(b.Utilities.log("unknown breadcrumb level "+d.level+" setting to default of '"+this.DEFAULT_BREADCRUMB_LEVEL+"'"),d.level=this.DEFAULT_BREADCRUMB_LEVEL),this.shouldRecord(d)&&(d.message=b.Utilities.truncate(d.message,this.MAX_MESSAGE_SIZE),this.breadcrumbs.push(d),this.breadcrumbs=this.breadcrumbs.slice(-this.MAX_BREADCRUMBS))},d.prototype.shouldRecord=function(a){var b=this.BREADCRUMB_LEVELS.indexOf(a.level),c=this.BREADCRUMB_LEVELS.indexOf(this.breadcrumbLevel);return b>=c},d.prototype.setBreadcrumbLevel=function(a){return this.BREADCRUMB_LEVELS.indexOf(a)===-1?void b.Utilities.log("Breadcrumb level of '"+a+"' is invalid, setting to default of '"+this.DEFAULT_BREADCRUMB_LEVEL+"'"):void(this.breadcrumbLevel=a)},d.prototype.setOption=function(a,b){if("breadcrumbsLevel"===a)this.setBreadcrumbLevel(b);else if("xhrIgnoredHosts"===a){this.xhrIgnoredHosts=b.concat(this.DEFAULT_XHR_IGNORED_HOSTS);var d=this;this.removeBreadcrumbsWithPredicate(function(a){return"request"===a.type&&c(a.metadata.requestURL||a.metadata.responseURL,d.xhrIgnoredHosts)})}else"logXhrContents"===a&&(this.logXhrContents=b)},d.prototype.any=function(){return this.breadcrumbs.length>0},d.prototype.all=function(){for(var a=[],b=0;b-1&&(m=!0);if(!m)return void r.Utilities.log("Raygun4JS: cancelling send due to error on non-origin, non-whitelisted domain")}}if(U instanceof Array)for(var p in U)if(U.hasOwnProperty(p)&&a.location.hostname&&a.location.hostname.match(U[p]))return void r.Utilities.log("Raygun4JS: cancelling send as error originates from an excluded hostname");if(V instanceof Array&&!r.Utilities.isReactNative())for(var q in V)if(V.hasOwnProperty(q)&&navigator.userAgent.match(V[q]))return void r.Utilities.log("Raygun4JS: cancelling send as error originates from an excluded user agent");if(r.Utilities.isReactNative()||!navigator.userAgent.match("RaygunPulseInsightsCrawler")){b.stack&&b.stack.length&&r.Utilities.forEach(b.stack,function(a,b){g.push({LineNumber:b.line,ColumnNumber:b.column,ClassName:"line "+b.line+", column "+b.column,FileName:b.url,MethodName:b.func||"[anonymous]"})});var u=r.Utilities.parseUrl("?");u.length>0&&r.Utilities.forEach(u.split("&"),function(a,b){var c=b.split("=");if(c&&2===c.length){var d=decodeURIComponent(c[0]),e=k(d,c[1]);h[d]=e}}),d===c&&(d={}),r.Utilities.isEmpty(d.customData)&&("function"==typeof Q?d.customData=Q():d.customData=Q),r.Utilities.isEmpty(d.tags)&&("function"==typeof R?d.tags=R():"string"==typeof R?d.tags=[R]:d.tags=R),e||(d.tags||(d.tags=[]),r.Utilities.contains(d.tags,"UnhandledException")||d.tags.push("UnhandledException")),r.Utilities.isReactNative()&&!r.Utilities.contains(d.tags,"React Native")&&d.tags.push("React Native");var w,y=a.screen||{width:r.Utilities.getViewPort().width,height:r.Utilities.getViewPort().height,colorDepth:8},z=d.customData&&d.customData.ajaxErrorMessage;w="customData"===W?l(d.customData,"UserCustomData"):d.customData;try{JSON.stringify(w)}catch(A){var B="Cannot add custom data; may contain circular reference";w={error:B},r.Utilities.log("Raygun4JS: "+B)}var D=f;z?D=z:b.message?D=b.message:d&&d.status&&(D=d.status),"undefined"==typeof D&&(D=f),D&&"string"==typeof D&&(D=D.substring(0,512));var E;E=r.Utilities.isReactNative()?"/":[location.protocol,"//",location.host,location.pathname,location.hash].join("");var F={OccurredOn:new Date,Details:{Error:{ClassName:b.name,Message:D,StackTrace:g,StackString:b.stackstring},Environment:{UtcOffset:(new Date).getTimezoneOffset()/-60,"User-Language":navigator.userLanguage,"Document-Mode":r.Utilities.isReactNative()?"Not available":document.documentMode,"Browser-Width":r.Utilities.getViewPort().width,"Browser-Height":r.Utilities.getViewPort().height,"Screen-Width":y.width,"Screen-Height":y.height,"Color-Depth":y.colorDepth,Browser:navigator.appCodeName,"Browser-Name":navigator.appName,"Browser-Version":navigator.appVersion,Platform:navigator.platform},Client:{Name:"raygun-js",Version:"2.9.4"},UserCustomData:w,Tags:d.tags,Request:{Url:E,QueryString:h,Headers:{"User-Agent":navigator.userAgent,Referer:r.Utilities.isReactNative()?"Not available":document.referrer,Host:r.Utilities.isReactNative()?"Not available":document.domain}},Version:t||"Not supplied"}};if(F.Details.User=s,Y.any()){F.Details.Breadcrumbs=[];var G=Y.all()||[];G.forEach(function(a){a.metadata&&(a.CustomData=a.metadata,delete a.metadata),F.Details.Breadcrumbs.push(a)})}if("all"===W&&(F=l(F)),"function"==typeof x&&(r.Utilities.log("Raygun4JS: calling custom grouping key"),F.Details.GroupingKey=x(F,b,d)),"function"==typeof v){var H=v(F);H&&o(H)}else o(F)}}function o(a){if(r.Utilities.isApiKeyConfigured()){r.Utilities.log("Sending exception data to Raygun:",a);var b=T+"/entries?apikey="+encodeURIComponent(r.Options._raygunApiKey); +q(b,JSON.stringify(a))}}function p(b,c){var d;return d=new a.XMLHttpRequest,"withCredentials"in d||r.Utilities.isReactNative()?d.open(b,c,!0):a.XDomainRequest&&(H&&(c=c.slice(6)),d=new a.XDomainRequest,d.open(b,c)),d.timeout=1e4,d}function q(b,c,e,f){var g=p("POST",b,c);return"function"==typeof y&&y(g),r.Utilities.log("Is offline enabled? "+K),"withCredentials"in g||r.Utilities.isReactNative()?(g.onreadystatechange=function(){4===g.readyState&&(202===g.status?j():K&&403!==g.status&&400!==g.status&&429!==g.status&&i(b,c))},g.onload=function(){r.Utilities.log("posted to Raygun"),d(this),e&&"function"==typeof e&&e(g,b,c)}):a.XDomainRequest&&(g.ontimeout=function(){K&&(r.Utilities.log("Raygun: saved locally"),i(b,c))},g.onload=function(){r.Utilities.log("posted to Raygun"),j(),d(this),e&&"function"==typeof e&&e(g,b,c)}),g.onerror=function(){r.Utilities.log("failed to post to Raygun"),d(this),f&&"function"==typeof f&&f(g,b,c)},g?(r.Utilities.isReactNative()&&g.setRequestHeader("Content-type","application/json;charset=UTF-8"),void g.send(c)):void r.Utilities.log("CORS not supported")}var r={};r.Utilities=raygunUtilityFactory(a,r),r.Breadcrumbs=raygunBreadcrumbsFactory(a,r);var s,t,u,v,w,x,y,z,A,B,C={LOADING:0,READY:1},D="raygun4js-userid",E=TraceKit,F=a.Raygun,G=!1,H=!1,I=!1,J=!1,K=!1,L=!1,M=!1,N=!1,O=!0,P=!1,Q={},R=[],S=[],T="https://api.raygun.io",U=null,V=null,W="customData",X=null,Y=new r.Breadcrumbs,Z=null,$=!0,_=C.LOADING,aa=[],ba=[],ca=null,da=Math.random(),ea={Rand:da,Options:{},noConflict:function(){return F&&(a.Raygun=F),r},constructNewRaygun:function(){var b=raygunFactory(a,a.jQuery);return b},init:function(a,d,f){return E.remoteFetching=!1,this.Options._raygunApiKey=a,f&&(Q=f),b&&(B=b(document)),d&&(H=d.allowInsecureSubmissions||!1,I=d.ignoreAjaxAbort||!1,J=d.ignoreAjaxError||!1,M=d.disableAnonymousUserTracking||!1,N=d.disableErrorTracking||!1,O=d.disablePulse===c||d.disablePulse,U=d.excludedHostnames||!1,V=d.excludedUserAgents||!1,Z=d.pulseMaxVirtualPageDuration||null,$=d.pulseIgnoreUrlCasing||!1,ca=d.pulseCustomLoadTimeEnabled||!1,d.apiUrl&&(T=d.apiUrl),"undefined"!=typeof d.wrapAsynchronousCallbacks&&(P=d.wrapAsynchronousCallbacks),d.debugMode&&(G=d.debugMode),this.Options._debugMode=G,d.ignore3rdPartyErrors&&(L=!0),d.apiEndpoint&&(T=d.apiEndpoint),d.from&&(A=d.from)),e(),r},withCustomData:function(a){return Q=a,r},withTags:function(a){return R=a,X!==c&&null!==X&&X.withTags(a),r},attach:function(){return!r.Utilities.isApiKeyConfigured()||N?r:(a.RaygunObject&&a[a.RaygunObject]&&a[a.RaygunObject].q&&(a.onerror=null),r.Utilities.isReactNative()&&__DEV__!==!0&&a.ErrorUtils&&a.ErrorUtils.setGlobalHandler&&a.ErrorUtils.setGlobalHandler(function(a,b){var c=z;z=function(){"function"==typeof c&&c(),r.Utilities.defaultReactNativeGlobalHandler(a,b),z=c},TraceKit.report(a)}),E.report.subscribe(n),P&&E.extendToAsynchronousCallbacks(),B&&B.ajaxError&&!J&&B.ajaxError(m),r)},detach:function(){return E.report.unsubscribe(n),B&&B.unbind("ajaxError",m),r},send:function(a,b,c){if(N)return r.Utilities.log("Error not sent due to disabled error tracking"),r;try{n(E.computeStackTrace(a),{customData:"function"==typeof Q?r.Utilities.merge(Q(),b):r.Utilities.merge(Q,b),tags:"function"==typeof R?r.Utilities.mergeArray(R(),c):r.Utilities.mergeArray(R,c)},!0)}catch(d){if(a!==d)throw d}return r},setUser:function(a,b,d,e,f,g){return s={Identifier:a},"boolean"==typeof b&&(s.IsAnonymous=b),d&&(s.Email=d),e&&(s.FullName=e),f&&(s.FirstName=f),g&&(s.UUID=g),X!==c&&null!==X&&X.setUser(s),r},resetAnonymousUser:function(){r.Utilities.clearCookie("raygun4js-userid")},setVersion:function(a){return t=a,r},saveIfOffline:function(a){return"undefined"!=typeof a&&"boolean"==typeof a&&(K=a),r},filterSensitiveData:function(a){return u=a,r},setFilterScope:function(a){return"customData"!==a&&"all"!==a||(W=a),r},whitelistCrossOriginDomains:function(a){return S=a,r},onBeforeSend:function(a){return v=a,r},onBeforeSendRum:function(a){return w=a,r},groupingKey:function(a){return x=a,r},onBeforeXHR:function(a){return y=a,r},onAfterSend:function(a){return z=a,r},endSession:function(){r.RealUserMonitoring!==c&&X&&X.endSession()},trackEvent:function(a,b){return _!==C.READY?void ba.push({type:a,options:b}):void(r.RealUserMonitoring!==c&&X&&("pageView"===a&&b.path?X.virtualPageLoaded(b.path):"customTimings"===a&&b.timings&&X.sendCustomTimings(b.timings)))},recordBreadcrumb:function(){Y.recordBreadcrumb.apply(Y,arguments)},enableAutoBreadcrumbs:function(a){a?Y["enableAutoBreadcrumbs"+a]():Y.enableAutoBreadcrumbs()},disableAutoBreadcrumbs:function(a){a?Y["disableAutoBreadcrumbs"+a]():Y.disableAutoBreadcrumbs()},setBreadcrumbOption:function(a,b){Y.setOption(a,b)},setBreadcrumbs:function(a){Y=a},getBreadcrumbs:function(){return Y.all()}};return r=r.Utilities.mergeMutate(r,ea),a.__raygunNoConflict||(a.Raygun=r),TraceKit.setRaygun(r),r};window.__instantiatedRaygun=raygunFactory(window,window.jQuery);var raygunRumFactory=function(a,b,c){c.RealUserMonitoring=function(b,c,d,e,f,g,h,i,j,k,l,m,n){function o(a){if(!R.pendingPayloadData||a){var b,c,d=[],e=[],f=!1,g=function(){e.push(q(d)),d=[],f=!1},h=function(){d.length>0&&g(),e.length>0&&(R.sendItemsImmediately(e),d=[],f=!1)};for(c=0;c0&&i&&g(),i&&s(),b.timing.t===T.VirtualPage&&b.timing.pending)return h(),void R.queuedPerformanceTimings.splice(0,c);d.push(b),f=f||b.timing.t===T.Page||b.timing.t===T.VirtualPage}h(),R.queuedPerformanceTimings=[]}}function p(a,b){R.queuedPerformanceTimings=R.queuedPerformanceTimings.concat(a),o(b)}function q(a){return{sessionId:R.sessionId,requestId:R.requestId,timestamp:(new Date).toISOString(),type:"web_request_timing",user:R.user,version:R.version||"Not supplied",device:navigator.userAgent,tags:R.tags,data:a}}function r(a){var b=v(R.cookieName),c=null===b,d="string"==typeof exisitingCookie&&b.length>0&&b.indexOf("timestamp")===-1,e=null;if(!c&&!d){var f=new Date(u(b,"timestamp")),g=new Date(new Date-18e5);e=f0&&(c.b=b+a.domainLookupStart-c.a),a.domainLookupEnd&&a.domainLookupEnd>0&&(c.c=b+a.domainLookupEnd-c.a),a.connectStart&&a.connectStart>0&&(c.d=b+a.connectStart-c.a),a.connectEnd&&a.connectEnd>0&&(c.e=b+a.connectEnd-c.a),a.responseStart&&a.responseStart>0&&(c.f=b+a.responseStart-c.a),a.responseEnd&&a.responseEnd>0&&(c.g=b+a.responseEnd-c.a),a.domLoading&&a.domLoading>0&&(c.h=b+a.domLoading-c.a),a.domInteractive&&a.domInteractive>0&&(c.i=b+a.domInteractive-c.a),a.domContentLoadedEventEnd&&a.domContentLoadedEventEnd>0&&(c.j=b+a.domContentLoadedEventEnd-c.a),a.domComplete&&a.domComplete>0&&(c.k=N(b+a.domComplete-c.a)),a.loadEventStart&&a.loadEventStart>0&&(c.l=b+a.loadEventStart-c.a),a.loadEventEnd&&a.loadEventEnd>0&&(c.m=b+a.loadEventEnd-c.a),a.secureConnectionStart&&a.secureConnectionStart>0&&(c.n=b+(a.secureConnectionStart-a.connectStart)-c.a),c=J(c)}function B(a){return"xmlhttprequest"===a.initiatorType?T.XHR:0===a.duration?T.CachedChildAsset:T.ChildAsset}function C(a,b){var c={du:N(a.duration).toFixed(2),t:B(a),a:b+a.fetchStart};return a.domainLookupStart&&a.domainLookupStart>0&&(c.b=b+a.domainLookupStart-c.a),a.domainLookupEnd&&a.domainLookupEnd>0&&(c.c=b+a.domainLookupEnd-c.a),a.connectStart&&a.connectStart>0&&(c.d=b+a.connectStart-c.a),a.connectEnd&&a.connectEnd>0&&(c.e=b+a.connectEnd-c.a),a.responseStart&&a.responseStart>0&&(c.f=b+a.responseStart-c.a),a.responseEnd&&a.responseEnd>0&&(c.g=b+a.responseEnd-c.a),a.secureConnectionStart&&a.secureConnectionStart>0&&(c.n=b+(a.secureConnectionStart-a.connectStart)-c.a),c.a=c.a.toFixed(2),c=J(c)}function D(){var b=a.location.pathname;R.ignoreUrlCasing&&(b=b.toLowerCase());var c=a.location.protocol+"//"+a.location.host+b;return c.length>800&&(c=c.substring(0,800)),{url:c,userAgent:navigator.userAgent,timing:A(a.performance.timing,0),size:0}}function E(b,c){R.ignoreUrlCasing&&(b=b.toLowerCase()),b.indexOf("?")!==-1&&(b=b.split("?")[0]);var d=a.location.protocol+"//"+a.location.host+b;return d.length>800&&(d=d.substring(0,800)),{url:d,userAgent:navigator.userAgent,timing:x(c),size:0}}function F(b,c){var d=b.name.split("?")[0];return R.ignoreUrlCasing&&(d=d.toLowerCase()),d.length>800&&(d=d.substring(0,800)),{url:d,timing:C(b,c?0:a.performance.timing.navigationStart),size:b.decodedBodySize||0}}function G(a){return 0===a.indexOf(R.apiUrl)||(a.indexOf("favicon.ico")>0||(0===a.indexOf("about:blank")||("j"===a[0]&&1===a.indexOf("avascript:")||(0===a.indexOf("chrome-extension://")||(0===a.indexOf("res://")||0===a.indexOf("file://"))))))}function H(b,c){if(L("getEntries","function"))try{for(var d=a.performance.getEntries(),e=R.offset;ee?f=1:d0&&"/"!==a[0]&&(a+="/"),a.length>800&&(a=a.substring(0,800)),this.virtualPage=a),y(),this.sendPerformance(!1)},this.heartBeat=function(){return null!==R.heartBeatInterval?void O("Raygun4JS: Heartbeat already exists. Skipping heartbeat creation."):void(R.heartBeatInterval=setInterval(function(){R.sendChildAssets(),R.sendQueuedItems()},R.heartBeatIntervalTime))},this.setUser=function(a){R.user=a},this.withTags=function(a){R.tags=a},this.endSession=function(){R.sendItemImmediately({sessionId:R.sessionId,requestId:R.requestId,timestamp:(new Date).toISOString(),type:"session_end"})},this.sendNewSessionStart=function(){R.sendItemImmediately({sessionId:R.sessionId,timestamp:(new Date).toISOString(),type:"session_start",user:R.user,version:R.version||"Not supplied",tags:R.tags,device:navigator.userAgent})},this.sendCustomTimings=function(a){"object"!=typeof a||"number"!=typeof a.custom1&&"number"!=typeof a.custom2&&"number"!=typeof a.custom3&&"number"!=typeof a.custom4&&"number"!=typeof a.custom5&&"number"!=typeof a.custom6&&"number"!=typeof a.custom7&&"number"!=typeof a.custom8&&"number"!=typeof a.custom9&&"number"!=typeof a.custom10||R.pendingPayloadData&&R.queuedPerformanceTimings.length>0&&(R.pendingPayloadData=!1,R.queuedPerformanceTimings[0].customTiming=a,o())},this.sendPerformance=function(a){var b=I(this.virtualPage,a);null===b||b.length<0||p(b,!1)},this.sendChildAssets=function(a){a&&y();var b=[];H(b),p(b,a)},this.sendQueuedItems=function(){if(R.queuedItems.length>0){R.queuedItems=Q(R.queuedItems,"timestamp");var a=R.queuedItems.splice(0,R.maxQueueItemsSent);R.sendItemsImmediately(a)}},this.sendItemImmediately=function(a){var b=[a];R.sendItemsImmediately(b)},this.sendItemsImmediately=function(a){var b={eventData:a},c=function(){O("Raygun4JS: Items sent successfully. Queue length: "+R.queuedItems.length)},d=function(b){R.requeueItemsToFront(a),O("Raygun4JS: Items failed to send. Queue length: "+R.queuedItems.length+" Response status code: "+b.status)};this.postPayload(b,c,d)},this.requeueItemsToFront=function(a){R.queuedItems=a.concat(R.queuedItems)},this.postPayload=function(a,b,c){"function"!=typeof b&&(b=function(){}),"function"!=typeof c&&(c=function(){}),R.makePostCorsRequest(R.apiUrl+"/events?apikey="+encodeURIComponent(R.apiKey),a,b,c)},this.makePostCorsRequest=function(b,c,e,f){if(R.excludedUserAgents instanceof Array)for(var g in R.excludedUserAgents)if(R.excludedUserAgents.hasOwnProperty(g)&&navigator.userAgent.match(R.excludedUserAgents[g]))return void O("Raygun4JS: cancelling send as error originates from an excluded user agent");if(R.excludedHostNames instanceof Array)for(var h in R.excludedHostNames)if(R.excludedHostNames.hasOwnProperty(h)&&a.location.hostname&&a.location.hostname.match(R.excludedHostNames[h]))return void O("Raygun4JS: cancelling send as error originates from an excluded hostname");if(!navigator.userAgent.match("RaygunPulseInsightsCrawler")){var i=R.beforeSend(c);if(!i)return void O("Raygun4JS: cancelling send because onBeforeSendRUM returned falsy value");if(i.eventData)for(var j=0;j=0;--b)n[b]===a&&n.splice(b,1)}function g(a,b){var d=null;if(!b||f.collectWindowErrors){for(var e in n)if(c(n,e))try{n[e].apply(null,[a].concat(h.call(arguments,2)))}catch(g){d=g}if(d)throw d}}function i(a,b,c,d,e){var h=null;if(e)h=f.computeStackTrace(e);else if(p)f.computeStackTrace.augmentStackTraceWithInitialElement(p,b,c,a),h=p,p=null,o=null;else{var i={url:b,line:c,column:d};i.func=f.computeStackTrace.guessFunctionName(i.url,i.line),i.context=f.computeStackTrace.gatherContext(i.url,i.line),h={mode:"onerror",message:a,url:document.location.href,stack:[i],useragent:navigator.userAgent}}return g(h,"from window.onerror"),!!l&&l.apply(this,arguments)}function j(){m!==!0&&(l=a.onerror,a.onerror=i,m=!0)}function k(b){var c;if("undefined"!=typeof document&&(c=h.call(arguments,1)),p){if(o===b)return;var d=p;p=null,o=null,g.apply(null,[d,null].concat(c))}var i=f.computeStackTrace(b);if(p=i,o=b,a.setTimeout(function(){o===b&&(p=null,o=null,g.apply(null,[i,null].concat(c)))},i.incomplete?2e3:0),!e.Utilities.isReactNative())throw b}var l,m,n=[],o=null,p=null;return k.subscribe=b,k.unsubscribe=d,k}(),f.computeStackTrace=function(){function b(a){return"string"!=typeof a?[]:""}function g(d){if(!c(x,d)){var e="";d=d||"";var f;f="undefined"!=typeof document?document.domain:a.location.hostname,d.indexOf&&d.indexOf(f)!==-1&&(e=b(d)),x[d]=e?e.split("\n"):[]}return x[d]}function h(a,b){var c,e=/function ([^(]*)\(([^)]*)\)/,f=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,h="",j=10,k=g(a);if(!k.length)return i;for(var l=0;l0?e:null}function k(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function l(a){return k(a).replace("<","(?:<|<)").replace(">","(?:>|>)").replace("&","(?:&|&)").replace('"','(?:"|")').replace(/\s+/g,"\\s+")}function m(a,b){for(var c,d,e=0,f=b.length;ec&&(d=f.exec(e[c]))?d.index:null}function o(b){for(var c,d,e,f,g=[a.location.href],h=document.getElementsByTagName("script"),i=""+b,j=/^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,n=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,o=0;o|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,f=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,g=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,k=a.stack.split("\n"),l=[],m=/^(.*) is undefined$/.exec(a.message);if(e.Utilities.isReactNative())for(var o=/^(.*@)?.*\/[^\.]+(\.app|CodePush)\/?(.*)/,p="file://reactnative.local/",q=0;q]+)>|([^\)]+))\((.*)\) in (.*):\s*$/i,e=c?c.split("\n"):[],f=[],g=0,i=e.length;g=0&&(t.line=u+k.substring(0,w).split("\n").length)}}else if(e=p.exec(d[f])){var x=a.location.href.replace(/#.*$/,""),y=e[1],z=new RegExp(l(d[f+1]));k=m(z,[x]),t={url:x,line:k?k.line:y,func:""}}if(t){t.func||(t.func=h(t.url,t.line));var A=j(t.url,t.line),B=A?A[Math.floor(A.length/2)]:null;A&&B.replace(/^\s*/,"")===d[f+1].replace(/^\s*/,"")?t.context=A:t.context=[d[f+1]],q.push(t)}}return q.length?{mode:"multiline",name:b.name,message:d[0],url:document.location.href,stack:q,useragent:navigator.userAgent}:null}function s(a,b,c,d){var e={url:b,line:c};if(e.url&&e.line){a.incomplete=!1,e.func||(e.func=h(e.url,e.line)),e.context||(e.context=j(e.url,e.line));var f=/ '([^']+)' /.exec(d);if(f&&(e.column=n(f[1],e.url,e.line)),a.stack.length>0&&a.stack[0].url===e.url){if(a.stack[0].line===e.line)return!1;if(!a.stack[0].line&&a.stack[0].func===e.func)return a.stack[0].line=e.line,a.stack[0].context=e.context,!1}return a.stack.unshift(e),a.partial=!0,!0}return a.incomplete=!0,!1}function t(a,b){for(var c,d,e,g=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,j=[],k={},l=!1,m=t.caller;m&&!l;m=m.caller)if(m!==u&&m!==f.report){if(d={url:null,func:i,line:null,column:null},m.name?d.func=m.name:(c=g.exec(m.toString()))&&(d.func=c[1]),"undefined"==typeof d.func)try{d.func=c.input.substring(0,c.input.indexOf("{"))}catch(p){}if(e=o(m)){d.url=e.url,d.line=e.line,d.func===i&&(d.func=h(d.url,d.line));var q=/ '([^']+)' /.exec(a.message||a.description);q&&(d.column=n(q[1],e.url,e.line))}k[""+m]?l=!0:k[""+m]=!0,j.push(d)}b&&j.splice(0,b);var r={mode:"callers",name:a.name,message:a.message,url:document.location.href,stack:j,useragent:navigator.userAgent};return s(r,a.sourceURL||a.fileName,a.line||a.lineNumber,a.message||a.description),r}function u(a,b){var c=null;b=null==b?0:+b;try{if(c=q(a))return c}catch(d){if(w)throw d}try{if(c=p(a))return c}catch(d){if(w)throw d}try{if(c=r(a))return c}catch(d){if(w)throw d}try{if(c=t(a,b+1))return c}catch(d){if(w)throw d}return{tracekitResult:"failedToComputeAnyStackTrace"}}function v(a){a=(null==a?0:+a)+1;try{throw new Error}catch(b){return u(b,a+1)}}var w=!1,x={};return u.augmentStackTraceWithInitialElement=s,u.guessFunctionName=h,u.gatherContext=j,u.ofCaller=v,u}(),f.extendToAsynchronousCallbacks=function(){var b=function(b){var c=a[b];a[b]=function(){var a=h.call(arguments),b=a[0];return"function"==typeof b&&(a[0]=f.wrap(b)),c.apply?c.apply(this,a):c(a[0],a[1])}};b("setTimeout"),b("setInterval")},f.remoteFetching||(f.remoteFetching=!0),f.collectWindowErrors||(f.collectWindowErrors=!0),(!f.linesOfContext||f.linesOfContext<1)&&(f.linesOfContext=11),a.TraceKit=f}(window),Date.prototype.toISOString||!function(){function a(a){var b=String(a);return 1===b.length&&(b="0"+b),b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}(),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;var f=0|b;if(f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);c>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(b=arguments[1]),c=new Array(f),d=0;d>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(b=arguments[1]),c=0;c3?"/":"")+c.slice(3,c.length).join("/").split("?")[0].split("#")[0];var h=f.pathname;"/"===h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));var i=f.hostname,j=i.split("."),k=h.split("/");if("hostname"===b)return i;if("domain"===b)return/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/.test(i)?i:j.slice(-2).join(".");if("sub"===b)return j.slice(0,j.length-2).join(".");if("port"===b)return f.port;if("protocol"===b)return f.protocol.split(":")[0];if("auth"===b)return f.auth;if("user"===b)return f.auth.split(":")[0];if("pass"===b)return f.auth.split(":")[1]||"";if("path"===b)return f.pathname;if("."===b.charAt(0)){if(b=b.substring(1),d(b))return b=parseInt(b,10),j[b<0?j.length+b:b-1]||""}else{if(d(b))return b=parseInt(b,10),k[b<0?k.length+b:b]||"";if("file"===b)return k.slice(-1)[0];if("filename"===b)return k.slice(-1)[0].split(".")[0];if("fileext"===b)return k.slice(-1)[0].split(".")[1]||"";if("?"===b.charAt(0)||"#"===b.charAt(0)){var l=e,m=null;if("?"===b.charAt(0)?l=(l.split("?")[1]||"").split("#")[0]:"#"===b.charAt(0)&&(l=l.split("#")[1]||""),!b.charAt(1))return l;b=b.substring(1),l=l.split("&");for(var n=0,o=l.length;nb?a.slice(0,b-c.length)+c:a}};return d.isReactNative()&&__DEV__!==!0&&a.ErrorUtils&&a.ErrorUtils.getGlobalHandler&&(c=a.ErrorUtils.getGlobalHandler()),d},window.raygunBreadcrumbsFactory=function(a,b){function c(a,b){for(var c=0;c-1)return!0;if("object"==typeof d&&d.exec(a))return!0}return!1}var d=function(){this.MAX_BREADCRUMBS=32,this.MAX_MESSAGE_SIZE=1024,this.BREADCRUMB_LEVELS=["debug","info","warning","error"],this.DEFAULT_BREADCRUMB_LEVEL="info",this.DEFAULT_XHR_IGNORED_HOSTS=["raygun"],this.breadcrumbLevel="info",this.logXhrContents=!1,this.xhrIgnoredHosts=[].concat(this.DEFAULT_XHR_IGNORED_HOSTS),this.breadcrumbs=[],this.wrapWithHandler=function(a){return function(){try{return a.apply(this,arguments)}catch(c){b.Utilities.log(c)}}},this.disableConsoleFunctions=[],this.disableNavigationFunctions=[],this.disableXHRLogging=function(){},this.disableClicksTracking=function(){},this.enableAutoBreadcrumbs(),this.wrapPrototypeWithHandlers()};return d.prototype.recordBreadcrumb=function(a,c){var d={level:this.DEFAULT_BREADCRUMB_LEVEL,timestamp:(new Date).getTime(),type:"manual"};switch(typeof a){case"object":d=b.Utilities.merge(d,a);break;case"string":d=b.Utilities.merge(b.Utilities.merge(d,{message:a,metadata:c}));break;default:return void b.Utilities.log("expected first argument to recordBreadcrumb to be a 'string' or 'object', got "+typeof a)}this.BREADCRUMB_LEVELS.indexOf(d.level)===-1&&(b.Utilities.log("unknown breadcrumb level "+d.level+" setting to default of '"+this.DEFAULT_BREADCRUMB_LEVEL+"'"),d.level=this.DEFAULT_BREADCRUMB_LEVEL),this.shouldRecord(d)&&(d.message=b.Utilities.truncate(d.message,this.MAX_MESSAGE_SIZE),this.breadcrumbs.push(d),this.breadcrumbs=this.breadcrumbs.slice(-this.MAX_BREADCRUMBS))},d.prototype.shouldRecord=function(a){var b=this.BREADCRUMB_LEVELS.indexOf(a.level),c=this.BREADCRUMB_LEVELS.indexOf(this.breadcrumbLevel);return b>=c},d.prototype.setBreadcrumbLevel=function(a){return this.BREADCRUMB_LEVELS.indexOf(a)===-1?void b.Utilities.log("Breadcrumb level of '"+a+"' is invalid, setting to default of '"+this.DEFAULT_BREADCRUMB_LEVEL+"'"):void(this.breadcrumbLevel=a)},d.prototype.setOption=function(a,b){if("breadcrumbsLevel"===a)this.setBreadcrumbLevel(b);else if("xhrIgnoredHosts"===a){this.xhrIgnoredHosts=b.concat(this.DEFAULT_XHR_IGNORED_HOSTS);var d=this;this.removeBreadcrumbsWithPredicate(function(a){return"request"===a.type&&c(a.metadata.requestURL||a.metadata.responseURL,d.xhrIgnoredHosts)})}else"logXhrContents"===a&&(this.logXhrContents=b)},d.prototype.any=function(){return this.breadcrumbs.length>0},d.prototype.all=function(){for(var a=[],b=0;b-1&&(k=!0);if(!k)return void s.Utilities.log("Raygun4JS: cancelling send due to error on non-origin, non-whitelisted domain")}}if(V instanceof Array)for(var o in V)if(V.hasOwnProperty(o)&&a.location.hostname&&a.location.hostname.match(V[o]))return void s.Utilities.log("Raygun4JS: cancelling send as error originates from an excluded hostname");if(W instanceof Array&&!s.Utilities.isReactNative())for(var q in W)if(W.hasOwnProperty(q)&&navigator.userAgent.match(W[q]))return void s.Utilities.log("Raygun4JS: cancelling send as error originates from an excluded user agent");if(s.Utilities.isReactNative()||!navigator.userAgent.match("RaygunPulseInsightsCrawler")){b.stack&&b.stack.length&&s.Utilities.forEach(b.stack,function(a,b){g.push({LineNumber:b.line,ColumnNumber:b.column,ClassName:"line "+b.line+", column "+b.column,FileName:b.url,MethodName:b.func||"[anonymous]"})});var r=s.Utilities.parseUrl("?");r.length>0&&s.Utilities.forEach(r.split("&"),function(a,b){var c=b.split("=");if(c&&2===c.length){var d=decodeURIComponent(c[0]),e=l(d,c[1]);h[d]=e}}),c===d&&(c={}),s.Utilities.isEmpty(c.customData)&&("function"==typeof R?c.customData=R():c.customData=R),s.Utilities.isEmpty(c.tags)&&("function"==typeof S?c.tags=S():"string"==typeof S?c.tags=[S]:c.tags=S),e||(c.tags||(c.tags=[]),s.Utilities.contains(c.tags,"UnhandledException")||c.tags.push("UnhandledException")),s.Utilities.isReactNative()&&!s.Utilities.contains(c.tags,"React Native")&&c.tags.push("React Native");var v,x=a.screen||{width:s.Utilities.getViewPort().width,height:s.Utilities.getViewPort().height,colorDepth:8},z=c.customData&&c.customData.ajaxErrorMessage;v="customData"===X?m(c.customData,"UserCustomData"):c.customData;try{JSON.stringify(v)}catch(A){var B="Cannot add custom data; may contain circular reference";v={error:B},s.Utilities.log("Raygun4JS: "+B)}var C=f;z?C=z:b.message?C=b.message:c&&c.status&&(C=c.status),"undefined"==typeof C&&(C=f),C&&"string"==typeof C&&(C=C.substring(0,512));var E;E=s.Utilities.isReactNative()?"/":[location.protocol,"//",location.host,location.pathname,location.hash].join("");var F={OccurredOn:new Date,Details:{Error:{ClassName:b.name,Message:C,StackTrace:g,StackString:b.stackstring},Environment:{UtcOffset:(new Date).getTimezoneOffset()/-60,"User-Language":navigator.userLanguage,"Document-Mode":s.Utilities.isReactNative()?"Not available":document.documentMode,"Browser-Width":s.Utilities.getViewPort().width,"Browser-Height":s.Utilities.getViewPort().height,"Screen-Width":x.width,"Screen-Height":x.height,"Color-Depth":x.colorDepth,Browser:navigator.appCodeName,"Browser-Name":navigator.appName,"Browser-Version":navigator.appVersion,Platform:navigator.platform},Client:{Name:"raygun-js",Version:"2.9.3"},UserCustomData:v,Tags:c.tags,Request:{Url:E,QueryString:h,Headers:{"User-Agent":navigator.userAgent,Referer:s.Utilities.isReactNative()?"Not available":document.referrer,Host:s.Utilities.isReactNative()?"Not available":document.domain -}},Version:u||"Not supplied"}};if(F.Details.User=t,Z.any()){F.Details.Breadcrumbs=[];var G=Z.all()||[];G.forEach(function(a){a.metadata&&(a.CustomData=a.metadata,delete a.metadata),F.Details.Breadcrumbs.push(a)})}if("all"===X&&(F=m(F)),"function"==typeof y&&(s.Utilities.log("Raygun4JS: calling custom grouping key"),F.Details.GroupingKey=y(F,b,c)),"function"==typeof w){var H=w(F);H&&p(H)}else p(F)}}function p(a){if(s.Utilities.isApiKeyConfigured()){s.Utilities.log("Sending exception data to Raygun:",a);var b=U+"/entries?apikey="+encodeURIComponent(s.Options._raygunApiKey);r(b,JSON.stringify(a))}}function q(b,c){var d;return d=new a.XMLHttpRequest,"withCredentials"in d||s.Utilities.isReactNative()?d.open(b,c,!0):a.XDomainRequest&&(I&&(c=c.slice(6)),d=new a.XDomainRequest,d.open(b,c)),d.timeout=1e4,d}function r(b,c,d,f){var g=q("POST",b,c);return"function"==typeof z&&z(g),s.Utilities.log("Is offline enabled? "+L),"withCredentials"in g||s.Utilities.isReactNative()?(g.onreadystatechange=function(){4===g.readyState&&(202===g.status?k():L&&403!==g.status&&400!==g.status&&429!==g.status&&j(b,c))},g.onload=function(){s.Utilities.log("posted to Raygun"),e(this),d&&"function"==typeof d&&d(g,b,c)}):a.XDomainRequest&&(g.ontimeout=function(){L&&(s.Utilities.log("Raygun: saved locally"),j(b,c))},g.onload=function(){s.Utilities.log("posted to Raygun"),k(),e(this),d&&"function"==typeof d&&d(g,b,c)}),g.onerror=function(){s.Utilities.log("failed to post to Raygun"),e(this),f&&"function"==typeof f&&f(g,b,c)},g?(s.Utilities.isReactNative()&&g.setRequestHeader("Content-type","application/json;charset=UTF-8"),void g.send(c)):void s.Utilities.log("CORS not supported")}var s={};s.Utilities=raygunUtilityFactory(a,s),s.Breadcrumbs=raygunBreadcrumbsFactory(a,s);var t,u,v,w,x,y,z,A,B,C,D={LOADING:0,READY:1},E="raygun4js-userid",F=TraceKit,G=a.Raygun,H=!1,I=!1,J=!1,K=!1,L=!1,M=!1,N=!1,O=!1,P=!0,Q=!1,R={},S=[],T=[],U="https://api.raygun.io",V=null,W=null,X="customData",Y=null,Z=new s.Breadcrumbs,$=null,_=!0,aa=D.LOADING,ba=[],ca=[],da=null,ea=Math.random(),fa={Rand:ea,Options:{},noConflict:function(){return G&&(a.Raygun=G),s},constructNewRaygun:function(){var b=c(a,a.jQuery);return b},init:function(a,c,e){return F.remoteFetching=!1,this.Options._raygunApiKey=a,e&&(R=e),b&&(C=b(document)),c&&(I=c.allowInsecureSubmissions||!1,J=c.ignoreAjaxAbort||!1,K=c.ignoreAjaxError||!1,N=c.disableAnonymousUserTracking||!1,O=c.disableErrorTracking||!1,P=c.disablePulse===d||c.disablePulse,V=c.excludedHostnames||!1,W=c.excludedUserAgents||!1,$=c.pulseMaxVirtualPageDuration||null,_=c.pulseIgnoreUrlCasing||!1,da=c.pulseCustomLoadTimeEnabled||!1,c.apiUrl&&(U=c.apiUrl),"undefined"!=typeof c.wrapAsynchronousCallbacks&&(Q=c.wrapAsynchronousCallbacks),c.debugMode&&(H=c.debugMode),this.Options._debugMode=H,c.ignore3rdPartyErrors&&(M=!0),c.apiEndpoint&&(U=c.apiEndpoint),c.from&&(B=c.from)),f(),s},withCustomData:function(a){return R=a,s},withTags:function(a){return S=a,Y!==d&&null!==Y&&Y.withTags(a),s},attach:function(){return!s.Utilities.isApiKeyConfigured()||O?s:(a.RaygunObject&&a[a.RaygunObject]&&a[a.RaygunObject].q&&(a.onerror=null),s.Utilities.isReactNative()&&__DEV__!==!0&&a.ErrorUtils&&a.ErrorUtils.setGlobalHandler&&a.ErrorUtils.setGlobalHandler(function(a,b){var c=A;A=function(){"function"==typeof c&&c(),s.Utilities.defaultReactNativeGlobalHandler(a,b),A=c},TraceKit.report(a)}),F.report.subscribe(o),Q&&F.extendToAsynchronousCallbacks(),C&&C.ajaxError&&!K&&C.ajaxError(n),s)},detach:function(){return F.report.unsubscribe(o),C&&C.unbind("ajaxError",n),s},send:function(a,b,c){if(O)return s.Utilities.log("Error not sent due to disabled error tracking"),s;try{o(F.computeStackTrace(a),{customData:"function"==typeof R?s.Utilities.merge(R(),b):s.Utilities.merge(R,b),tags:"function"==typeof S?s.Utilities.mergeArray(S(),c):s.Utilities.mergeArray(S,c)},!0)}catch(d){if(a!==d)throw d}return s},setUser:function(a,b,c,e,f,g){return t={Identifier:a},"boolean"==typeof b&&(t.IsAnonymous=b),c&&(t.Email=c),e&&(t.FullName=e),f&&(t.FirstName=f),g&&(t.UUID=g),Y!==d&&null!==Y&&Y.setUser(t),s},resetAnonymousUser:function(){s.Utilities.clearCookie("raygun4js-userid")},setVersion:function(a){return u=a,s},saveIfOffline:function(a){return"undefined"!=typeof a&&"boolean"==typeof a&&(L=a),s},filterSensitiveData:function(a){return v=a,s},setFilterScope:function(a){return"customData"!==a&&"all"!==a||(X=a),s},whitelistCrossOriginDomains:function(a){return T=a,s},onBeforeSend:function(a){return w=a,s},onBeforeSendRum:function(a){return x=a,s},groupingKey:function(a){return y=a,s},onBeforeXHR:function(a){return z=a,s},onAfterSend:function(a){return A=a,s},endSession:function(){s.RealUserMonitoring!==d&&Y&&Y.endSession()},trackEvent:function(a,b){return aa!==D.READY?void ca.push({type:a,options:b}):void(s.RealUserMonitoring!==d&&Y&&("pageView"===a&&b.path?Y.virtualPageLoaded(b.path):"customTimings"===a&&b.timings&&Y.sendCustomTimings(b.timings)))},recordBreadcrumb:function(){Z.recordBreadcrumb.apply(Z,arguments)},enableAutoBreadcrumbs:function(a){a?Z["enableAutoBreadcrumbs"+a]():Z.enableAutoBreadcrumbs()},disableAutoBreadcrumbs:function(a){a?Z["disableAutoBreadcrumbs"+a]():Z.disableAutoBreadcrumbs()},setBreadcrumbOption:function(a,b){Z.setOption(a,b)},setBreadcrumbs:function(a){Z=a},getBreadcrumbs:function(){return Z.all()}};return s=s.Utilities.mergeMutate(s,fa),a.__raygunNoConflict||(a.Raygun=s),TraceKit.setRaygun(s),s};window.__instantiatedRaygun=c(window,window.jQuery);var d=function(a,b,c){c.RealUserMonitoring=function(b,c,d,e,f,g,h,i,j,k,l,m,n){function o(a){if(!R.pendingPayloadData||a){var b,c,d=[],e=[],f=!1,g=function(){e.push(q(d)),d=[],f=!1},h=function(){d.length>0&&g(),e.length>0&&(R.sendItemsImmediately(e),d=[],f=!1)};for(c=0;c0&&i&&g(),i&&s(),b.timing.t===T.VirtualPage&&b.timing.pending)return h(),void R.queuedPerformanceTimings.splice(0,c);d.push(b),f=f||b.timing.t===T.Page||b.timing.t===T.VirtualPage}h(),R.queuedPerformanceTimings=[]}}function p(a,b){R.queuedPerformanceTimings=R.queuedPerformanceTimings.concat(a),o(b)}function q(a){return{sessionId:R.sessionId,requestId:R.requestId,timestamp:(new Date).toISOString(),type:"web_request_timing",user:R.user,version:R.version||"Not supplied",device:navigator.userAgent,tags:R.tags,data:a}}function r(a){var b=v(R.cookieName),c=null===b,d="string"==typeof exisitingCookie&&b.length>0&&b.indexOf("timestamp")===-1,e=null;if(!c&&!d){var f=new Date(u(b,"timestamp")),g=new Date(new Date-18e5);e=f0&&(c.b=b+a.domainLookupStart-c.a),a.domainLookupEnd&&a.domainLookupEnd>0&&(c.c=b+a.domainLookupEnd-c.a),a.connectStart&&a.connectStart>0&&(c.d=b+a.connectStart-c.a),a.connectEnd&&a.connectEnd>0&&(c.e=b+a.connectEnd-c.a),a.responseStart&&a.responseStart>0&&(c.f=b+a.responseStart-c.a),a.responseEnd&&a.responseEnd>0&&(c.g=b+a.responseEnd-c.a),a.domLoading&&a.domLoading>0&&(c.h=b+a.domLoading-c.a),a.domInteractive&&a.domInteractive>0&&(c.i=b+a.domInteractive-c.a),a.domContentLoadedEventEnd&&a.domContentLoadedEventEnd>0&&(c.j=b+a.domContentLoadedEventEnd-c.a),a.domComplete&&a.domComplete>0&&(c.k=N(b+a.domComplete-c.a)),a.loadEventStart&&a.loadEventStart>0&&(c.l=b+a.loadEventStart-c.a),a.loadEventEnd&&a.loadEventEnd>0&&(c.m=b+a.loadEventEnd-c.a),a.secureConnectionStart&&a.secureConnectionStart>0&&(c.n=b+(a.secureConnectionStart-a.connectStart)-c.a),c=J(c)}function B(a){return"xmlhttprequest"===a.initiatorType?T.XHR:0===a.duration?T.CachedChildAsset:T.ChildAsset}function C(a,b){var c={du:N(a.duration).toFixed(2),t:B(a),a:b+a.fetchStart};return a.domainLookupStart&&a.domainLookupStart>0&&(c.b=b+a.domainLookupStart-c.a),a.domainLookupEnd&&a.domainLookupEnd>0&&(c.c=b+a.domainLookupEnd-c.a),a.connectStart&&a.connectStart>0&&(c.d=b+a.connectStart-c.a),a.connectEnd&&a.connectEnd>0&&(c.e=b+a.connectEnd-c.a),a.responseStart&&a.responseStart>0&&(c.f=b+a.responseStart-c.a),a.responseEnd&&a.responseEnd>0&&(c.g=b+a.responseEnd-c.a),a.secureConnectionStart&&a.secureConnectionStart>0&&(c.n=b+(a.secureConnectionStart-a.connectStart)-c.a),c.a=c.a.toFixed(2),c=J(c)}function D(){var b=a.location.pathname;R.ignoreUrlCasing&&(b=b.toLowerCase());var c=a.location.protocol+"//"+a.location.host+b;return c.length>800&&(c=c.substring(0,800)),{url:c,userAgent:navigator.userAgent,timing:A(a.performance.timing,0),size:0}}function E(b,c){R.ignoreUrlCasing&&(b=b.toLowerCase()),b.indexOf("?")!==-1&&(b=b.split("?")[0]);var d=a.location.protocol+"//"+a.location.host+b;return d.length>800&&(d=d.substring(0,800)),{url:d,userAgent:navigator.userAgent,timing:x(c),size:0}}function F(b,c){var d=b.name.split("?")[0];return R.ignoreUrlCasing&&(d=d.toLowerCase()),d.length>800&&(d=d.substring(0,800)),{url:d,timing:C(b,c?0:a.performance.timing.navigationStart),size:b.decodedBodySize||0}}function G(a){return 0===a.indexOf(R.apiUrl)||(a.indexOf("favicon.ico")>0||(0===a.indexOf("about:blank")||("j"===a[0]&&1===a.indexOf("avascript:")||(0===a.indexOf("chrome-extension://")||(0===a.indexOf("res://")||0===a.indexOf("file://"))))))}function H(b,c){if(L("getEntries","function"))try{for(var d=a.performance.getEntries(),e=R.offset;ee?f=1:d0&&"/"!==a[0]&&(a+="/"),a.length>800&&(a=a.substring(0,800)),this.virtualPage=a),y(),this.sendPerformance(!1)},this.heartBeat=function(){return null!==R.heartBeatInterval?void O("Raygun4JS: Heartbeat already exists. Skipping heartbeat creation."):void(R.heartBeatInterval=setInterval(function(){R.sendChildAssets(),R.sendQueuedItems()},R.heartBeatIntervalTime))},this.setUser=function(a){R.user=a},this.withTags=function(a){R.tags=a},this.endSession=function(){R.sendItemImmediately({sessionId:R.sessionId,requestId:R.requestId,timestamp:(new Date).toISOString(),type:"session_end"})},this.sendNewSessionStart=function(){R.sendItemImmediately({sessionId:R.sessionId,timestamp:(new Date).toISOString(),type:"session_start",user:R.user,version:R.version||"Not supplied",tags:R.tags,device:navigator.userAgent})},this.sendCustomTimings=function(a){"object"!=typeof a||"number"!=typeof a.custom1&&"number"!=typeof a.custom2&&"number"!=typeof a.custom3&&"number"!=typeof a.custom4&&"number"!=typeof a.custom5&&"number"!=typeof a.custom6&&"number"!=typeof a.custom7&&"number"!=typeof a.custom8&&"number"!=typeof a.custom9&&"number"!=typeof a.custom10||R.pendingPayloadData&&R.queuedPerformanceTimings.length>0&&(R.pendingPayloadData=!1,R.queuedPerformanceTimings[0].customTiming=a,o())},this.sendPerformance=function(a){var b=I(this.virtualPage,a);null===b||b.length<0||p(b,!1)},this.sendChildAssets=function(a){a&&y();var b=[];H(b),p(b,a)},this.sendQueuedItems=function(){if(R.queuedItems.length>0){R.queuedItems=Q(R.queuedItems,"timestamp");var a=R.queuedItems.splice(0,R.maxQueueItemsSent);R.sendItemsImmediately(a)}},this.sendItemImmediately=function(a){var b=[a];R.sendItemsImmediately(b)},this.sendItemsImmediately=function(a){var b={eventData:a},c=function(){O("Raygun4JS: Items sent successfully. Queue length: "+R.queuedItems.length)},d=function(b){R.requeueItemsToFront(a),O("Raygun4JS: Items failed to send. Queue length: "+R.queuedItems.length+" Response status code: "+b.status)};this.postPayload(b,c,d)},this.requeueItemsToFront=function(a){R.queuedItems=a.concat(R.queuedItems)},this.postPayload=function(a,b,c){"function"!=typeof b&&(b=function(){}),"function"!=typeof c&&(c=function(){}),R.makePostCorsRequest(R.apiUrl+"/events?apikey="+encodeURIComponent(R.apiKey),a,b,c)},this.makePostCorsRequest=function(b,c,e,f){if(R.excludedUserAgents instanceof Array)for(var g in R.excludedUserAgents)if(R.excludedUserAgents.hasOwnProperty(g)&&navigator.userAgent.match(R.excludedUserAgents[g]))return void O("Raygun4JS: cancelling send as error originates from an excluded user agent");if(R.excludedHostNames instanceof Array)for(var h in R.excludedHostNames)if(R.excludedHostNames.hasOwnProperty(h)&&a.location.hostname&&a.location.hostname.match(R.excludedHostNames[h]))return void O("Raygun4JS: cancelling send as error originates from an excluded hostname");if(!navigator.userAgent.match("RaygunPulseInsightsCrawler")){var i=R.beforeSend(c);if(!i)return void O("Raygun4JS: cancelling send because onBeforeSendRUM returned falsy value");if(i.eventData)for(var j=0;j=0;--b)n[b]===a&&n.splice(b,1)}function g(a,b){var d=null;if(!b||f.collectWindowErrors){for(var e in n)if(c(n,e))try{n[e].apply(null,[a].concat(h.call(arguments,2)))}catch(g){d=g}if(d)throw d}}function i(a,b,c,d,e){var h=null;if(e)h=f.computeStackTrace(e);else if(p)f.computeStackTrace.augmentStackTraceWithInitialElement(p,b,c,a),h=p,p=null,o=null;else{var i={url:b,line:c,column:d};i.func=f.computeStackTrace.guessFunctionName(i.url,i.line),i.context=f.computeStackTrace.gatherContext(i.url,i.line),h={mode:"onerror",message:a,url:document.location.href,stack:[i],useragent:navigator.userAgent}}return g(h,"from window.onerror"),!!l&&l.apply(this,arguments)}function j(){m!==!0&&(l=a.onerror,a.onerror=i,m=!0)}function k(b){var c;if("undefined"!=typeof document&&(c=h.call(arguments,1)),p){if(o===b)return;var d=p;p=null,o=null,g.apply(null,[d,null].concat(c))}var i=f.computeStackTrace(b);if(p=i,o=b,a.setTimeout(function(){o===b&&(p=null,o=null,g.apply(null,[i,null].concat(c)))},i.incomplete?2e3:0),!e.Utilities.isReactNative())throw b}var l,m,n=[],o=null,p=null;return k.subscribe=b,k.unsubscribe=d,k}(),f.computeStackTrace=function(){function b(a){return"string"!=typeof a?[]:""}function g(d){if(!c(x,d)){var e="";d=d||"";var f;f="undefined"!=typeof document?document.domain:a.location.hostname,d.indexOf&&d.indexOf(f)!==-1&&(e=b(d)),x[d]=e?e.split("\n"):[]}return x[d]}function h(a,b){var c,e=/function ([^(]*)\(([^)]*)\)/,f=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,h="",j=10,k=g(a);if(!k.length)return i;for(var l=0;l0?e:null}function k(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function l(a){return k(a).replace("<","(?:<|<)").replace(">","(?:>|>)").replace("&","(?:&|&)").replace('"','(?:"|")').replace(/\s+/g,"\\s+")}function m(a,b){for(var c,d,e=0,f=b.length;ec&&(d=f.exec(e[c]))?d.index:null}function o(b){for(var c,d,e,f,g=[a.location.href],h=document.getElementsByTagName("script"),i=""+b,j=/^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,n=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,o=0;o|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,f=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,g=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,k=a.stack.split("\n"),l=[],m=/^(.*) is undefined$/.exec(a.message);if(e.Utilities.isReactNative())for(var o=/^(.*@)?.*\/[^\.]+(\.app|CodePush)\/?(.*)/,p="file://reactnative.local/",q=0;q]+)>|([^\)]+))\((.*)\) in (.*):\s*$/i,e=c?c.split("\n"):[],f=[],g=0,i=e.length;g=0&&(t.line=u+k.substring(0,w).split("\n").length)}}else if(e=p.exec(d[f])){var x=a.location.href.replace(/#.*$/,""),y=e[1],z=new RegExp(l(d[f+1]));k=m(z,[x]),t={url:x,line:k?k.line:y,func:""}}if(t){t.func||(t.func=h(t.url,t.line));var A=j(t.url,t.line),B=A?A[Math.floor(A.length/2)]:null;A&&B.replace(/^\s*/,"")===d[f+1].replace(/^\s*/,"")?t.context=A:t.context=[d[f+1]],q.push(t)}}return q.length?{mode:"multiline",name:b.name,message:d[0],url:document.location.href,stack:q,useragent:navigator.userAgent}:null}function s(a,b,c,d){var e={url:b,line:c};if(e.url&&e.line){a.incomplete=!1,e.func||(e.func=h(e.url,e.line)),e.context||(e.context=j(e.url,e.line));var f=/ '([^']+)' /.exec(d);if(f&&(e.column=n(f[1],e.url,e.line)),a.stack.length>0&&a.stack[0].url===e.url){if(a.stack[0].line===e.line)return!1;if(!a.stack[0].line&&a.stack[0].func===e.func)return a.stack[0].line=e.line,a.stack[0].context=e.context,!1}return a.stack.unshift(e),a.partial=!0,!0}return a.incomplete=!0,!1}function t(a,b){for(var c,d,e,g=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,j=[],k={},l=!1,m=t.caller;m&&!l;m=m.caller)if(m!==u&&m!==f.report){if(d={url:null,func:i,line:null,column:null},m.name?d.func=m.name:(c=g.exec(m.toString()))&&(d.func=c[1]),"undefined"==typeof d.func)try{d.func=c.input.substring(0,c.input.indexOf("{"))}catch(p){}if(e=o(m)){d.url=e.url,d.line=e.line,d.func===i&&(d.func=h(d.url,d.line));var q=/ '([^']+)' /.exec(a.message||a.description);q&&(d.column=n(q[1],e.url,e.line))}k[""+m]?l=!0:k[""+m]=!0,j.push(d)}b&&j.splice(0,b);var r={mode:"callers",name:a.name,message:a.message,url:document.location.href,stack:j,useragent:navigator.userAgent};return s(r,a.sourceURL||a.fileName,a.line||a.lineNumber,a.message||a.description),r}function u(a,b){var c=null;b=null==b?0:+b;try{if(c=q(a))return c}catch(d){if(w)throw d}try{if(c=p(a))return c}catch(d){if(w)throw d}try{if(c=r(a))return c}catch(d){if(w)throw d}try{if(c=t(a,b+1))return c}catch(d){if(w)throw d}return{tracekitResult:"failedToComputeAnyStackTrace"}}function v(a){a=(null==a?0:+a)+1;try{throw new Error}catch(b){return u(b,a+1)}}var w=!1,x={};return u.augmentStackTraceWithInitialElement=s,u.guessFunctionName=h,u.gatherContext=j,u.ofCaller=v,u}(),f.extendToAsynchronousCallbacks=function(){var b=function(b){var c=a[b];a[b]=function(){var a=h.call(arguments),b=a[0];return"function"==typeof b&&(a[0]=f.wrap(b)),c.apply?c.apply(this,a):c(a[0],a[1])}};b("setTimeout"),b("setInterval")},f.remoteFetching||(f.remoteFetching=!0),f.collectWindowErrors||(f.collectWindowErrors=!0),(!f.linesOfContext||f.linesOfContext<1)&&(f.linesOfContext=11),a.TraceKit=f}(window),Date.prototype.toISOString||!function(){function a(a){var b=String(a);return 1===b.length&&(b="0"+b),b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}(),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;var f=0|b;if(f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);c>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(b=arguments[1]),c=new Array(f),d=0;d>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(b=arguments[1]),c=0;c3?"/":"")+c.slice(3,c.length).join("/").split("?")[0].split("#")[0];var h=f.pathname;"/"===h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));var i=f.hostname,j=i.split("."),k=h.split("/");if("hostname"===b)return i;if("domain"===b)return/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/.test(i)?i:j.slice(-2).join(".");if("sub"===b)return j.slice(0,j.length-2).join(".");if("port"===b)return f.port;if("protocol"===b)return f.protocol.split(":")[0];if("auth"===b)return f.auth;if("user"===b)return f.auth.split(":")[0];if("pass"===b)return f.auth.split(":")[1]||"";if("path"===b)return f.pathname;if("."===b.charAt(0)){if(b=b.substring(1),d(b))return b=parseInt(b,10),j[b<0?j.length+b:b-1]||""}else{if(d(b))return b=parseInt(b,10),k[b<0?k.length+b:b]||"";if("file"===b)return k.slice(-1)[0];if("filename"===b)return k.slice(-1)[0].split(".")[0];if("fileext"===b)return k.slice(-1)[0].split(".")[1]||"";if("?"===b.charAt(0)||"#"===b.charAt(0)){var l=e,m=null;if("?"===b.charAt(0)?l=(l.split("?")[1]||"").split("#")[0]:"#"===b.charAt(0)&&(l=l.split("#")[1]||""),!b.charAt(1))return l;b=b.substring(1),l=l.split("&");for(var n=0,o=l.length;nb?a.slice(0,b-c.length)+c:a}};return d.isReactNative()&&__DEV__!==!0&&a.ErrorUtils&&a.ErrorUtils.getGlobalHandler&&(c=a.ErrorUtils.getGlobalHandler()),d},window.raygunBreadcrumbsFactory=function(a,b){function c(a,b){for(var c=0;c-1)return!0;if("object"==typeof d&&d.exec(a))return!0}return!1}var d=function(){this.MAX_BREADCRUMBS=32,this.MAX_MESSAGE_SIZE=1024,this.BREADCRUMB_LEVELS=["debug","info","warning","error"],this.DEFAULT_BREADCRUMB_LEVEL="info",this.DEFAULT_XHR_IGNORED_HOSTS=["raygun"],this.breadcrumbLevel="info",this.logXhrContents=!1,this.xhrIgnoredHosts=[].concat(this.DEFAULT_XHR_IGNORED_HOSTS),this.breadcrumbs=[],this.wrapWithHandler=function(a){return function(){try{return a.apply(this,arguments)}catch(c){b.Utilities.log(c)}}},this.disableConsoleFunctions=[],this.disableNavigationFunctions=[],this.disableXHRLogging=function(){},this.disableClicksTracking=function(){},this.enableAutoBreadcrumbs(),this.wrapPrototypeWithHandlers()};return d.prototype.recordBreadcrumb=function(a,c){var d={level:this.DEFAULT_BREADCRUMB_LEVEL,timestamp:(new Date).getTime(),type:"manual"};switch(typeof a){case"object":d=b.Utilities.merge(d,a);break;case"string":d=b.Utilities.merge(b.Utilities.merge(d,{message:a,metadata:c}));break;default:return void b.Utilities.log("expected first argument to recordBreadcrumb to be a 'string' or 'object', got "+typeof a)}this.BREADCRUMB_LEVELS.indexOf(d.level)===-1&&(b.Utilities.log("unknown breadcrumb level "+d.level+" setting to default of '"+this.DEFAULT_BREADCRUMB_LEVEL+"'"),d.level=this.DEFAULT_BREADCRUMB_LEVEL),this.shouldRecord(d)&&(d.message=b.Utilities.truncate(d.message,this.MAX_MESSAGE_SIZE),this.breadcrumbs.push(d),this.breadcrumbs=this.breadcrumbs.slice(-this.MAX_BREADCRUMBS))},d.prototype.shouldRecord=function(a){var b=this.BREADCRUMB_LEVELS.indexOf(a.level),c=this.BREADCRUMB_LEVELS.indexOf(this.breadcrumbLevel);return b>=c},d.prototype.setBreadcrumbLevel=function(a){return this.BREADCRUMB_LEVELS.indexOf(a)===-1?void b.Utilities.log("Breadcrumb level of '"+a+"' is invalid, setting to default of '"+this.DEFAULT_BREADCRUMB_LEVEL+"'"):void(this.breadcrumbLevel=a)},d.prototype.setOption=function(a,b){if("breadcrumbsLevel"===a)this.setBreadcrumbLevel(b);else if("xhrIgnoredHosts"===a){this.xhrIgnoredHosts=b.concat(this.DEFAULT_XHR_IGNORED_HOSTS);var d=this;this.removeBreadcrumbsWithPredicate(function(a){return"request"===a.type&&c(a.metadata.requestURL||a.metadata.responseURL,d.xhrIgnoredHosts)})}else"logXhrContents"===a&&(this.logXhrContents=b)},d.prototype.any=function(){return this.breadcrumbs.length>0},d.prototype.all=function(){for(var a=[],b=0;b-1&&(k=!0);if(!k)return void s.Utilities.log("Raygun4JS: cancelling send due to error on non-origin, non-whitelisted domain")}}if(V instanceof Array)for(var o in V)if(V.hasOwnProperty(o)&&a.location.hostname&&a.location.hostname.match(V[o]))return void s.Utilities.log("Raygun4JS: cancelling send as error originates from an excluded hostname");if(W instanceof Array&&!s.Utilities.isReactNative())for(var q in W)if(W.hasOwnProperty(q)&&navigator.userAgent.match(W[q]))return void s.Utilities.log("Raygun4JS: cancelling send as error originates from an excluded user agent");if(s.Utilities.isReactNative()||!navigator.userAgent.match("RaygunPulseInsightsCrawler")){b.stack&&b.stack.length&&s.Utilities.forEach(b.stack,function(a,b){g.push({LineNumber:b.line,ColumnNumber:b.column,ClassName:"line "+b.line+", column "+b.column,FileName:b.url,MethodName:b.func||"[anonymous]"})});var r=s.Utilities.parseUrl("?");r.length>0&&s.Utilities.forEach(r.split("&"),function(a,b){var c=b.split("=");if(c&&2===c.length){var d=decodeURIComponent(c[0]),e=l(d,c[1]);h[d]=e}}),c===d&&(c={}),s.Utilities.isEmpty(c.customData)&&("function"==typeof R?c.customData=R():c.customData=R),s.Utilities.isEmpty(c.tags)&&("function"==typeof S?c.tags=S():"string"==typeof S?c.tags=[S]:c.tags=S),e||(c.tags||(c.tags=[]),s.Utilities.contains(c.tags,"UnhandledException")||c.tags.push("UnhandledException")),s.Utilities.isReactNative()&&!s.Utilities.contains(c.tags,"React Native")&&c.tags.push("React Native");var v,x=a.screen||{width:s.Utilities.getViewPort().width,height:s.Utilities.getViewPort().height,colorDepth:8},z=c.customData&&c.customData.ajaxErrorMessage;v="customData"===X?m(c.customData,"UserCustomData"):c.customData;try{JSON.stringify(v)}catch(A){var B="Cannot add custom data; may contain circular reference";v={error:B},s.Utilities.log("Raygun4JS: "+B)}var C=f;z?C=z:b.message?C=b.message:c&&c.status&&(C=c.status),"undefined"==typeof C&&(C=f),C&&"string"==typeof C&&(C=C.substring(0,512));var E;E=s.Utilities.isReactNative()?"/":[location.protocol,"//",location.host,location.pathname,location.hash].join("");var F={OccurredOn:new Date,Details:{Error:{ClassName:b.name,Message:C,StackTrace:g,StackString:b.stackstring},Environment:{UtcOffset:(new Date).getTimezoneOffset()/-60,"User-Language":navigator.userLanguage,"Document-Mode":s.Utilities.isReactNative()?"Not available":document.documentMode,"Browser-Width":s.Utilities.getViewPort().width,"Browser-Height":s.Utilities.getViewPort().height,"Screen-Width":x.width,"Screen-Height":x.height,"Color-Depth":x.colorDepth,Browser:navigator.appCodeName,"Browser-Name":navigator.appName,"Browser-Version":navigator.appVersion,Platform:navigator.platform},Client:{Name:"raygun-js",Version:"2.9.4"},UserCustomData:v,Tags:c.tags,Request:{Url:E,QueryString:h,Headers:{"User-Agent":navigator.userAgent,Referer:s.Utilities.isReactNative()?"Not available":document.referrer, +Host:s.Utilities.isReactNative()?"Not available":document.domain}},Version:u||"Not supplied"}};if(F.Details.User=t,Z.any()){F.Details.Breadcrumbs=[];var G=Z.all()||[];G.forEach(function(a){a.metadata&&(a.CustomData=a.metadata,delete a.metadata),F.Details.Breadcrumbs.push(a)})}if("all"===X&&(F=m(F)),"function"==typeof y&&(s.Utilities.log("Raygun4JS: calling custom grouping key"),F.Details.GroupingKey=y(F,b,c)),"function"==typeof w){var H=w(F);H&&p(H)}else p(F)}}function p(a){if(s.Utilities.isApiKeyConfigured()){s.Utilities.log("Sending exception data to Raygun:",a);var b=U+"/entries?apikey="+encodeURIComponent(s.Options._raygunApiKey);r(b,JSON.stringify(a))}}function q(b,c){var d;return d=new a.XMLHttpRequest,"withCredentials"in d||s.Utilities.isReactNative()?d.open(b,c,!0):a.XDomainRequest&&(I&&(c=c.slice(6)),d=new a.XDomainRequest,d.open(b,c)),d.timeout=1e4,d}function r(b,c,d,f){var g=q("POST",b,c);return"function"==typeof z&&z(g),s.Utilities.log("Is offline enabled? "+L),"withCredentials"in g||s.Utilities.isReactNative()?(g.onreadystatechange=function(){4===g.readyState&&(202===g.status?k():L&&403!==g.status&&400!==g.status&&429!==g.status&&j(b,c))},g.onload=function(){s.Utilities.log("posted to Raygun"),e(this),d&&"function"==typeof d&&d(g,b,c)}):a.XDomainRequest&&(g.ontimeout=function(){L&&(s.Utilities.log("Raygun: saved locally"),j(b,c))},g.onload=function(){s.Utilities.log("posted to Raygun"),k(),e(this),d&&"function"==typeof d&&d(g,b,c)}),g.onerror=function(){s.Utilities.log("failed to post to Raygun"),e(this),f&&"function"==typeof f&&f(g,b,c)},g?(s.Utilities.isReactNative()&&g.setRequestHeader("Content-type","application/json;charset=UTF-8"),void g.send(c)):void s.Utilities.log("CORS not supported")}var s={};s.Utilities=raygunUtilityFactory(a,s),s.Breadcrumbs=raygunBreadcrumbsFactory(a,s);var t,u,v,w,x,y,z,A,B,C,D={LOADING:0,READY:1},E="raygun4js-userid",F=TraceKit,G=a.Raygun,H=!1,I=!1,J=!1,K=!1,L=!1,M=!1,N=!1,O=!1,P=!0,Q=!1,R={},S=[],T=[],U="https://api.raygun.io",V=null,W=null,X="customData",Y=null,Z=new s.Breadcrumbs,$=null,_=!0,aa=D.LOADING,ba=[],ca=[],da=null,ea=Math.random(),fa={Rand:ea,Options:{},noConflict:function(){return G&&(a.Raygun=G),s},constructNewRaygun:function(){var b=c(a,a.jQuery);return b},init:function(a,c,e){return F.remoteFetching=!1,this.Options._raygunApiKey=a,e&&(R=e),b&&(C=b(document)),c&&(I=c.allowInsecureSubmissions||!1,J=c.ignoreAjaxAbort||!1,K=c.ignoreAjaxError||!1,N=c.disableAnonymousUserTracking||!1,O=c.disableErrorTracking||!1,P=c.disablePulse===d||c.disablePulse,V=c.excludedHostnames||!1,W=c.excludedUserAgents||!1,$=c.pulseMaxVirtualPageDuration||null,_=c.pulseIgnoreUrlCasing||!1,da=c.pulseCustomLoadTimeEnabled||!1,c.apiUrl&&(U=c.apiUrl),"undefined"!=typeof c.wrapAsynchronousCallbacks&&(Q=c.wrapAsynchronousCallbacks),c.debugMode&&(H=c.debugMode),this.Options._debugMode=H,c.ignore3rdPartyErrors&&(M=!0),c.apiEndpoint&&(U=c.apiEndpoint),c.from&&(B=c.from)),f(),s},withCustomData:function(a){return R=a,s},withTags:function(a){return S=a,Y!==d&&null!==Y&&Y.withTags(a),s},attach:function(){return!s.Utilities.isApiKeyConfigured()||O?s:(a.RaygunObject&&a[a.RaygunObject]&&a[a.RaygunObject].q&&(a.onerror=null),s.Utilities.isReactNative()&&__DEV__!==!0&&a.ErrorUtils&&a.ErrorUtils.setGlobalHandler&&a.ErrorUtils.setGlobalHandler(function(a,b){var c=A;A=function(){"function"==typeof c&&c(),s.Utilities.defaultReactNativeGlobalHandler(a,b),A=c},TraceKit.report(a)}),F.report.subscribe(o),Q&&F.extendToAsynchronousCallbacks(),C&&C.ajaxError&&!K&&C.ajaxError(n),s)},detach:function(){return F.report.unsubscribe(o),C&&C.unbind("ajaxError",n),s},send:function(a,b,c){if(O)return s.Utilities.log("Error not sent due to disabled error tracking"),s;try{o(F.computeStackTrace(a),{customData:"function"==typeof R?s.Utilities.merge(R(),b):s.Utilities.merge(R,b),tags:"function"==typeof S?s.Utilities.mergeArray(S(),c):s.Utilities.mergeArray(S,c)},!0)}catch(d){if(a!==d)throw d}return s},setUser:function(a,b,c,e,f,g){return t={Identifier:a},"boolean"==typeof b&&(t.IsAnonymous=b),c&&(t.Email=c),e&&(t.FullName=e),f&&(t.FirstName=f),g&&(t.UUID=g),Y!==d&&null!==Y&&Y.setUser(t),s},resetAnonymousUser:function(){s.Utilities.clearCookie("raygun4js-userid")},setVersion:function(a){return u=a,s},saveIfOffline:function(a){return"undefined"!=typeof a&&"boolean"==typeof a&&(L=a),s},filterSensitiveData:function(a){return v=a,s},setFilterScope:function(a){return"customData"!==a&&"all"!==a||(X=a),s},whitelistCrossOriginDomains:function(a){return T=a,s},onBeforeSend:function(a){return w=a,s},onBeforeSendRum:function(a){return x=a,s},groupingKey:function(a){return y=a,s},onBeforeXHR:function(a){return z=a,s},onAfterSend:function(a){return A=a,s},endSession:function(){s.RealUserMonitoring!==d&&Y&&Y.endSession()},trackEvent:function(a,b){return aa!==D.READY?void ca.push({type:a,options:b}):void(s.RealUserMonitoring!==d&&Y&&("pageView"===a&&b.path?Y.virtualPageLoaded(b.path):"customTimings"===a&&b.timings&&Y.sendCustomTimings(b.timings)))},recordBreadcrumb:function(){Z.recordBreadcrumb.apply(Z,arguments)},enableAutoBreadcrumbs:function(a){a?Z["enableAutoBreadcrumbs"+a]():Z.enableAutoBreadcrumbs()},disableAutoBreadcrumbs:function(a){a?Z["disableAutoBreadcrumbs"+a]():Z.disableAutoBreadcrumbs()},setBreadcrumbOption:function(a,b){Z.setOption(a,b)},setBreadcrumbs:function(a){Z=a},getBreadcrumbs:function(){return Z.all()}};return s=s.Utilities.mergeMutate(s,fa),a.__raygunNoConflict||(a.Raygun=s),TraceKit.setRaygun(s),s};window.__instantiatedRaygun=c(window,window.jQuery);var d=function(a,b,c){c.RealUserMonitoring=function(b,c,d,e,f,g,h,i,j,k,l,m,n){function o(a){if(!R.pendingPayloadData||a){var b,c,d=[],e=[],f=!1,g=function(){e.push(q(d)),d=[],f=!1},h=function(){d.length>0&&g(),e.length>0&&(R.sendItemsImmediately(e),d=[],f=!1)};for(c=0;c0&&i&&g(),i&&s(),b.timing.t===T.VirtualPage&&b.timing.pending)return h(),void R.queuedPerformanceTimings.splice(0,c);d.push(b),f=f||b.timing.t===T.Page||b.timing.t===T.VirtualPage}h(),R.queuedPerformanceTimings=[]}}function p(a,b){R.queuedPerformanceTimings=R.queuedPerformanceTimings.concat(a),o(b)}function q(a){return{sessionId:R.sessionId,requestId:R.requestId,timestamp:(new Date).toISOString(),type:"web_request_timing",user:R.user,version:R.version||"Not supplied",device:navigator.userAgent,tags:R.tags,data:a}}function r(a){var b=v(R.cookieName),c=null===b,d="string"==typeof exisitingCookie&&b.length>0&&b.indexOf("timestamp")===-1,e=null;if(!c&&!d){var f=new Date(u(b,"timestamp")),g=new Date(new Date-18e5);e=f0&&(c.b=b+a.domainLookupStart-c.a),a.domainLookupEnd&&a.domainLookupEnd>0&&(c.c=b+a.domainLookupEnd-c.a),a.connectStart&&a.connectStart>0&&(c.d=b+a.connectStart-c.a),a.connectEnd&&a.connectEnd>0&&(c.e=b+a.connectEnd-c.a),a.responseStart&&a.responseStart>0&&(c.f=b+a.responseStart-c.a),a.responseEnd&&a.responseEnd>0&&(c.g=b+a.responseEnd-c.a),a.domLoading&&a.domLoading>0&&(c.h=b+a.domLoading-c.a),a.domInteractive&&a.domInteractive>0&&(c.i=b+a.domInteractive-c.a),a.domContentLoadedEventEnd&&a.domContentLoadedEventEnd>0&&(c.j=b+a.domContentLoadedEventEnd-c.a),a.domComplete&&a.domComplete>0&&(c.k=N(b+a.domComplete-c.a)),a.loadEventStart&&a.loadEventStart>0&&(c.l=b+a.loadEventStart-c.a),a.loadEventEnd&&a.loadEventEnd>0&&(c.m=b+a.loadEventEnd-c.a),a.secureConnectionStart&&a.secureConnectionStart>0&&(c.n=b+(a.secureConnectionStart-a.connectStart)-c.a),c=J(c)}function B(a){return"xmlhttprequest"===a.initiatorType?T.XHR:0===a.duration?T.CachedChildAsset:T.ChildAsset}function C(a,b){var c={du:N(a.duration).toFixed(2),t:B(a),a:b+a.fetchStart};return a.domainLookupStart&&a.domainLookupStart>0&&(c.b=b+a.domainLookupStart-c.a),a.domainLookupEnd&&a.domainLookupEnd>0&&(c.c=b+a.domainLookupEnd-c.a),a.connectStart&&a.connectStart>0&&(c.d=b+a.connectStart-c.a),a.connectEnd&&a.connectEnd>0&&(c.e=b+a.connectEnd-c.a),a.responseStart&&a.responseStart>0&&(c.f=b+a.responseStart-c.a),a.responseEnd&&a.responseEnd>0&&(c.g=b+a.responseEnd-c.a),a.secureConnectionStart&&a.secureConnectionStart>0&&(c.n=b+(a.secureConnectionStart-a.connectStart)-c.a),c.a=c.a.toFixed(2),c=J(c)}function D(){var b=a.location.pathname;R.ignoreUrlCasing&&(b=b.toLowerCase());var c=a.location.protocol+"//"+a.location.host+b;return c.length>800&&(c=c.substring(0,800)),{url:c,userAgent:navigator.userAgent,timing:A(a.performance.timing,0),size:0}}function E(b,c){R.ignoreUrlCasing&&(b=b.toLowerCase()),b.indexOf("?")!==-1&&(b=b.split("?")[0]);var d=a.location.protocol+"//"+a.location.host+b;return d.length>800&&(d=d.substring(0,800)),{url:d,userAgent:navigator.userAgent,timing:x(c),size:0}}function F(b,c){var d=b.name.split("?")[0];return R.ignoreUrlCasing&&(d=d.toLowerCase()),d.length>800&&(d=d.substring(0,800)),{url:d,timing:C(b,c?0:a.performance.timing.navigationStart),size:b.decodedBodySize||0}}function G(a){return 0===a.indexOf(R.apiUrl)||(a.indexOf("favicon.ico")>0||(0===a.indexOf("about:blank")||("j"===a[0]&&1===a.indexOf("avascript:")||(0===a.indexOf("chrome-extension://")||(0===a.indexOf("res://")||0===a.indexOf("file://"))))))}function H(b,c){if(L("getEntries","function"))try{for(var d=a.performance.getEntries(),e=R.offset;ee?f=1:d0&&"/"!==a[0]&&(a+="/"),a.length>800&&(a=a.substring(0,800)),this.virtualPage=a),y(),this.sendPerformance(!1)},this.heartBeat=function(){return null!==R.heartBeatInterval?void O("Raygun4JS: Heartbeat already exists. Skipping heartbeat creation."):void(R.heartBeatInterval=setInterval(function(){R.sendChildAssets(),R.sendQueuedItems()},R.heartBeatIntervalTime))},this.setUser=function(a){R.user=a},this.withTags=function(a){R.tags=a},this.endSession=function(){R.sendItemImmediately({sessionId:R.sessionId,requestId:R.requestId,timestamp:(new Date).toISOString(),type:"session_end"})},this.sendNewSessionStart=function(){R.sendItemImmediately({sessionId:R.sessionId,timestamp:(new Date).toISOString(),type:"session_start",user:R.user,version:R.version||"Not supplied",tags:R.tags,device:navigator.userAgent})},this.sendCustomTimings=function(a){"object"!=typeof a||"number"!=typeof a.custom1&&"number"!=typeof a.custom2&&"number"!=typeof a.custom3&&"number"!=typeof a.custom4&&"number"!=typeof a.custom5&&"number"!=typeof a.custom6&&"number"!=typeof a.custom7&&"number"!=typeof a.custom8&&"number"!=typeof a.custom9&&"number"!=typeof a.custom10||R.pendingPayloadData&&R.queuedPerformanceTimings.length>0&&(R.pendingPayloadData=!1,R.queuedPerformanceTimings[0].customTiming=a,o())},this.sendPerformance=function(a){var b=I(this.virtualPage,a);null===b||b.length<0||p(b,!1)},this.sendChildAssets=function(a){a&&y();var b=[];H(b),p(b,a)},this.sendQueuedItems=function(){if(R.queuedItems.length>0){R.queuedItems=Q(R.queuedItems,"timestamp");var a=R.queuedItems.splice(0,R.maxQueueItemsSent);R.sendItemsImmediately(a)}},this.sendItemImmediately=function(a){var b=[a];R.sendItemsImmediately(b)},this.sendItemsImmediately=function(a){var b={eventData:a},c=function(){O("Raygun4JS: Items sent successfully. Queue length: "+R.queuedItems.length)},d=function(b){R.requeueItemsToFront(a),O("Raygun4JS: Items failed to send. Queue length: "+R.queuedItems.length+" Response status code: "+b.status)};this.postPayload(b,c,d)},this.requeueItemsToFront=function(a){R.queuedItems=a.concat(R.queuedItems)},this.postPayload=function(a,b,c){"function"!=typeof b&&(b=function(){}),"function"!=typeof c&&(c=function(){}),R.makePostCorsRequest(R.apiUrl+"/events?apikey="+encodeURIComponent(R.apiKey),a,b,c)},this.makePostCorsRequest=function(b,c,e,f){if(R.excludedUserAgents instanceof Array)for(var g in R.excludedUserAgents)if(R.excludedUserAgents.hasOwnProperty(g)&&navigator.userAgent.match(R.excludedUserAgents[g]))return void O("Raygun4JS: cancelling send as error originates from an excluded user agent");if(R.excludedHostNames instanceof Array)for(var h in R.excludedHostNames)if(R.excludedHostNames.hasOwnProperty(h)&&a.location.hostname&&a.location.hostname.match(R.excludedHostNames[h]))return void O("Raygun4JS: cancelling send as error originates from an excluded hostname");if(!navigator.userAgent.match("RaygunPulseInsightsCrawler")){var i=R.beforeSend(c);if(!i)return void O("Raygun4JS: cancelling send because onBeforeSendRUM returned falsy value");if(i.eventData)for(var j=0;j=0;--b)n[b]===a&&n.splice(b,1)}function g(a,b){var d=null;if(!b||f.collectWindowErrors){for(var e in n)if(c(n,e))try{n[e].apply(null,[a].concat(h.call(arguments,2)))}catch(g){d=g}if(d)throw d}}function i(a,b,c,d,e){var h=null;if(e)h=f.computeStackTrace(e);else if(p)f.computeStackTrace.augmentStackTraceWithInitialElement(p,b,c,a),h=p,p=null,o=null;else{var i={url:b,line:c,column:d};i.func=f.computeStackTrace.guessFunctionName(i.url,i.line),i.context=f.computeStackTrace.gatherContext(i.url,i.line),h={mode:"onerror",message:a,url:document.location.href,stack:[i],useragent:navigator.userAgent}}return g(h,"from window.onerror"),!!l&&l.apply(this,arguments)}function j(){m!==!0&&(l=a.onerror,a.onerror=i,m=!0)}function k(b){var c;if("undefined"!=typeof document&&(c=h.call(arguments,1)),p){if(o===b)return;var d=p;p=null,o=null,g.apply(null,[d,null].concat(c))}var i=f.computeStackTrace(b);if(p=i,o=b,a.setTimeout(function(){o===b&&(p=null,o=null,g.apply(null,[i,null].concat(c)))},i.incomplete?2e3:0),!e.Utilities.isReactNative())throw b}var l,m,n=[],o=null,p=null;return k.subscribe=b,k.unsubscribe=d,k}(),f.computeStackTrace=function(){function b(a){return"string"!=typeof a?[]:""}function g(d){if(!c(x,d)){var e="";d=d||"";var f;f="undefined"!=typeof document?document.domain:a.location.hostname,d.indexOf&&d.indexOf(f)!==-1&&(e=b(d)),x[d]=e?e.split("\n"):[]}return x[d]}function h(a,b){var c,e=/function ([^(]*)\(([^)]*)\)/,f=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,h="",j=10,k=g(a);if(!k.length)return i;for(var l=0;l0?e:null}function k(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function l(a){return k(a).replace("<","(?:<|<)").replace(">","(?:>|>)").replace("&","(?:&|&)").replace('"','(?:"|")').replace(/\s+/g,"\\s+")}function m(a,b){for(var c,d,e=0,f=b.length;ec&&(d=f.exec(e[c]))?d.index:null}function o(b){for(var c,d,e,f,g=[a.location.href],h=document.getElementsByTagName("script"),i=""+b,j=/^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,n=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,o=0;o|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,f=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,g=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,k=a.stack.split("\n"),l=[],m=/^(.*) is undefined$/.exec(a.message);if(e.Utilities.isReactNative())for(var o=/^(.*@)?.*\/[^\.]+(\.app|CodePush)\/?(.*)/,p="file://reactnative.local/",q=0;q]+)>|([^\)]+))\((.*)\) in (.*):\s*$/i,e=c?c.split("\n"):[],f=[],g=0,i=e.length;g=0&&(t.line=u+k.substring(0,w).split("\n").length)}}else if(e=p.exec(d[f])){var x=a.location.href.replace(/#.*$/,""),y=e[1],z=new RegExp(l(d[f+1]));k=m(z,[x]),t={url:x,line:k?k.line:y,func:""}}if(t){t.func||(t.func=h(t.url,t.line));var A=j(t.url,t.line),B=A?A[Math.floor(A.length/2)]:null;A&&B.replace(/^\s*/,"")===d[f+1].replace(/^\s*/,"")?t.context=A:t.context=[d[f+1]],q.push(t)}}return q.length?{mode:"multiline",name:b.name,message:d[0],url:document.location.href,stack:q,useragent:navigator.userAgent}:null}function s(a,b,c,d){var e={url:b,line:c};if(e.url&&e.line){a.incomplete=!1,e.func||(e.func=h(e.url,e.line)),e.context||(e.context=j(e.url,e.line));var f=/ '([^']+)' /.exec(d);if(f&&(e.column=n(f[1],e.url,e.line)),a.stack.length>0&&a.stack[0].url===e.url){if(a.stack[0].line===e.line)return!1;if(!a.stack[0].line&&a.stack[0].func===e.func)return a.stack[0].line=e.line,a.stack[0].context=e.context,!1}return a.stack.unshift(e),a.partial=!0,!0}return a.incomplete=!0,!1}function t(a,b){for(var c,d,e,g=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,j=[],k={},l=!1,m=t.caller;m&&!l;m=m.caller)if(m!==u&&m!==f.report){if(d={url:null,func:i,line:null,column:null},m.name?d.func=m.name:(c=g.exec(m.toString()))&&(d.func=c[1]),"undefined"==typeof d.func)try{d.func=c.input.substring(0,c.input.indexOf("{"))}catch(p){}if(e=o(m)){d.url=e.url,d.line=e.line,d.func===i&&(d.func=h(d.url,d.line));var q=/ '([^']+)' /.exec(a.message||a.description);q&&(d.column=n(q[1],e.url,e.line))}k[""+m]?l=!0:k[""+m]=!0,j.push(d)}b&&j.splice(0,b);var r={mode:"callers",name:a.name,message:a.message,url:document.location.href,stack:j,useragent:navigator.userAgent};return s(r,a.sourceURL||a.fileName,a.line||a.lineNumber,a.message||a.description),r}function u(a,b){var c=null;b=null==b?0:+b;try{if(c=q(a))return c}catch(d){if(w)throw d}try{if(c=p(a))return c}catch(d){if(w)throw d}try{if(c=r(a))return c}catch(d){if(w)throw d}try{if(c=t(a,b+1))return c}catch(d){if(w)throw d}return{tracekitResult:"failedToComputeAnyStackTrace"}}function v(a){a=(null==a?0:+a)+1;try{throw new Error}catch(b){return u(b,a+1)}}var w=!1,x={};return u.augmentStackTraceWithInitialElement=s,u.guessFunctionName=h,u.gatherContext=j,u.ofCaller=v,u}(),f.extendToAsynchronousCallbacks=function(){var b=function(b){var c=a[b];a[b]=function(){var a=h.call(arguments),b=a[0];return"function"==typeof b&&(a[0]=f.wrap(b)),c.apply?c.apply(this,a):c(a[0],a[1])}};b("setTimeout"),b("setInterval")},f.remoteFetching||(f.remoteFetching=!0),f.collectWindowErrors||(f.collectWindowErrors=!0),(!f.linesOfContext||f.linesOfContext<1)&&(f.linesOfContext=11),a.TraceKit=f}(window),Date.prototype.toISOString||!function(){function a(a){var b=String(a);return 1===b.length&&(b="0"+b),b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}(),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;var f=0|b;if(f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);c>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(b=arguments[1]),c=new Array(f),d=0;d>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(b=arguments[1]),c=0;c3?"/":"")+c.slice(3,c.length).join("/").split("?")[0].split("#")[0];var h=f.pathname;"/"===h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));var i=f.hostname,j=i.split("."),k=h.split("/");if("hostname"===b)return i;if("domain"===b)return/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/.test(i)?i:j.slice(-2).join(".");if("sub"===b)return j.slice(0,j.length-2).join(".");if("port"===b)return f.port;if("protocol"===b)return f.protocol.split(":")[0];if("auth"===b)return f.auth;if("user"===b)return f.auth.split(":")[0];if("pass"===b)return f.auth.split(":")[1]||"";if("path"===b)return f.pathname;if("."===b.charAt(0)){if(b=b.substring(1),d(b))return b=parseInt(b,10),j[b<0?j.length+b:b-1]||""}else{if(d(b))return b=parseInt(b,10),k[b<0?k.length+b:b]||"";if("file"===b)return k.slice(-1)[0];if("filename"===b)return k.slice(-1)[0].split(".")[0];if("fileext"===b)return k.slice(-1)[0].split(".")[1]||"";if("?"===b.charAt(0)||"#"===b.charAt(0)){var l=e,m=null;if("?"===b.charAt(0)?l=(l.split("?")[1]||"").split("#")[0]:"#"===b.charAt(0)&&(l=l.split("#")[1]||""),!b.charAt(1))return l;b=b.substring(1),l=l.split("&");for(var n=0,o=l.length;nb?a.slice(0,b-c.length)+c:a}};return d.isReactNative()&&__DEV__!==!0&&a.ErrorUtils&&a.ErrorUtils.getGlobalHandler&&(c=a.ErrorUtils.getGlobalHandler()),d},window.raygunBreadcrumbsFactory=function(a,b){function c(a,b){for(var c=0;c-1)return!0;if("object"==typeof d&&d.exec(a))return!0}return!1}var d=function(){this.MAX_BREADCRUMBS=32,this.MAX_MESSAGE_SIZE=1024,this.BREADCRUMB_LEVELS=["debug","info","warning","error"],this.DEFAULT_BREADCRUMB_LEVEL="info",this.DEFAULT_XHR_IGNORED_HOSTS=["raygun"],this.breadcrumbLevel="info",this.logXhrContents=!1,this.xhrIgnoredHosts=[].concat(this.DEFAULT_XHR_IGNORED_HOSTS),this.breadcrumbs=[],this.wrapWithHandler=function(a){return function(){try{return a.apply(this,arguments)}catch(c){b.Utilities.log(c)}}},this.disableConsoleFunctions=[],this.disableNavigationFunctions=[],this.disableXHRLogging=function(){},this.disableClicksTracking=function(){},this.enableAutoBreadcrumbs(),this.wrapPrototypeWithHandlers()};return d.prototype.recordBreadcrumb=function(a,c){var d={level:this.DEFAULT_BREADCRUMB_LEVEL,timestamp:(new Date).getTime(),type:"manual"};switch(typeof a){case"object":d=b.Utilities.merge(d,a);break;case"string":d=b.Utilities.merge(b.Utilities.merge(d,{message:a,metadata:c}));break;default:return void b.Utilities.log("expected first argument to recordBreadcrumb to be a 'string' or 'object', got "+typeof a)}this.BREADCRUMB_LEVELS.indexOf(d.level)===-1&&(b.Utilities.log("unknown breadcrumb level "+d.level+" setting to default of '"+this.DEFAULT_BREADCRUMB_LEVEL+"'"),d.level=this.DEFAULT_BREADCRUMB_LEVEL),this.shouldRecord(d)&&(d.message=b.Utilities.truncate(d.message,this.MAX_MESSAGE_SIZE),this.breadcrumbs.push(d),this.breadcrumbs=this.breadcrumbs.slice(-this.MAX_BREADCRUMBS))},d.prototype.shouldRecord=function(a){var b=this.BREADCRUMB_LEVELS.indexOf(a.level),c=this.BREADCRUMB_LEVELS.indexOf(this.breadcrumbLevel);return b>=c},d.prototype.setBreadcrumbLevel=function(a){return this.BREADCRUMB_LEVELS.indexOf(a)===-1?void b.Utilities.log("Breadcrumb level of '"+a+"' is invalid, setting to default of '"+this.DEFAULT_BREADCRUMB_LEVEL+"'"):void(this.breadcrumbLevel=a)},d.prototype.setOption=function(a,b){if("breadcrumbsLevel"===a)this.setBreadcrumbLevel(b);else if("xhrIgnoredHosts"===a){this.xhrIgnoredHosts=b.concat(this.DEFAULT_XHR_IGNORED_HOSTS);var d=this;this.removeBreadcrumbsWithPredicate(function(a){return"request"===a.type&&c(a.metadata.requestURL||a.metadata.responseURL,d.xhrIgnoredHosts)})}else"logXhrContents"===a&&(this.logXhrContents=b)},d.prototype.any=function(){return this.breadcrumbs.length>0},d.prototype.all=function(){for(var a=[],b=0;b-1&&(m=!0);if(!m)return void r.Utilities.log("Raygun4JS: cancelling send due to error on non-origin, non-whitelisted domain")}}if(U instanceof Array)for(var p in U)if(U.hasOwnProperty(p)&&a.location.hostname&&a.location.hostname.match(U[p]))return void r.Utilities.log("Raygun4JS: cancelling send as error originates from an excluded hostname");if(V instanceof Array&&!r.Utilities.isReactNative())for(var q in V)if(V.hasOwnProperty(q)&&navigator.userAgent.match(V[q]))return void r.Utilities.log("Raygun4JS: cancelling send as error originates from an excluded user agent");if(r.Utilities.isReactNative()||!navigator.userAgent.match("RaygunPulseInsightsCrawler")){b.stack&&b.stack.length&&r.Utilities.forEach(b.stack,function(a,b){g.push({LineNumber:b.line,ColumnNumber:b.column,ClassName:"line "+b.line+", column "+b.column,FileName:b.url,MethodName:b.func||"[anonymous]"})});var u=r.Utilities.parseUrl("?");u.length>0&&r.Utilities.forEach(u.split("&"),function(a,b){var c=b.split("=");if(c&&2===c.length){var d=decodeURIComponent(c[0]),e=k(d,c[1]);h[d]=e}}),d===c&&(d={}),r.Utilities.isEmpty(d.customData)&&("function"==typeof Q?d.customData=Q():d.customData=Q),r.Utilities.isEmpty(d.tags)&&("function"==typeof R?d.tags=R():"string"==typeof R?d.tags=[R]:d.tags=R),e||(d.tags||(d.tags=[]),r.Utilities.contains(d.tags,"UnhandledException")||d.tags.push("UnhandledException")),r.Utilities.isReactNative()&&!r.Utilities.contains(d.tags,"React Native")&&d.tags.push("React Native");var w,y=a.screen||{width:r.Utilities.getViewPort().width,height:r.Utilities.getViewPort().height,colorDepth:8},z=d.customData&&d.customData.ajaxErrorMessage;w="customData"===W?l(d.customData,"UserCustomData"):d.customData;try{JSON.stringify(w)}catch(A){var B="Cannot add custom data; may contain circular reference";w={error:B},r.Utilities.log("Raygun4JS: "+B)}var D=f;z?D=z:b.message?D=b.message:d&&d.status&&(D=d.status),"undefined"==typeof D&&(D=f),D&&"string"==typeof D&&(D=D.substring(0,512));var E;E=r.Utilities.isReactNative()?"/":[location.protocol,"//",location.host,location.pathname,location.hash].join("");var F={OccurredOn:new Date,Details:{Error:{ClassName:b.name,Message:D,StackTrace:g,StackString:b.stackstring},Environment:{UtcOffset:(new Date).getTimezoneOffset()/-60,"User-Language":navigator.userLanguage,"Document-Mode":r.Utilities.isReactNative()?"Not available":document.documentMode,"Browser-Width":r.Utilities.getViewPort().width,"Browser-Height":r.Utilities.getViewPort().height,"Screen-Width":y.width,"Screen-Height":y.height,"Color-Depth":y.colorDepth,Browser:navigator.appCodeName,"Browser-Name":navigator.appName,"Browser-Version":navigator.appVersion,Platform:navigator.platform},Client:{Name:"raygun-js",Version:"2.9.3"},UserCustomData:w,Tags:d.tags,Request:{Url:E,QueryString:h,Headers:{"User-Agent":navigator.userAgent,Referer:r.Utilities.isReactNative()?"Not available":document.referrer,Host:r.Utilities.isReactNative()?"Not available":document.domain}},Version:t||"Not supplied"}};if(F.Details.User=s,Y.any()){F.Details.Breadcrumbs=[];var G=Y.all()||[];G.forEach(function(a){a.metadata&&(a.CustomData=a.metadata,delete a.metadata),F.Details.Breadcrumbs.push(a)})}if("all"===W&&(F=l(F)),"function"==typeof x&&(r.Utilities.log("Raygun4JS: calling custom grouping key"),F.Details.GroupingKey=x(F,b,d)),"function"==typeof v){var H=v(F);H&&o(H)}else o(F)}}function o(a){if(r.Utilities.isApiKeyConfigured()){r.Utilities.log("Sending exception data to Raygun:",a);var b=T+"/entries?apikey="+encodeURIComponent(r.Options._raygunApiKey);q(b,JSON.stringify(a))}}function p(b,c){var d;return d=new a.XMLHttpRequest,"withCredentials"in d||r.Utilities.isReactNative()?d.open(b,c,!0):a.XDomainRequest&&(H&&(c=c.slice(6)),d=new a.XDomainRequest,d.open(b,c)),d.timeout=1e4,d}function q(b,c,e,f){var g=p("POST",b,c);return"function"==typeof y&&y(g),r.Utilities.log("Is offline enabled? "+K),"withCredentials"in g||r.Utilities.isReactNative()?(g.onreadystatechange=function(){4===g.readyState&&(202===g.status?j():K&&403!==g.status&&400!==g.status&&429!==g.status&&i(b,c))},g.onload=function(){r.Utilities.log("posted to Raygun"),d(this),e&&"function"==typeof e&&e(g,b,c)}):a.XDomainRequest&&(g.ontimeout=function(){K&&(r.Utilities.log("Raygun: saved locally"), -i(b,c))},g.onload=function(){r.Utilities.log("posted to Raygun"),j(),d(this),e&&"function"==typeof e&&e(g,b,c)}),g.onerror=function(){r.Utilities.log("failed to post to Raygun"),d(this),f&&"function"==typeof f&&f(g,b,c)},g?(r.Utilities.isReactNative()&&g.setRequestHeader("Content-type","application/json;charset=UTF-8"),void g.send(c)):void r.Utilities.log("CORS not supported")}var r={};r.Utilities=raygunUtilityFactory(a,r),r.Breadcrumbs=raygunBreadcrumbsFactory(a,r);var s,t,u,v,w,x,y,z,A,B,C={LOADING:0,READY:1},D="raygun4js-userid",E=TraceKit,F=a.Raygun,G=!1,H=!1,I=!1,J=!1,K=!1,L=!1,M=!1,N=!1,O=!0,P=!1,Q={},R=[],S=[],T="https://api.raygun.io",U=null,V=null,W="customData",X=null,Y=new r.Breadcrumbs,Z=null,$=!0,_=C.LOADING,aa=[],ba=[],ca=null,da=Math.random(),ea={Rand:da,Options:{},noConflict:function(){return F&&(a.Raygun=F),r},constructNewRaygun:function(){var b=raygunFactory(a,a.jQuery);return b},init:function(a,d,f){return E.remoteFetching=!1,this.Options._raygunApiKey=a,f&&(Q=f),b&&(B=b(document)),d&&(H=d.allowInsecureSubmissions||!1,I=d.ignoreAjaxAbort||!1,J=d.ignoreAjaxError||!1,M=d.disableAnonymousUserTracking||!1,N=d.disableErrorTracking||!1,O=d.disablePulse===c||d.disablePulse,U=d.excludedHostnames||!1,V=d.excludedUserAgents||!1,Z=d.pulseMaxVirtualPageDuration||null,$=d.pulseIgnoreUrlCasing||!1,ca=d.pulseCustomLoadTimeEnabled||!1,d.apiUrl&&(T=d.apiUrl),"undefined"!=typeof d.wrapAsynchronousCallbacks&&(P=d.wrapAsynchronousCallbacks),d.debugMode&&(G=d.debugMode),this.Options._debugMode=G,d.ignore3rdPartyErrors&&(L=!0),d.apiEndpoint&&(T=d.apiEndpoint),d.from&&(A=d.from)),e(),r},withCustomData:function(a){return Q=a,r},withTags:function(a){return R=a,X!==c&&null!==X&&X.withTags(a),r},attach:function(){return!r.Utilities.isApiKeyConfigured()||N?r:(a.RaygunObject&&a[a.RaygunObject]&&a[a.RaygunObject].q&&(a.onerror=null),r.Utilities.isReactNative()&&__DEV__!==!0&&a.ErrorUtils&&a.ErrorUtils.setGlobalHandler&&a.ErrorUtils.setGlobalHandler(function(a,b){var c=z;z=function(){"function"==typeof c&&c(),r.Utilities.defaultReactNativeGlobalHandler(a,b),z=c},TraceKit.report(a)}),E.report.subscribe(n),P&&E.extendToAsynchronousCallbacks(),B&&B.ajaxError&&!J&&B.ajaxError(m),r)},detach:function(){return E.report.unsubscribe(n),B&&B.unbind("ajaxError",m),r},send:function(a,b,c){if(N)return r.Utilities.log("Error not sent due to disabled error tracking"),r;try{n(E.computeStackTrace(a),{customData:"function"==typeof Q?r.Utilities.merge(Q(),b):r.Utilities.merge(Q,b),tags:"function"==typeof R?r.Utilities.mergeArray(R(),c):r.Utilities.mergeArray(R,c)},!0)}catch(d){if(a!==d)throw d}return r},setUser:function(a,b,d,e,f,g){return s={Identifier:a},"boolean"==typeof b&&(s.IsAnonymous=b),d&&(s.Email=d),e&&(s.FullName=e),f&&(s.FirstName=f),g&&(s.UUID=g),X!==c&&null!==X&&X.setUser(s),r},resetAnonymousUser:function(){r.Utilities.clearCookie("raygun4js-userid")},setVersion:function(a){return t=a,r},saveIfOffline:function(a){return"undefined"!=typeof a&&"boolean"==typeof a&&(K=a),r},filterSensitiveData:function(a){return u=a,r},setFilterScope:function(a){return"customData"!==a&&"all"!==a||(W=a),r},whitelistCrossOriginDomains:function(a){return S=a,r},onBeforeSend:function(a){return v=a,r},onBeforeSendRum:function(a){return w=a,r},groupingKey:function(a){return x=a,r},onBeforeXHR:function(a){return y=a,r},onAfterSend:function(a){return z=a,r},endSession:function(){r.RealUserMonitoring!==c&&X&&X.endSession()},trackEvent:function(a,b){return _!==C.READY?void ba.push({type:a,options:b}):void(r.RealUserMonitoring!==c&&X&&("pageView"===a&&b.path?X.virtualPageLoaded(b.path):"customTimings"===a&&b.timings&&X.sendCustomTimings(b.timings)))},recordBreadcrumb:function(){Y.recordBreadcrumb.apply(Y,arguments)},enableAutoBreadcrumbs:function(a){a?Y["enableAutoBreadcrumbs"+a]():Y.enableAutoBreadcrumbs()},disableAutoBreadcrumbs:function(a){a?Y["disableAutoBreadcrumbs"+a]():Y.disableAutoBreadcrumbs()},setBreadcrumbOption:function(a,b){Y.setOption(a,b)},setBreadcrumbs:function(a){Y=a},getBreadcrumbs:function(){return Y.all()}};return r=r.Utilities.mergeMutate(r,ea),a.__raygunNoConflict||(a.Raygun=r),TraceKit.setRaygun(r),r};window.__instantiatedRaygun=raygunFactory(window,window.jQuery);var raygunRumFactory=function(a,b,c){c.RealUserMonitoring=function(b,c,d,e,f,g,h,i,j,k,l,m,n){function o(a){if(!R.pendingPayloadData||a){var b,c,d=[],e=[],f=!1,g=function(){e.push(q(d)),d=[],f=!1},h=function(){d.length>0&&g(),e.length>0&&(R.sendItemsImmediately(e),d=[],f=!1)};for(c=0;c0&&i&&g(),i&&s(),b.timing.t===T.VirtualPage&&b.timing.pending)return h(),void R.queuedPerformanceTimings.splice(0,c);d.push(b),f=f||b.timing.t===T.Page||b.timing.t===T.VirtualPage}h(),R.queuedPerformanceTimings=[]}}function p(a,b){R.queuedPerformanceTimings=R.queuedPerformanceTimings.concat(a),o(b)}function q(a){return{sessionId:R.sessionId,requestId:R.requestId,timestamp:(new Date).toISOString(),type:"web_request_timing",user:R.user,version:R.version||"Not supplied",device:navigator.userAgent,tags:R.tags,data:a}}function r(a){var b=v(R.cookieName),c=null===b,d="string"==typeof exisitingCookie&&b.length>0&&b.indexOf("timestamp")===-1,e=null;if(!c&&!d){var f=new Date(u(b,"timestamp")),g=new Date(new Date-18e5);e=f0&&(c.b=b+a.domainLookupStart-c.a),a.domainLookupEnd&&a.domainLookupEnd>0&&(c.c=b+a.domainLookupEnd-c.a),a.connectStart&&a.connectStart>0&&(c.d=b+a.connectStart-c.a),a.connectEnd&&a.connectEnd>0&&(c.e=b+a.connectEnd-c.a),a.responseStart&&a.responseStart>0&&(c.f=b+a.responseStart-c.a),a.responseEnd&&a.responseEnd>0&&(c.g=b+a.responseEnd-c.a),a.domLoading&&a.domLoading>0&&(c.h=b+a.domLoading-c.a),a.domInteractive&&a.domInteractive>0&&(c.i=b+a.domInteractive-c.a),a.domContentLoadedEventEnd&&a.domContentLoadedEventEnd>0&&(c.j=b+a.domContentLoadedEventEnd-c.a),a.domComplete&&a.domComplete>0&&(c.k=N(b+a.domComplete-c.a)),a.loadEventStart&&a.loadEventStart>0&&(c.l=b+a.loadEventStart-c.a),a.loadEventEnd&&a.loadEventEnd>0&&(c.m=b+a.loadEventEnd-c.a),a.secureConnectionStart&&a.secureConnectionStart>0&&(c.n=b+(a.secureConnectionStart-a.connectStart)-c.a),c=J(c)}function B(a){return"xmlhttprequest"===a.initiatorType?T.XHR:0===a.duration?T.CachedChildAsset:T.ChildAsset}function C(a,b){var c={du:N(a.duration).toFixed(2),t:B(a),a:b+a.fetchStart};return a.domainLookupStart&&a.domainLookupStart>0&&(c.b=b+a.domainLookupStart-c.a),a.domainLookupEnd&&a.domainLookupEnd>0&&(c.c=b+a.domainLookupEnd-c.a),a.connectStart&&a.connectStart>0&&(c.d=b+a.connectStart-c.a),a.connectEnd&&a.connectEnd>0&&(c.e=b+a.connectEnd-c.a),a.responseStart&&a.responseStart>0&&(c.f=b+a.responseStart-c.a),a.responseEnd&&a.responseEnd>0&&(c.g=b+a.responseEnd-c.a),a.secureConnectionStart&&a.secureConnectionStart>0&&(c.n=b+(a.secureConnectionStart-a.connectStart)-c.a),c.a=c.a.toFixed(2),c=J(c)}function D(){var b=a.location.pathname;R.ignoreUrlCasing&&(b=b.toLowerCase());var c=a.location.protocol+"//"+a.location.host+b;return c.length>800&&(c=c.substring(0,800)),{url:c,userAgent:navigator.userAgent,timing:A(a.performance.timing,0),size:0}}function E(b,c){R.ignoreUrlCasing&&(b=b.toLowerCase()),b.indexOf("?")!==-1&&(b=b.split("?")[0]);var d=a.location.protocol+"//"+a.location.host+b;return d.length>800&&(d=d.substring(0,800)),{url:d,userAgent:navigator.userAgent,timing:x(c),size:0}}function F(b,c){var d=b.name.split("?")[0];return R.ignoreUrlCasing&&(d=d.toLowerCase()),d.length>800&&(d=d.substring(0,800)),{url:d,timing:C(b,c?0:a.performance.timing.navigationStart),size:b.decodedBodySize||0}}function G(a){return 0===a.indexOf(R.apiUrl)||(a.indexOf("favicon.ico")>0||(0===a.indexOf("about:blank")||("j"===a[0]&&1===a.indexOf("avascript:")||(0===a.indexOf("chrome-extension://")||(0===a.indexOf("res://")||0===a.indexOf("file://"))))))}function H(b,c){if(L("getEntries","function"))try{for(var d=a.performance.getEntries(),e=R.offset;ee?f=1:d0&&"/"!==a[0]&&(a+="/"),a.length>800&&(a=a.substring(0,800)),this.virtualPage=a),y(),this.sendPerformance(!1)},this.heartBeat=function(){return null!==R.heartBeatInterval?void O("Raygun4JS: Heartbeat already exists. Skipping heartbeat creation."):void(R.heartBeatInterval=setInterval(function(){R.sendChildAssets(),R.sendQueuedItems()},R.heartBeatIntervalTime))},this.setUser=function(a){R.user=a},this.withTags=function(a){R.tags=a},this.endSession=function(){R.sendItemImmediately({sessionId:R.sessionId,requestId:R.requestId,timestamp:(new Date).toISOString(),type:"session_end"})},this.sendNewSessionStart=function(){R.sendItemImmediately({sessionId:R.sessionId,timestamp:(new Date).toISOString(),type:"session_start",user:R.user,version:R.version||"Not supplied",tags:R.tags,device:navigator.userAgent})},this.sendCustomTimings=function(a){"object"!=typeof a||"number"!=typeof a.custom1&&"number"!=typeof a.custom2&&"number"!=typeof a.custom3&&"number"!=typeof a.custom4&&"number"!=typeof a.custom5&&"number"!=typeof a.custom6&&"number"!=typeof a.custom7&&"number"!=typeof a.custom8&&"number"!=typeof a.custom9&&"number"!=typeof a.custom10||R.pendingPayloadData&&R.queuedPerformanceTimings.length>0&&(R.pendingPayloadData=!1,R.queuedPerformanceTimings[0].customTiming=a,o())},this.sendPerformance=function(a){var b=I(this.virtualPage,a);null===b||b.length<0||p(b,!1)},this.sendChildAssets=function(a){a&&y();var b=[];H(b),p(b,a)},this.sendQueuedItems=function(){if(R.queuedItems.length>0){R.queuedItems=Q(R.queuedItems,"timestamp");var a=R.queuedItems.splice(0,R.maxQueueItemsSent);R.sendItemsImmediately(a)}},this.sendItemImmediately=function(a){var b=[a];R.sendItemsImmediately(b)},this.sendItemsImmediately=function(a){var b={eventData:a},c=function(){O("Raygun4JS: Items sent successfully. Queue length: "+R.queuedItems.length)},d=function(b){R.requeueItemsToFront(a),O("Raygun4JS: Items failed to send. Queue length: "+R.queuedItems.length+" Response status code: "+b.status)};this.postPayload(b,c,d)},this.requeueItemsToFront=function(a){R.queuedItems=a.concat(R.queuedItems)},this.postPayload=function(a,b,c){"function"!=typeof b&&(b=function(){}),"function"!=typeof c&&(c=function(){}),R.makePostCorsRequest(R.apiUrl+"/events?apikey="+encodeURIComponent(R.apiKey),a,b,c)},this.makePostCorsRequest=function(b,c,e,f){if(R.excludedUserAgents instanceof Array)for(var g in R.excludedUserAgents)if(R.excludedUserAgents.hasOwnProperty(g)&&navigator.userAgent.match(R.excludedUserAgents[g]))return void O("Raygun4JS: cancelling send as error originates from an excluded user agent");if(R.excludedHostNames instanceof Array)for(var h in R.excludedHostNames)if(R.excludedHostNames.hasOwnProperty(h)&&a.location.hostname&&a.location.hostname.match(R.excludedHostNames[h]))return void O("Raygun4JS: cancelling send as error originates from an excluded hostname");if(!navigator.userAgent.match("RaygunPulseInsightsCrawler")){var i=R.beforeSend(c);if(!i)return void O("Raygun4JS: cancelling send because onBeforeSendRUM returned falsy value");if(i.eventData)for(var j=0;j=0;--b)n[b]===a&&n.splice(b,1)}function g(a,b){var d=null;if(!b||f.collectWindowErrors){for(var e in n)if(c(n,e))try{n[e].apply(null,[a].concat(h.call(arguments,2)))}catch(g){d=g}if(d)throw d}}function i(a,b,c,d,e){var h=null;if(e)h=f.computeStackTrace(e);else if(p)f.computeStackTrace.augmentStackTraceWithInitialElement(p,b,c,a),h=p,p=null,o=null;else{var i={url:b,line:c,column:d};i.func=f.computeStackTrace.guessFunctionName(i.url,i.line),i.context=f.computeStackTrace.gatherContext(i.url,i.line),h={mode:"onerror",message:a,url:document.location.href,stack:[i],useragent:navigator.userAgent}}return g(h,"from window.onerror"),!!l&&l.apply(this,arguments)}function j(){m!==!0&&(l=a.onerror,a.onerror=i,m=!0)}function k(b){var c;if("undefined"!=typeof document&&(c=h.call(arguments,1)),p){if(o===b)return;var d=p;p=null,o=null,g.apply(null,[d,null].concat(c))}var i=f.computeStackTrace(b);if(p=i,o=b,a.setTimeout(function(){o===b&&(p=null,o=null,g.apply(null,[i,null].concat(c)))},i.incomplete?2e3:0),!e.Utilities.isReactNative())throw b}var l,m,n=[],o=null,p=null;return k.subscribe=b,k.unsubscribe=d,k}(),f.computeStackTrace=function(){function b(a){return"string"!=typeof a?[]:""}function g(d){if(!c(x,d)){var e="";d=d||"";var f;f="undefined"!=typeof document?document.domain:a.location.hostname,d.indexOf&&d.indexOf(f)!==-1&&(e=b(d)),x[d]=e?e.split("\n"):[]}return x[d]}function h(a,b){var c,e=/function ([^(]*)\(([^)]*)\)/,f=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,h="",j=10,k=g(a);if(!k.length)return i;for(var l=0;l0?e:null}function k(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function l(a){return k(a).replace("<","(?:<|<)").replace(">","(?:>|>)").replace("&","(?:&|&)").replace('"','(?:"|")').replace(/\s+/g,"\\s+")}function m(a,b){for(var c,d,e=0,f=b.length;ec&&(d=f.exec(e[c]))?d.index:null}function o(b){for(var c,d,e,f,g=[a.location.href],h=document.getElementsByTagName("script"),i=""+b,j=/^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,n=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/,o=0;o|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,f=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,g=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,k=a.stack.split("\n"),l=[],m=/^(.*) is undefined$/.exec(a.message);if(e.Utilities.isReactNative())for(var o=/^(.*@)?.*\/[^\.]+(\.app|CodePush)\/?(.*)/,p="file://reactnative.local/",q=0;q]+)>|([^\)]+))\((.*)\) in (.*):\s*$/i,e=c?c.split("\n"):[],f=[],g=0,i=e.length;g=0&&(t.line=u+k.substring(0,w).split("\n").length)}}else if(e=p.exec(d[f])){var x=a.location.href.replace(/#.*$/,""),y=e[1],z=new RegExp(l(d[f+1]));k=m(z,[x]),t={url:x,line:k?k.line:y,func:""}}if(t){t.func||(t.func=h(t.url,t.line));var A=j(t.url,t.line),B=A?A[Math.floor(A.length/2)]:null;A&&B.replace(/^\s*/,"")===d[f+1].replace(/^\s*/,"")?t.context=A:t.context=[d[f+1]],q.push(t)}}return q.length?{mode:"multiline",name:b.name,message:d[0],url:document.location.href,stack:q,useragent:navigator.userAgent}:null}function s(a,b,c,d){var e={url:b,line:c};if(e.url&&e.line){a.incomplete=!1,e.func||(e.func=h(e.url,e.line)),e.context||(e.context=j(e.url,e.line));var f=/ '([^']+)' /.exec(d);if(f&&(e.column=n(f[1],e.url,e.line)),a.stack.length>0&&a.stack[0].url===e.url){if(a.stack[0].line===e.line)return!1;if(!a.stack[0].line&&a.stack[0].func===e.func)return a.stack[0].line=e.line,a.stack[0].context=e.context,!1}return a.stack.unshift(e),a.partial=!0,!0}return a.incomplete=!0,!1}function t(a,b){for(var c,d,e,g=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,j=[],k={},l=!1,m=t.caller;m&&!l;m=m.caller)if(m!==u&&m!==f.report){if(d={url:null,func:i,line:null,column:null},m.name?d.func=m.name:(c=g.exec(m.toString()))&&(d.func=c[1]),"undefined"==typeof d.func)try{d.func=c.input.substring(0,c.input.indexOf("{"))}catch(p){}if(e=o(m)){d.url=e.url,d.line=e.line,d.func===i&&(d.func=h(d.url,d.line));var q=/ '([^']+)' /.exec(a.message||a.description);q&&(d.column=n(q[1],e.url,e.line))}k[""+m]?l=!0:k[""+m]=!0,j.push(d)}b&&j.splice(0,b);var r={mode:"callers",name:a.name,message:a.message,url:document.location.href,stack:j,useragent:navigator.userAgent};return s(r,a.sourceURL||a.fileName,a.line||a.lineNumber,a.message||a.description),r}function u(a,b){var c=null;b=null==b?0:+b;try{if(c=q(a))return c}catch(d){if(w)throw d}try{if(c=p(a))return c}catch(d){if(w)throw d}try{if(c=r(a))return c}catch(d){if(w)throw d}try{if(c=t(a,b+1))return c}catch(d){if(w)throw d}return{tracekitResult:"failedToComputeAnyStackTrace"}}function v(a){a=(null==a?0:+a)+1;try{throw new Error}catch(b){return u(b,a+1)}}var w=!1,x={};return u.augmentStackTraceWithInitialElement=s,u.guessFunctionName=h,u.gatherContext=j,u.ofCaller=v,u}(),f.extendToAsynchronousCallbacks=function(){var b=function(b){var c=a[b];a[b]=function(){var a=h.call(arguments),b=a[0];return"function"==typeof b&&(a[0]=f.wrap(b)),c.apply?c.apply(this,a):c(a[0],a[1])}};b("setTimeout"),b("setInterval")},f.remoteFetching||(f.remoteFetching=!0),f.collectWindowErrors||(f.collectWindowErrors=!0),(!f.linesOfContext||f.linesOfContext<1)&&(f.linesOfContext=11),a.TraceKit=f}(window),Date.prototype.toISOString||!function(){function a(a){var b=String(a);return 1===b.length&&(b="0"+b),b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}(),Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;var f=0|b;if(f>=e)return-1;for(c=Math.max(f>=0?f:e-Math.abs(f),0);c>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(b=arguments[1]),c=new Array(f),d=0;d>>0;if("function"!=typeof a)throw new TypeError(a+" is not a function");for(arguments.length>1&&(b=arguments[1]),c=0;c3?"/":"")+c.slice(3,c.length).join("/").split("?")[0].split("#")[0];var h=f.pathname;"/"===h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));var i=f.hostname,j=i.split("."),k=h.split("/");if("hostname"===b)return i;if("domain"===b)return/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/.test(i)?i:j.slice(-2).join(".");if("sub"===b)return j.slice(0,j.length-2).join(".");if("port"===b)return f.port;if("protocol"===b)return f.protocol.split(":")[0];if("auth"===b)return f.auth;if("user"===b)return f.auth.split(":")[0];if("pass"===b)return f.auth.split(":")[1]||"";if("path"===b)return f.pathname;if("."===b.charAt(0)){if(b=b.substring(1),d(b))return b=parseInt(b,10),j[b<0?j.length+b:b-1]||""}else{if(d(b))return b=parseInt(b,10),k[b<0?k.length+b:b]||"";if("file"===b)return k.slice(-1)[0];if("filename"===b)return k.slice(-1)[0].split(".")[0];if("fileext"===b)return k.slice(-1)[0].split(".")[1]||"";if("?"===b.charAt(0)||"#"===b.charAt(0)){var l=e,m=null;if("?"===b.charAt(0)?l=(l.split("?")[1]||"").split("#")[0]:"#"===b.charAt(0)&&(l=l.split("#")[1]||""),!b.charAt(1))return l;b=b.substring(1),l=l.split("&");for(var n=0,o=l.length;nb?a.slice(0,b-c.length)+c:a}};return d.isReactNative()&&__DEV__!==!0&&a.ErrorUtils&&a.ErrorUtils.getGlobalHandler&&(c=a.ErrorUtils.getGlobalHandler()),d},window.raygunBreadcrumbsFactory=function(a,b){function c(a,b){for(var c=0;c-1)return!0;if("object"==typeof d&&d.exec(a))return!0}return!1}var d=function(){this.MAX_BREADCRUMBS=32,this.MAX_MESSAGE_SIZE=1024,this.BREADCRUMB_LEVELS=["debug","info","warning","error"],this.DEFAULT_BREADCRUMB_LEVEL="info",this.DEFAULT_XHR_IGNORED_HOSTS=["raygun"],this.breadcrumbLevel="info",this.logXhrContents=!1,this.xhrIgnoredHosts=[].concat(this.DEFAULT_XHR_IGNORED_HOSTS),this.breadcrumbs=[],this.wrapWithHandler=function(a){return function(){try{return a.apply(this,arguments)}catch(c){b.Utilities.log(c)}}},this.disableConsoleFunctions=[],this.disableNavigationFunctions=[],this.disableXHRLogging=function(){},this.disableClicksTracking=function(){},this.enableAutoBreadcrumbs(),this.wrapPrototypeWithHandlers()};return d.prototype.recordBreadcrumb=function(a,c){var d={level:this.DEFAULT_BREADCRUMB_LEVEL,timestamp:(new Date).getTime(),type:"manual"};switch(typeof a){case"object":d=b.Utilities.merge(d,a);break;case"string":d=b.Utilities.merge(b.Utilities.merge(d,{message:a,metadata:c}));break;default:return void b.Utilities.log("expected first argument to recordBreadcrumb to be a 'string' or 'object', got "+typeof a)}this.BREADCRUMB_LEVELS.indexOf(d.level)===-1&&(b.Utilities.log("unknown breadcrumb level "+d.level+" setting to default of '"+this.DEFAULT_BREADCRUMB_LEVEL+"'"),d.level=this.DEFAULT_BREADCRUMB_LEVEL),this.shouldRecord(d)&&(d.message=b.Utilities.truncate(d.message,this.MAX_MESSAGE_SIZE),this.breadcrumbs.push(d),this.breadcrumbs=this.breadcrumbs.slice(-this.MAX_BREADCRUMBS))},d.prototype.shouldRecord=function(a){var b=this.BREADCRUMB_LEVELS.indexOf(a.level),c=this.BREADCRUMB_LEVELS.indexOf(this.breadcrumbLevel);return b>=c},d.prototype.setBreadcrumbLevel=function(a){return this.BREADCRUMB_LEVELS.indexOf(a)===-1?void b.Utilities.log("Breadcrumb level of '"+a+"' is invalid, setting to default of '"+this.DEFAULT_BREADCRUMB_LEVEL+"'"):void(this.breadcrumbLevel=a)},d.prototype.setOption=function(a,b){if("breadcrumbsLevel"===a)this.setBreadcrumbLevel(b);else if("xhrIgnoredHosts"===a){this.xhrIgnoredHosts=b.concat(this.DEFAULT_XHR_IGNORED_HOSTS);var d=this;this.removeBreadcrumbsWithPredicate(function(a){return"request"===a.type&&c(a.metadata.requestURL||a.metadata.responseURL,d.xhrIgnoredHosts)})}else"logXhrContents"===a&&(this.logXhrContents=b)},d.prototype.any=function(){return this.breadcrumbs.length>0},d.prototype.all=function(){for(var a=[],b=0;b-1&&(m=!0);if(!m)return void r.Utilities.log("Raygun4JS: cancelling send due to error on non-origin, non-whitelisted domain")}}if(U instanceof Array)for(var p in U)if(U.hasOwnProperty(p)&&a.location.hostname&&a.location.hostname.match(U[p]))return void r.Utilities.log("Raygun4JS: cancelling send as error originates from an excluded hostname");if(V instanceof Array&&!r.Utilities.isReactNative())for(var q in V)if(V.hasOwnProperty(q)&&navigator.userAgent.match(V[q]))return void r.Utilities.log("Raygun4JS: cancelling send as error originates from an excluded user agent");if(r.Utilities.isReactNative()||!navigator.userAgent.match("RaygunPulseInsightsCrawler")){b.stack&&b.stack.length&&r.Utilities.forEach(b.stack,function(a,b){g.push({LineNumber:b.line,ColumnNumber:b.column,ClassName:"line "+b.line+", column "+b.column,FileName:b.url,MethodName:b.func||"[anonymous]"})});var u=r.Utilities.parseUrl("?");u.length>0&&r.Utilities.forEach(u.split("&"),function(a,b){var c=b.split("=");if(c&&2===c.length){var d=decodeURIComponent(c[0]),e=k(d,c[1]);h[d]=e}}),d===c&&(d={}),r.Utilities.isEmpty(d.customData)&&("function"==typeof Q?d.customData=Q():d.customData=Q),r.Utilities.isEmpty(d.tags)&&("function"==typeof R?d.tags=R():"string"==typeof R?d.tags=[R]:d.tags=R),e||(d.tags||(d.tags=[]),r.Utilities.contains(d.tags,"UnhandledException")||d.tags.push("UnhandledException")),r.Utilities.isReactNative()&&!r.Utilities.contains(d.tags,"React Native")&&d.tags.push("React Native");var w,y=a.screen||{width:r.Utilities.getViewPort().width,height:r.Utilities.getViewPort().height,colorDepth:8},z=d.customData&&d.customData.ajaxErrorMessage;w="customData"===W?l(d.customData,"UserCustomData"):d.customData;try{JSON.stringify(w)}catch(A){var B="Cannot add custom data; may contain circular reference";w={error:B},r.Utilities.log("Raygun4JS: "+B)}var D=f;z?D=z:b.message?D=b.message:d&&d.status&&(D=d.status),"undefined"==typeof D&&(D=f),D&&"string"==typeof D&&(D=D.substring(0,512));var E;E=r.Utilities.isReactNative()?"/":[location.protocol,"//",location.host,location.pathname,location.hash].join("");var F={OccurredOn:new Date,Details:{Error:{ClassName:b.name,Message:D,StackTrace:g,StackString:b.stackstring},Environment:{UtcOffset:(new Date).getTimezoneOffset()/-60,"User-Language":navigator.userLanguage,"Document-Mode":r.Utilities.isReactNative()?"Not available":document.documentMode,"Browser-Width":r.Utilities.getViewPort().width,"Browser-Height":r.Utilities.getViewPort().height,"Screen-Width":y.width,"Screen-Height":y.height,"Color-Depth":y.colorDepth,Browser:navigator.appCodeName,"Browser-Name":navigator.appName,"Browser-Version":navigator.appVersion,Platform:navigator.platform},Client:{Name:"raygun-js",Version:"2.9.4"},UserCustomData:w,Tags:d.tags,Request:{Url:E,QueryString:h,Headers:{"User-Agent":navigator.userAgent,Referer:r.Utilities.isReactNative()?"Not available":document.referrer,Host:r.Utilities.isReactNative()?"Not available":document.domain}},Version:t||"Not supplied"}};if(F.Details.User=s,Y.any()){F.Details.Breadcrumbs=[];var G=Y.all()||[];G.forEach(function(a){a.metadata&&(a.CustomData=a.metadata,delete a.metadata),F.Details.Breadcrumbs.push(a)})}if("all"===W&&(F=l(F)),"function"==typeof x&&(r.Utilities.log("Raygun4JS: calling custom grouping key"),F.Details.GroupingKey=x(F,b,d)),"function"==typeof v){var H=v(F);H&&o(H)}else o(F)}}function o(a){if(r.Utilities.isApiKeyConfigured()){r.Utilities.log("Sending exception data to Raygun:",a);var b=T+"/entries?apikey="+encodeURIComponent(r.Options._raygunApiKey);q(b,JSON.stringify(a))}}function p(b,c){var d;return d=new a.XMLHttpRequest,"withCredentials"in d||r.Utilities.isReactNative()?d.open(b,c,!0):a.XDomainRequest&&(H&&(c=c.slice(6)),d=new a.XDomainRequest,d.open(b,c)),d.timeout=1e4,d}function q(b,c,e,f){var g=p("POST",b,c);return"function"==typeof y&&y(g),r.Utilities.log("Is offline enabled? "+K),"withCredentials"in g||r.Utilities.isReactNative()?(g.onreadystatechange=function(){4===g.readyState&&(202===g.status?j():K&&403!==g.status&&400!==g.status&&429!==g.status&&i(b,c))},g.onload=function(){r.Utilities.log("posted to Raygun"),d(this),e&&"function"==typeof e&&e(g,b,c)}):a.XDomainRequest&&(g.ontimeout=function(){ +K&&(r.Utilities.log("Raygun: saved locally"),i(b,c))},g.onload=function(){r.Utilities.log("posted to Raygun"),j(),d(this),e&&"function"==typeof e&&e(g,b,c)}),g.onerror=function(){r.Utilities.log("failed to post to Raygun"),d(this),f&&"function"==typeof f&&f(g,b,c)},g?(r.Utilities.isReactNative()&&g.setRequestHeader("Content-type","application/json;charset=UTF-8"),void g.send(c)):void r.Utilities.log("CORS not supported")}var r={};r.Utilities=raygunUtilityFactory(a,r),r.Breadcrumbs=raygunBreadcrumbsFactory(a,r);var s,t,u,v,w,x,y,z,A,B,C={LOADING:0,READY:1},D="raygun4js-userid",E=TraceKit,F=a.Raygun,G=!1,H=!1,I=!1,J=!1,K=!1,L=!1,M=!1,N=!1,O=!0,P=!1,Q={},R=[],S=[],T="https://api.raygun.io",U=null,V=null,W="customData",X=null,Y=new r.Breadcrumbs,Z=null,$=!0,_=C.LOADING,aa=[],ba=[],ca=null,da=Math.random(),ea={Rand:da,Options:{},noConflict:function(){return F&&(a.Raygun=F),r},constructNewRaygun:function(){var b=raygunFactory(a,a.jQuery);return b},init:function(a,d,f){return E.remoteFetching=!1,this.Options._raygunApiKey=a,f&&(Q=f),b&&(B=b(document)),d&&(H=d.allowInsecureSubmissions||!1,I=d.ignoreAjaxAbort||!1,J=d.ignoreAjaxError||!1,M=d.disableAnonymousUserTracking||!1,N=d.disableErrorTracking||!1,O=d.disablePulse===c||d.disablePulse,U=d.excludedHostnames||!1,V=d.excludedUserAgents||!1,Z=d.pulseMaxVirtualPageDuration||null,$=d.pulseIgnoreUrlCasing||!1,ca=d.pulseCustomLoadTimeEnabled||!1,d.apiUrl&&(T=d.apiUrl),"undefined"!=typeof d.wrapAsynchronousCallbacks&&(P=d.wrapAsynchronousCallbacks),d.debugMode&&(G=d.debugMode),this.Options._debugMode=G,d.ignore3rdPartyErrors&&(L=!0),d.apiEndpoint&&(T=d.apiEndpoint),d.from&&(A=d.from)),e(),r},withCustomData:function(a){return Q=a,r},withTags:function(a){return R=a,X!==c&&null!==X&&X.withTags(a),r},attach:function(){return!r.Utilities.isApiKeyConfigured()||N?r:(a.RaygunObject&&a[a.RaygunObject]&&a[a.RaygunObject].q&&(a.onerror=null),r.Utilities.isReactNative()&&__DEV__!==!0&&a.ErrorUtils&&a.ErrorUtils.setGlobalHandler&&a.ErrorUtils.setGlobalHandler(function(a,b){var c=z;z=function(){"function"==typeof c&&c(),r.Utilities.defaultReactNativeGlobalHandler(a,b),z=c},TraceKit.report(a)}),E.report.subscribe(n),P&&E.extendToAsynchronousCallbacks(),B&&B.ajaxError&&!J&&B.ajaxError(m),r)},detach:function(){return E.report.unsubscribe(n),B&&B.unbind("ajaxError",m),r},send:function(a,b,c){if(N)return r.Utilities.log("Error not sent due to disabled error tracking"),r;try{n(E.computeStackTrace(a),{customData:"function"==typeof Q?r.Utilities.merge(Q(),b):r.Utilities.merge(Q,b),tags:"function"==typeof R?r.Utilities.mergeArray(R(),c):r.Utilities.mergeArray(R,c)},!0)}catch(d){if(a!==d)throw d}return r},setUser:function(a,b,d,e,f,g){return s={Identifier:a},"boolean"==typeof b&&(s.IsAnonymous=b),d&&(s.Email=d),e&&(s.FullName=e),f&&(s.FirstName=f),g&&(s.UUID=g),X!==c&&null!==X&&X.setUser(s),r},resetAnonymousUser:function(){r.Utilities.clearCookie("raygun4js-userid")},setVersion:function(a){return t=a,r},saveIfOffline:function(a){return"undefined"!=typeof a&&"boolean"==typeof a&&(K=a),r},filterSensitiveData:function(a){return u=a,r},setFilterScope:function(a){return"customData"!==a&&"all"!==a||(W=a),r},whitelistCrossOriginDomains:function(a){return S=a,r},onBeforeSend:function(a){return v=a,r},onBeforeSendRum:function(a){return w=a,r},groupingKey:function(a){return x=a,r},onBeforeXHR:function(a){return y=a,r},onAfterSend:function(a){return z=a,r},endSession:function(){r.RealUserMonitoring!==c&&X&&X.endSession()},trackEvent:function(a,b){return _!==C.READY?void ba.push({type:a,options:b}):void(r.RealUserMonitoring!==c&&X&&("pageView"===a&&b.path?X.virtualPageLoaded(b.path):"customTimings"===a&&b.timings&&X.sendCustomTimings(b.timings)))},recordBreadcrumb:function(){Y.recordBreadcrumb.apply(Y,arguments)},enableAutoBreadcrumbs:function(a){a?Y["enableAutoBreadcrumbs"+a]():Y.enableAutoBreadcrumbs()},disableAutoBreadcrumbs:function(a){a?Y["disableAutoBreadcrumbs"+a]():Y.disableAutoBreadcrumbs()},setBreadcrumbOption:function(a,b){Y.setOption(a,b)},setBreadcrumbs:function(a){Y=a},getBreadcrumbs:function(){return Y.all()}};return r=r.Utilities.mergeMutate(r,ea),a.__raygunNoConflict||(a.Raygun=r),TraceKit.setRaygun(r),r};window.__instantiatedRaygun=raygunFactory(window,window.jQuery);var raygunRumFactory=function(a,b,c){c.RealUserMonitoring=function(b,c,d,e,f,g,h,i,j,k,l,m,n){function o(a){if(!R.pendingPayloadData||a){var b,c,d=[],e=[],f=!1,g=function(){e.push(q(d)),d=[],f=!1},h=function(){d.length>0&&g(),e.length>0&&(R.sendItemsImmediately(e),d=[],f=!1)};for(c=0;c0&&i&&g(),i&&s(),b.timing.t===T.VirtualPage&&b.timing.pending)return h(),void R.queuedPerformanceTimings.splice(0,c);d.push(b),f=f||b.timing.t===T.Page||b.timing.t===T.VirtualPage}h(),R.queuedPerformanceTimings=[]}}function p(a,b){R.queuedPerformanceTimings=R.queuedPerformanceTimings.concat(a),o(b)}function q(a){return{sessionId:R.sessionId,requestId:R.requestId,timestamp:(new Date).toISOString(),type:"web_request_timing",user:R.user,version:R.version||"Not supplied",device:navigator.userAgent,tags:R.tags,data:a}}function r(a){var b=v(R.cookieName),c=null===b,d="string"==typeof exisitingCookie&&b.length>0&&b.indexOf("timestamp")===-1,e=null;if(!c&&!d){var f=new Date(u(b,"timestamp")),g=new Date(new Date-18e5);e=f0&&(c.b=b+a.domainLookupStart-c.a),a.domainLookupEnd&&a.domainLookupEnd>0&&(c.c=b+a.domainLookupEnd-c.a),a.connectStart&&a.connectStart>0&&(c.d=b+a.connectStart-c.a),a.connectEnd&&a.connectEnd>0&&(c.e=b+a.connectEnd-c.a),a.responseStart&&a.responseStart>0&&(c.f=b+a.responseStart-c.a),a.responseEnd&&a.responseEnd>0&&(c.g=b+a.responseEnd-c.a),a.domLoading&&a.domLoading>0&&(c.h=b+a.domLoading-c.a),a.domInteractive&&a.domInteractive>0&&(c.i=b+a.domInteractive-c.a),a.domContentLoadedEventEnd&&a.domContentLoadedEventEnd>0&&(c.j=b+a.domContentLoadedEventEnd-c.a),a.domComplete&&a.domComplete>0&&(c.k=N(b+a.domComplete-c.a)),a.loadEventStart&&a.loadEventStart>0&&(c.l=b+a.loadEventStart-c.a),a.loadEventEnd&&a.loadEventEnd>0&&(c.m=b+a.loadEventEnd-c.a),a.secureConnectionStart&&a.secureConnectionStart>0&&(c.n=b+(a.secureConnectionStart-a.connectStart)-c.a),c=J(c)}function B(a){return"xmlhttprequest"===a.initiatorType?T.XHR:0===a.duration?T.CachedChildAsset:T.ChildAsset}function C(a,b){var c={du:N(a.duration).toFixed(2),t:B(a),a:b+a.fetchStart};return a.domainLookupStart&&a.domainLookupStart>0&&(c.b=b+a.domainLookupStart-c.a),a.domainLookupEnd&&a.domainLookupEnd>0&&(c.c=b+a.domainLookupEnd-c.a),a.connectStart&&a.connectStart>0&&(c.d=b+a.connectStart-c.a),a.connectEnd&&a.connectEnd>0&&(c.e=b+a.connectEnd-c.a),a.responseStart&&a.responseStart>0&&(c.f=b+a.responseStart-c.a),a.responseEnd&&a.responseEnd>0&&(c.g=b+a.responseEnd-c.a),a.secureConnectionStart&&a.secureConnectionStart>0&&(c.n=b+(a.secureConnectionStart-a.connectStart)-c.a),c.a=c.a.toFixed(2),c=J(c)}function D(){var b=a.location.pathname;R.ignoreUrlCasing&&(b=b.toLowerCase());var c=a.location.protocol+"//"+a.location.host+b;return c.length>800&&(c=c.substring(0,800)),{url:c,userAgent:navigator.userAgent,timing:A(a.performance.timing,0),size:0}}function E(b,c){R.ignoreUrlCasing&&(b=b.toLowerCase()),b.indexOf("?")!==-1&&(b=b.split("?")[0]);var d=a.location.protocol+"//"+a.location.host+b;return d.length>800&&(d=d.substring(0,800)),{url:d,userAgent:navigator.userAgent,timing:x(c),size:0}}function F(b,c){var d=b.name.split("?")[0];return R.ignoreUrlCasing&&(d=d.toLowerCase()),d.length>800&&(d=d.substring(0,800)),{url:d,timing:C(b,c?0:a.performance.timing.navigationStart),size:b.decodedBodySize||0}}function G(a){return 0===a.indexOf(R.apiUrl)||(a.indexOf("favicon.ico")>0||(0===a.indexOf("about:blank")||("j"===a[0]&&1===a.indexOf("avascript:")||(0===a.indexOf("chrome-extension://")||(0===a.indexOf("res://")||0===a.indexOf("file://"))))))}function H(b,c){if(L("getEntries","function"))try{for(var d=a.performance.getEntries(),e=R.offset;ee?f=1:d0&&"/"!==a[0]&&(a+="/"),a.length>800&&(a=a.substring(0,800)),this.virtualPage=a),y(),this.sendPerformance(!1)},this.heartBeat=function(){return null!==R.heartBeatInterval?void O("Raygun4JS: Heartbeat already exists. Skipping heartbeat creation."):void(R.heartBeatInterval=setInterval(function(){R.sendChildAssets(),R.sendQueuedItems()},R.heartBeatIntervalTime))},this.setUser=function(a){R.user=a},this.withTags=function(a){R.tags=a},this.endSession=function(){R.sendItemImmediately({sessionId:R.sessionId,requestId:R.requestId,timestamp:(new Date).toISOString(),type:"session_end"})},this.sendNewSessionStart=function(){R.sendItemImmediately({sessionId:R.sessionId,timestamp:(new Date).toISOString(),type:"session_start",user:R.user,version:R.version||"Not supplied",tags:R.tags,device:navigator.userAgent})},this.sendCustomTimings=function(a){"object"!=typeof a||"number"!=typeof a.custom1&&"number"!=typeof a.custom2&&"number"!=typeof a.custom3&&"number"!=typeof a.custom4&&"number"!=typeof a.custom5&&"number"!=typeof a.custom6&&"number"!=typeof a.custom7&&"number"!=typeof a.custom8&&"number"!=typeof a.custom9&&"number"!=typeof a.custom10||R.pendingPayloadData&&R.queuedPerformanceTimings.length>0&&(R.pendingPayloadData=!1,R.queuedPerformanceTimings[0].customTiming=a,o())},this.sendPerformance=function(a){var b=I(this.virtualPage,a);null===b||b.length<0||p(b,!1)},this.sendChildAssets=function(a){a&&y();var b=[];H(b),p(b,a)},this.sendQueuedItems=function(){if(R.queuedItems.length>0){R.queuedItems=Q(R.queuedItems,"timestamp");var a=R.queuedItems.splice(0,R.maxQueueItemsSent);R.sendItemsImmediately(a)}},this.sendItemImmediately=function(a){var b=[a];R.sendItemsImmediately(b)},this.sendItemsImmediately=function(a){var b={eventData:a},c=function(){O("Raygun4JS: Items sent successfully. Queue length: "+R.queuedItems.length)},d=function(b){R.requeueItemsToFront(a),O("Raygun4JS: Items failed to send. Queue length: "+R.queuedItems.length+" Response status code: "+b.status)};this.postPayload(b,c,d)},this.requeueItemsToFront=function(a){R.queuedItems=a.concat(R.queuedItems)},this.postPayload=function(a,b,c){"function"!=typeof b&&(b=function(){}),"function"!=typeof c&&(c=function(){}),R.makePostCorsRequest(R.apiUrl+"/events?apikey="+encodeURIComponent(R.apiKey),a,b,c)},this.makePostCorsRequest=function(b,c,e,f){if(R.excludedUserAgents instanceof Array)for(var g in R.excludedUserAgents)if(R.excludedUserAgents.hasOwnProperty(g)&&navigator.userAgent.match(R.excludedUserAgents[g]))return void O("Raygun4JS: cancelling send as error originates from an excluded user agent");if(R.excludedHostNames instanceof Array)for(var h in R.excludedHostNames)if(R.excludedHostNames.hasOwnProperty(h)&&a.location.hostname&&a.location.hostname.match(R.excludedHostNames[h]))return void O("Raygun4JS: cancelling send as error originates from an excluded hostname");if(!navigator.userAgent.match("RaygunPulseInsightsCrawler")){var i=R.beforeSend(c);if(!i)return void O("Raygun4JS: cancelling send because onBeforeSendRUM returned falsy value");if(i.eventData)for(var j=0;j raygun4js - 2.9.3 + 2.9.4 Raygun4js Mindscape Limited Mindscape Limited