raygun4js
Version:
Raygun.com plugin for JavaScript
4 lines • 73 kB
JavaScript
/*! Raygun4js - v3.1.3 - 2024-11-28
* https://github.com/MindscapeHQ/raygun4js
* Copyright (c) 2024 MindscapeHQ; Licensed MIT */
!function r(i,a,o){function s(t,e){if(!a[t]){if(!i[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(u)return u(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}n=a[t]={exports:{}},i[t][0].call(n.exports,function(e){return s(i[t][1][e]||e)},n,n.exports,r,i,a,o)}return a[t].exports}for(var u="function"==typeof require&&require,e=0;e<o.length;e++)s(o[e]);return s}({1:[function(e,t,n){var r,i;r=this,i=function(e){"use strict";function u(t){function e(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||t(e)}addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)}function c(t){var n=!1;return function(e){n||(t(e),n=!0)}}function t(a,o){o=o||{},R(function(){var t,n=E(),r=b("FCP"),i=U("paint",function(e){e.forEach(function(e){"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<n.firstHiddenTime)&&(r.value=Math.max(e.startTime-v(),0),r.entries.push(e),t(!0))})});i&&(t=w(a,r,k,o.reportAllChanges),m(function(e){r=b("FCP"),t=w(a,r,k,o.reportAllChanges),S(function(){r.value=performance.now()-e.timeStamp,t(!0)})}))})}function n(o,s){s=s||{},t(c(function(){function e(e){e.forEach(function(e){var t,n;e.hadRecentInput||(t=i[0],n=i[i.length-1],r&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(r+=e.value,i.push(e)):(r=e.value,i=[e]))}),r>n.value&&(n.value=r,n.entries=i,t())}var t,n=b("CLS",0),r=0,i=[],a=U("layout-shift",e);a&&(t=w(o,n,T,s.reportAllChanges),u(function(){e(a.takeRecords()),t(!0)}),m(function(){n=b("CLS",r=0),t=w(o,n,T,s.reportAllChanges),S(function(){return t()})}),setTimeout(t,0))}))}function s(e,t){f||(f=t,g=e,j=new Date,d(removeEventListener),l())}function l(){var t;0<=g&&g<j-X&&(t={entryType:"first-input",name:f.type,target:f.target,cancelable:f.cancelable,startTime:f.timeStamp,processingStart:f.timeStamp+g},p.forEach(function(e){e(t)}),p=[])}function d(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,K,A)})}function I(o,s){s=s||{},R(function(){function e(e){e.forEach(r)}var t=E(),n=b("FID"),r=function(e){e.startTime<t.firstHiddenTime&&(n.value=e.processingStart-e.startTime,n.entries.push(e),a(!0))},i=U("first-input",e),a=w(o,n,x,s.reportAllChanges);i&&u(c(function(){e(i.takeRecords()),i.disconnect()})),i&&m(function(){var e;n=b("FID"),a=w(o,n,x,s.reportAllChanges),p=[],g=-1,f=null,d(addEventListener),e=r,p.push(e),l()})})}function H(){return z()-Q}function P(e){var t=N[N.length-1],n=L[e.interactionId];(n||N.length<10||e.duration>t.latency)&&(n?(n.entries.push(e),n.latency=Math.max(n.latency,e.duration)):(t={id:e.interactionId,latency:e.duration,entries:[e]},L[t.id]=t,N.push(t)),N.sort(function(e,t){return t.latency-e.latency}),N.splice(10).forEach(function(e){delete L[e.id]}))}function q(a,o){o=o||{},R(function(){var e;"interactionCount"in performance||(h=h||U("event",G,{type:"event",buffered:!0,durationThreshold:0}));function t(e){e.forEach(function(t){t.interactionId&&P(t),"first-input"!==t.entryType||N.some(function(e){return e.entries.some(function(e){return t.duration===e.duration&&t.startTime===e.startTime})})||P(t)}),e=Math.min(N.length-1,Math.floor(H()/50)),(e=N[e])&&e.latency!==n.value&&(n.value=e.latency,n.entries=e.entries,i())}var n=b("INP"),r=U("event",t,{durationThreshold:null!=(e=o.durationThreshold)?e:40}),i=w(a,n,O,o.reportAllChanges);r&&("PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&r.observe({type:"first-input",buffered:!0}),u(function(){t(r.takeRecords()),n.value<0&&0<H()&&(n.value=0,n.entries=[]),i(!0)}),m(function(){N=[],Q=z(),n=b("INP"),i=w(a,n,O,o.reportAllChanges)}))})}function F(o,s){s=s||{},R(function(){function e(e){(e=e[e.length-1])&&e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-v(),0),i.entries=[e],t())}var t,n,r=E(),i=b("LCP"),a=U("largest-contentful-paint",e);a&&(t=w(o,i,D,s.reportAllChanges),n=c(function(){B[i.id]||(e(a.takeRecords()),a.disconnect(),B[i.id]=!0,t(!0))}),["keydown","click"].forEach(function(e){addEventListener(e,function(){return setTimeout(n,0)},!0)}),u(n),m(function(e){i=b("LCP"),t=w(o,i,D,s.reportAllChanges),S(function(){i.value=performance.now()-e.timeStamp,B[i.id]=!0,t(!0)})}))})}function o(e){document.prerendering?R(function(){return o(e)}):"complete"!==document.readyState?addEventListener("load",function(){return o(e)},!0):setTimeout(e,0)}function _(n,r){r=r||{};var i=b("TTFB"),a=w(n,i,M,r.reportAllChanges);o(function(){var e,t=y();!t||(e=t.responseStart)<=0||e>performance.now()||(i.value=Math.max(e-v(),0),i.entries=[t],a(!0),m(function(){i=b("TTFB",0),(a=w(n,i,M,r.reportAllChanges))(!0)}))})}var f,g,j,p,h,V=-1,m=function(t){addEventListener("pageshow",function(e){e.persisted&&(V=e.timeStamp,t(e))},!0)},y=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},v=function(){var e=y();return e&&e.activationStart||0},b=function(e,t){var n=y(),r="navigate";return 0<=V?r="back-forward-cache":n&&(document.prerendering||0<v()?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},U=function(e,t,n){try{var r;if(PerformanceObserver.supportedEntryTypes.includes(e))return(r=new PerformanceObserver(function(e){Promise.resolve().then(function(){t(e.getEntries())})})).observe(Object.assign({type:e,buffered:!0},n||{})),r}catch(e){}},w=function(t,n,r,i){var a,o;return function(e){0<=n.value&&(e||i)&&((o=n.value-(a||0))||void 0===a)&&(a=n.value,n.delta=o,n.rating=(e=n.value)>r[1]?"poor":e>r[0]?"needs-improvement":"good",t(n))}},S=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},r=-1,W=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},i=function(e){"hidden"===document.visibilityState&&-1<r&&(r="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("visibilitychange",i,!0),removeEventListener("prerenderingchange",i,!0))},J=function(){addEventListener("visibilitychange",i,!0),addEventListener("prerenderingchange",i,!0)},E=function(){return r<0&&(r=W(),J(),m(function(){setTimeout(function(){r=W(),J()},0)})),{get firstHiddenTime(){return r}}},R=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},k=[1800,3e3],T=[.1,.25],A={passive:!0,capture:!0},X=new Date,K=function(e){var t,n,r,i;function a(){s(n,r),i()}function o(){i()}e.cancelable&&(t=(1e12<e.timeStamp?new Date:performance.now())-e.timeStamp,"pointerdown"==e.type?(n=t,r=e,i=function(){removeEventListener("pointerup",a,A),removeEventListener("pointercancel",o,A)},addEventListener("pointerup",a,A),addEventListener("pointercancel",o,A)):s(t,e))},x=[100,300],$=0,a=1/0,C=0,G=function(e){e.forEach(function(e){e.interactionId&&(a=Math.min(a,e.interactionId),C=Math.max(C,e.interactionId),$=C?(C-a)/7+1:0)})},z=function(){return h?$:performance.interactionCount||0},O=[200,500],Q=0,N=[],L={},D=[2500,4e3],B={},M=[800,1800];e.CLSThresholds=T,e.FCPThresholds=k,e.FIDThresholds=x,e.INPThresholds=O,e.LCPThresholds=D,e.TTFBThresholds=M,e.getCLS=n,e.getFCP=t,e.getFID=I,e.getINP=q,e.getLCP=F,e.getTTFB=_,e.onCLS=n,e.onFCP=t,e.onFID=I,e.onINP=q,e.onLCP=F,e.onTTFB=_},"object"==typeof n&&void 0!==t?i(n):"function"==typeof define&&define.amd?define(["exports"],i):i((r="undefined"!=typeof globalThis?globalThis:r||self).webVitals={})},{}],2:[function(e,t,n){function r(e){e=String(e);return e=1===e.length?"0"+e:e}Date.prototype.toISOString||(Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+r(this.getUTCMonth()+1)+"-"+r(this.getUTCDate())+"T"+r(this.getUTCHours())+":"+r(this.getUTCMinutes())+":"+r(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 r=Object(this),i=r.length>>>0;if(0!=i){t=0|t;if(!(i<=t))for(n=Math.max(0<=t?t:i-Math.abs(t),0);n<i;){if(n in r&&r[n]===e)return n;n++}}return-1}),Array.prototype.map||(Array.prototype.map=function(e){var t,n,r;if(null==this)throw new TypeError("this is null or not defined");var i,a=Object(this),o=a.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(1<arguments.length&&(t=arguments[1]),n=new Array(o),r=0;r<o;)r in a&&(i=a[r],i=e.call(t,i,r,a),n[r]=i),r++;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 r,i=Object(this),a=i.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 i&&(r=i[n],e.call(t,r,n,i)),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(){return r.apply(this instanceof i&&e?this:e,n.concat(Array.prototype.slice.call(arguments)))}var n=Array.prototype.slice.call(arguments,1),r=this,i=function(){};return i.prototype=this.prototype,t.prototype=new i,t})},{}],3:[function(e,t,n){window.raygunBreadcrumbsFactory=function(o,a){function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("string"==typeof r&&e&&-1<e.indexOf(r))return!0;if("object"==typeof r&&r.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){a.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=a.Utilities.merge(n,e);break;case"string":n=a.Utilities.merge(a.Utilities.merge(n,{message:e,metadata:t}));break;default:return void a.Utilities.log("expected first argument to recordBreadcrumb to be a 'string' or 'object', got "+typeof e)}-1===this.BREADCRUMB_LEVELS.indexOf(n.level)&&(a.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=a.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){e=this.BREADCRUMB_LEVELS.indexOf(e.level);return this.BREADCRUMB_LEVELS.indexOf(this.breadcrumbLevel)<=e},n.prototype.setBreadcrumbLevel=function(e){-1===this.BREADCRUMB_LEVELS.indexOf(e)?a.Utilities.log("Breadcrumb level of '"+e+"' is invalid, setting to default of '"+this.DEFAULT_BREADCRUMB_LEVEL+"'"):this.breadcrumbLevel=e},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&&i(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=[],r=0;r<t.length;r++){var i=t[r];e(i)||n.push(i)}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=[],r=0;r<t.length;r++){var i=t[r];null!=i&&n.push(i.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 a.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 i,n,t,e;o.addEventListener&&o.history&&o.history.pushState&&(i=function(e,t,n,r){var i=location.pathname+location.search+location.hash,a=null;return o.history.state&&(a=history.state),{message:"History "+e,type:"navigation",level:"info",metadata:{from:i,to:r||i,prevState:JSON.stringify(a)||"unsupported",nextState:JSON.stringify(t)}}}.bind(this),n=function(e){return e.split("#")[1]||""},this.disableNavigationFunctions=this.disableNavigationFunctions.concat(["pushState","replaceState"].map(function(r){return a.Utilities.enhance(history,r,this.wrapWithHandler(function(e,t,n){this.recordBreadcrumb(i(r,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,e=e.newURL,t=t&&e?{from:n(t),to:n(e)}:{to:location.hash};return{type:"navigation",message:"Hash change",metadata:t}}},{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 a.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=a.Utilities.addEventHandler(o,"click",this.wrapWithHandler(function(e){var t,n;try{t=a.Utilities.truncate(a.Utilities.nodeText(e.target),150),n=a.Utilities.nodeSelector(e.target)}catch(e){n=t="[unknown]",a.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){i(e.requestURL,t.xhrIgnoredHosts)||(e.body&&(e.body=a.Utilities.truncate(e.body,500)),t.recordBreadcrumb({type:"request",message:"Opening request to "+e.requestURL,level:"info",metadata:e}))}),n=t.wrapWithHandler(function(e){i(e.requestURL,t.xhrIgnoredHosts)||i(e.responseURL,t.xhrIgnoredHosts)||(e.body&&(e.body=a.Utilities.truncate(e.body,500)),e.duration=e.duration+"ms",t.recordBreadcrumb({type:"request",message:"Finished request to "+e.requestURL,level:"info",metadata:e}))}),r=t.wrapWithHandler(function(e){i(e.requestURL,t.xhrIgnoredHosts)||(e.duration=e.duration+"ms",t.recordBreadcrumb({type:"request",message:"Failed request to "+e.requestURL,level:"info",metadata:e}))});a.NetworkTracking.on("request",e),a.NetworkTracking.on("response",n),a.NetworkTracking.on("error",r),this.disableXHRLogging=function(){a.NetworkTracking.off("request",e),a.NetworkTracking.off("response",n),a.NetworkTracking.off("error",r)}},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}},{}],4:[function(e,t,n){function ue(p,H,h){var m,y,i,v,P,b,u,r,q,a,c,e,U={},w=(U.Utilities=raygunUtilityFactory(p,U),U.ErrorUtilities=raygunErrorUtilitiesFactory(p,U),U.NetworkTracking=raygunNetworkTrackingFactory(p,U),U.Breadcrumbs=raygunBreadcrumbsFactory(p,U),U.CoreWebVitals=raygunCoreWebVitalFactory(p),U.Viewport=raygunViewportFactory(p,document,U),{LOADING:0,READY:1}),o="raygun4js-userid",s=TraceKit,t=p.Raygun,l=!1,F=!1,_=!1,d=!1,j=!1,V=!1,f=!1,W=!0,J=!1,X=!1,K=!0,$=!0,S={},E=[],G=[],R=null,k=null,T="customData",g=null,A=new U.Breadcrumbs,z=null,Q=!0,x=w.LOADING,C=[],O=[],Y=null,N=!0,L=!1,Z=!1,ee=!1,n={Rand:Math.random(),Options:{},noConflict:function(){return t&&(p.Raygun=t),U},constructNewRaygun:function(){return ue(p,p.jQuery)},init:function(e,t,n){return s.remoteFetching=!1,U.Options._raygunApiUrl="https://api.raygun.io",this.Options._raygunApiKey=e,n&&(S=n),H&&(a=H(document)),t&&(F=t.ignoreAjaxAbort||!1,_=t.ignoreAjaxError||!1,V=t.disableAnonymousUserTracking||!1,f=t.disableErrorTracking||!1,W=t.disablePulse===h||t.disablePulse,R=t.excludedHostnames||!1,k=t.excludedUserAgents||!1,z=t.pulseMaxVirtualPageDuration||null,Q=t.pulseIgnoreUrlCasing||!1,Y=t.pulseCustomLoadTimeEnabled||!1,L=t.setCookieAsSecure||!1,Z=t.captureMissingRequests||!1,X=t.automaticPerformanceCustomTimings||!1,K=t.trackCoreWebVitals===h||t.trackCoreWebVitals,$=t.trackViewportDimensions===h||t.trackViewportDimensions,t.apiUrl&&(this.Options._raygunApiUrl=t.apiUrl,this.Options._customEndpointSet=!0),void 0!==t.wrapAsynchronousCallbacks&&(J=t.wrapAsynchronousCallbacks),void 0!==t.captureUnhandledRejections&&(N=t.captureUnhandledRejections),t.debugMode&&(l=t.debugMode),this.Options._debugMode=l,t.ignore3rdPartyErrors&&(j=!0),t.apiEndpoint&&(this.Options._raygunApiUrl=t.apiEndpoint,this.Options._customEndpointSet=!0),t.from&&(q=t.from),t.clientIp)&&(c=t.clientIp),m||V?ie():function(e){var t;if(U.Utilities.localStorageAvailable()&&null!==(t=localStorage.getItem(o)))return e(t);null!==(t=U.Utilities.readCookie(o))&&U.Utilities.localStorageAvailable()&&(U.Utilities.clearCookie(o),localStorage.setItem(o,t));e(t)}(ne),U},withCustomData:function(e){return S=e,U},withTags:function(e){return E=e,g!==h&&null!==g&&g.withTags(e),U},attach:function(){return U.Utilities.isApiKeyConfigured()&&!f&&(p.RaygunObject&&p[p.RaygunObject]&&p[p.RaygunObject].q&&(p.onerror=null),N&&(e=U.Utilities.addEventHandler(p,"unhandledrejection",re)),U.Utilities.isReactNative()&&!0!==__DEV__&&p.ErrorUtils&&p.ErrorUtils.setGlobalHandler&&p.ErrorUtils.setGlobalHandler(function(e,t){var n=r;r=function(){"function"==typeof n&&n(),U.Utilities.defaultReactNativeGlobalHandler(e,t),r=n},TraceKit.report(e)}),s.report.subscribe(M),J&&s.extendToAsynchronousCallbacks(),a&&a.ajaxError&&!_)&&a.ajaxError(oe),U},detach:function(){return s.report.unsubscribe(M),a&&a.unbind("ajaxError",oe),N&&e&&e(),U},send:function(t,e,n){if(f)U.Utilities.log("Error not sent due to disabled error tracking");else try{M(s.computeStackTrace(t),{customData:"function"==typeof S?U.Utilities.merge(S(),e):U.Utilities.merge(S,e),tags:"function"==typeof E?U.Utilities.mergeArray(E(),n):U.Utilities.mergeArray(E,n)},!0,t)}catch(e){if(t!==e)throw e}return U},setUser:function(e,t,n,r,i,a){return m={Identifier:e},"boolean"==typeof t&&(m.IsAnonymous=t),n&&(m.Email=n),r&&(m.FullName=r),i&&(m.FirstName=i),a&&(m.UUID=a),g!==h&&null!==g&&g.setUser(m),U},resetAnonymousUser:function(){U.Utilities.localStorageAvailable()?localStorage.removeItem(o):U.Utilities.clearCookie(o)},setVersion:function(e){return y=e,U},saveIfOffline:function(e){return void 0!==e&&"boolean"==typeof e&&(d=e),U},filterSensitiveData:function(e){return i=e,U},setFilterScope:function(e){return"customData"!==e&&"all"!==e||(T=e),U},whitelistCrossOriginDomains:function(e){return G=e,U},onBeforeSend:function(e){return v=e,U},onBeforeSendRum:function(e){return P=e,U},groupingKey:function(e){return b=e,U},onBeforeXHR:function(e){return u=e,U},onAfterSend:function(e){return r=e,U},endSession:function(){U.RealUserMonitoring!==h&&g&&g.endSession()},trackEvent:function(e,t){var n;x!==w.READY?O.push({type:e,options:t}):U.RealUserMonitoring!==h&&g&&(n=g.parentResource,"pageView"===e&&t.path?g.virtualPageLoaded(t.path):"customTiming"===e?g.trackCustomTiming(t.name,t.duration,t.offset||0,n):"customTimings"===e&&t.timings&&g.sendCustomTimings(t.timings,n))},setClientIp:function(e){c=e},captureMissingRequests:function(e){U.RealUserMonitoring!==h&&g&&g.captureMissingRequests(e)},recordBreadcrumb:function(){A.recordBreadcrumb.apply(A,arguments)},enableAutoBreadcrumbs:function(e){e?A["enableAutoBreadcrumbs"+e]():A.enableAutoBreadcrumbs()},disableAutoBreadcrumbs:function(e){e?A["disableAutoBreadcrumbs"+e]():A.disableAutoBreadcrumbs()},setBreadcrumbOption:function(e,t){A.setOption(e,t)},setBreadcrumbs:function(e){A=e},getBreadcrumbs:function(){return A.all()}};function te(e){"function"==typeof r&&r(e)}function ne(e){var t="Unknown";e?t=e:(t=U.Utilities.getUuid(),e=t,U.Utilities.localStorageAvailable()?localStorage.setItem(o,e):U.Utilities.createCookie(o,e,744,L)),U.setUser(t,!0,null,null,null,t),ie()}function re(e){var t=e.reason;(t=(t=!t&&e.detail&&e.detail.reason?e.detail.reason:t)instanceof Error||!e.reason||!e.reason.error?t:e.reason.error)||((t=new Error("Unhandled promise rejection")).stack=null),n.send(t,null,["UnhandledPromiseRejection"])}function ie(){if(x!==w.READY){var e,t;for(x=w.READY,U.RealUserMonitoring===h||W||(e=function(){(g=new U.RealUserMonitoring(U.Options._raygunApiKey,U.Options._raygunApiUrl,I,m,y,E,R,k,l,z,Q,Y,P,L,Z,X,K,$)).attach()},U.Utilities.isReactNative()?U.Utilities.log("Not enabling RUM because Raygun4JS has detected a React Native environment, see #310 on Github"):"onLoad"===q?e():p.addEventListener?p.addEventListener("load",e):p.attachEvent("onload",e)),t=0;t<C.length;t++)M(C[t].stackTrace,C[t].options,C[t].userTriggered,C[t].error);for(C=[],t=0;t<O.length;t++)n.trackEvent(O[t].type,O[t].options);O=[],ae()}}function ae(){if(U.Utilities.localStorageAvailable())for(var e in localStorage)if(-1<e.indexOf("raygunjs+"+U.Options._raygunApiKey)){try{var t=JSON.parse(localStorage[e]);!ee&&t.url.includes("raygun.com")&&(t.url=t.url.replace("raygun.com","raygun.io")),I(t.url,t.data)}catch(e){U.Utilities.log("Raygun4JS: Invalid JSON object in LocalStorage")}try{localStorage.removeItem(e)}catch(e){U.Utilities.log("Raygun4JS: Unable to remove error")}}}function D(e,t){if(i)for(var n=0;n<i.length;n++)if("object"==typeof i[n]&&"function"==typeof i[n].exec){var r=i[n].exec(e);if(null!==r&&r!==h)return"[removed by filter]"}else if(i[n]===e)return"[removed by filter]";return t}function B(e,t){if(null==e)return e;if("[object Object]"!==Object.prototype.toString.call(e))return e;var n,r={};for(n in e){var i=e[n];"[object Object]"===Object.prototype.toString.call(i)?r[n]="Details"!==t||"Client"!==n?B(D(n,i),n):i:"[object Function]"!==Object.prototype.toString.call(i)&&(void 0!==t?r[n]=D(n,i):"OccurredOn"===n&&(r[n]=i))}return r}function oe(e,t,n,r){var i="AJAX Error: "+(t.statusText||"unknown")+" "+(n.type||"unknown")+" "+(U.Utilities.truncateURL(n.url)||"unknown");(!F||0!==t.status&&t.getAllResponseHeaders())&&U.send(r||e.type,{status:t.status,statusText:t.statusText,type:n.type,url:n.url,ajaxErrorMessage:i,contentType:n.contentType,requestData:n.data&&n.data.slice?n.data.slice(0,10240):h,responseData:t.responseText&&t.responseText.slice?t.responseText.slice(0,10240):h,activeTarget:e.target&&e.target.activeElement&&e.target.activeElement.outerHTML&&e.target.activeElement.outerHTML.slice?e.target.activeElement.outerHTML.slice(0,10240):h})}function M(e,t,n,r){if(x!==w.READY)C.push({stackTrace:e,options:t,userTriggered:n,error:r});else{var i="Script error",a=[],o={};if(!j||!function(e,t){if(U.Utilities.isEmpty(e.stack))U.Utilities.log("Raygun4JS: Cancelling send due to null stacktrace");else if(U.ErrorUtilities.isScriptError(e,t))U.Utilities.log("Raygun4JS: cancelling send due to third-party script error with no stacktrace and message",{stackTrace:e,options:t});else if(U.ErrorUtilities.isBrowserExtensionError(e))U.Utilities.log("Raygun4JS: cancelling send due to the error coming from a browser extension",e);else if(U.ErrorUtilities.isValidStackTrace(e)){if(U.ErrorUtilities.stackTraceHasValidDomain(e,G))return;U.Utilities.log("Raygun4JS: cancelling send due to error on non-origin, non-whitelisted domain")}else U.Utilities.log("Raygun4JS: cancelling send due to invalid stacktrace data",e);return 1}(e,t)){if(R instanceof Array)for(var s in R)if(R.hasOwnProperty(s)&&p.location.hostname&&p.location.hostname.match(R[s]))return void U.Utilities.log("Raygun4JS: cancelling send as error originates from an excluded hostname");if(k instanceof Array&&!U.Utilities.isReactNative())for(var u in k)if(k.hasOwnProperty(u)&&p.raygunUserAgent.match(k[u]))return void U.Utilities.log("Raygun4JS: cancelling send as error originates from an excluded user agent");if(U.Utilities.isReactNative()||!p.raygunUserAgent.match("RaygunPulseInsightsCrawler")){e.stack&&e.stack.length&&U.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 c=U.Utilities.parseUrl("?"),c=(0<c.length&&U.Utilities.forEach(c.split("&"),function(e,t){var n,t=t.split("=");t&&2===t.length&&(t=D(n=decodeURIComponent(t[0]),t[1]),o[n]=t)}),U.Utilities.isEmpty((t=t===h?{}:t).customData)&&(t.customData="function"==typeof S?S():S),U.Utilities.isEmpty(t.tags)&&(t.tags="function"==typeof E?E():"string"==typeof E?[E]:E),n||(t.tags||(t.tags=[]),U.Utilities.contains(t.tags,"UnhandledException"))||t.tags.push("UnhandledException"),U.Utilities.isReactNative()&&!U.Utilities.contains(t.tags,"React Native")&&t.tags.push("React Native"),U.Viewport.getViewportDimensions()),n=p.screen||{width:c.width,height:c.height,colorDepth:8},l=t.customData&&t.customData.ajaxErrorMessage;f="customData"===T?B(t.customData,"UserCustomData"):t.customData;try{JSON.stringify(f)}catch(e){var d="Cannot add custom data; may contain circular reference",f={error:d};U.Utilities.log("Raygun4JS: "+d)}var d=i,g=(l?d=l:e.message?d=e.message:t&&t.status?d=t.status:"string"==typeof r&&(d=r),(d=void 0===d?i:d)&&"string"==typeof d&&(d=d.substring(0,512)),l=U.Utilities.isReactNative()?"/":[location.protocol,"//",location.host,location.pathname,location.hash].join(""),{OccurredOn:new Date,Details:{Error:{ClassName:e.name,Message:d,StackTrace:a,StackString:e.stackstring},Environment:{UtcOffset:(new Date).getTimezoneOffset()/-60,"User-Language":navigator.userLanguage,"Document-Mode":U.Utilities.isReactNative()?"Not available":document.documentMode,"Browser-Width":c.width,"Browser-Height":c.height,"Screen-Width":n.width,"Screen-Height":n.height,"Color-Depth":n.colorDepth,Browser:navigator.appCodeName,"Browser-Name":navigator.appName,"Browser-Version":navigator.appVersion,Platform:navigator.platform},Client:{Name:"raygun-js",Version:"3.1.3"},UserCustomData:f,Tags:t.tags,Request:{Url:l,QueryString:o,Headers:{"User-Agent":p.raygunUserAgent,Referer:U.Utilities.isReactNative()?"Not available":document.referrer,Host:U.Utilities.isReactNative()?"Not available":document.domain}},Version:y||"Not supplied"}}),r=(g.Details.User=m,A.any()&&(g.Details.Breadcrumbs=[],(A.all()||[]).forEach(function(e){e.metadata&&(e.CustomData=e.metadata,delete e.metadata),g.Details.Breadcrumbs.push(e)})),"all"===T&&(g=B(g)),"function"==typeof b&&(U.Utilities.log("Raygun4JS: calling custom grouping key"),g.Details.GroupingKey=b(g,e,t)),g);if("function"==typeof v){try{r=p.structuredClone?p.structuredClone(g):g}catch(e){U.Utilities.log('Unable to clone RUM payload data":',e)}i=v(r);i&&se(i)}else se(r)}}}}function se(e){U.Utilities.isApiKeyConfigured()&&(U.Utilities.log("Sending exception data to Raygun:",e),I(U.Options._raygunApiUrl+"/entries?apikey="+encodeURIComponent(U.Options._raygunApiKey),JSON.stringify(e)))}function I(i,a,e,t){n="POST",r=i,(o=new p.XMLHttpRequest).timeout=1e4,("withCredentials"in o||U.Utilities.isReactNative())&&o.open(n,r,!0);var n,r,o,s=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),U.Utilities.log("Is offline enabled? "+d),("withCredentials"in s||U.Utilities.isReactNative())&&(s.onreadystatechange=function(){if(4===s.readyState)if(202===s.status)ae();else if(d&&403!==s.status&&400!==s.status&&429!==s.status){var e=i,t=a,n=(new Date).toJSON();try{var r="raygunjs+"+U.Options._raygunApiKey+"="+n+"="+U.Utilities.getRandomInt();void 0===localStorage[r]&&(localStorage[r]=JSON.stringify({url:e,data:t}))}catch(e){U.Utilities.log("Raygun4JS: LocalStorage full, cannot save exception")}}},s.onload=function(){U.Utilities.log("posted to Raygun"),te(this),e&&"function"==typeof e&&e(s,i,a)}),s.onerror=function(){U.Utilities.log("failed to post to Raygun"),te(this),t&&"function"==typeof t&&t(s,i,a)},s?(U.Utilities.isReactNative()&&s.setRequestHeader("Content-type","application/json;charset=UTF-8"),s.send(a)):U.Utilities.log("CORS not supported")}return U=U.Utilities.mergeMutate(U,n),p.__raygunNoConflict||(p.Raygun=U),TraceKit.setRaygun(U),U}window.__instantiatedRaygun=ue(window,window.jQuery)},{}],5:[function(e,t,n){var i=window,a=window.__instantiatedRaygun;if(i.RaygunObject&&i[i.RaygunObject]){var o,s,u,c=i[i.RaygunObject].o,l=!1,d=[],f=!1,g=!1,r=!1;try{r=!!i.sessionStorage}catch(e){}function p(){i[i.RaygunObject]=function(){return w(arguments)},i.RaygunInitialized=!0,l=!0}var h,m={ping:{sessionStorageItem:"raygun4js-successful-ping",sendPing:!0,failedPings:0}},y=["function (b,c,d,f,g){","||(g=new Error(b)),a[e].q=a[e].q||[]"],v=i[i.RaygunObject].q,b=a,U=["trackEvent","send","recordBreadcrumb","captureMissingRequests"],w=function(e){var t,n,r,i=e[0],a=e[1];if(i)switch(i){case"sendPing":m.ping.sendPing=a;break;case"boot":E();break;case"noConflict":u=a;break;case"apiKey":o=a,0;break;case"options":s=a;break;case"attach":case"enableCrashReporting":g=a,0;break;case"enableRealUserMonitoring":case"enableRUM":case"enablePulse":f=a,0;break;case"detach":b.detach();break;case"getRaygunInstance":return a&&"function"==typeof a&&a(b),b;case"setUser":b.setUser(a.identifier,a.isAnonymous,a.email,a.fullName,a.firstName,a.uuid);break;case"onBeforeSend":b.onBeforeSend(a);break;case"onBeforeSendRUM":b.onBeforeSendRum(a);break;case"onBeforeXHR":b.onBeforeXHR(a);break;case"onAfterSend":b.onAfterSend(a);break;case"withCustomData":b.withCustomData(a);break;case"withTags":b.withTags(a);break;case"setVersion":b.setVersion(a);break;case"filterSensitiveData":b.filterSensitiveData(a);break;case"setFilterScope":b.setFilterScope(a);break;case"whitelistCrossOriginDomains":b.whitelistCrossOriginDomains(a);break;case"saveIfOffline":"boolean"==typeof a&&b.saveIfOffline(a);break;case"groupingKey":b.groupingKey(a);break;case"endSession":b.endSession();break;case"send":a.error?(t=a.error,a.tags&&(n=a.tags),a.customData&&(r=a.customData)):t=a,b.send(t,r,n);break;case"trackEvent":a.type&&a.path?b.trackEvent(a.type,{path:a.path}):a.type&&a.name&&a.duration?b.trackEvent(a.type,{name:a.name,duration:a.duration,offset:a.offset||0}):a.type&&a.timings&&b.trackEvent(a.type,{timings:a.timings});break;case"recordBreadcrumb":b.recordBreadcrumb(e[1],e[2]);break;case"enableAutoBreadcrumbs":b.enableAutoBreadcrumbs();break;case"disableAutoBreadcrumbs":b.disableAutoBreadcrumbs();break;case"enableAutoBreadcrumbsConsole":b.enableAutoBreadcrumbs("Console");break;case"disableAutoBreadcrumbsConsole":b.disableAutoBreadcrumbs("Console");break;case"enableAutoBreadcrumbsNavigation":b.enableAutoBreadcrumbs("Navigation");break;case"disableAutoBreadcrumbsNavigation":b.disableAutoBreadcrumbs("Navigation");break;case"enableAutoBreadcrumbsClicks":b.enableAutoBreadcrumbs("Clicks");break;case"disableAutoBreadcrumbsClicks":b.disableAutoBreadcrumbs("Clicks");break;case"enableAutoBreadcrumbsXHR":b.enableAutoBreadcrumbs("XHR");break;case"disableAutoBreadcrumbsXHR":b.disableAutoBreadcrumbs("XHR");break;case"setBreadcrumbLevel":b.setBreadcrumbOption("breadcrumbsLevel",e[1]);break;case"setAutoBreadcrumbsXHRIgnoredHosts":b.setBreadcrumbOption("xhrIgnoredHosts",e[1]);break;case"logContentsOfXhrCalls":b.setBreadcrumbOption("logXhrContents",e[1]);break;case"clientIp":b.setClientIp(a);break;case"captureMissingRequests":b.captureMissingRequests(a);break;case"captureUnhandledRejections":0}},S=function(e){5<e||(e=1e3*Math.min(10*Math.pow(2,m.ping.failedPings),120),setTimeout(R,e))},E=function(){for(var e in c=i[i.RaygunObject].o)c.hasOwnProperty(e)&&(e=c[e])&&(-1===U.indexOf(e[0])?w(e):d.push(e));var t,n;if(u&&(b=a.noConflict()),o&&(s=s||{},f&&(s.disablePulse=!1),s.from="onLoad",b.init(o,s,null)),g)for(var r in b.attach(),v=i[i.RaygunObject].q)b.send(v[r].e,{handler:"From Raygun4JS snippet global error handler"});else"function"==typeof i.onerror&&-1!==(t=i.onerror.toString()).indexOf(y[0])&&-1!==t.indexOf(y[1])&&(i.onerror=null);for(n in d)d.hasOwnProperty(n)&&w(d[n]);d=[],l||p(),m.ping.sendPing&&R(),i[i.RaygunObject].q=v};a.Utilities.isReactNative()?p():(h=!!i.PerformanceObserver&&!!i.PerformanceObserver.supportedEntryTypes&&i.PerformanceObserver.supportedEntryTypes.includes("navigation"),"complete"===document.readyState?E():h?new i.PerformanceObserver(function(){E()}).observe({entryTypes:["navigation"]}):i.addEventListener?i.addEventListener("load",E):i.attachEvent("onload",E))}function R(){if(a.Options&&a.Options._raygunApiKey&&a.Options._raygunApiUrl){var e=a.Options._raygunApiUrl+"/ping?apiKey="+encodeURIComponent(a.Options._raygunApiKey),t={crashReportingEnabled:!!g,realUserMonitoringEnabled:!!f,providerName:"raygun4js",providerVersion:"3.1.3"};if(r){var n=sessionStorage.getItem(m.ping.sessionStorageItem);if(n&&n===JSON.stringify(t))return}fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(function(e){e.ok?(r&&sessionStorage.setItem(m.ping.sessionStorageItem,JSON.stringify(t)),m.ping.failedPings=0):(S(m.ping.failedPings),m.ping.failedPings++)}).catch(function(){S(m.ping.failedPings),m.ping.failedPings++})}}try{delete window.__instantiatedRaygun}catch(e){window.__instantiatedRaygun=void 0}},{}],6:[function(e,t,n){window.raygunNetworkTrackingFactory=function(c,l){function n(){this.requestHandlers=[],this.responseHandlers=[],this.errorHandlers=[],this.wrapWithHandler=function(e){return function(){try{return e.apply(this,arguments)}catch(e){l.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=l.Utilities.removeFromArray(this.requestHandlers,t);break;case"response":this.responseHandlers=l.Utilities.removeFromArray(this.responseHandlers,t);break;case"error":this.errorHandlers=l.Utilities.removeFromArray(this.errorHandlers,t)}},n.prototype.attach=function(){var e,s=this,u=(c.XMLHttpRequest.prototype.addEventListener&&l.Utilities.enhance(c.XMLHttpRequest.prototype,"open",s.wrapWithHandler(function(){var t=(new Date).getTime(),n=l.Utilities.resolveFullUrl(arguments[1])||"Unknown",r=n.split("?")[0],i=arguments[0];l.Utilities.enhance(this,"send",s.wrapWithHandler(function(){var e={method:i,requestURL:n,baseUrl:r};arguments[0]&&"string"==typeof arguments[0]&&(e.body=arguments[0]),s.executeHandlers(s.requestHandlers,e)})),this.addEventListener("load",s.wrapWithHandler(function(){var e="N/A for non text responses";""!==this.responseType&&"text"!==this.responseType||(e=this.responseText),l.Utilities.log("Tracking XHR response for",n),s.executeHandlers(s.responseHandlers,{status:this.status,requestURL:n,responseURL:this.responseURL,baseUrl:r,body:e,duration:(new Date).getTime()-t})})),this.addEventListener("error",s.wrapWithHandler(function(){s.executeHandlers(s.errorHandlers,{requestURL:n,responseURL:this.responseURL,duration:(new Date).getTime()-t})}))})),c.__raygunOriginalFetch||c.fetch);"function"!=typeof u||void 0!==u.polyfill||l.Utilities.isIE()||(e=function(){var i,a,e=arguments[0],t=arguments[1],n=t&&t.method||"GET",o=(new Date).getTime(),e=("string"==typeof e?i=e:void 0!==c.Request&&e instanceof c.Request?(i=e.url,e.method&&(n=e.method)):i=String(e),i=l.Utilities.resolveFullUrl(i),a=i.split("?")[0],u.apply(null,arguments));try{var r={method:n,requestURL:i,baseUrl:a};t&&t.body&&(r.body=t.body),s.executeHandlers(s.requestHandlers,r),e.then(s.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 r(){l.Utilities.log("tracking fetch response for",i),s.executeHandlers(s.responseHandlers,{status:e.status,requestURL:i,responseURL:e.url,body:t,baseUrl:a,duration:(new Date).getTime()-o})}if(n)try{n.text().then(function(e){t=l.Utilities.truncate(e,500),r()}).catch(function(){r()})}catch(e){r()}else r()})).catch(s.wrapWithHandler(function(e){s.executeHandlers(s.errorHandlers,{metadata:{requestUrl:i,error:e.toString(),duration:(new Date).getTime()-o}})}))}catch(e){l.Utilities.log(e)}return e},c.__raygunOriginalFetch?c.__raygunFetchCallback=e:c.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}},{}],7:[function(e,t,n){var i=e("web-vitals");window.raygunCoreWebVitalFactory=function(){function e(){this.cleanWebVitalData=function(e){return e.value&&e.value.toFixed&&(e.value=e.value.toFixed(3)),e}}var n=null,r=null;return e.prototype.attach=function(e,t){n=e,r=t,i.onLCP(this.handler),i.onFID(this.handler),i.onCLS(this.handler),i.onINP(this.handler),i.onFCP(this.handler),i.onTTFB(this.handler)},e.prototype.handler=function(e){e.value&&e.value.toFixed&&(e.value=e.value.toFixed(3));e={url:e.name,timing:{t:"w",du:e.value},parentResource:r};n(e)},new e}},{"web-vitals":1}],8:[function(e,t,n){var ie,ae;(ie=window).jQuery,(ae=window.__instantiatedRaygun).RealUserMonitoring=function(I,H,P,q,F,_,j,V,W,J,X,e,K,$,G,z,Q,Y){var g=this,a={},c=(this.cookieName="raygun4js-sid",this.apiKey=I,this.apiUrl=H,this.debugMode=W,this.excludedHostNames=j,this.excludedUserAgents=V,this.maxVirtualPageDuration=J||18e5,this.ignoreUrlCasing=X,this.customTimingsEnabled=e,this.automaticPerformanceCustomTimings=z,this.trackCoreWebVitals=Q,this.beforeSend=K||function(e){return e},this.pendingPayloadData=e||!1,this.queuedPerformanceTimings=[],this.pendingVirtualPage=null,this.sessionId=null,this.virtualPage=null,this.user=q,this.version=F,this.tags=_,this.heartBeatInterval=null,this.heartBeatIntervalTime=3e4,this.offset=0,this._captureMissingRequests=G||!1,this.sendUsingNavigatorBeacon=!1,this.stopCollectingMetrics=!1,this.queuedItems=[],this.maxQueueItemsSent=50,this.setCookieAsSecure=$,this.xhrRequestMap={},this.xhrStatusMap={},{Page:"p",VirtualPage:"v",XHR:"x",CachedChildAsset:"e",ChildAsset:"c",CustomTiming:"t",CoreWebVital:"w"});function n(){i(M({sessionId:g.sessionId,timestamp:(new Date).toISOString(),type:"session_start",user:g.user,version:g.version||"Not supplied",tags:g.tags,device:ie.raygunUserAgent,client:{name:"raygun4js",version:"3.1.3"}}))}function o(e){return new Date(B(e,"timestamp"))<new Date(new Date-18e5)}function s(){g.sessionId=T(32),L(g.sessionId)}function t(e,t){e=function(e,t,n){if(!A("timing","object")||void 0===ie.performance.timing.fetchStart||isNaN(ie.performance.timing.fetchStart))return null;var r=[];t&&r.push(function(){var e=ie.location.pathname;g.ignoreUrlCasing&&(e=e.toLowerCase());e=ie.location.protocol+"//"+ie.location.host+e;800<e.length&&(e=e.substring(0,800));return{url:e,userAgent:ie.raygunUserAgent,timing:function(){var e=ie.performance.getEntriesByType("navigation")[0]||ie.performance.timing,t={du:U(e),t:c.Page};t.a=e.fetchStart||0,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=C(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){var t;return A("getEntriesByName","function")&&(0<(t=ie.performance.getEntriesByName("first-paint")).length&&0<t[0].startTime?e.fp=t[0].startTime.toFixed(2):ie.performance.timing&&ie.performance.timing.msFirstPaint&&(e.fp=(ie.performance.timing.msFirstPaint-ie.performance.timing.fetchStart).toFixed(2)),0<(t=ie.performance.getEntriesByName("first-contentful-paint")).length)&&0<t[0].startTime&&(e.fcp=t[0].startTime.toFixed(2)),e}(t=k(t))}(),size:0}}());h(r),e&&(r.push(function(e,t){g.ignoreUrlCasing&&(e=e.toLowerCase());-1!==e.indexOf("?")&&(e=e.split("?")[0]);e=ie.location.protocol+"//"+ie.location.host+e;800<e.length&&(e=e.substring(0,800));return{url:e,userAgent:ie.raygunUserAgent,timing:function(e){return{t:c.VirtualPage,startTime:e,staticLoad:g.initalStaticPageLoadTimestamp,pending:!0}}(t),size:0}}(e,x(0))),h(r,!0));return r=function(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];n.push(b(i,t))}return n}(r,n)}(g.virtualPage,e,t);null===e||e.length<0||p(e,!1)}function u(e){e&&r();var t=[];h(t,void 0,e),p(t,e)}function l(){var e,t;0<g.queuedItems.length&&(g.queuedItems=(e=g.queuedItems,t="timestamp",e.sort(function(r){return function(e,t){var n;return e.hasOwnProperty(r)&&t.hasOwnProperty(r)?(e=e[r],n=0,(t=t[r])<e?n=1:e<t&&(n=-1),n):(O('Raygun4JS: Property "'+r+'" not found in items in this collection'),0)}}(t))),d(g.queuedItems.splice(0,g.maxQueueItemsSent)))}function r(){for(var e,t,n=0;n<g.queuedPerformanceTimings.length;n++)(e=g.queuedPerformanceTimings[n]).timing.t===c.VirtualPage&&e.timing.pending&&(e.timing=(e=e.timing,t=void 0,t=x(0),{t:e.t,du:Math.min(g.maxVirtualPageDuration,t-e.startTime),o:Math.min(g.maxVirtualPageDuration,t-e.staticLoad)}))}function i(e){d([e])}function d(t){var e={eventData:t},n=function(){O("Raygun4JS: Items sent successfully. Queue length: "+g.queuedItems.length)},r=function(e){g.queuedItems=t.concat(g.queuedItems),O("Raygun4JS: Items failed to send. Queue length: "+g.queuedItems.length+" Response status code: "+e.status)},c=("function"!=typeof n&&(n=function(){}),"function"!=typeof r&&(r=function(){}),g.apiUrl+"/events?apikey="+encodeURIComponent(g.apiKey)),l=e,d=n,f=r;if(g.excludedUserAgents instanceof Array)for(var i in g.excludedUserAgents)if(g.excludedUserAgents.hasOwnProperty(i)&&ie.raygunUserAgent.match(g.excludedUserAgents[i]))return void O("Raygun4JS: cancelling send as error originates from an excluded user agent");if(g.excludedHostNames instanceof Array)for(var a in g.excludedHostNames)if(g.excludedHostNames.hasOwnProperty(a)&&ie.location.hostname&&ie.location.hostname.match(g.excludedHostNames[a]))return void O("Raygun4JS: cancelling send as error originates from an excluded hostname");ie.raygunUserAgent.match("RaygunPulseInsightsCrawler")||setTimeout(function(){var e=l;if(e.eventData)for(var t=0;t<e.eventData.length;t++)if(e.eventData[t].data&&Array.isArray(e.eventData[t].data))for(var n=0;n<e.eventData[t].data.length;n++){var r,i=e.eventData[t].data[n];i.device&&ie.raygunUserAgentData&&ie.raygunUserAgentData.platformVersion&&(r=(ie.raygunUserAgentData.platformVersion||"").split("."),i.device={Family:ie.raygunUserAgentData.platform,Major:r[0]||"",Minor:r[1]||"",Patch:r[2]||"",PatchMinor:r[3]||""})}var a=l;try{a=ie.structuredClone?ie.structuredClone(l):l}catch(e){ae.Utilities.log('Unable to clone CR payload data":',e)}var o=g.beforeSend(a);if(o){if(o.eventData)for(var s,u=0;u<o.eventData.length;u++)o.eventData[u].data&&"string"!=typeof o.eventData[u].data&&(s=function(e){for(var t=0;t<e.length;t++){var n=e[t];n.requestDetails&&delete n.requestDetails}return e}(o.eventData[u].data),o.eventData[u].data=JSON.stringify(s));a=JSON.stringify(o);if(g.sendUsingNavigatorBeacon&&navigator.sendBeacon)try{navigator.sendBeacon(c,a)}catch(e){O(e,{url:c,payload:a})}else P(c,a,d,f)}else O("Raygun4JS: cancelling send because onBeforeSendRUM returned falsy value")},1===ie.raygunUserAgentDataStatus?200:0)}function f(e){if(!g.pendingPayloadData||e){function t(){i.push(N(r)),a=!(r=[])}function n(){0<r.length&&t(),0<i.length&&(d(i),a=!(r=[]))}for(var r=[],i=[],a=!1,o=0;o<g.queuedPerformanceTimings.length;o++){var s,u=(s=g.queuedPerformanceTimings[o]).timing.t===c.Page||s.timing.t===c.VirtualPage;if(a&&u&&t(),0<r.length&&u&&t(),u&&(g.requestId=T(16)),s.timing.t===c.VirtualPage&&s.timing.pending)return n(),void g.queuedPerformanceTimings.splice(0,o);r.push(s),a=a||s.timing.t===c.Page||s.timing.t===c.VirtualPage}n(),g.queuedPerformanceTimings=[]}}function p(e,t){!1===g.stopCollectingMetrics&&(g.queuedPerformanceTimings=g.queuedPerformanceTimings.concat(e),f(t))}function Z(e){e=N([e]);if(navigator.sendBeacon){if(e.data){e.data=JSON.stringify(e.data);var t=JSON.stringify({eventData:[e]}),n=g.apiUrl+"/events?apikey="+encodeURIComponent(g.apiKey);try{navigator.sendBeacon(n,t)}catch(e){O(e,{url:n,payload:t})}}}else d([e])}function h(e,t,n){var r;if(A("getEntries","function"))try{for(var i=0,a=ie.performance.getEntriesByType("navigation"),i=t||a&&0<a.length?0:ie.performance.timing.navigationStart,o=ie.performance.getEntries(),s=g.offset;s<o.length;s++){var u,c=o[s];if(!n&&te(c))break;w(c)?g.automaticPerformanceCustomTimings&&(u=S(c),e.push(b(u,g.parentResource))):R((r=c).name.split("?")[0])||"paint"===r.entryType||"mark"===r.entryType||"navigation"===r.entryType||"visibility-state"===r.entryType||e.push(ne(c,i))}g.offset=s,g._captureMissingRequests&&ee(e,i)}catch(e){O(e)}}this.Utilities={},this.attach=function(){var e=function(e){g.pageLoaded(e)},t=D(),n=null===t,r=!1,i=(n||(r=o(t)),n||r?(s(),e(!0)):(L(n=B(t,"id")),g.sessionId=n,e(!1)),this.trackCoreWebVitals&&ae.CoreWebVitals.attach(Z,g.parentResource),function(){u(g.sendUsingNavigatorBeacon=!0),l()}.bind(a)),r=function(){this.updateStorageTimestamp()}.bind(a),t=function(){"visible"===document.visibilityState&&this.updateStorageTimestamp(),"hidden"===document.visibilityState&&i()}.bind(a),n=function(){i()}.bind(a),e=function(){i(),g.stopCollectingMetrics=!0}.bind(a);ie.addEventListener?(ie.addEventListener("click",r),document.addEventListener("visibilitychange",t),ie.addEventListener("popstate",n),ie.addEventListener("pagehide",e)):ie.attachEvent&&document.attachEvent("onclick",r),ae.NetworkTracking.on("request",function(e){this.xhrRequestMap[e.baseUrl]||(this.xhrRequestMap[e.baseUrl]=[]);O("adding request to xhr request map",e);var t=b(e,g.parentResource);this.xhrRequestMap[e.baseUrl].push(t)}.bind(this)),ae.NetworkTracking.on("error",function(e){var t=this.xhrRequestMap[e.baseUrl];t&&0<t.length&&(this.xhrRequestMap[e.baseUrl].shift(),O("request encountered an error",e))}.bind(this)),ae.NetworkTracking.on("response",function(e){var t=this.xhrRequestMap[e.baseUrl];{var n;t&&0<t.length?(t=t[0],n=t.parentResource,this.xhrRequestMap[e.baseUrl].shift(),0===this.xhrRequestMap[e.baseUrl].length&&delete this.xhrRequestMap[e.baseUrl],this.xhrStatusMap[e.baseUrl]||(this.xhrStatusMap[e.baseUrl]=[]),O("adding request/response to xhr status map",t={request:t,response:e}),t=b(t,n),this.xhrStatusMap[e.baseUrl].push(t)):O("response fired from non-handled request")}}.bind(this))},this.pageLoaded=function(e){e&&n();e=v(y(ie.location.pathname),c.Page);g.parentResource=e,t(!0,e),null!==g.heartBeatInterval?O("Raygun4JS: Heartbeat already exists. Skipping heartbeat creation."):g.heartBeatInterval=setInterval(function(){u(),l(),g.xhrStatusMap={}},g.heartBeatIntervalTime),g.initalStaticPageLoadTimestamp=x(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);e=v(y(e),c.VirtualPage);g.parentResource=e,g.stopCollectingMetrics&&(g.offset=ie.performance.getEntries().length,g.stopCollectingMetrics=!1),r(),t(!1,e)},this.setUser=function(e){g.user=e},this.withTags=function(e){g.tags=e},t