6 lines
63 KiB
JavaScript
6 lines
63 KiB
JavaScript
/*! Raygun4js - v2.22.3 - 2021-05-03
|
|
* https://github.com/MindscapeHQ/raygun4js
|
|
* Copyright (c) 2021 MindscapeHQ; Licensed MIT */
|
|
|
|
function raygunCoreWebVitalFactory(t){function e(){this.cleanWebVitalData=function(e){var t=e;return t.value&&t.value.toFixed&&(t.value=t.value.toFixed(3)),t}}var n=null;return e.prototype.attach=function(e){n=e,void 0!==t&&t.webVitals&&(t.webVitals.getLCP&&t.webVitals.getLCP(this.handler),t.webVitals.getFID&&t.webVitals.getFID(this.handler),t.webVitals.getCLS&&t.webVitals.getCLS(this.handler))},e.prototype.handler=function(e){e.value&&e.value.toFixed&&(e.value=e.value.toFixed(3));var t={url:e.name,timing:{t:"w",du:e.value}};n(t)},new e}!function(w){var p,s,t,r,u,c,i,a,f={},e=w.TraceKit,o=[].slice,h="?";function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){return void 0===e}function d(e,t){var n=null;if(!t||f.collectWindowErrors){for(var i in r)if(S(r,i))try{r[i].apply(null,[e].concat(o.call(arguments,2)))}catch(e){n=e}if(n)throw n}}function n(e,t,n,i,r){var a,o=null;return r?o=f.computeStackTrace(r):c?(f.computeStackTrace.augmentStackTraceWithInitialElement(c,t,n,e),o=c,u=c=null):((a={url:t,line:n,column:i}).func=f.computeStackTrace.guessFunctionName(a.url,a.line),a.context=f.computeStackTrace.gatherContext(a.url,a.line),o={mode:"onerror",message:e,url:document.location.href,stack:[a],useragent:navigator.userAgent}),d(o,"from window.onerror"),!!s&&s.apply(this,arguments)}function g(e){var t;if("undefined"!=typeof document&&(t=o.call(arguments,1)),c){if(u===e)return;var n=c;d.apply(u=c=null,[n,null].concat(t))}var i=f.computeStackTrace(e);if(c=i,u=e,w.setTimeout(function(){u===e&&d.apply(u=c=null,[i,null].concat(t))},i.incomplete?2e3:0),!p.Utilities.isReactNative())throw e}function U(e){var t,n;return S(a,e)||(t="",e=e||"",n="undefined"!=typeof document?document.domain:w.location.hostname,e.indexOf&&-1!==e.indexOf(n)&&(t="string"!=typeof e?[]:""),a[e]=t?t.split("\n"):[]),a[e]}function k(e,t){var n,i=/function ([^(]*)\(([^)]*)\)/,r=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,a="",o=U(e);if(!o.length)return h;for(var s=0;s<10;++s)if(!l(a=o[t-s]+a)){if(n=r.exec(a))return n[1];if(n=i.exec(a))return n[1]}return h}function R(e,t){var n=U(e);if(!n.length)return null;var i=[],r=Math.floor(f.linesOfContext/2),a=r+f.linesOfContext%2,o=Math.max(0,t-r-1),s=Math.min(n.length,t+a-1);--t;for(var u=o;u<s;++u)l(n[u])||i.push(n[u]);return 0<i.length?i:null}function m(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function E(e){return m(e).replace("<","(?:<|<)").replace(">","(?:>|>)").replace("&","(?:&|&)").replace('"','(?:"|")').replace(/\s+/g,"\\s+")}function x(e,t){for(var n,i,r=0,a=t.length;r<a;++r)if((n=U(t[r])).length&&(n=n.join("\n"),i=e.exec(n)))return{url:t[r],line:n.substring(0,i.index).split("\n").length,column:i.index-n.lastIndexOf("\n",i.index)-1};return null}function v(e,t,n){var i,r=U(t),a=new RegExp("\\b"+m(e)+"\\b");return--n,r&&r.length>n&&(i=a.exec(r[n]))?i.index:null}function b(e,t,n,i){var r={url:t,line:n};if(r.url&&r.line){e.incomplete=!1,r.func||(r.func=k(r.url,r.line)),r.context||(r.context=R(r.url,r.line));var a=/ '([^']+)' /.exec(i);if(a&&(r.column=v(a[1],r.url,r.line)),0<e.stack.length&&e.stack[0].url===r.url){if(e.stack[0].line===r.line)return!1;if(!e.stack[0].line&&e.stack[0].func===r.func)return e.stack[0].line=r.line,e.stack[0].context=r.context,!1}return e.stack.unshift(r),e.partial=!0}return!(e.incomplete=!0)}function y(e,t){for(var n,i,r,a,o=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,s=[],u={},c=!1,l=y.caller;l&&!c;l=l.caller)if(l!==C&&l!==f.report){if(i={url:null,func:h,line:null,column:null},l.name?i.func=l.name:(n=o.exec(l.toString()))&&(i.func=n[1]),void 0===i.func)try{i.func=n.input.substring(0,n.input.indexOf("{"))}catch(e){}(r=function(e){for(var t,n,i,r,a,o=[w.location.href],s=document.getElementsByTagName("script"),u=""+e,c=0;c<s.length;++c){var l=s[c];l.src&&o.push(l.src)}if(n=x((t=/^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/.exec(u))?(i=t[1]?"\\s+"+t[1]:"",r=t[2].split(",").join("\\s*,\\s*"),a=m(t[3]).replace(/;$/,";?"),new RegExp("function"+i+"\\s*\\(\\s*"+r+"\\s*\\)\\s*{\\s*"+a+"\\s*}")):new RegExp(m(u).replace(/\s+/g,"\\s+")),o))return n;if(t=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/.exec(u)){var d=t[1];if(a=E(t[2]),n=x(new RegExp("on"+d+"=[\\'\"]\\s*"+a+"\\s*[\\'\"]","i"),o[0]))return n;if(n=x(new RegExp(a),o))return n}return null}(l))&&(i.url=r.url,i.line=r.line,i.func===h&&(i.func=k(i.url,i.line)),(a=/ '([^']+)' /.exec(e.message||e.description))&&(i.column=v(a[1],r.url,r.line))),u[""+l]?c=!0:u[""+l]=!0,s.push(i)}t&&s.splice(0,t);var d={mode:"callers",name:e.name,message:e.message,url:document.location.href,stack:s,useragent:navigator.userAgent};return b(d,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),d}function C(e,t){var n=null;t=null==t?0:+t;try{if(n=function(e){for(var t,n=e.stacktrace,i=/ line (\d+), column (\d+) in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\) in (.*):\s*$/i,r=n?n.split("\n"):[],a=[],o=0,s=r.length;o<s;o+=2)if(t=i.exec(r[o])){var u={line:+t[1],column:+t[2],func:t[3]||t[4],args:t[5]?t[5].split(","):[],url:t[6]};if(!u.func&&u.line&&(u.func=k(u.url,u.line)),u.line)try{u.context=R(u.url,u.line)}catch(e){}u.context||(u.context=[r[o+1]]),a.push(u)}return a.length?{mode:"stacktrace",name:e.name,message:e.message,url:document.location.href,stack:a,useragent:navigator.userAgent,stackstring:n}:null}(e))return n}catch(e){if(i)throw e}try{if(n=function(e){if(!e.stack)return null;var t,n=/^\s*at (.*?) ?\(((?:file|https?|\s*|blob|chrome-extension|native|webpack|ionic|app|eval|<anonymous>|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,i=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|ionic|app|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,r=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,a=e.stack.split("\n"),o=[],s=/^(.*) is undefined$/.exec(e.message);if(p.Utilities.isReactNative())for(var u,c,l,d=/^(.*@)?.*\/[^\.]+(\.app|CodePush)\/?(.*)/,f=0;f<a.length;f++){null!==(l=d.exec(a[f]))&&(u=l[1]?l[1]:"anonymous@",c=l[3],a[f]=u+"file://reactnative.local/"+c)}for(var f=0,g=a.length;f<g;++f){if(l=i.exec(a[f]))t={url:l[3],func:l[1]||h,args:l[2]?l[2].split(","):"",line:+l[4],column:l[5]?+l[5]:null};else if(l=n.exec(a[f]))t={url:l[2],func:l[1]||h,line:+l[3],column:l[4]?+l[4]:null};else{if(!(l=r.exec(a[f])))continue;t={url:l[2],func:l[1]||h,line:+l[3],column:l[4]?+l[4]:null}}!t.func&&t.line&&(t.func=k(t.url,t.line)),"undefined"!=typeof document&&t.line&&(t.context=R(t.url,t.line)),o.push(t)}return o[0]&&o[0].line&&!o[0].column&&s?o[0].column=v(s[1],o[0].url,o[0].line):o[0].column||void 0===e.columnNumber||(o[0].column=e.columnNumber+1),o.length?{mode:"stack",name:e?e.name:"",message:e?e.message:"",url:"undefined"!=typeof document?document.location.href:"",stack:o,useragent:navigator?navigator.userAgent:"",stackstring:e&&e.stack?e.stack.toString():""}:null}(e))return n}catch(e){if(i)throw e}try{if(n=function(e){var t=e.message.split("\n");if(t.length<4)return null;var n,i,r,a=/^\s*Line (\d+) of linked script ((?:file|http|https)\S+)(?:: in function (\S+))?\s*$/i,o=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|http|https)\S+)(?:: in function (\S+))?\s*$/i,s=/^\s*Line (\d+) of function script\s*$/i,u=[],c=document.getElementsByTagName("script"),l=[];for(i in c)S(c,i)&&!c[i].src&&l.push(c[i]);for(i=2,r=t.length;i<r;i+=2){var d,f,g,p,h,m,v,b,y=null;(n=a.exec(t[i]))?y={url:n[2],func:n[3],line:+n[1]}:(n=o.exec(t[i]))?(y={url:n[3],func:n[4]},d=+n[1],(f=l[n[2]-1])&&(!(p=U(y.url))||0<=(g=(p=p.join("\n")).indexOf(f.innerText))&&(y.line=d+p.substring(0,g).split("\n").length))):(n=s.exec(t[i]))&&(h=w.location.href.replace(/#.*$/,""),m=n[1],y={url:h,line:(p=x(new RegExp(E(t[i+1])),[h]))?p.line:m,func:""}),y&&(y.func||(y.func=k(y.url,y.line)),b=(v=R(y.url,y.line))?v[Math.floor(v.length/2)]:null,v&&b.replace(/^\s*/,"")===t[i+1].replace(/^\s*/,"")?y.context=v:y.context=[t[i+1]],u.push(y))}return u.length?{mode:"multiline",name:e.name,message:t[0],url:document.location.href,stack:u,useragent:navigator.userAgent}:null}(e))return n}catch(e){if(i)throw e}try{if(n=y(e,t+1))return n}catch(e){if(i)throw e}return{tracekitResult:"failedToComputeAnyStackTrace"}}f.setRaygun=function(e){p=p||e},f.noConflict=function(){return w.TraceKit=e,f},f.wrap=function(e){return function(){try{return e.apply(this,arguments)}catch(e){throw f.report(e),e}}},f.report=(r=[],c=u=null,g.subscribe=function(e){!0!==t&&(s=w.onerror,w.onerror=n,t=!0),r.push(e)},g.unsubscribe=function(e){for(var t=r.length-1;0<=t;--t)r[t]===e&&r.splice(t,1)},g),f.computeStackTrace=(i=!1,a={},C.augmentStackTraceWithInitialElement=b,C.guessFunctionName=k,C.gatherContext=R,C.ofCaller=function(t){t=1+(null==t?0:+t);try{throw new Error}catch(e){return C(e,t+1)}},C),f.extendToAsynchronousCallbacks=function(){function e(e){var n=w[e];w[e]=function(){var e=o.call(arguments),t=e[0];return"function"==typeof t&&(e[0]=f.wrap(t)),n.apply?n.apply(this,e):n(e[0],e[1])}}e("setTimeout"),e("setInterval")},f.remoteFetching||(f.remoteFetching=!0),f.collectWindowErrors||(f.collectWindowErrors=!0),(!f.linesOfContext||f.linesOfContext<1)&&(f.linesOfContext=11),w.TraceKit=f}(window),function(o,s){"use strict";var u,t,r;o&&o.event&&o.event.add&&(u=o.event.add,o.event.add=function(e,t,n,i,r){return"function"!=typeof n&&"function"!=typeof n.handler||(n.handler?(a=n.handler,n.handler=s.wrap(n.handler)):(a=n,n=s.wrap(n)),a.guid?n.guid=a.guid:n.guid=a.guid=o.guid++),u.call(this,e,t,n,i,r);var a},t=o.fn.ready,o.fn.ready=function(e){return t.call(this,s.wrap(e))},r=o.ajax,o.ajax=function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};for(var n,i=["complete","error","success"];n=i.pop();)o.isFunction(t[n])&&(t[n]=s.wrap(t[n]));try{return e?r.call(this,e,t):r.call(this,t)}catch(e){throw s.report(e),e}})}(window.jQuery,window.TraceKit),Date.prototype.toISOString||function(){function e(e){var t=String(e);return 1===t.length&&(t="0"+t),t}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}(),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var n;if(null==this)throw new TypeError('"this" is null or not defined');var i=Object(this),r=i.length>>>0;if(0==r)return-1;var a=0|t;if(r<=a)return-1;for(n=Math.max(0<=a?a:r-Math.abs(a),0);n<r;){if(n in i&&i[n]===e)return n;n++}return-1}),Array.prototype.map||(Array.prototype.map=function(e){var t,n,i;if(null==this)throw new TypeError("this is null or not defined");var r,a,o=Object(this),s=o.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(1<arguments.length&&(t=arguments[1]),n=new Array(s),i=0;i<s;){i in o&&(r=o[i],a=e.call(t,r,i,o),n[i]=a),i++}return n}),Array.prototype.forEach||(Array.prototype.forEach=function(e){var t,n;if(null==this)throw new TypeError("this is null or not defined");var i,r=Object(this),a=r.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(1<arguments.length&&(t=arguments[1]),n=0;n<a;){n in r&&(i=r[n],e.call(t,i,n,r)),n++}}),Function.prototype.bind||(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");function t(){}function n(){return r.apply(this instanceof t&&e?this:e,i.concat(Array.prototype.slice.call(arguments)))}var i=Array.prototype.slice.call(arguments,1),r=this;return t.prototype=this.prototype,n.prototype=new t,n}),function(){var n,i,r,a,s,e,t,u,o,c,l,d;"undefined"!=typeof document&&(s={passive:!0,capture:!0},e=new Date,t=function(){a=[],i=-1,n=null,l(addEventListener)},u=function(e,t){n||(n=t,i=e,r=new Date,l(removeEventListener),o())},o=function(){var t;0<=i&&i<r-e&&(t={entryType:"first-input",name:n.type,target:n.target,cancelable:n.cancelable,startTime:n.timeStamp,processingStart:n.timeStamp+i},a.forEach(function(e){e(t)}),a=[])},c=function(e){var t,n,i,r;function a(){u(n,i),r()}function o(){r()}e.cancelable&&(t=(1e12<e.timeStamp?new Date:performance.now())-e.timeStamp,"pointerdown"==e.type?(n=t,i=e,r=function(){removeEventListener("pointerup",a,s),removeEventListener("pointercancel",o,s)},addEventListener("pointerup",a,s),addEventListener("pointercancel",o,s)):u(t,e))},l=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,c,s)})},d="hidden"===document.visibilityState?0:1/0,addEventListener("visibilitychange",function e(t){"hidden"===document.visibilityState&&(d=t.timeStamp,removeEventListener("visibilitychange",e,!0))},!0),t(),self.webVitals={firstInputPolyfill:function(e){a.push(e),o()},resetFirstInputPolyfill:t,get firstHiddenTime(){return d}})}(),window.raygunUtilityFactory=function(p,n){var i,e={getUuid:function(){function e(e){var t=(Math.random().toString(16)+"000000000").substr(2,8);return e?"-"+t.substr(0,4)+"-"+t.substr(4,4):t}return e()+e(!0)+e(!0)+e()},createCookie:function(e,t,n,i){var r,a,o;this.isReactNative()||(a=n?((r=new Date).setTime(r.getTime()+60*n*60*1e3),"; expires="+r.toGMTString()):"",o=i?"; secure":"",document.cookie=e+"="+t+a+"; path=/"+o)},readCookie:function(e){if(this.isReactNative())return"none";for(var t=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var r=n[i];" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(t))return r.substring(t.length,r.length)}return null},clearCookie:function(e){this.isReactNative()||this.createCookie(e,"",-1)},log:function(e,t){n.Options._debugMode&&p.console&&p.console.log&&(p.console.log(e),t&&p.console.log(t))},isApiKeyConfigured:function(){return!(!n.Options._raygunApiKey||""===n.Options._raygunApiKey)||(n.Utilities.log("Raygun API key has not been configured."),!1)},isReactNative:function(){return"undefined"==typeof document&&"undefined"!=typeof __DEV__},defaultReactNativeGlobalHandler:function(e,t){"function"==typeof i&&i(e,t)},localStorageAvailable:function(){try{return"localStorage"in p&&null!==p.localStorage}catch(e){return!1}},sessionStorageAvailable:function(){try{return"sessionStorage"in p&&null!==p.sessionStorage}catch(e){return!1}},truncateURL:function(e){var t,n,i,r,a=e,o=e.split("//")[1];return o&&(t=o.indexOf("?"),i=(n=o.toString().substring(0,t)).split("/").slice(0,4).join("/"),r=n.substring(0,48),(a=i.length<r.length?i:r)!==n&&(a+="..")),a},merge:function(e,t){var n,i={};for(n in e)i[n]=e[n];for(n in t)i[n]=t[n];return i},mergeMutate:function(e,t){var n;for(n in t)e[n]=t[n];return e},mergeArray:function(e,t){return null!=t?e.concat(t):e.slice(0)},forEach:function(e,t){for(var n=0;n<e.length;n++)t.call(null,n,e[n])},isEmpty:function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},contains:function(e,t){for(var n=e.length;n--;)if(e[n]===t)return!0;return!1},getRandomInt:function(){return Math.floor(9007199254740992*Math.random())},getViewPort:function(){if(this.isReactNative())return{width:"Not available",height:"Not available"};var e=document.documentElement,t=document.getElementsByTagName("body")[0];return{width:p.innerWidth||e.clientWidth||t.clientWidth,height:p.innerHeight||e.clientHeight||t.clientHeight}},parseUrl:function(e,t){function g(e){return!isNaN(parseFloat(e))&&isFinite(e)}return function(e,t){if("undefined"==typeof document)return"";var n=t||p.location.toString();if(!e)return n;e=e.toString(),"//"===n.substring(0,2)?n="http:"+n:1===n.split("://").length&&(n="http://"+n);var i={auth:""},r=1===(r=(t=n.split("/"))[2].split("@")).length?r[0].split(":"):(i.auth=r[0],r[1].split(":"));i.protocol=t[0],i.hostname=r[0],i.port=r[1]||("https"===i.protocol.split(":")[0].toLowerCase()?"443":"80"),i.pathname=(3<t.length?"/":"")+t.slice(3,t.length).join("/").split("?")[0].split("#")[0];var a=i.pathname;"/"===a.charAt(a.length-1)&&(a=a.substring(0,a.length-1));var o=i.hostname,s=o.split("."),u=a.split("/");if("hostname"===e)return o;if("domain"===e)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(o)?o:s.slice(-2).join(".");if("sub"===e)return s.slice(0,s.length-2).join(".");if("port"===e)return i.port;if("protocol"===e)return i.protocol.split(":")[0];if("auth"===e)return i.auth;if("user"===e)return i.auth.split(":")[0];if("pass"===e)return i.auth.split(":")[1]||"";if("path"===e)return i.pathname;if("."===e.charAt(0)){if(g(e=e.substring(1)))return s[(e=parseInt(e,10))<0?s.length+e:e-1]||""}else{if(g(e))return u[(e=parseInt(e,10))<0?u.length+e:e]||"";if("file"===e)return u.slice(-1)[0];if("filename"===e)return u.slice(-1)[0].split(".")[0];if("fileext"===e)return u.slice(-1)[0].split(".")[1]||"";if("?"===e.charAt(0)||"#"===e.charAt(0)){var c=n,l=null;if("?"===e.charAt(0)?c=(c.split("?")[1]||"").split("#")[0]:"#"===e.charAt(0)&&(c=c.split("#")[1]||""),!e.charAt(1))return c;e=e.substring(1);for(var d=0,f=(c=c.split("&")).length;d<f;d++)if((l=c[d].split("="))[0]===e)return l[1]||"";return null}}return""}(e,t)},enhance:function(e,t,n){var i=e[t];return e[t]=function(){n.apply(this,arguments),"function"==typeof i&&i.apply(this,arguments)},function(){e[t]=i}},addEventHandler:function(e,t,n,i){var r=i||!1;return e.addEventListener?e.addEventListener(t,n,r):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n,function(){e.removeEventListener?e.removeEventListener(t,n,r):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=function(){}}},nodeText:function(e){var t=e.textContent||e.innerText||"";return-1!==["submit","button"].indexOf(e.type)&&(t=e.value||t),t=t.replace(/^\s+|\s+$/g,"")},nodeSelector:function(e){var t=[e.tagName];return e.id&&t.push("#"+e.id),e.className&&e.className.length&&t.push("."+e.className.split(" ").join(".")),t.join("")},truncate:function(e,t){return e.length>t?e.slice(0,t-"(...)".length)+"(...)":e},getOrigin:function(){return p.location.origin?p.location.origin:p.location.protocol+"//"+p.location.hostname+(p.location.port?":"+p.location.port:"")},resolveFullUrl:function(e){if(e&&0===e.indexOf("//")&&(e=p.location.protocol+e),e&&p.location.pathname&&-1===e.indexOf("://")){var t=this.getOrigin();if(0===e.indexOf("/"))return t+e;var n=p.location.pathname.split("/");return n.pop(),t+n.join("/")+"/"+e}return e},removeFromArray:function(e,t){for(var n=[],i=0;i<e.length;i++)e[i]!==t&&n.push(e[i]);return n},isIE:function(){return-1<p.navigator.userAgent.indexOf("Trident")||-1<p.navigator.userAgent.indexOf("MSIE")}};return e.isReactNative()&&!0!==__DEV__&&p.ErrorUtils&&p.ErrorUtils.getGlobalHandler&&(i=p.ErrorUtils.getGlobalHandler()),e},window.raygunNetworkTrackingFactory=function(l,d){function n(){this.requestHandlers=[],this.responseHandlers=[],this.errorHandlers=[],this.wrapWithHandler=function(e){return function(){try{return e.apply(this,arguments)}catch(e){d.Utilities.log(e)}}},this.executeHandlers=this.wrapWithHandler(function(e,t){for(var n=0;n<e.length;n++)e[n](JSON.parse(JSON.stringify(t)))}),this.wrapPrototypeWithHandlers(),this.attach()}return n.prototype.on=function(e,t){switch(e){case"request":this.requestHandlers.push(t);break;case"response":this.responseHandlers.push(t);break;case"error":this.errorHandlers.push(t)}},n.prototype.off=function(e,t){switch(e){case"request":this.requestHandlers=d.Utilities.removeFromArray(this.requestHandlers,t);break;case"response":this.responseHandlers=d.Utilities.removeFromArray(this.responseHandlers,t);break;case"error":this.errorHandlers=d.Utilities.removeFromArray(this.errorHandlers,t)}},n.prototype.attach=function(){var u=this;l.XMLHttpRequest.prototype.addEventListener&&d.Utilities.enhance(l.XMLHttpRequest.prototype,"open",u.wrapWithHandler(function(){var t=(new Date).getTime(),n=d.Utilities.resolveFullUrl(arguments[1])||"Unknown",i=n.split("?")[0],r=arguments[0];d.Utilities.enhance(this,"send",u.wrapWithHandler(function(){var e={method:r,requestURL:n,baseUrl:i};arguments[0]&&"string"==typeof arguments[0]&&(e.body=arguments[0]),u.executeHandlers(u.requestHandlers,e)})),this.addEventListener("load",u.wrapWithHandler(function(){var e="N/A for non text responses";""!==this.responseType&&"text"!==this.responseType||(e=this.responseText),d.Utilities.log("Tracking XHR response for",n),u.executeHandlers(u.responseHandlers,{status:this.status,requestURL:n,responseURL:this.responseURL,baseUrl:i,body:e,duration:(new Date).getTime()-t})})),this.addEventListener("error",u.wrapWithHandler(function(){u.executeHandlers(u.errorHandlers,{requestURL:n,responseURL:this.responseURL,duration:(new Date).getTime()-t})}))}));var e,c=l.__raygunOriginalFetch||l.fetch;"function"!=typeof c||void 0!==c.polyfill||d.Utilities.isIE()||(e=function(){var r,a,e=arguments[0],t=arguments[1],n=t&&t.method||"GET",o=(new Date).getTime();"string"==typeof e?r=e:void 0!==l.Request&&e instanceof l.Request?(r=e.url,e.method&&(n=e.method)):r=String(e),r=d.Utilities.resolveFullUrl(r),a=r.split("?")[0];var i=c.apply(null,arguments);try{var s={method:n,requestURL:r,baseUrl:a};t&&t.body&&(s.body=t.body),u.executeHandlers(u.requestHandlers,s),i.then(u.wrapWithHandler(function(e){var t="N/A when the fetch response does not support clone()",n="function"==typeof e.clone?e.clone():void 0;function i(){d.Utilities.log("tracking fetch response for",r),u.executeHandlers(u.responseHandlers,{status:e.status,requestURL:r,responseURL:e.url,body:t,baseUrl:a,duration:(new Date).getTime()-o})}if(n)try{n.text().then(function(e){t=d.Utilities.truncate(e,500),i()}).catch(function(){i()})}catch(e){i()}else i()})),i.catch(u.wrapWithHandler(function(e){u.executeHandlers(u.errorHandlers,{metadata:{requestUrl:r,error:e.toString(),duration:(new Date).getTime()-o}})}))}catch(e){d.Utilities.log(e)}return i},l.__raygunOriginalFetch?l.__raygunFetchCallback=e:l.fetch=e)},n.prototype.wrapPrototypeWithHandlers=function(){var e,t;for(e in n.prototype)"function"==typeof(t=n.prototype[e])&&(n.prototype[e]=this.wrapWithHandler(t))},new n},window.raygunBreadcrumbsFactory=function(o,s){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];if("string"==typeof i&&e&&-1<e.indexOf(i))return!0;if("object"==typeof i&&i.exec(e))return!0}return!1}function n(){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(e){return function(){try{return e.apply(this,arguments)}catch(e){s.Utilities.log(e)}}},this.disableConsoleFunctions=[],this.disableNavigationFunctions=[],this.disableXHRLogging=function(){},this.disableClicksTracking=function(){},this.enableAutoBreadcrumbs(),this.wrapPrototypeWithHandlers()}return n.prototype.recordBreadcrumb=function(e,t){var n={level:this.DEFAULT_BREADCRUMB_LEVEL,timestamp:(new Date).getTime(),type:"manual"};switch(typeof e){case"object":n=s.Utilities.merge(n,e);break;case"string":n=s.Utilities.merge(s.Utilities.merge(n,{message:e,metadata:t}));break;default:return void s.Utilities.log("expected first argument to recordBreadcrumb to be a 'string' or 'object', got "+typeof e)}-1===this.BREADCRUMB_LEVELS.indexOf(n.level)&&(s.Utilities.log("unknown breadcrumb level "+n.level+" setting to default of '"+this.DEFAULT_BREADCRUMB_LEVEL+"'"),n.level=this.DEFAULT_BREADCRUMB_LEVEL),this.shouldRecord(n)&&(n.message=s.Utilities.truncate(n.message,this.MAX_MESSAGE_SIZE),this.breadcrumbs.push(n),this.breadcrumbs=this.breadcrumbs.slice(-this.MAX_BREADCRUMBS))},n.prototype.shouldRecord=function(e){var t=this.BREADCRUMB_LEVELS.indexOf(e.level);return this.BREADCRUMB_LEVELS.indexOf(this.breadcrumbLevel)<=t},n.prototype.setBreadcrumbLevel=function(e){-1!==this.BREADCRUMB_LEVELS.indexOf(e)?this.breadcrumbLevel=e:s.Utilities.log("Breadcrumb level of '"+e+"' is invalid, setting to default of '"+this.DEFAULT_BREADCRUMB_LEVEL+"'")},n.prototype.setOption=function(e,t){var n;"breadcrumbsLevel"===e?this.setBreadcrumbLevel(t):"xhrIgnoredHosts"===e?(this.xhrIgnoredHosts=t.concat(this.DEFAULT_XHR_IGNORED_HOSTS),(n=this).removeBreadcrumbsWithPredicate(function(e){return"request"===e.type&&r(e.metadata.requestURL||e.metadata.responseURL,n.xhrIgnoredHosts)})):"logXhrContents"===e&&(this.logXhrContents=t)},n.prototype.any=function(){return 0<this.breadcrumbs.length},n.prototype.all=function(){for(var e=[],t=0;t<this.breadcrumbs.length;t++){var n=this.breadcrumbs[t];n&&"request"===n.type&&!this.logXhrContents&&n.metadata&&n.metadata.body&&(n.metadata.body="Disabled because logContentsOfXhrCalls has not been enabled"),e.push(n)}return e},n.prototype.enableAutoBreadcrumbs=function(){this.enableAutoBreadcrumbsXHR(),this.enableAutoBreadcrumbsClicks(),this.enableAutoBreadcrumbsConsole(),this.enableAutoBreadcrumbsNavigation()},n.prototype.disableAutoBreadcrumbs=function(){this.disableAutoBreadcrumbsXHR(),this.disableAutoBreadcrumbsClicks(),this.disableAutoBreadcrumbsConsole(),this.disableAutoBreadcrumbsNavigation()},n.prototype.removeBreadcrumbsWithPredicate=function(e){for(var t=this.breadcrumbs,n=[],i=0;i<t.length;i++){var r=t[i];e(r)||n.push(r)}this.breadcrumbs=n},n.prototype.removeCrumbsOfType=function(t){this.removeBreadcrumbsWithPredicate(function(e){return e.type===t})},n.prototype.enableAutoBreadcrumbsConsole=function(){var t,n;void 0!==o.console&&(t=function(e,t){for(var n=[],i=0;i<t.length;i++){var r=t[i];null!=r&&n.push(r.toString())}this.recordBreadcrumb({type:"console",level:e,message:Array.prototype.slice.call(n).join(", ")})}.bind(this),(n=this).disableConsoleFunctions=["log","warn","error"].map(function(e){return s.Utilities.enhance(console,e,n.wrapWithHandler(function(){t("log"===e?"info":"warn"===e?"warning":"error",arguments)}))}))},n.prototype.disableAutoBreadcrumbsConsole=function(){this.disableConsoleFunctions.forEach(function(e){e()}),this.removeCrumbsOfType("console")},n.prototype.enableAutoBreadcrumbsNavigation=function(){var r,a,t,e;o.addEventListener&&o.history&&o.history.pushState&&(r=function(e,t,n,i){var r=location.pathname+location.search+location.hash,a=null;return o.history.state&&(a=history.state),{message:"History "+e,type:"navigation",level:"info",metadata:{from:r,to:i||r,prevState:JSON.stringify(a)||"unsupported",nextState:JSON.stringify(t)}}}.bind(this),a=function(e){return e.split("#")[1]||""},this.disableNavigationFunctions=this.disableNavigationFunctions.concat(["pushState","replaceState"].map(function(i){return s.Utilities.enhance(history,i,this.wrapWithHandler(function(e,t,n){this.recordBreadcrumb(r(i,e,t,n))}.bind(this)))}.bind(this))),t=function(e){return this.wrapWithHandler(function(){this.recordBreadcrumb(e.apply(null,arguments))}.bind(this))}.bind(this),e=[{element:o,event:"hashchange",handler:function(e){var t=e.oldURL,n=e.newURL,i=t&&n?{from:a(t),to:a(n)}:{to:location.hash};return{type:"navigation",message:"Hash change",metadata:i}}},{element:o,event:"load",handler:function(){return{type:"navigation",message:"Page loaded"}}},{element:o,event:"popstate",handler:function(){return{type:"navigation",message:"Navigated back"}}},{element:o,event:"pagehide",handler:function(){return{type:"navigation",message:"Page hidden"}}},{element:o,event:"pageshow",handler:function(){return{type:"navigation",message:"Page shown"}}},{element:document,event:"DOMContentLoaded",handler:function(){return{type:"navigation",message:"DOMContentLoaded"}}}],this.disableNavigationFunctions=this.disableNavigationFunctions.concat(e.map(function(e){return s.Utilities.addEventHandler(e.element,e.event,t(e.handler))}.bind(this))))},n.prototype.disableAutoBreadcrumbsNavigation=function(){this.disableNavigationFunctions.forEach(function(e){e()}),this.disableNavigationFunctions=[],this.removeCrumbsOfType("navigation")},n.prototype.enableAutoBreadcrumbsClicks=function(){this.disableClicksTracking=s.Utilities.addEventHandler(o,"click",this.wrapWithHandler(function(e){var t,n;try{t=s.Utilities.truncate(s.Utilities.nodeText(e.target),150),n=s.Utilities.nodeSelector(e.target)}catch(e){n=t="[unknown]",s.Utilities.log("Error retrieving node text/selector. Most likely due to a cross domain error")}this.recordBreadcrumb({type:"click-event",message:"UI Click",level:"info",metadata:{text:t,selector:n}})}.bind(this),!0))},n.prototype.disableAutoBreadcrumbsClicks=function(){this.disableClicksTracking(),this.removeCrumbsOfType("click-event")},n.prototype.enableAutoBreadcrumbsXHR=function(){var t=this,e=t.wrapWithHandler(function(e){r(e.requestURL,t.xhrIgnoredHosts)||(e.body&&(e.body=s.Utilities.truncate(e.body,500)),t.recordBreadcrumb({type:"request",message:"Opening request to "+e.requestURL,level:"info",metadata:e}))}),n=t.wrapWithHandler(function(e){r(e.requestURL,t.xhrIgnoredHosts)||r(e.responseURL,t.xhrIgnoredHosts)||(e.body&&(e.body=s.Utilities.truncate(e.body,500)),e.duration=e.duration+"ms",t.recordBreadcrumb({type:"request",message:"Finished request to "+e.requestURL,level:"info",metadata:e}))}),i=t.wrapWithHandler(function(e){r(e.requestURL,t.xhrIgnoredHosts)||(e.duration=e.duration+"ms",t.recordBreadcrumb({type:"request",message:"Failed request to "+e.requestUrl,level:"info",metadata:e}))});s.NetworkTracking.on("request",e),s.NetworkTracking.on("response",n),s.NetworkTracking.on("error",i),this.disableXHRLogging=function(){s.NetworkTracking.off("request",e),s.NetworkTracking.off("response",n),s.NetworkTracking.off("error",i)}},n.prototype.disableAutoBreadcrumbsXHR=function(){this.disableXHRLogging(),this.removeCrumbsOfType("request")},n.prototype.wrapPrototypeWithHandlers=function(){var e,t;for(e in n.prototype)"function"==typeof(t=n.prototype[e])&&(n.prototype[e]=this.wrapWithHandler(t))},n},window.raygunCoreWebVitalFactory=raygunCoreWebVitalFactory;var raygunFactory=function(k,i,R){var E={};E.Utilities=raygunUtilityFactory(k,E),E.NetworkTracking=raygunNetworkTrackingFactory(k,E),E.Breadcrumbs=raygunBreadcrumbsFactory(k,E),E.CoreWebVitals=raygunCoreWebVitalFactory(k);var x,C,r,T,t,A,u,a,o,s,c,e,L={LOADING:0,READY:1},l="raygun4js-userid",d=TraceKit,n=k.Raygun,f=!1,g=!1,p=!1,h=!1,m=!1,O=!1,v=!1,b=!1,y=!0,w=!1,S=!1,U=!0,B={},N=[],D=[],H="https://api.raygun.io",M=null,I=null,q="customData",F=null,P=new E.Breadcrumbs,_=null,j=!0,V=L.LOADING,W=[],X=[],J=null,K=!0,$=!1,G=!1,Q={Rand:Math.random(),Options:{},noConflict:function(){return n&&(k.Raygun=n),E},constructNewRaygun:function(){return raygunFactory(k,k.jQuery)},init:function(e,t,n){return d.remoteFetching=!1,this.Options._raygunApiKey=e,n&&(B=n),i&&(s=i(document)),t&&(g=t.allowInsecureSubmissions||!1,p=t.ignoreAjaxAbort||!1,h=t.ignoreAjaxError||!1,v=t.disableAnonymousUserTracking||!1,b=t.disableErrorTracking||!1,y=t.disablePulse===R||t.disablePulse,M=t.excludedHostnames||!1,I=t.excludedUserAgents||!1,_=t.pulseMaxVirtualPageDuration||null,j=t.pulseIgnoreUrlCasing||!1,J=t.pulseCustomLoadTimeEnabled||!1,$=t.setCookieAsSecure||!1,G=t.captureMissingRequests||!1,S=t.automaticPerformanceCustomTimings||!1,U=t.trackCoreWebVitals||!0,t.apiUrl&&(H=t.apiUrl),void 0!==t.wrapAsynchronousCallbacks&&(w=t.wrapAsynchronousCallbacks),void 0!==t.captureUnhandledRejections&&(K=t.captureUnhandledRejections),t.debugMode&&(f=t.debugMode),this.Options._debugMode=f,t.ignore3rdPartyErrors&&(O=!0),t.apiEndpoint&&(H=t.apiEndpoint),t.from&&(o=t.from),t.clientIp&&(c=t.clientIp)),x||v?ee():function(e){var t;if(E.Utilities.localStorageAvailable()&&null!==(t=localStorage.getItem(l)))return e(t);null!==(t=E.Utilities.readCookie(l))&&E.Utilities.localStorageAvailable()&&(E.Utilities.clearCookie(l),localStorage.setItem(l,t));e(t)}(Y),E},withCustomData:function(e){return B=e,E},withTags:function(e){return N=e,F!==R&&null!==F&&F.withTags(e),E},attach:function(){return!E.Utilities.isApiKeyConfigured()||b||(k.RaygunObject&&k[k.RaygunObject]&&k[k.RaygunObject].q&&(k.onerror=null),K&&(e=E.Utilities.addEventHandler(k,"unhandledrejection",Z)),E.Utilities.isReactNative()&&!0!==__DEV__&&k.ErrorUtils&&k.ErrorUtils.setGlobalHandler&&k.ErrorUtils.setGlobalHandler(function(e,t){var n=a;a=function(){"function"==typeof n&&n(),E.Utilities.defaultReactNativeGlobalHandler(e,t),a=n},TraceKit.report(e)}),d.report.subscribe(oe),w&&d.extendToAsynchronousCallbacks(),s&&s.ajaxError&&!h&&s.ajaxError(ae)),E},detach:function(){return d.report.unsubscribe(oe),s&&s.unbind("ajaxError",ae),K&&e&&e(),E},send:function(t,e,n){if(b)return E.Utilities.log("Error not sent due to disabled error tracking"),E;try{oe(d.computeStackTrace(t),{customData:"function"==typeof B?E.Utilities.merge(B(),e):E.Utilities.merge(B,e),tags:"function"==typeof N?E.Utilities.mergeArray(N(),n):E.Utilities.mergeArray(N,n)},!0,t)}catch(e){if(t!==e)throw e}return E},setUser:function(e,t,n,i,r,a){return x={Identifier:e},"boolean"==typeof t&&(x.IsAnonymous=t),n&&(x.Email=n),i&&(x.FullName=i),r&&(x.FirstName=r),a&&(x.UUID=a),F!==R&&null!==F&&F.setUser(x),E},resetAnonymousUser:function(){E.Utilities.localStorageAvailable()?localStorage.removeItem(l):E.Utilities.clearCookie(l)},setVersion:function(e){return C=e,E},saveIfOffline:function(e){return void 0!==e&&"boolean"==typeof e&&(m=e),E},filterSensitiveData:function(e){return r=e,E},setFilterScope:function(e){return"customData"!==e&&"all"!==e||(q=e),E},whitelistCrossOriginDomains:function(e){return D=e,E},onBeforeSend:function(e){return T=e,E},onBeforeSendRum:function(e){return t=e,E},groupingKey:function(e){return A=e,E},onBeforeXHR:function(e){return u=e,E},onAfterSend:function(e){return a=e,E},endSession:function(){E.RealUserMonitoring!==R&&F&&F.endSession()},trackEvent:function(e,t){V===L.READY?E.RealUserMonitoring!==R&&F&&("pageView"===e&&t.path?F.virtualPageLoaded(t.path):"customTiming"===e?F.trackCustomTiming(t.name,t.duration,t.offset):"customTimings"===e&&t.timings&&F.sendCustomTimings(t.timings)):X.push({type:e,options:t})},setClientIp:function(e){c=e},captureMissingRequests:function(e){E.RealUserMonitoring!==R&&F&&F.captureMissingRequests(e)},recordBreadcrumb:function(){P.recordBreadcrumb.apply(P,arguments)},enableAutoBreadcrumbs:function(e){e?P["enableAutoBreadcrumbs"+e]():P.enableAutoBreadcrumbs()},disableAutoBreadcrumbs:function(e){e?P["disableAutoBreadcrumbs"+e]():P.disableAutoBreadcrumbs()},setBreadcrumbOption:function(e,t){P.setOption(e,t)},setBreadcrumbs:function(e){P=e},getBreadcrumbs:function(){return P.all()}};function z(e){"function"==typeof a&&a(e)}function Y(e){var t,n="Unknown";e?n=e:(n=E.Utilities.getUuid(),t=n,E.Utilities.localStorageAvailable()?localStorage.setItem(l,t):E.Utilities.createCookie(l,t,744,$)),E.setUser(n,!0,null,null,null,n),ee()}function Z(e){var t=e.reason;!t&&e.detail&&e.detail.reason&&(t=e.detail.reason),t instanceof Error||!e.reason||!e.reason.error||(t=e.reason.error),t||((t=new Error("Unhandled promise rejection")).stack=null),Q.send(t,null,["UnhandledPromiseRejection"])}function ee(){var e;V!==L.READY&&(V=L.READY,E.RealUserMonitoring===R||y||(e=function(){(F=new E.RealUserMonitoring(E.Options._raygunApiKey,H,ue,x,C,N,M,I,f,_,j,J,t,$,G,S,U)).attach()},E.Utilities.isReactNative()?E.Utilities.log("Not enabling RUM because Raygun4JS has detected a React Native environment, see #310 on Github"):"onLoad"===o?e():k.addEventListener?k.addEventListener("load",e):k.attachEvent("onload",e)),function(){var e;for(e=0;e<W.length;e++)oe(W[e].stackTrace,W[e].options,W[e].userTriggered,W[e].error);for(W=[],e=0;e<X.length;e++)Q.trackEvent(X[e].type,X[e].options);X=[]}(),ne())}function te(e,t){var n=(new Date).toJSON();try{var i="raygunjs+"+E.Options._raygunApiKey+"="+n+"="+E.Utilities.getRandomInt();void 0===localStorage[i]&&(localStorage[i]=JSON.stringify({url:e,data:t}))}catch(e){E.Utilities.log("Raygun4JS: LocalStorage full, cannot save exception")}}function ne(){if(E.Utilities.localStorageAvailable())for(var e in localStorage)if(-1<e.indexOf("raygunjs+"+E.Options._raygunApiKey)){try{var t=JSON.parse(localStorage[e]);ue(t.url,t.data)}catch(e){E.Utilities.log("Raygun4JS: Invalid JSON object in LocalStorage")}try{localStorage.removeItem(e)}catch(e){E.Utilities.log("Raygun4JS: Unable to remove error")}}}function ie(e,t){if(r)for(var n=0;n<r.length;n++)if("object"==typeof r[n]&&"function"==typeof r[n].exec){var i=r[n].exec(e);if(null!==i&&i!==R)return"[removed by filter]"}else if(r[n]===e)return"[removed by filter]";return t}function re(e,t){if(null==e)return e;if("[object Object]"!==Object.prototype.toString.call(e))return e;var n={};for(var i in e){var r=e[i];"[object Object]"===Object.prototype.toString.call(r)?n[i]="Details"!==t||"Client"!==i?re(ie(i,r),i):r:"[object Function]"!==Object.prototype.toString.call(r)&&(void 0!==t?n[i]=ie(i,r):"OccurredOn"===i&&(n[i]=r))}return n}function ae(e,t,n,i){var r="AJAX Error: "+(t.statusText||"unknown")+" "+(n.type||"unknown")+" "+(E.Utilities.truncateURL(n.url)||"unknown");(!p||0!==t.status&&t.getAllResponseHeaders())&&E.send(i||e.type,{status:t.status,statusText:t.statusText,type:n.type,url:n.url,ajaxErrorMessage:r,contentType:n.contentType,requestData:n.data&&n.data.slice?n.data.slice(0,10240):R,responseData:t.responseText&&t.responseText.slice?t.responseText.slice(0,10240):R,activeTarget:e.target&&e.target.activeElement&&e.target.activeElement.outerHTML&&e.target.activeElement.outerHTML.slice?e.target.activeElement.outerHTML.slice(0,10240):R})}function oe(e,t,n,i){if(V===L.READY){var r="Script error",a=[],o={};if(O){if(!e.stack||!e.stack.length)return void E.Utilities.log("Raygun4JS: Cancelling send due to null stacktrace");var s=E.Utilities.parseUrl("domain"),u=r;if(e.message?u=e.message:t&&t.status&&(u=t.status),void 0===u&&(u=r),!E.Utilities.isReactNative()&&"function"==typeof u.substring&&u.substring(0,r.length)===r&&null!==e.stack[0].url&&e.stack[0].url!==R&&-1===e.stack[0].url.indexOf(s)&&(0===e.stack[0].line||"?"===e.stack[0].func))return void E.Utilities.log("Raygun4JS: cancelling send due to third-party script error with no stacktrace and message");for(var c=!1,l=0;!c&&e.stack&&l<e.stack.length;l++)if(null!==e.stack[l]&&e.stack[l]!==R&&null!==e.stack[l].url&&e.stack[l].url!==R){for(var d in D)-1<e.stack[l].url.indexOf(D[d])&&(c=!0);-1<e.stack[l].url.indexOf(s)&&(c=!0)}if(!c)return void E.Utilities.log("Raygun4JS: cancelling send due to error on non-origin, non-whitelisted domain")}if(M instanceof Array)for(var f in M)if(M.hasOwnProperty(f)&&k.location.hostname&&k.location.hostname.match(M[f]))return void E.Utilities.log("Raygun4JS: cancelling send as error originates from an excluded hostname");if(I instanceof Array&&!E.Utilities.isReactNative())for(var g in I)if(I.hasOwnProperty(g)&&navigator.userAgent.match(I[g]))return void E.Utilities.log("Raygun4JS: cancelling send as error originates from an excluded user agent");if(E.Utilities.isReactNative()||!navigator.userAgent.match("RaygunPulseInsightsCrawler")){e.stack&&e.stack.length&&E.Utilities.forEach(e.stack,function(e,t){a.push({LineNumber:t.line,ColumnNumber:t.column,ClassName:"line "+t.line+", column "+t.column,FileName:t.url,MethodName:t.func||"[anonymous]"})});var p=E.Utilities.parseUrl("?");0<p.length&&E.Utilities.forEach(p.split("&"),function(e,t){var n,i,r=t.split("=");r&&2===r.length&&(i=ie(n=decodeURIComponent(r[0]),r[1]),o[n]=i)}),t===R&&(t={}),E.Utilities.isEmpty(t.customData)&&(t.customData="function"==typeof B?B():B),E.Utilities.isEmpty(t.tags)&&(t.tags="function"==typeof N?N():"string"==typeof N?[N]:N),n||(t.tags||(t.tags=[]),E.Utilities.contains(t.tags,"UnhandledException")||t.tags.push("UnhandledException")),E.Utilities.isReactNative()&&!E.Utilities.contains(t.tags,"React Native")&&t.tags.push("React Native");var h=k.screen||{width:E.Utilities.getViewPort().width,height:E.Utilities.getViewPort().height,colorDepth:8},m=t.customData&&t.customData.ajaxErrorMessage,v="customData"===q?re(t.customData,"UserCustomData"):t.customData;try{JSON.stringify(v)}catch(e){var b="Cannot add custom data; may contain circular reference";v={error:b},E.Utilities.log("Raygun4JS: "+b)}var y,w=r;m?w=m:e.message?w=e.message:t&&t.status?w=t.status:"string"==typeof i&&(w=i),void 0===w&&(w=r),w&&"string"==typeof w&&(w=w.substring(0,512)),y=E.Utilities.isReactNative()?"/":[location.protocol,"//",location.host,location.pathname,location.hash].join("");var S,U={OccurredOn:new Date,Details:{Error:{ClassName:e.name,Message:w,StackTrace:a,StackString:e.stackstring},Environment:{UtcOffset:(new Date).getTimezoneOffset()/-60,"User-Language":navigator.userLanguage,"Document-Mode":E.Utilities.isReactNative()?"Not available":document.documentMode,"Browser-Width":E.Utilities.getViewPort().width,"Browser-Height":E.Utilities.getViewPort().height,"Screen-Width":h.width,"Screen-Height":h.height,"Color-Depth":h.colorDepth,Browser:navigator.appCodeName,"Browser-Name":navigator.appName,"Browser-Version":navigator.appVersion,Platform:navigator.platform},Client:{Name:"raygun-js",Version:"2.22.3"},UserCustomData:v,Tags:t.tags,Request:{Url:y,QueryString:o,Headers:{"User-Agent":navigator.userAgent,Referer:E.Utilities.isReactNative()?"Not available":document.referrer,Host:E.Utilities.isReactNative()?"Not available":document.domain}},Version:C||"Not supplied"}};U.Details.User=x,P.any()&&(U.Details.Breadcrumbs=[],(P.all()||[]).forEach(function(e){e.metadata&&(e.CustomData=e.metadata,delete e.metadata),U.Details.Breadcrumbs.push(e)})),"all"===q&&(U=re(U)),"function"==typeof A&&(E.Utilities.log("Raygun4JS: calling custom grouping key"),U.Details.GroupingKey=A(U,e,t)),"function"==typeof T?(S=T(U))&&se(S):se(U)}}else W.push({stackTrace:e,options:t,userTriggered:n,error:i})}function se(e){E.Utilities.isApiKeyConfigured()&&(E.Utilities.log("Sending exception data to Raygun:",e),ue(H+"/entries?apikey="+encodeURIComponent(E.Options._raygunApiKey),JSON.stringify(e)))}function ue(e,t,n,i){var r,a,o,s=(r="POST",a=e,"withCredentials"in(o=new k.XMLHttpRequest)||E.Utilities.isReactNative()?o.open(r,a,!0):k.XDomainRequest&&(g&&(a=a.slice(6)),(o=new k.XDomainRequest).open(r,a)),o.timeout=1e4,o);"function"==typeof s.setRequestHeader&&(s.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),void 0!==c&&s.setRequestHeader("X-Remote-Address",c)),"function"==typeof u&&u(s),E.Utilities.log("Is offline enabled? "+m),"withCredentials"in s||E.Utilities.isReactNative()?(s.onreadystatechange=function(){4===s.readyState&&(202===s.status?ne():m&&403!==s.status&&400!==s.status&&429!==s.status&&te(e,t))},s.onload=function(){E.Utilities.log("posted to Raygun"),z(this),n&&"function"==typeof n&&n(s,e,t)}):k.XDomainRequest&&(s.ontimeout=function(){m&&(E.Utilities.log("Raygun: saved locally"),te(e,t))},s.onload=function(){E.Utilities.log("posted to Raygun"),ne(),z(this),n&&"function"==typeof n&&n(s,e,t)}),s.onerror=function(){E.Utilities.log("failed to post to Raygun"),z(this),i&&"function"==typeof i&&i(s,e,t)},s?(E.Utilities.isReactNative()&&s.setRequestHeader("Content-type","application/json;charset=UTF-8"),s.send(t)):E.Utilities.log("CORS not supported")}return E=E.Utilities.mergeMutate(E,Q),k.__raygunNoConflict||(k.Raygun=E),TraceKit.setRaygun(E),E};window.__instantiatedRaygun=raygunFactory(window,window.jQuery),function(){var u,c,e,l,d,f,g,n,t,i,p;"undefined"!=typeof document&&(u=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v1-".concat(Date.now(),"-").concat(Math.floor(Math.random()*(9e12-1))+1e12)}},e=!(c=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver(function(e){return e.getEntries().map(t)});return n.observe({type:e,buffered:!0}),n}}catch(e){}}),l=function(n,i){e||"undefined"!=typeof InstallTrigger||(addEventListener("beforeunload",function(){}),e=!0);addEventListener("visibilitychange",function e(t){"hidden"===document.visibilityState&&(n(t),i&&removeEventListener("visibilitychange",e,!0))},!0)},d=function(t){addEventListener("pageshow",function(e){e.persisted&&t(e)},!0)},f=new("function"==typeof WeakSet?WeakSet:Set),g=function(e,t,n){var i;return function(){0<=t.value&&(n||f.has(t)||"hidden"===document.visibilityState)&&(t.delta=t.value-(i||0),!t.delta&&void 0!==i||(i=t.value,e(t)))}},n=-1,t=function(){return"hidden"===document.visibilityState?0:1/0},i=function(){l(function(e){var t=e.timeStamp;n=t},!0)},p=function(){return n<0&&((n=self.webVitals?self.webVitals.firstHiddenTime:t())===1/0&&i(),d(function(){setTimeout(function(){n=t(),i()},0)})),{get timeStamp(){return n}}},window.webVitals.getCLS=function(e,t){function n(e){e.hadRecentInput||(r.value+=e.value,r.entries.push(e),i())}var i,r=u("CLS",0),a=c("layout-shift",n);a&&(i=g(e,r,t),l(function(){a.takeRecords().map(n),i()}),d(function(){r=u("CLS",0),i=g(e,r,t)}))},window.webVitals.getFCP=function(t,n){var i,r=p(),a=u("FCP"),o=c("paint",function(e){"first-contentful-paint"===e.name&&(o&&o.disconnect(),e.startTime<r.timeStamp&&(a.value=e.startTime,a.entries.push(e),f.add(a),i()))});o&&(i=g(t,a,n),d(function(e){a=u("FCP"),i=g(t,a,n),requestAnimationFrame(function(){requestAnimationFrame(function(){a.value=performance.now()-e.timeStamp,f.add(a),i()})})}))},window.webVitals.getFID=function(e,t){function n(e){e.startTime<i.timeStamp&&(r.value=e.processingStart-e.startTime,r.entries.push(e),f.add(r),o())}var i=p(),r=u("FID"),a=c("first-input",n),o=g(e,r,t);a&&l(function(){a.takeRecords().map(n),a.disconnect()},!0),a||window.webVitals.firstInputPolyfill(n),d(function(){r=u("FID"),o=g(e,r,t),window.webVitals.resetFirstInputPolyfill(),window.webVitals.firstInputPolyfill(n)})},window.webVitals.getLCP=function(t,n){function e(e){var t=e.startTime;t<a.timeStamp&&(o.value=t,o.entries.push(e)),i()}var i,r,a=p(),o=u("LCP"),s=c("largest-contentful-paint",e);s&&(i=g(t,o,n),r=function(){f.has(o)||(s.takeRecords().map(e),s.disconnect(),f.add(o),i())},["keydown","click"].forEach(function(e){addEventListener(e,r,{once:!0,capture:!0})}),l(r,!0),d(function(e){o=u("LCP"),i=g(t,o,n),requestAnimationFrame(function(){requestAnimationFrame(function(){o.value=performance.now()-e.timeStamp,f.add(o),i()})})}))},window.webVitals.getTTFB=function(n){var e,i=u("TTFB");e=function(){try{var e=performance.getEntriesByType("navigation"),t=e?e[0]:function(){var e=performance.timing,t={entryType:"navigation",startTime:0};for(var n in e)"navigationStart"!==n&&"toJSON"!==n&&(t[n]=Math.max(e[n]-e.navigationStart,0));return t}();i.value=i.delta=t.responseStart,i.entries=[t],n(i)}catch(e){}},"complete"===document.readyState?setTimeout(e,0):addEventListener("pageshow",e)})}();var raygunRumFactory=function(z,e,Y){Y.RealUserMonitoring=function(e,t,c,n,i,r,a,o,s,u,l,d,f,g,p,h,m){var v=this,b={};this.cookieName="raygun4js-sid",this.apiKey=e,this.apiUrl=t,this.debugMode=s,this.excludedHostNames=a,this.excludedUserAgents=o,this.maxVirtualPageDuration=u||18e5,this.ignoreUrlCasing=l,this.customTimingsEnabled=d,this.automaticPerformanceCustomTimings=h,this.trackCoreWebVitals=m,this.beforeSend=f||function(e){return e},this.pendingPayloadData=d||!1,this.queuedPerformanceTimings=[],this.pendingVirtualPage=null,this.sessionId=null,this.virtualPage=null,this.user=n,this.version=i,this.tags=r,this.heartBeatInterval=null,this.heartBeatIntervalTime=3e4,this.offset=0,this._captureMissingRequests=p||!1,this.sendUsingNavigatorBeacon=!1,this.stopCollectingMetrics=!1,this.queuedItems=[],this.maxQueueItemsSent=50,this.setCookieAsSecure=g,this.xhrRequestMap={},this.xhrStatusMap={};var y={Page:"p",VirtualPage:"v",XHR:"x",CachedChildAsset:"e",ChildAsset:"c",CustomTiming:"t",CoreWebVital:"w"};function w(){C({sessionId:v.sessionId,timestamp:(new Date).toISOString(),type:"session_start",user:v.user,version:v.version||"Not supplied",tags:v.tags,device:navigator.userAgent})}function S(e){return new Date(G(e,"timestamp"))<new Date(new Date-18e5)}function U(){v.sessionId=j(32),K(v.sessionId)}function k(e){var t=function(e,t){if(!V("timing","object")||void 0===z.performance.timing.fetchStart||isNaN(z.performance.timing.fetchStart))return null;var n=[];t&&n.push(function(){var e=z.location.pathname;v.ignoreUrlCasing&&(e=e.toLowerCase());var t=z.location.protocol+"//"+z.location.host+e;800<t.length&&(t=t.substring(0,800));return{url:t,userAgent:navigator.userAgent,timing:function(){var e=z.performance.timing,t={du:e.duration,t:y.Page};t.a=e.fetchStart,e.domainLookupStart&&0<e.domainLookupStart&&(t.b=e.domainLookupStart-t.a);e.domainLookupEnd&&0<e.domainLookupEnd&&(t.c=e.domainLookupEnd-t.a);e.connectStart&&0<e.connectStart&&(t.d=e.connectStart-t.a);e.connectEnd&&0<e.connectEnd&&(t.e=e.connectEnd-t.a);e.responseStart&&0<e.responseStart&&(t.f=e.responseStart-t.a);e.responseEnd&&0<e.responseEnd&&(t.g=e.responseEnd-t.a);e.domLoading&&0<e.domLoading&&(t.h=e.domLoading-t.a);e.domInteractive&&0<e.domInteractive&&(t.i=e.domInteractive-t.a);e.domContentLoadedEventEnd&&0<e.domContentLoadedEventEnd&&(t.j=e.domContentLoadedEventEnd-t.a);e.domComplete&&0<e.domComplete&&(t.k=X(e.domComplete-t.a));e.loadEventStart&&0<e.loadEventStart&&(t.l=e.loadEventStart-t.a);e.loadEventEnd&&0<e.loadEventEnd&&(t.m=e.loadEventEnd-t.a);e.secureConnectionStart&&0<e.secureConnectionStart&&(t.n=e.secureConnectionStart-e.connectStart-t.a);return t=function(e){if(!V("getEntriesByName","function"))return e;var t=z.performance.getEntriesByName("first-paint");0<t.length&&0<t[0].startTime?e.fp=t[0].startTime.toFixed(2):z.performance.timing&&z.performance.timing.msFirstPaint&&(e.fp=(z.performance.timing.msFirstPaint-z.performance.timing.fetchStart).toFixed(2));var n=z.performance.getEntriesByName("first-contentful-paint");0<n.length&&0<n[0].startTime&&(e.fcp=n[0].startTime.toFixed(2));return e}(t=_(t))}(),size:0}}());O(n),e&&(n.push(function(e,t){v.ignoreUrlCasing&&(e=e.toLowerCase());-1!==e.indexOf("?")&&(e=e.split("?")[0]);var n=z.location.protocol+"//"+z.location.host+e;800<n.length&&(n=n.substring(0,800));return{url:n,userAgent:navigator.userAgent,timing:function(e){return{t:y.VirtualPage,startTime:e,staticLoad:v.initalStaticPageLoadTimestamp,pending:!0}}(t),size:0}}(e,W(0))),O(n,!0));return n}(v.virtualPage,e);null===t||t.length<0||L(t,!1)}function R(e){e&&x();var t=[];O(t,void 0,e),L(t,e)}function E(){var e,t;0<v.queuedItems.length&&(v.queuedItems=(e=v.queuedItems,t="timestamp",e.sort(function(a){return function(e,t){if(!e.hasOwnProperty(a)||!t.hasOwnProperty(a))return J('Raygun4JS: Property "'+a+'" not found in items in this collection'),0;var n=e[a],i=t[a],r=0;return i<n?r=1:n<i&&(r=-1),r}}(t))),T(v.queuedItems.splice(0,v.maxQueueItemsSent)))}function x(){for(var e,t,n,i=0;i<v.queuedPerformanceTimings.length;i++)(e=v.queuedPerformanceTimings[i]).timing.t===y.VirtualPage&&e.timing.pending&&(e.timing=(t=e.timing,n=W(0),{t:t.t,du:Math.min(v.maxVirtualPageDuration,n-t.startTime),o:Math.min(v.maxVirtualPageDuration,n-t.staticLoad)}))}function C(e){T([e])}function T(n){!function(e,t,n){"function"!=typeof t&&(t=function(){});"function"!=typeof n&&(n=function(){});!function(e,t,n,i){if(v.excludedUserAgents instanceof Array)for(var r in v.excludedUserAgents)if(v.excludedUserAgents.hasOwnProperty(r)&&navigator.userAgent.match(v.excludedUserAgents[r]))return J("Raygun4JS: cancelling send as error originates from an excluded user agent");if(v.excludedHostNames instanceof Array)for(var a in v.excludedHostNames)if(v.excludedHostNames.hasOwnProperty(a)&&z.location.hostname&&z.location.hostname.match(v.excludedHostNames[a]))return J("Raygun4JS: cancelling send as error originates from an excluded hostname");if(navigator.userAgent.match("RaygunPulseInsightsCrawler"))return;var o=v.beforeSend(t);if(!o)return J("Raygun4JS: cancelling send because onBeforeSendRUM returned falsy value");if(o.eventData)for(var s=0;s<o.eventData.length;s++)o.eventData[s].data&&"string"!=typeof o.eventData[s].data&&(o.eventData[s].data=JSON.stringify(o.eventData[s].data));var u=JSON.stringify(o);if(v.sendUsingNavigatorBeacon&&navigator.sendBeacon)return navigator.sendBeacon(e,u);c(e,u,n,i)}(v.apiUrl+"/events?apikey="+encodeURIComponent(v.apiKey),e,t,n)}({eventData:n},function(){J("Raygun4JS: Items sent successfully. Queue length: "+v.queuedItems.length)},function(e){var t;t=n,v.queuedItems=t.concat(v.queuedItems),J("Raygun4JS: Items failed to send. Queue length: "+v.queuedItems.length+" Response status code: "+e.status)})}function A(e){if(!v.pendingPayloadData||e){function t(){var e;a.push((e=r,{sessionId:v.sessionId,requestId:v.requestId,timestamp:(new Date).toISOString(),type:"web_request_timing",user:v.user,version:v.version||"Not supplied",device:navigator.userAgent,tags:v.tags,data:e})),o=!(r=[])}function n(){0<r.length&&t(),0<a.length&&(T(a),o=!(r=[]))}for(var i,r=[],a=[],o=!1,s=0;s<v.queuedPerformanceTimings.length;s++){var u=(i=v.queuedPerformanceTimings[s]).timing.t===y.Page||i.timing.t===y.VirtualPage;if(o&&u&&t(),0<r.length&&u&&t(),u&&(v.requestId=j(16)),i.timing.t===y.VirtualPage&&i.timing.pending)return n(),void v.queuedPerformanceTimings.splice(0,s);r.push(i),o=o||i.timing.t===y.Page||i.timing.t===y.VirtualPage}n(),v.queuedPerformanceTimings=[]}}function L(e,t){!1===v.stopCollectingMetrics&&(v.queuedPerformanceTimings=v.queuedPerformanceTimings.concat(e),A(t))}function O(e,t,n){var i;if(V("getEntries","function"))try{for(var r=t?0:z.performance.timing.navigationStart,a=z.performance.getEntries(),o=v.offset;o<a.length;o++){var s=a[o];if(!n&&D(s))break;I(s)?v.automaticPerformanceCustomTimings&&e.push(q(s)):P((i=s).name.split("?")[0])||"paint"===i.entryType||"navigation"===i.entryType||"mark"===i.entryType||e.push(H(s,r))}v.offset=o,this._captureMissingRequests&&B(e,r)}catch(e){J(e)}}this.Utilities={},this.attach=function(){this.trackCoreWebVitals&&Y.CoreWebVitals.attach(L),function(e){var t=$(),n=null===t,i=!1;n||(i=S(t));{var r;n||i?(U(),e(!0)):(K(r=G(t,"id")),v.sessionId=r,e(!1))}}(function(e){v.pageLoaded(e)});var e=function(){this.updateStorageTimestamp()}.bind(b),t=function(){R(v.sendUsingNavigatorBeacon=!0),E()}.bind(b),n=function(){"visible"===document.visibilityState&&this.updateStorageTimestamp()}.bind(b),i=function(){R(v.sendUsingNavigatorBeacon=!0),E(),v.stopCollectingMetrics=!0}.bind(b);z.addEventListener?(z.addEventListener("click",e),document.addEventListener("visibilitychange",n),z.addEventListener("beforeunload",t),z.addEventListener("pagehide",i)):z.attachEvent&&document.attachEvent("onclick",e),Y.NetworkTracking.on("request",function(e){this.xhrRequestMap[e.baseUrl]||(this.xhrRequestMap[e.baseUrl]=[]);J("adding request to xhr request map",e),this.xhrRequestMap[e.baseUrl].push(e)}.bind(this)),Y.NetworkTracking.on("error",function(e){var t=this.xhrRequestMap[e.baseUrl];t&&0<t.length&&(this.xhrRequestMap[e.baseUrl].shift(),J("request encountered an error",e))}.bind(this)),Y.NetworkTracking.on("response",function(e){var t=this.xhrRequestMap[e.baseUrl];t&&0<t.length?(this.xhrRequestMap[e.baseUrl].shift(),0===this.xhrRequestMap[e.baseUrl].length&&delete this.xhrRequestMap[e.baseUrl],this.xhrStatusMap[e.baseUrl]||(this.xhrStatusMap[e.baseUrl]=[]),J("adding response to xhr status map",e),this.xhrStatusMap[e.baseUrl].push(e)):J("response fired from non-handled request")}.bind(this))},this.pageLoaded=function(e){e&&w(),k(!0),function(){if(null!==v.heartBeatInterval)return J("Raygun4JS: Heartbeat already exists. Skipping heartbeat creation.");v.heartBeatInterval=setInterval(function(){R(),E(),v.xhrStatusMap={}},v.heartBeatIntervalTime)}(),v.initalStaticPageLoadTimestamp=W(0)},this.virtualPageLoaded=function(e){"string"==typeof e&&(0<e.length&&"/"!==e[0]&&(e+="/"),800<e.length&&(e=e.substring(0,800)),this.virtualPage=e),v.stopCollectingMetrics&&(v.offset=z.performance.getEntries().length,v.stopCollectingMetrics=!1),x(),k(!1)},this.setUser=function(e){v.user=e},this.withTags=function(e){v.tags=e},this.endSession=function(){v.pendingPayloadData=!1,A(),C({sessionId:v.sessionId,requestId:v.requestId,timestamp:(new Date).toISOString(),type:"session_end"}),U(),w()},this.sendCustomTimings=function(e){"object"!=typeof e||"number"!=typeof e.custom1&&"number"!=typeof e.custom2&&"number"!=typeof e.custom3&&"number"!=typeof e.custom4&&"number"!=typeof e.custom5&&"number"!=typeof e.custom6&&"number"!=typeof e.custom7&&"number"!=typeof e.custom8&&"number"!=typeof e.custom9&&"number"!=typeof e.custom10||v.pendingPayloadData&&0<v.queuedPerformanceTimings.length&&(v.pendingPayloadData=!1,v.queuedPerformanceTimings[0].customTiming=e,A())},this.trackCustomTiming=function(e,t,n){var i;"number"==typeof t?((i=[]).push(F(e,t,n)),L(i,!1)):J('Raygun4JS: Custom timing "'+e+'" duration value is not a number')},this.captureMissingRequests=function(e){this._captureMissingRequests=e};var B=function(e,t){for(var n in J("checking for missing WRT data",this.xhrStatusMap),this.xhrStatusMap)if(this.xhrStatusMap.hasOwnProperty(n)){var i=this.xhrStatusMap[n];if(i&&0<i.length)do{var r=i.shift();J("checking response",r),P(r.baseUrl)||(J("adding missing WRT data for url"),e.push({url:r.baseUrl,statusCode:r.status,timing:{du:X(r.duration).toFixed(2),a:t.toFixed(2),t:y.XHR}}))}while(0<i.length);delete this.xhrStatusMap[n]}}.bind(this);var N=function(e){var t=e.name.split("?")[0];return v.ignoreUrlCasing&&(t=t.toLowerCase()),800<t.length&&(t=t.substring(0,800)),t}.bind(this),D=function(e){var t=N(e),n=this.xhrRequestMap[t];return n&&0<n.length}.bind(this),H=function(e,t){var n=N(e),i={url:n,timing:function(e,t){var n={du:X(M(e)).toFixed(2),t:function(e){return function(e){return"xmlhttprequest"===e||"fetch"===e||"preflight"===e||"beacon"===e}(e.initiatorType)||!function(e){switch(e.initiatorType){case"img":case"css":case"script":case"link":case"other":case"use":return!0}return!1}(e)&&function(e){return"string"==typeof e.initiatorType&&""===e.initiatorType}(e)?y.XHR:Q(e)}(e),a:t+e.fetchStart};e.domainLookupStart&&0<e.domainLookupStart&&(n.b=t+e.domainLookupStart-n.a);e.domainLookupEnd&&0<e.domainLookupEnd&&(n.c=t+e.domainLookupEnd-n.a);e.connectStart&&0<e.connectStart&&(n.d=t+e.connectStart-n.a);e.connectEnd&&0<e.connectEnd&&(n.e=t+e.connectEnd-n.a);e.responseStart&&0<e.responseStart&&(n.f=t+e.responseStart-n.a);e.responseEnd&&0<e.responseEnd&&(n.g=t+e.responseEnd-n.a);e.secureConnectionStart&&0<e.secureConnectionStart&&(n.n=t+(e.secureConnectionStart-e.connectStart)-n.a);return n.a=n.a.toFixed(2),n=_(n)}(e,t),size:e.decodedBodySize||0};J("retrieving secondary timing data for",e.name);var r=this.xhrStatusMap[n];return r&&0<r.length?(i.statusCode=this.xhrStatusMap[n].shift().status,J("found status for timing",i.statusCode),0===this.xhrStatusMap[n].length&&delete this.xhrStatusMap[n]):J("no status found for timing",this.xhrStatusMap),i}.bind(this);function M(e){var t=e.duration;return 0!==t?t:e.responseEnd-e.startTime}function I(e){return!(!e||"measure"!==e.entryType)}function q(e){return F(e.name,e.duration,e.startTime)}function F(e,t,n){return{url:e,timing:{t:y.CustomTiming,du:t.toFixed(2),a:(n||0).toFixed(2)}}}function P(e){return 0===e.indexOf(v.apiUrl)||(0<e.indexOf("favicon.ico")||(0===e.indexOf("about:blank")||("j"===e[0]&&1===e.indexOf("avascript:")||(0===e.indexOf("chrome-extension://")||(0===e.indexOf("res://")||0===e.indexOf("file://"))))))}function _(e){for(var t in e)isNaN(e[t])&&"string"!=typeof e[t]&&(e[t]=0);return e}function j(e){return Math.round(Math.pow(36,e+1)-Math.random()*Math.pow(36,e)).toString(36).slice(1)}function V(e,t){return"object"==typeof z.performance&&(!e||e&&typeof z.performance[e]===t)}function W(e){return V("now","function")?z.performance.now():e}function X(e){return Math.min(e,3e5)}function J(e,t){v.debugMode&&z.console&&z.console.log&&(t?z.console.log(e,t):z.console.log(e))}function K(e){var t="id|"+e+"×tamp|"+(new Date).toISOString();Y.Utilities.localStorageAvailable()?localStorage.setItem(v.cookieName,t):Y.Utilities.createCookie(v.cookieName,t,null,v.setCookieAsSecure)}function $(){var e;return Y.Utilities.localStorageAvailable()&&null!==(e=localStorage.getItem(v.cookieName))||(Y.Utilities.sessionStorageAvailable()&&null!==(e=sessionStorage.getItem(v.cookieName))?K(e):null!==(e=Y.Utilities.readCookie(v.cookieName))&&Y.Utilities.localStorageAvailable()&&(Y.Utilities.clearCookie(v.cookieName),localStorage.setItem(v.cookieName,e))),e}function G(e,t){var n=e.split(/[|&]/);return"id"===t?n[1]:"timestamp"===t?n[3]:void 0}function Q(e){return 0===e.duration?y.CachedChildAsset:y.ChildAsset}this.Utilities.getTimingDuration=M,this.Utilities.isCustomTimingMeasurement=I,this.Utilities.getCustomTimingMeasurement=q,this.Utilities.createCustomTimingMeasurement=F,b.updateStorageTimestamp=function(){var e=$(),t=!1;e&&(t=S(e)),!t&&e||(v.sessionId=j(32)),K(v.sessionId),t&&w()}}};raygunRumFactory(window,window.jQuery,window.__instantiatedRaygun),function(i,r){var a,o,s,u,c,l,d,f,g,p,h,m,v,b,y;i.RaygunObject&&i[i.RaygunObject]&&(a=i[i.RaygunObject].o,o=!1,s=[],g=["function (b,c,d,f,g){","||(g=new Error(b)),a[e].q=a[e].q||[]"],p=i[i.RaygunObject].q,m=["trackEvent","send","recordBreadcrumb"],v=function(e){var t,n,i,r=e[0],a=e[1];if(r)switch(r){case"boot":y();break;case"noConflict":f=a;break;case"apiKey":u=a,0;break;case"options":c=a;break;case"attach":case"enableCrashReporting":l=a,0;break;case"enablePulse":d=a,0;break;case"detach":h.detach();break;case"getRaygunInstance":return h;case"setUser":h.setUser(a.identifier,a.isAnonymous,a.email,a.fullName,a.firstName,a.uuid);break;case"onBeforeSend":h.onBeforeSend(a);break;case"onBeforeSendRUM":h.onBeforeSendRum(a);break;case"onBeforeXHR":h.onBeforeXHR(a);break;case"onAfterSend":h.onAfterSend(a);break;case"withCustomData":h.withCustomData(a);break;case"withTags":h.withTags(a);break;case"setVersion":h.setVersion(a);break;case"filterSensitiveData":h.filterSensitiveData(a);break;case"setFilterScope":h.setFilterScope(a);break;case"whitelistCrossOriginDomains":h.whitelistCrossOriginDomains(a);break;case"saveIfOffline":"boolean"==typeof a&&h.saveIfOffline(a);break;case"groupingKey":h.groupingKey(a);break;case"endSession":h.endSession();break;case"send":a.error?(t=a.error,a.tags&&(n=a.tags),a.customData&&(i=a.customData)):t=a,h.send(t,i,n);break;case"trackEvent":a.type&&a.path?h.trackEvent(a.type,{path:a.path}):a.type&&a.name&&a.duration?h.trackEvent(a.type,{name:a.name,duration:a.duration,offset:a.offset}):a.type&&a.timings&&h.trackEvent(a.type,{timings:a.timings});break;case"recordBreadcrumb":h.recordBreadcrumb(e[1],e[2]);break;case"enableAutoBreadcrumbs":h.enableAutoBreadcrumbs();break;case"disableAutoBreadcrumbs":h.disableAutoBreadcrumbs();break;case"enableAutoBreadcrumbsConsole":h.enableAutoBreadcrumbs("Console");break;case"disableAutoBreadcrumbsConsole":h.disableAutoBreadcrumbs("Console");break;case"enableAutoBreadcrumbsNavigation":h.enableAutoBreadcrumbs("Navigation");break;case"disableAutoBreadcrumbsNavigation":h.disableAutoBreadcrumbs("Navigation");break;case"enableAutoBreadcrumbsClicks":h.enableAutoBreadcrumbs("Clicks");break;case"disableAutoBreadcrumbsClicks":h.disableAutoBreadcrumbs("Clicks");break;case"enableAutoBreadcrumbsXHR":h.enableAutoBreadcrumbs("XHR");break;case"disableAutoBreadcrumbsXHR":h.disableAutoBreadcrumbs("XHR");break;case"setBreadcrumbLevel":h.setBreadcrumbOption("breadcrumbsLevel",e[1]);break;case"setAutoBreadcrumbsXHRIgnoredHosts":h.setBreadcrumbOption("xhrIgnoredHosts",e[1]);break;case"logContentsOfXhrCalls":h.setBreadcrumbOption("logXhrContents",e[1]);break;case"clientIp":h.setClientIp(a);break;case"captureMissingRequests":h.captureMissingRequests(a);break;case"captureUnhandledRejections":0}},b=function(){i[i.RaygunObject]=function(){return v(arguments)},o=!0},y=function(){var e;if(function(){for(var e in a=i[i.RaygunObject].o){var t;!a.hasOwnProperty(e)||(t=a[e])&&(-1===m.indexOf(t[0])?v(t):s.push(t))}}(),f&&(h=r.noConflict()),u&&(c=c||{},d&&(c.disablePulse=!1),c.from="onLoad",h.init(u,c,null)),l)for(var t in h.attach(),p=i[i.RaygunObject].q)h.send(p[t].e,{handler:"From Raygun4JS snippet global error handler"});else"function"!=typeof i.onerror||-1!==(e=i.onerror.toString()).indexOf(g[0])&&-1!==e.indexOf(g[1])&&(i.onerror=null);for(var n in s)s.hasOwnProperty(n)&&v(s[n]);s=[],o||b(),i[i.RaygunObject].q=p},(h=r).Utilities.isReactNative()?b():"complete"===document.readyState?y():i.addEventListener?i.addEventListener("load",y):i.attachEvent("onload",y))}(window,window.__instantiatedRaygun);try{delete window.__instantiatedRaygun}catch(e){window.__instantiatedRaygun=void 0}
|
|
//# sourceMappingURL=raygun.min.js.map
|