!function(){"use strict";var t,e,n,r,o,a,i,c,s,u,l,f,p,d,v,y,m,h,g,b,_,O={},S={};function w(t){var e=S[t];if(void 0!==e)return e.exports;var n=S[t]={exports:{}};return O[t](n,n.exports,w),n.exports}w.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(t){if("object"==typeof window)return window}}(),w.rv=function(){return"1.2.8"},w.ruid="bundler=rspack@1.2.8";var j=window.HeaderScripts,E="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,k="9.13.0",P=globalThis;function T(){return x(P),P}function x(t){var e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||k,e[k]=e[k]||{}}function A(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:P,r=n.__SENTRY__=n.__SENTRY__||{},o=r[k]=r[k]||{};return o[t]||(o[t]=e())}var I="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function D(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);nt.length)&&(e=t.length);for(var n=0,r=Array(e);n1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return"";try{for(var n,r=t,o=[],a=0,i=0,c=Array.isArray(e)?e:e.keyAttrs,s=!Array.isArray(e)&&e.maxStringLength||80;r&&a++<5&&(n=function(t,e){var n=[];if(!(null==t?void 0:t.tagName))return"";if(P.HTMLElement&&t instanceof HTMLElement&&t.dataset){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}n.push(t.tagName.toLowerCase());var r=(null==e?void 0:e.length)?e.filter(function(e){return t.getAttribute(e)}).map(function(e){return[e,t.getAttribute(e)]}):null;if(null==r?void 0:r.length)r.forEach(function(t){n.push("[".concat(t[0],'="').concat(t[1],'"]'))});else{t.id&&n.push("#".concat(t.id));var o=t.className;if(o&&Y(o)){var a=o.split(/\s+/),i=!0,c=!1,s=void 0;try{for(var u,l=a[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var f=u.value;n.push(".".concat(f))}}catch(t){c=!0,s=t}finally{try{i||null==l.return||l.return()}finally{if(c)throw s}}}}var p=!0,d=!1,v=void 0;try{for(var y,m=["aria-label","type","name","title","alt"][Symbol.iterator]();!(p=(y=m.next()).done);p=!0){var h=y.value,g=t.getAttribute(h);g&&n.push("[".concat(h,'="').concat(g,'"]'))}}catch(t){d=!0,v=t}finally{try{p||null==m.return||m.return()}finally{if(d)throw v}}return n.join("")}(r,c),"html"!==n&&(!(a>1)||!(i+3*o.length+n.length>=s)));)o.push(n),i+=n.length,r=r.parentNode;return o.reverse().join(" > ")}catch(t){return""}}function to(){try{return P.document.location.href}catch(t){return""}}function ta(t){if(!P.HTMLElement)return null;for(var e=t,n=0;n<5&&e;n++){if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}function ti(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"string"!=typeof t||0===e?t:t.length<=e?t:"".concat(t.slice(0,e),"...")}function tc(t,e){if(!Array.isArray(t))return"";for(var n=[],r=0;r1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e.some(function(e){return function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!!Y(t)&&(W(e,"RegExp")?e.test(t):!!Y(e)&&(n?t===e:t.includes(e)))}(t,e,n)})}function tu(t){for(var e=1;e"}}function tm(t){if((void 0===t?"undefined":t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)!="object"||null===t)return{};var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function th(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:P.crypto||P.msCrypto,e=function(){return 16*Math.random()};try{if(null==t?void 0:t.randomUUID)return t.randomUUID().replace(/-/g,"");(null==t?void 0:t.getRandomValues)&&(e=function(){var e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(t){}return"10000000100040008000100000000000".replace(/[018]/g,function(t){return(t^(15&e())>>t/4).toString(16)})}function tb(t){var e,n;return null===(n=t.exception)||void 0===n?void 0:null===(e=n.values)||void 0===e?void 0:e[0]}function t_(t){var e=t.message,n=t.event_id;if(e)return e;var r=tb(t);return r?r.type&&r.value?"".concat(r.type,": ").concat(r.value):r.type||r.value||n||"":n||""}function tO(t,e,n){var r=t.exception=t.exception||{},o=r.values=r.values||[],a=o[0]=o[0]||{};a.value||(a.value=e||""),a.type||(a.type=n||"Error")}function tS(t,e){var n=tb(t);if(n){var r=n.mechanism;if(n.mechanism=th({},{type:"generic",handled:!0},r,e),e&&"data"in e){var o=th({},null==r?void 0:r.data,e.data);n.mechanism.data=o}}}function tw(t){if(function(t){try{return t.__sentry_captured__}catch(t){}}(t))return!0;try{tf(t,"__sentry_captured__",!0)}catch(t){}return!1}function tj(t){var e=[];t.message&&e.push(t.message);try{var n=t.exception.values[t.exception.values.length-1];(null==n?void 0:n.value)&&(e.push(n.value),n.type&&e.push("".concat(n.type,": ").concat(n.value)))}catch(t){}return e}function tE(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n0&&void 0!==arguments[0]?arguments[0]:{};return{name:"EventFilters",setup:function(n){t=tA(e,n.getOptions())},processEvent:function(n,r,o){return t||(t=tA(e,o.getOptions())),!function(t,e){if(t.type){if("transaction"===t.type&&function(t,e){if(!(null==e?void 0:e.length))return!1;var n=t.transaction;return!!n&&ts(n,e)}(t,e.ignoreTransactions))return E&&N.warn("Event dropped due to being matched by `ignoreTransactions` option.\nEvent: ".concat(t_(t))),!0}else{var n,r,o,a,i;if(n=t,null!=(r=e.ignoreErrors)&&r.length&&tj(n).some(function(t){return ts(t,r)}))return E&&N.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: ".concat(t_(t))),!0;if(null!==(i=(o=t).exception)&&void 0!==i&&null!==(a=i.values)&&void 0!==a&&a.length&&!o.message&&!o.exception.values.some(function(t){return t.stacktrace||t.type&&"Error"!==t.type||t.value}))return E&&N.warn("Event dropped due to not having an error message, error type or stacktrace.\nEvent: ".concat(t_(t))),!0;if(function(t,e){if(!(null==e?void 0:e.length))return!1;var n=tI(t);return!!n&&ts(n,e)}(t,e.denyUrls))return E&&N.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: ".concat(t_(t),".\nUrl: ").concat(tI(t))),!0;if(!function(t,e){if(!(null==e?void 0:e.length))return!0;var n=tI(t);return!n||ts(n,e)}(t,e.allowUrls))return E&&N.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: ".concat(t_(t),".\nUrl: ").concat(tI(t))),!0}return!1}(n,t)?n:null}}},tx=function(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{allowUrls:tk(t.allowUrls||[]).concat(tk(e.allowUrls||[])),denyUrls:tk(t.denyUrls||[]).concat(tk(e.denyUrls||[])),ignoreErrors:tk(t.ignoreErrors||[]).concat(tk(e.ignoreErrors||[]),tk(t.disableErrorDefaults?[]:tP)),ignoreTransactions:tk(t.ignoreTransactions||[]).concat(tk(e.ignoreTransactions||[]))}}function tI(t){try{var e,n,r,o=tk(null!==(r=null===(e=t.exception)||void 0===e?void 0:e.values)&&void 0!==r?r:[]).reverse().find(function(t){var e,n,r;return(null===(e=t.mechanism)||void 0===e?void 0:e.parent_id)===void 0&&(null===(r=t.stacktrace)||void 0===r?void 0:null===(n=r.frames)||void 0===n?void 0:n.length)}),a=null==o?void 0:null===(n=o.stacktrace)||void 0===n?void 0:n.frames;return a?function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.length-1;e>=0;e--){var n=t[e];if(n&&""!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(a):null}catch(e){return E&&N.error("Cannot extract url for event ".concat(t_(t))),null}}function tD(){return Date.now()/1e3}var tC=function(){var t=P.performance;if(!(null==t?void 0:t.now))return tD;var e=Date.now()-t.now(),n=void 0==t.timeOrigin?e:t.timeOrigin;return function(){return(n+t.now())/1e3}}();function tR(){return n||(n=function(){var t,e=P.performance;if(!(null==e?void 0:e.now))return[void 0,"none"];var n=e.now(),r=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-r):36e5,a=null===(t=e.timing)||void 0===t?void 0:t.navigationStart,i="number"==typeof a?Math.abs(a+n-r):36e5;return o<36e5||i<36e5?o<=i?[e.timeOrigin,"timeOrigin"]:[a,"navigationStart"]:[r,"dateNow"]}()),n[0]}function tM(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e.user||(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||tC(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:tg()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did="".concat(e.did)),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{var n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}function tN(){return tg().substring(16)}function tL(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if(!e||(void 0===e?"undefined":e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)!="object"||n<=0)return e;if(t&&0===Object.keys(e).length)return t;var r=function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=Array(e);nr&&(this._breadcrumbs=this._breadcrumbs.slice(-r),null===(n=this._client)||void 0===n||n.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}},{key:"getLastBreadcrumb",value:function(){return this._breadcrumbs[this._breadcrumbs.length-1]}},{key:"clearBreadcrumbs",value:function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}},{key:"addAttachment",value:function(t){return this._attachments.push(t),this}},{key:"clearAttachments",value:function(){return this._attachments=[],this}},{key:"getScopeData",value:function(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:this[tU]}}},{key:"setSDKProcessingMetadata",value:function(t){return this._sdkProcessingMetadata=tL(this._sdkProcessingMetadata,t,2),this}},{key:"setPropagationContext",value:function(t){return this._propagationContext=t,this}},{key:"getPropagationContext",value:function(){return this._propagationContext}},{key:"captureException",value:function(t,e){var n=(null==e?void 0:e.event_id)||tg();if(!this._client)return N.warn("No client configured on scope - will not capture exception!"),n;var r=Error("Sentry syntheticException");return this._client.captureException(t,t$(tB({originalException:t,syntheticException:r},e),{event_id:n}),this),n}},{key:"captureMessage",value:function(t,e,n){var r=(null==n?void 0:n.event_id)||tg();if(!this._client)return N.warn("No client configured on scope - will not capture message!"),r;var o=Error(t);return this._client.captureMessage(t,e,t$(tB({originalException:t,syntheticException:o},n),{event_id:r}),this),r}},{key:"captureEvent",value:function(t,e){var n=(null==e?void 0:e.event_id)||tg();return this._client?this._client.captureEvent(t,t$(tB({},e),{event_id:n}),this):N.warn("No client configured on scope - will not capture event!"),n}},{key:"_notifyScopeListeners",value:function(){var t=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(function(e){e(t)}),this._notifyingListeners=!1)}}],function(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=Array(e);nt.length)&&(e=t.length);for(var n=0,r=Array(e);n1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=[],a=t.split("\n"),i=e;i1024)){var s=t6.test(c)?c.replace(t6,"$1"):c;if(!s.match(/\S*Error: /)){var u=!0,l=!1,f=void 0;try{for(var p,d=r[Symbol.iterator]();!(u=(p=d.next()).done);u=!0){var v=(0,p.value)(s);if(v){o.push(v);break}}}catch(t){l=!0,f=t}finally{try{u||null==d.return||d.return()}finally{if(l)throw f}}if(o.length>=50+n)break}}}return function(t){if(!t.length)return[];var e=Array.from(t);return/sentryWrapped/.test(t7(e).function||"")&&e.pop(),e.reverse(),t5.test(t7(e).function||"")&&(e.pop(),t5.test(t7(e).function||"")&&e.pop()),e.slice(0,50).map(function(t){var n,r;return n=function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=Array(e);n1&&void 0!==arguments[1]&&arguments[1],n=t.host,r=t.path,o=t.pass,a=t.port,i=t.projectId,c=t.protocol,s=t.publicKey;return"".concat(c,"://").concat(s).concat(e&&o?":".concat(o):"")+"@".concat(n).concat(a?":".concat(a):"","/").concat(r?"".concat(r,"/"):r).concat(i)}function ep(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function ed(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n1&&void 0!==arguments[1]?arguments[1]:100,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Infinity;try{return function t(e,n){var r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Infinity,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Infinity,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:(r=new WeakSet,[function(t){return!!r.has(t)||(r.add(t),!1)},function(t){r.delete(t)}]),c=function(t){if(Array.isArray(t))return t}(i)||function(t,e){var n,r,o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var a=[],i=!0,c=!1;try{for(o=o.call(t);!(i=(n=o.next()).done)&&(a.push(n.value),a.length!==e);i=!0);}catch(t){c=!0,r=t}finally{try{i||null==o.return||o.return()}finally{if(c)throw r}}return a}}(i,2)||function(t,e){if(t){if("string"==typeof t)return ed(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ed(t,e)}}(i,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),s=c[0],u=c[1];if(null==n||["boolean","string"].includes(void 0===n?"undefined":ev(n))||"number"==typeof n&&Number.isFinite(n))return n;var l=function(t,e){try{if("domain"===t&&e&&(void 0===e?"undefined":ev(e))==="object"&&e._events)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if(void 0!==w.g&&e===w.g)return"[Global]";if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(te(e))return"[VueViewModel]";if(K(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e)return"[SyntheticEvent]";if("number"==typeof e&&!Number.isFinite(e))return"[".concat(e,"]");if("function"==typeof e)return"[Function: ".concat(ee(e),"]");if((void 0===e?"undefined":ev(e))==="symbol")return"[".concat(String(e),"]");if((void 0===e?"undefined":ev(e))==="bigint")return"[BigInt: ".concat(String(e),"]");var n,r,o=(n=e,r=Object.getPrototypeOf(n),(null==r?void 0:r.constructor)?r.constructor.name:"null prototype");if(/^HTML(\w*)Element$/.test(o))return"[HTMLElement: ".concat(o,"]");return"[object ".concat(o,"]")}catch(t){return"**non-serializable** (".concat(t,")")}}(e,n);if(!l.startsWith("[object "))return l;if(n.__sentry_skip_normalization__)return n;var f="number"==typeof n.__sentry_override_normalization_depth__?n.__sentry_override_normalization_depth__:o;if(0===f)return l.replace("object ","");if(s(n))return"[Circular ~]";if(n&&"function"==typeof n.toJSON)try{var p=n.toJSON();return t("",p,f-1,a,i)}catch(t){}var d=Array.isArray(n)?[]:{},v=0,y=tv(n);for(var m in y)if(Object.prototype.hasOwnProperty.call(y,m)){if(v>=a){d[m]="[MaxProperties ~]";break}var h=y[m];d[m]=t(m,h,f-1,a,i),v++}return u(n),d}("",t,e,n)}catch(t){return{ERROR:"**non-serializable** (".concat(t,")")}}}function em(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n1&&void 0!==arguments[1]?arguments[1]:[];return[t,e]}function e_(t,e){var n=t[1],r=!0,o=!1,a=void 0;try{for(var i,c=n[Symbol.iterator]();!(r=(i=c.next()).done);r=!0){var s=i.value,u=s[0].type;if(e(s,u))return!0}}catch(t){o=!0,a=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return!1}function eO(t){var e=x(P);return e.encodePolyfill?e.encodePolyfill(t):new TextEncoder().encode(t)}var eS={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",otel_log:"log_item"};function ew(t){if(null==t?void 0:t.sdk){var e=t.sdk;return{name:e.name,version:e.version}}}function ej(t){return[{type:"otel_log"},t]}var eE=new WeakMap;function ek(t,e){var n,r,o,a,i,c=null!==(i=null!=e?e:eE.get(t))&&void 0!==i?i:[];if(0!==c.length){var s=t.getOptions(),u=(n=s._metadata,r=s.tunnel,o=t.getDsn(),a={},(null==n?void 0:n.sdk)&&(a.sdk={name:n.sdk.name,version:n.sdk.version}),r&&o&&(a.dsn=ef(o)),eb(a,c.map(ej)));c.length=0,t.emit("flushLogs"),t.sendEnvelope(u)}}function eP(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=Array(e);n0?r:void 0}}function eJ(t){return t.split(",").map(function(t){return t.split("=").map(function(t){return decodeURIComponent(t.trim())})}).reduce(function(t,e){var n=e$(e,2),r=n[0],o=n[1];return r&&o&&(t[r]=o),t},{})}function eY(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;var e,n=t||(null===(e=t2())||void 0===e?void 0:e.getOptions());return!!n&&(null!=n.tracesSampleRate||!!n.tracesSampler)}function eX(t,e){t.setAttribute("http.response.status_code",e);var n=function(t){if(t<400&&t>=100)return{code:1};if(t>=400&&t<500)switch(t){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(t>=500&&t<600)switch(t){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"unknown_error"}}(e);"unknown_error"!==n.message&&t.setStatus(n)}var eV="_sentryScope",eK="_sentryIsolationScope";function eZ(t){return{scope:t[eV],isolationScope:t[eK]}}function eQ(t){if("boolean"==typeof t)return Number(t);var e="string"==typeof t?parseFloat(t):t;if(!("number"!=typeof e||isNaN(e))&&!(e<0)&&!(e>1))return e}var e0=RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function e1(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tg(),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tN(),n=arguments.length>2?arguments[2]:void 0,r="";return void 0!==n&&(r=n?"-1":"-0"),"".concat(t,"-").concat(e).concat(r)}var e2=!1;function e3(t){return t&&t.length>0?t.map(function(t){var e=t.context;return function(t){for(var e=1;e=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t.context,["spanId","traceId","traceFlags"]))}):void 0}function e8(t){return"number"==typeof t?e4(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?e4(t.getTime()):tC()}function e4(t){return t>0x2540be3ff?t/1e3:t}function e6(t){if("function"==typeof t.getSpanJSON)return t.getSpanJSON();var e,n=t.spanContext(),r=n.spanId,o=n.traceId;if((e=t).attributes&&e.startTime&&e.name&&e.endTime&&e.status){var a=t.attributes,i=t.startTime,c=t.name,s=t.endTime,u=t.parentSpanId,l=t.status,f=t.links;return{span_id:r,trace_id:o,data:a,description:c,parent_span_id:u,start_timestamp:e8(i),timestamp:e8(s)||void 0,status:e9(l),op:a[eR],origin:a[eM],links:e3(f)}}return{span_id:r,trace_id:o,start_timestamp:0,data:{}}}function e5(t){return 1===t.spanContext().traceFlags}function e9(t){return t&&0!==t.code?1===t.code?"ok":t.message||"unknown_error":void 0}var e7="_sentryChildSpans",nt="_sentryRootSpan";function ne(t,e){var n=t[nt]||t;tf(e,nt,n),t[e7]?t[e7].add(e):tf(t,e7,new Set([e]))}function nn(t){var e=new Set;return!function t(n){if(!e.has(n)&&e5(n)){e.add(n);var r=n[e7]?Array.from(n[e7]):[],o=!0,a=!1,i=void 0;try{for(var c,s=r[Symbol.iterator]();!(o=(c=s.next()).done);o=!0){var u=c.value;t(u)}}catch(t){a=!0,i=t}finally{try{o||null==s.return||s.return()}finally{if(a)throw i}}}}(t),Array.from(e)}function nr(t){return t[nt]||t}function no(){var t=tK(T());return t.getActiveSpan?t.getActiveSpan():tQ()[tU]}function na(){e2||(M(function(){console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),e2=!0)}var ni="_frozenDsc";function nc(t,e){var n=e.getOptions(),r=(e.getDsn()||{}).publicKey,o={environment:n.environment||eI,release:n.release,public_key:r,trace_id:t};return e.emit("createDsc",o),o}function ns(t,e){var n=e.getPropagationContext();return n.dsc||nc(n.traceId,t)}function nu(t){var e,n,r,o=t2();if(!o)return{};var a=nr(t),i=e6(a),c=i.data,s=a.spanContext().traceState,u=null!==(e=null==s?void 0:s.get("sentry.sample_rate"))&&void 0!==e?e:c[eC];function l(t){return("number"==typeof u||"string"==typeof u)&&(t.sample_rate="".concat(u)),t}var f=a[ni];if(f)return l(f);var p=null==s?void 0:s.get("sentry.dsc"),d=p&&eG(p);if(d)return l(d);var v=nc(t.spanContext().traceId,o),y=c[eD],m=i.description;return"url"!==y&&m&&(v.transaction=m),eY()&&(v.sampled=String(e5(a)),v.sample_rand=null!==(r=null==s?void 0:s.get("sentry.sample_rand"))&&void 0!==r?r:null===(n=eZ(a).scope)||void 0===n?void 0:n.getPropagationContext().sampleRand.toString()),l(v),o.emit("createDsc",v,a),v}function nl(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);nt.length)&&(e=t.length);for(var n=0,r=Array(e);nt.length)&&(e=t.length);for(var n=0,r=Array(e);nt.length)&&(e=t.length);for(var n=0,r=Array(e);n1&&(l=p.slice(0,-1).join("/"),f=p.pop()),f){var d=f.match(/^\d+/);d&&(f=d[0])}return ep({host:void 0===c?"":c,pass:void 0===i?"":i,path:l,projectId:f,port:void 0===s?"":s,protocol:o,publicKey:a})}(t):ep(t);if(e&&function(t){if(!I)return!0;var e=t.port,n=t.projectId,r=t.protocol;return!["protocol","publicKey","host","projectId"].find(function(e){return!t[e]&&(N.error("Invalid Sentry Dsn: ".concat(e," missing")),!0)})&&(n.match(/^\d+$/)?"http"!==r&&"https"!==r?(N.error("Invalid Sentry Dsn: Invalid protocol ".concat(r)),!1):!(e&&isNaN(parseInt(e,10)))||(N.error("Invalid Sentry Dsn: Invalid port ".concat(e)),!1):(N.error("Invalid Sentry Dsn: Invalid projectId ".concat(n)),!1))}(e))return e}(t.dsn):E&&N.warn("No DSN provided, client will not send events."),this._dsn){var n,r,o,a,i,c,s=(n=this._dsn,r=t.tunnel,o=t._metadata?t._metadata.sdk:void 0,r||"".concat("".concat((a=n.protocol?"".concat(n.protocol,":"):"",i=n.port?":".concat(n.port):"","".concat(a,"//").concat(n.host).concat(i).concat(n.path?"/".concat(n.path):"","/api/"))).concat(n.projectId,"/envelope/"),"?").concat((c={sentry_version:"7"},n.publicKey&&(c.sentry_key=n.publicKey),o&&(c.sentry_client="".concat(o.name,"/").concat(o.version)),new URLSearchParams(c).toString())));this._transport=t.transport(nx(nT({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this)},t.transportOptions),{url:s}))}}return t=[{key:"captureException",value:function(t,e,n){var r=this,o=tg();if(tw(t))return E&&N.log(nC),o;var a=nT({event_id:o},e);return this._process(this.eventFromException(t,a).then(function(t){return r._captureEvent(t,a,n)})),a.event_id}},{key:"captureMessage",value:function(t,e,n,r){var o=this,a=nT({event_id:tg()},n),i=X(t)?t:String(t),c=V(t)?this.eventFromMessage(i,e,a):this.eventFromException(t,a);return this._process(c.then(function(t){return o._captureEvent(t,a,r)})),a.event_id}},{key:"captureEvent",value:function(t,e,n){var r=tg();if((null==e?void 0:e.originalException)&&tw(e.originalException))return E&&N.log(nC),r;var o=nT({event_id:r},e),a=t.sdkProcessingMetadata||{},i=a.capturedSpanScope,c=a.capturedSpanIsolationScope;return this._process(this._captureEvent(t,o,i||n,c)),o.event_id}},{key:"captureSession",value:function(t){this.sendSession(t),tM(t,{init:!1})}},{key:"getDsn",value:function(){return this._dsn}},{key:"getOptions",value:function(){return this._options}},{key:"getSdkMetadata",value:function(){return this._options._metadata}},{key:"getTransport",value:function(){return this._transport}},{key:"flush",value:function(t){var e=this._transport;return e?(this.emit("flush"),this._isClientDoneProcessing(t).then(function(n){return e.flush(t).then(function(t){return n&&t})})):nd(!0)}},{key:"close",value:function(t){var e=this;return this.flush(t).then(function(t){return e.getOptions().enabled=!1,e.emit("close"),t})}},{key:"getEventProcessors",value:function(){return this._eventProcessors}},{key:"addEventProcessor",value:function(t){this._eventProcessors.push(t)}},{key:"init",value:function(){(this._isEnabled()||this._options.integrations.some(function(t){return t.name.startsWith("Spotlight")}))&&this._setupIntegrations()}},{key:"getIntegrationByName",value:function(t){return this._integrations[t]}},{key:"addIntegration",value:function(t){var e=this._integrations[t.name];H(this,t,this._integrations),e||F(this,[t])}},{key:"sendEvent",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.emit("beforeSendEvent",t,n);var r=(c=this._dsn,s=this._options._metadata,u=this._options.tunnel,l=ew(s),f=t.type&&"replay_event"!==t.type?t.type:"event",(p=null==s?void 0:s.sdk)&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||p.name,t.sdk.version=t.sdk.version||p.version,t.sdk.integrations=np(t.sdk.integrations||[]).concat(np(p.integrations||[])),t.sdk.packages=np(t.sdk.packages||[]).concat(np(p.packages||[]))),v=null===(d=t.sdkProcessingMetadata)||void 0===d?void 0:d.dynamicSamplingContext,y=function(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:1;if(this._options.sendClientReports){var r="".concat(t,":").concat(e);E&&N.log('Recording outcome: "'.concat(r,'"').concat(n>1?" (".concat(n," times)"):"")),this._outcomes[r]=(this._outcomes[r]||0)+n}}},{key:"on",value:function(t,e){var n=this._hooks[t]=this._hooks[t]||[];return n.push(e),function(){var t=n.indexOf(e);t>-1&&n.splice(t,1)}}},{key:"emit",value:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r=t&&(clearInterval(o),n(!1)))},1)})}},{key:"_isEnabled",value:function(){return!1!==this.getOptions().enabled&&void 0!==this._transport}},{key:"_prepareEvent",value:function(t,e,n,r){var o,s,u,l,f,p,d,v,y,m,h,g,b,_,O,S,w,j,k,T,x,I,D,C,R,M,L,U,q,F,H,B,$,z,W,G,J,Y,X,V,K,Z,tt,te,tn=this,tr=this.getOptions(),to=Object.keys(this._integrations);return!e.integrations&&(null==to?void 0:to.length)&&(e.integrations=to),this.emit("preprocessEvent",t,e),t.type||r.setLastEventId(t.event_id||e.event_id),(F=void 0===(q=tr.normalizeDepth)?3:q,B=void 0===(H=tr.normalizeMaxBreadth)?1e3:H,$=nS({},t),z=z={event_id:t.event_id||e.event_id||tg(),timestamp:t.timestamp||tD()},Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(z)):(function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n.push.apply(n,r)}return n})(Object(z)).forEach(function(t){Object.defineProperty($,t,Object.getOwnPropertyDescriptor(z,t))}),W=$,G=e.integrations||tr.integrations.map(function(t){return t.name}),o=W,u=(s=tr).environment,l=s.release,f=s.dist,p=s.maxValueLength,o.environment=o.environment||u||eI,!o.release&&l&&(o.release=l),!o.dist&&f&&(o.dist=f),(null==(d=o.request)?void 0:d.url)&&(d.url=ti(d.url,void 0===p?250:p)),v=W,(y=G).length>0&&(v.sdk=v.sdk||{},v.sdk.integrations=nw(v.sdk.integrations||[]).concat(nw(y))),this&&this.emit("applyFrameMetadata",t),void 0===t.type&&(m=W,b=function(t){var e=P._sentryDebugIds;if(!e)return{};var n=Object.keys(e);return c&&n.length===i?c:(i=n.length,c=n.reduce(function(n,r){a||(a={});var o=a[r];if(o)n[o[0]]=o[1];else for(var i=t(r),c=i.length-1;c>=0;c--){var s=i[c],u=null==s?void 0:s.filename,l=e[r];if(u&&l){n[u]=l,a[r]=[u,l];break}}return n},{}))}(tr.stackParser),null===(g=m.exception)||void 0===g||null===(h=g.values)||void 0===h||h.forEach(function(t){var e,n;null===(n=t.stacktrace)||void 0===n||null===(e=n.frames)||void 0===e||e.forEach(function(t){t.filename&&(t.debug_id=b[t.filename])})})),J=function(t,e){if(!e)return t;var n=t?t.clone():new tW;return n.update(e),n}(n,e.captureContext),e.mechanism&&tS(W,e.mechanism),Y=this?this.getEventProcessors():[],X=A("globalScope",function(){return new tW}).getScopeData(),r&&nb(X,r.getScopeData()),J&&nb(X,J.getScopeData()),(V=nw(e.attachments||[]).concat(nw(X.attachments))).length&&(e.attachments=V),K=X.fingerprint,Z=X.span,tt=X.breadcrumbs,te=X.sdkProcessingMetadata,_=W,S=(O=X).extra,w=O.tags,j=O.user,k=O.contexts,T=O.level,x=O.transactionName,Object.keys(S).length&&(_.extra=nh({},S,_.extra)),Object.keys(w).length&&(_.tags=nh({},w,_.tags)),Object.keys(j).length&&(_.user=nh({},j,_.user)),Object.keys(k).length&&(_.contexts=nh({},k,_.contexts)),T&&(_.level=T),x&&"transaction"!==_.type&&(_.transaction=x),Z&&function(t,e){t.contexts=nh({trace:(r=(n=e.spanContext()).spanId,o=n.traceId,i=(a=n.isRemote)?r:e6(e).parent_span_id,c=eZ(e).scope,{parent_span_id:i,span_id:a?(null==c?void 0:c.getPropagationContext().propagationSpanId)||tN():r,trace_id:o})},t.contexts),t.sdkProcessingMetadata=nh({dynamicSamplingContext:nu(e)},t.sdkProcessingMetadata);var n,r,o,a,i,c,s=e6(nr(e)).description;s&&!t.transaction&&"transaction"===t.type&&(t.transaction=s)}(W,Z),I=W,D=K,I.fingerprint=I.fingerprint?Array.isArray(I.fingerprint)?I.fingerprint:[I.fingerprint]:[],D&&(I.fingerprint=I.fingerprint.concat(D)),I.fingerprint.length||delete I.fingerprint,C=W,R=tt,M=ng(C.breadcrumbs||[]).concat(ng(R)),C.breadcrumbs=M.length?M:void 0,L=W,U=te,L.sdkProcessingMetadata=nh({},L.sdkProcessingMetadata,U),(function t(e,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return new ny(function(a,i){var c=e[o];if(null===n||"function"!=typeof c)a(n);else{var s=c(function(t){for(var e=1;e0)?function(t,e,n){if(!t)return null;var r,o,a=nS({},t,t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(function(t){return nS({},t,t.data&&{data:ey(t.data,e,n)})})},t.user&&{user:ey(t.user,e,n)},t.contexts&&{contexts:ey(t.contexts,e,n)},t.extra&&{extra:ey(t.extra,e,n)});return(null===(r=t.contexts)||void 0===r?void 0:r.trace)&&a.contexts&&(a.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(a.contexts.trace.data=ey(t.contexts.trace.data,e,n))),t.spans&&(a.spans=t.spans.map(function(t){return nS({},t,t.data&&{data:ey(t.data,e,n)})})),(null===(o=t.contexts)||void 0===o?void 0:o.flags)&&a.contexts&&(a.contexts.flags=ey(t.contexts.flags,3,n)),a}(t,F,B):t})).then(function(t){if(null===t)return t;tn.emit("postprocessEvent",t,e),t.contexts=nT({trace:(o=(r=n.getPropagationContext()).traceId,a=r.parentSpanId,i={trace_id:o,span_id:r.propagationSpanId||tN()},a&&(i.parent_span_id=a),i)},t.contexts);var r,o,a,i,c=ns(tn,n);return t.sdkProcessingMetadata=nT({dynamicSamplingContext:c},t.sdkProcessingMetadata),t})}},{key:"_captureEvent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tQ(),r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t0();return E&&nB(t)&&N.log("Captured error event `".concat(tj(t)[0]||"","`")),this._processEvent(t,e,n,r).then(function(t){return t.event_id},function(t){E&&(nF(t)?N.log(t.message):nq(t)?N.warn(t.message):N.warn(t))})}},{key:"_processEvent",value:function(t,e,n,r){var o=this,a=this.getOptions(),i=a.sampleRate,c=n$(t),s=nB(t),u=t.type||"error",l="before send for type `".concat(u,"`"),f=void 0===i?void 0:eQ(i);if(s&&"number"==typeof f&&Math.random()>f)return this.recordDroppedEvent("sample_rate","error"),nv(nU("Discarding event because it's not included in the random sample (sampling rate = ".concat(i,")")));var p="replay_event"===u?"replay":u;return this._prepareEvent(t,e,n,r).then(function(t){if(null===t)throw o.recordDroppedEvent("event_processor",p),nU("An event processor returned `null`, will not send event.");return e.data&&!0===e.data.__sentry__?t:function(t,e){var n="".concat(e," must return `null` or a valid event.");if(Q(t))return t.then(function(t){if(!K(t)&&null!==t)throw nL(n);return t},function(t){throw nL("".concat(e," rejected with ").concat(t))});if(!K(t)&&null!==t)throw nL(n);return t}(function(t,e,n,r){var o=e.beforeSend,a=e.beforeSendTransaction,i=e.beforeSendSpan,c=n;if(nB(c)&&o)return o(c,r);if(n$(c)){if(i){var s=i((g=(h=null!==(y=null===(v=(d=c).contexts)||void 0===v?void 0:v.trace)&&void 0!==y?y:{}).trace_id,b=h.parent_span_id,_=h.span_id,O=h.status,S=h.origin,w=h.data,j=h.op,{data:null!=w?w:{},description:d.transaction,op:j,parent_span_id:b,span_id:null!=_?_:"",start_timestamp:null!==(m=d.start_timestamp)&&void 0!==m?m:0,status:O,timestamp:d.timestamp,trace_id:null!=g?g:"",origin:S,profile_id:null==w?void 0:w[eF],exclusive_time:null==w?void 0:w[eH],measurements:d.measurements,is_segment:!0}));if(s?c=tL(n,{type:"transaction",timestamp:s.timestamp,start_timestamp:s.start_timestamp,transaction:s.description,contexts:{trace:{trace_id:s.trace_id,span_id:s.span_id,parent_span_id:s.parent_span_id,op:s.op,status:s.status,origin:s.origin,data:function(t){for(var e=1;e0&&o.recordDroppedEvent("before_send","span",d)}var v=a.transaction_info;return c&&v&&a.transaction!==t.transaction&&(a.transaction_info=nx(nT({},v),{source:"custom"})),o.sendEvent(a,e),a}).then(null,function(t){if(nF(t)||nq(t))throw t;throw o.captureException(t,{data:{__sentry__:!0},originalException:t}),nL("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ".concat(t))})}},{key:"_process",value:function(t){var e=this;this._numProcessing++,t.then(function(t){return e._numProcessing--,t},function(t){return e._numProcessing--,t})}},{key:"_clearOutcomes",value:function(){var t=this._outcomes;return this._outcomes={},Object.entries(t).map(function(t){var e=nA(t,2),n=e[0],r=e[1],o=nA(n.split(":"),2);return{reason:o[0],category:o[1],quantity:r}})}},{key:"_flushOutcomes",value:function(){E&&N.log("Flushing outcomes...");var t,e=this._clearOutcomes();if(0===e.length){E&&N.log("No outcomes to send");return}if(!this._dsn){E&&N.log("No dsn provided, will not send outcomes");return}E&&N.log("Sending outcomes:",e);var n=eb((t=this._options.tunnel&&ef(this._dsn))?{dsn:t}:{},[[{type:"client_report"},{timestamp:tD(),discarded_events:e}]]);this.sendEnvelope(n)}}],function(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:3,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:102400,o=ey(e,n);return~-encodeURI(JSON.stringify(o)).split(/%..|./).length>r?t(e,n-1,r):o}(e,a)};if(i)return{exception:{values:[nz(t,i)]},extra:c};var s={exception:{values:[{type:Z(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:function(t,e){var n=e.isUnhandledRejection,r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40,n=Object.keys(tv(t));n.sort();var r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return ti(r,e);for(var o=n.length;o>0;o--){var a=n.slice(0,o).join(", ");if(!(a.length>e)){if(o===n.length)return a;return ti(a,e)}}return""}(t),o=n?"promise rejection":"exception";if(G(t))return"Event `ErrorEvent` captured as ".concat(o," with message `").concat(t.message,"`");if(Z(t)){var a=function(t){try{var e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch(t){}}(t);return"Event `".concat(a,"` (type=").concat(t.type,") captured as ").concat(o)}return"Object captured as ".concat(o," with keys: ").concat(r)}(e,{isUnhandledRejection:r})}]},extra:c};if(n){var u=nG(t,n);u.length&&(s.exception.values[0].stacktrace={frames:u})}return s}(t,e,n,o),{synthetic:!0}):(tO(a=nV(t,e,n,r),"".concat(e),void 0),tS(a,{synthetic:!0})),a)}function nV(t,e,n,r){var o={};if(r&&n){var a=nG(t,n);a.length&&(o.exception={values:[{value:e,stacktrace:{frames:a}}]}),tS(o,{synthetic:!0})}if(X(e)){var i=e.__sentry_template_string__,c=e.__sentry_template_values__;return o.logentry={message:i,params:c},o}return o.message=e,o}function nK(t,e){return tQ().captureEvent(t,e)}function nZ(t,e){t0().setTag(t,e)}function nQ(t){var e,n,r,o=t0(),a=tQ(),i=(P.navigator||{}).userAgent,c=(e=function(t){for(var e=1;e0&&void 0!==arguments[0]&&arguments[0];if(t){n0();return}n1()}var n3=0;function n8(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("function"!=typeof t)return t;try{var n=t.__sentry_wrapped__;if(n){if("function"==typeof n)return n;return t}if(td(t))return t}catch(e){return t}var r=function(){for(var n=arguments.length,r=Array(n),o=0;o2&&void 0!==arguments[2]?arguments[2]:[e],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"npm",o=t._metadata||{};o.sdk||(o.sdk={name:"sentry.javascript.".concat(e),packages:n.map(function(t){return{name:"".concat(r,":@sentry/").concat(t),version:k}}),version:k}),t._metadata=o}(s,"browser",["browser"],P.SENTRY_SDK_SOURCE||"npm"),a=n,i=[s],a=n6(a),e=this;var u=(c=(r=n9()?Reflect.construct(a,i||[],n6(this).constructor):a.apply(this,i))&&("object"==((o=r)&&"undefined"!=typeof Symbol&&o.constructor===Symbol?"symbol":typeof o)||"function"==typeof r)?r:function(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e))._options,l=u.sendDefaultPii,f=u._experiments,p=null==f?void 0:f.enableLogs;return s.sendClientReports&&P.document&&P.document.addEventListener("visibilitychange",function(){"hidden"===P.document.visibilityState&&(c._flushOutcomes(),p&&ek(c))}),p&&(c.on("flush",function(){ek(c)}),c.on("afterCaptureLog",function(){c._logFlushIdleTimeout&&clearTimeout(c._logFlushIdleTimeout),c._logFlushIdleTimeout=setTimeout(function(){ek(c)},5e3)})),l&&(c.on("postprocessEvent",ex),c.on("beforeSendSession",eA)),c}return!function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n5(t,e)}(n,t),e=[{key:"eventFromException",value:function(t,e){var n,r,o;return n=this._options.stackParser,r=this._options.attachStacktrace,tS(o=nX(n,t,(null==e?void 0:e.syntheticException)||void 0,r)),o.level="error",(null==e?void 0:e.event_id)&&(o.event_id=e.event_id),nd(o)}},{key:"eventFromMessage",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",n=arguments.length>2?arguments[2]:void 0;return function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"info",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,a=nV(t,e,(null==r?void 0:r.syntheticException)||void 0,o);return a.level=n,(null==r?void 0:r.event_id)&&(a.event_id=r.event_id),nd(a)}(this._options.stackParser,t,e,n,this._options.attachStacktrace)}},{key:"_prepareEvent",value:function(t,e,r,o){return t.platform=t.platform||"javascript",n4(n6(n.prototype),"_prepareEvent",this).call(this,t,e,r,o)}}],function(t,e){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1];return function(n){if(n&&!n._sentryCaptured){var r=function(t){try{return t.target}catch(t){return null}}(n);if("keypress"!==n.type||null!=r&&r.tagName&&("INPUT"===r.tagName||"TEXTAREA"===r.tagName||r.isContentEditable)){tf(n,"_sentryCaptured",!0),r&&!r._sentryId&&tf(r,"_sentryId",tg());var o="keypress"===n.type?"input":n.type;!function(t){if(t.type!==u)return!1;try{if(!t.target||t.target._sentryId!==l)return!1}catch(t){}return!0}(n)&&(t({event:n,name:o,global:e}),u=n.type,l=r?r._sentryId:void 0),clearTimeout(s),s=P.setTimeout(function(){l=void 0,u=void 0},1e3)}}}}function rs(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n2?n[2]:void 0;if(o){var a=f,i=String(o);if(f=i,a===i)return t.apply(this,n);ra("history",{from:a,to:i})}return t.apply(this,n)}}}function rv(){"console"in P&&C.forEach(function(t){t in P.console&&tl(P.console,t,function(e){return R[t]=e,function(){for(var e=arguments.length,n=Array(e),r=0;rt.length)&&(e=t.length);for(var n=0,r=Array(e);n0&&o[o.length-1])&&(6===a[0]||2===a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]1&&void 0!==arguments[1]&&arguments[1];(!e||function(){if("string"==typeof EdgeRuntime)return!0;if(!ec())return!1;if(es(P.fetch))return!0;var t=!1,e=P.document;if(e&&"function"==typeof e.createElement)try{var n,r=e.createElement("iframe");r.hidden=!0,e.head.appendChild(r),(null===(n=r.contentWindow)||void 0===n?void 0:n.fetch)&&(t=es(r.contentWindow.fetch)),e.head.removeChild(r)}catch(t){I&&N.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return t}())&&tl(P,"fetch",function(e){return function(){for(var n,r=arguments.length,o=Array(r),a=0;a=400&&t<500?"warning":t>=500?"error":void 0}function rI(t){return"isRelative"in t}function rD(t){if(!t)return{};var e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};var n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function rC(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=rC({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t);return{name:"Breadcrumbs",setup:function(t){var n,r,o,a,i,c,s,u;if(e.console){r=t,rr(n="console",function(t){if(t2()===r){var e,n={category:"console",data:{arguments:t.args,logger:"console"},level:"warn"===(e=t.level)?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log",message:tc(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message="Assertion failed: ".concat(tc(t.args.slice(1)," ")||"console.assert"),n.data.arguments=t.args.slice(1)}rx(n,{input:t.args,level:t.level})}}),ro(n,rv)}if(e.dom){rr("dom",(o=t,a=e.dom,function(t){if(t2()===o){var e,n,r=(void 0===a?"undefined":rR(a))==="object"?a.serializeAttribute:void 0,i=(void 0===a?"undefined":rR(a))==="object"&&"number"==typeof a.maxStringLength?a.maxStringLength:void 0;i&&i>1024&&(rt&&N.warn("`dom.maxStringLength` cannot exceed ".concat(1024,", but a value of ").concat(i," was configured. Sentry will use ").concat(1024," instead.")),i=1024),"string"==typeof r&&(r=[r]);try{var c,s=t.event,u=(c=s)&&c.target?s.target:s;e=tr(u,{keyAttrs:r,maxStringLength:i}),n=ta(u)}catch(t){e=""}if(0!==e.length){var l={category:"ui.".concat(t.name),message:e};n&&(l.data={"ui.component_name":n}),rx(l,{event:t.event,name:t.name,global:t.global})}}})),ro("dom",ri)}e.xhr&&rl((i=t,function(t){if(t2()===i){var e=t.startTimestamp,n=t.endTimestamp,r=t.xhr[ru];if(e&&n&&r){var o=r.method,a=r.url,c=r.status_code,s=r.body,u={xhr:t.xhr,input:s,startTimestamp:e,endTimestamp:n},l={category:"xhr",data:{method:o,url:a,status_code:c},type:"http",level:rA(c)};i.emit("beforeOutgoingRequestBreadcrumb",l,u),rx(l,u)}}})),e.fetch&&rw((c=t,function(t){if(t2()===c){var e=t.startTimestamp,n=t.endTimestamp;if(!(!n||t.fetchData.url.match(/sentry_key/)&&"POST"===t.fetchData.method)){if(t.fetchData.method,t.fetchData.url,t.error){var r=t.fetchData,o={data:t.error,input:t.args,startTimestamp:e,endTimestamp:n},a={category:"fetch",data:r,level:"error",type:"http"};c.emit("beforeOutgoingRequestBreadcrumb",a,o),rx(a,o)}else{var i,s,u=t.response,l=(i=rC({},t.fetchData),s=s={status_code:null==u?void 0:u.status},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(s)):(function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n.push.apply(n,r)}return n})(Object(s)).forEach(function(t){Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(s,t))}),i);t.fetchData.request_body_size,t.fetchData.response_body_size,null==u||u.status;var f={input:t.args,response:u,startTimestamp:e,endTimestamp:n},p={category:"fetch",data:l,type:"http",level:rA(l.status_code)};c.emit("beforeOutgoingRequestBreadcrumb",p,f),rx(p,f)}}}})),e.history&&rp((s=t,function(t){if(t2()===s){var e=t.from,n=t.to,r=rD(P.location.href),o=e?rD(e):void 0,a=rD(n);(null==o?void 0:o.path)||(o=r),r.protocol===a.protocol&&r.host===a.host&&(n=a.relative),r.protocol===o.protocol&&r.host===o.host&&(e=o.relative),rx({category:"navigation",data:{from:e,to:n}})}})),e.sentry&&t.on("beforeSendEvent",(u=t,function(t){t2()===u&&rx({category:"sentry.".concat("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:t_(t)},{event:t})}))}}},rN=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],rL=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=function(t){for(var e=1;e0)){var a,i,c,s,u,l,f,p,d,v,y=t.msg,m=t.url,h=t.line,g=t.column,b=t.error,_=(a=nX(r,b||y,void 0,o,!1),i=m,c=h,s=g,d=(p=(f=(l=(u=a.exception=a.exception||{}).values=u.values||[])[0]=l[0]||{}).stacktrace=f.stacktrace||{}).frames=p.frames||[],v=Y(i)&&i.length>0?i:to(),0===d.length&&d.push({colno:s,filename:v,function:"?",in_app:!0,lineno:c}),a);_.level="error",nK(_,{originalException:b,mechanism:{handled:!1,type:"onerror"}})}}),rX("onerror")),e.onunhandledrejection&&(r=t,rG(function(t){var e=rV(),n=e.stackParser,o=e.attachStacktrace;if(t2()===r&&!(n3>0)){var a,i=function(t){if(V(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch(t){}return t}(t),c=V(i)?(a=i,{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: ".concat(String(a))}]}}):nX(n,i,void 0,o,!0);c.level="error",nK(c,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})}}),rX("onunhandledrejection"))}}};function rX(t){rt&&N.log("Global Handler attached: ".concat(t))}function rV(){var t=t2();return(null==t?void 0:t.getOptions())||{stackParser:function(){return[]},attachStacktrace:!1}}function rK(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=Array(e);n0&&void 0!==arguments[0]?arguments[0]:{},e=t.limit||5,n=t.key||"cause";return{name:"LinkedErrors",preprocessEvent:function(t,r,o){!function(t,e,n,r,o,a){if((null===(i=o.exception)||void 0===i?void 0:i.values)&&a&&tt(a.originalException,Error)){var i,c=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;c&&(o.exception.values=function t(e,n,r,o,a,i,c,s){if(i.length>=r+1)return i;var u=r1(i);if(tt(o[a],Error)){r2(c,s);var l=e(n,o[a]),f=u.length;r3(l,a,f,s),u=t(e,n,r,o[a],a,[l].concat(r1(u)),l,f)}return Array.isArray(o.errors)&&o.errors.forEach(function(o,i){if(tt(o,Error)){r2(c,s);var l=e(n,o),f=u.length;r3(l,"errors[".concat(i,"]"),f,s),u=t(e,n,r,o,a,[l].concat(r1(u)),l,f)}}),u}(t,e,r,a.originalException,n,o.exception.values,c,0))}}(nz,o.getOptions().stackParser,n,e,t,r)}}};function r4(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n"===e?"?":e,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}var r7=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,ot=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,oe=/\((\S*)(?::(\d+))(?::(\d+))\)/,on=[30,function(t){var e=r7.exec(t);if(e){var n=r6(e,4);return r9(n[1],"?",+n[2],+n[3])}var r=ot.exec(t);if(r){if(r[2]&&0===r[2].indexOf("eval")){var o=oe.exec(r[2]);o&&(r[2]=o[1],r[3]=o[2],r[4]=o[3])}var a=r6(oc(r[1]||"?",r[2]),2),i=a[0];return r9(a[1],i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],or=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,oo=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,oa=[50,function(t){var e=or.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){var n,r=oo.exec(e[3]);r&&(e[1]=e[1]||"eval",e[3]=r[1],e[4]=r[2],e[5]="")}var o=e[3],a=e[1]||"?";return a=(n=r6(oc(a,o),2))[0],r9(o=n[1],a,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],oi=t9.apply(void 0,function(t){if(Array.isArray(t))return r4(t)}(e=[on,oa])||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||r5(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),oc=function(t,e){var n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:"?",n?"safari-extension:".concat(e):"safari-web-extension:".concat(e)]:[t,e]},os="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,ou={},ol=Symbol.for("SentryBufferFullError");function of(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n1&&void 0!==arguments[1]?arguments[1]:function(t){var e=ou[t];if(e)return e;var n=P[t];if(es(n))return ou[t]=n.bind(P);var r=P.document;if(r&&"function"==typeof r.createElement)try{var o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);var a=o.contentWindow;(null==a?void 0:a[t])&&(n=a[t]),r.head.removeChild(o)}catch(e){os&&N.warn("Could not create sandbox iframe for ".concat(t," check, bailing to window.").concat(t,": "),e)}return n?ou[t]=n.bind(P):n}("fetch"),n=0,r=0;return function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(t){var e=[];function n(t){return e.splice(e.indexOf(t),1)[0]||Promise.resolve(void 0)}return{$:e,add:function(r){if(!(void 0===t||e.length0&&n(!1)},t);e.forEach(function(t){nd(t).then(function(){--o||(clearTimeout(a),n(!0))},r)})})}}}(t.bufferSize||64),r={};return{send:function(o){var a=[];if(e_(o,function(e,n){var o=eS[n];(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now();return(t[e]||t.all||0)>n})(r,o)?t.recordDroppedEvent("ratelimit_backoff",o):a.push(e)}),0===a.length)return nd({});var i=eb(o[0],a),c=function(e){e_(i,function(n,r){t.recordDroppedEvent(e,eS[r])})};return n.add(function(){return e({body:function(t){var e=eh(t,2),n=e[0],r=e[1],o=JSON.stringify(n);function a(t){"string"==typeof o?o="string"==typeof t?o+t:[eO(o),t]:o.push("string"==typeof t?eO(t):t)}var i=!0,c=!1,s=void 0;try{for(var u,l=r[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var f=u.value,p=eh(f,2),d=p[0],v=p[1];if(a("\n".concat(JSON.stringify(d),"\n")),"string"==typeof v||v instanceof Uint8Array)a(v);else{var y=void 0;try{y=JSON.stringify(v)}catch(t){y=JSON.stringify(ey(v))}a(y)}}}catch(t){c=!0,s=t}finally{try{i||null==l.return||l.return()}finally{if(c)throw s}}return"string"==typeof o?o:function(t){var e=new Uint8Array(t.reduce(function(t,e){return t+e.length},0)),n=0,r=!0,o=!1,a=void 0;try{for(var i,c=t[Symbol.iterator]();!(r=(i=c.next()).done);r=!0){var s=i.value;e.set(s,n),n+=s.length}}catch(t){o=!0,a=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return e}(o)}(i)}).then(function(t){return void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&E&&N.warn("Sentry responded with status code ".concat(t.statusCode," to sent event.")),r=function(t,e){var n=e.statusCode,r=e.headers,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Date.now(),a=function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:Date.now(),n=parseInt("".concat(t),10);if(!isNaN(n))return 1e3*n;var r=Date.parse("".concat(t));return isNaN(r)?6e4:r-e}(c,o):429===n&&(a.all=o+6e4);return a}(r,t),t},function(t){throw c("network_error"),E&&N.error("Encountered error running transport request:",t),t})}).then(function(t){return t},function(t){if(t===ol)return E&&N.error("Skipped sending event because buffer is full."),c("queue_overflow"),nd({});throw t})},flush:function(t){return n.drain(t)}}}(t,function(o){var a=o.body.length;n+=a,r++;var i=function(t){for(var e=1;e=0&&(i||r)&&((a=e.value-(o||0))||void 0===o)){var c;o=e.value,e.delta=a,e.rating=(c=e.value)>n[1]?"poor":c>n[0]?"needs-improvement":"good",t(e)}}},oh=function(){var t,e,n=!(arguments.length>0)||void 0===arguments[0]||arguments[0],r=null===(e=P.performance)||void 0===e?void 0:null===(t=e.getEntriesByType)||void 0===t?void 0:t.call(e,"navigation")[0];if(!n||r&&r.responseStart>0&&r.responseStart0?a="prerender":(null===(r=P.document)||void 0===r?void 0:r.wasDiscarded)?a="restore":o.type&&(a=o.type.replace(/_/g,"-"))),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(Math.random()*(9e12-1))+1e12),navigationType:a}},o_=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver(function(t){Promise.resolve().then(function(){e(t.getEntries())})});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(t){}},oO=function(t){var e=function(e){var n;("pagehide"===e.type||(null===(n=P.document)||void 0===n?void 0:n.visibilityState)==="hidden")&&t(e)};P.document&&(addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0))},oS=function(t){var e=!1;return function(){e||(t(),e=!0)}},ow=-1,oj=function(t){"hidden"===P.document.visibilityState&&ow>-1&&(ow="visibilitychange"===t.type?t.timeStamp:0,ok())},oE=function(){addEventListener("visibilitychange",oj,!0),addEventListener("prerenderingchange",oj,!0)},ok=function(){removeEventListener("visibilitychange",oj,!0),removeEventListener("prerenderingchange",oj,!0)},oP=function(){return P.document&&ow<0&&(ow="hidden"!==P.document.visibilityState||P.document.prerendering?1/0:0,oE()),{get firstHiddenTime(){return ow}}},oT=function(t){var e;(null===(e=P.document)||void 0===e?void 0:e.prerendering)?addEventListener("prerenderingchange",function(){return t()},!0):t()},ox=[1800,3e3],oA=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};oT(function(){var n,r=oP(),o=ob("FCP"),a=o_("paint",function(t){t.forEach(function(t){"first-contentful-paint"===t.name&&(a.disconnect(),t.startTime1&&void 0!==arguments[1]?arguments[1]:{};oA(oS(function(){var n,r=ob("CLS",0),o=0,a=[],i=function(t){t.forEach(function(t){if(!t.hadRecentInput){var e=a[0],n=a[a.length-1];o&&e&&n&&t.startTime-n.startTime<1e3&&t.startTime-e.startTime<5e3?(o+=t.value,a.push(t)):(o=t.value,a=[t])}}),o>r.value&&(r.value=o,r.entries=a,n())},c=o_("layout-shift",i);c&&(n=om(t,r,oI,e.reportAllChanges),oO(function(){i(c.takeRecords()),n(!0)}),setTimeout(n,0))}))},oC=[100,300],oR=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};oT(function(){var n,r=oP(),o=ob("FID"),a=function(t){t.startTimen.latency){if(r)t.duration>r.latency?(r.entries=[t],r.latency=t.duration):t.duration===r.latency&&t.startTime===(null===(e=r.entries[0])||void 0===e?void 0:e.startTime)&&r.entries.push(t);else{var o={id:t.interactionId,latency:t.duration,entries:[t]};oH.set(o.id,o),oF.push(o)}oF.sort(function(t,e){return e.latency-t.latency}),oF.length>10&&oF.splice(10).forEach(function(t){return oH.delete(t.id)})}}},oW=function(t){var e,n=P.requestIdleCallback||P.setTimeout,r=-1;return t=oS(t),(null===(e=P.document)||void 0===e?void 0:e.visibilityState)==="hidden"?t():(r=n(t),oO(t)),r},oG=[200,500],oJ=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"PerformanceEventTiming"in P&&"interactionId"in PerformanceEventTiming.prototype&&oT(function(){oq();var n,r=ob("INP"),o=function(t){oW(function(){t.forEach(oz);var e=oB();e&&e.latency!==r.value&&(r.value=e.latency,r.entries=e.entries,n())})},a=o_("event",o,{durationThreshold:null!=e.durationThreshold?e.durationThreshold:40});n=om(t,r,oG,e.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),oO(function(){o(a.takeRecords()),n(!0)}))})},oY=[2500,4e3],oX={},oV=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};oT(function(){var n,r=oP(),o=ob("LCP"),a=function(t){e.reportAllChanges||(t=t.slice(-1)),t.forEach(function(t){t.startTime1&&void 0!==arguments[1]?arguments[1]:{},n=ob("TTFB"),r=om(t,n,oK,e.reportAllChanges);oZ(function(){var t=oh();t&&(n.value=Math.max(t.responseStart-og(),0),n.entries=[t],r(!0))})},o0={},o1={};function o2(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return at("cls",t,o4,d,e)}function o3(t,e){var n,r;return ae(t,e),o1[t]||(r={},"event"===(n=t)&&(r.durationThreshold=0),o_(n,function(t){o8(n,{entries:t})},r),o1[t]=!0),an(t,e)}function o8(t,e){var n=o0[t];if(null==n?void 0:n.length){var r=!0,o=!1,a=void 0;try{for(var i,c=n[Symbol.iterator]();!(r=(i=c.next()).done);r=!0){var s=i.value;try{s(e)}catch(e){os&&N.error("Error while triggering instrumentation handler.\nType: ".concat(t,"\nName: ").concat(ee(s),"\nError:"),e)}}}catch(t){o=!0,a=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}}}function o4(){return oD(function(t){o8("cls",{metric:t}),d=t},{reportAllChanges:!0})}function o6(){return oR(function(t){o8("fid",{metric:t}),v=t})}function o5(){return oV(function(t){o8("lcp",{metric:t}),y=t},{reportAllChanges:!0})}function o9(){return oQ(function(t){o8("ttfb",{metric:t}),m=t})}function o7(){return oJ(function(t){o8("inp",{metric:t}),h=t})}function at(t,e,n,r){var o,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return ae(t,e),o1[t]||(o=n(),o1[t]=!0),r&&e({metric:r}),an(t,e,a?o:void 0)}function ae(t,e){o0[t]=o0[t]||[],o0[t].push(e)}function an(t,e,n){return function(){n&&n();var r=o0[t];if(r){var o=r.indexOf(e);-1!==o&&r.splice(o,1)}}}var ar=function(){var t;function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,e),this._traceId=t.traceId||tg(),this._spanId=t.spanId||tN()}return t=[{key:"spanContext",value:function(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}},{key:"end",value:function(t){}},{key:"setAttribute",value:function(t,e){return this}},{key:"setAttributes",value:function(t){return this}},{key:"setStatus",value:function(t){return this}},{key:"updateName",value:function(t){return this}},{key:"isRecording",value:function(){return!1}},{key:"addEvent",value:function(t,e,n){return this}},{key:"addLink",value:function(t){return this}},{key:"addLinks",value:function(t){return this}},{key:"recordException",value:function(t,e){}}],function(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=Array(e);n0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}(this,e),this._traceId=n.traceId||tg(),this._spanId=n.spanId||tN(),this._startTime=n.startTimestamp||tC(),this._links=n.links,this._attributes={},this.setAttributes(ai((aa(t={},eM,"manual"),aa(t,eR,n.op),t),n.attributes)),this._name=n.name,n.parentSpanId&&(this._parentSpanId=n.parentSpanId),"sampled"in n&&(this._sampled=n.sampled),n.endTimestamp&&(this._endTime=n.endTimestamp),this._events=[],this._isStandaloneSpan=n.isStandalone,this._endTime&&this._onSpanEnded()}return t=[{key:"addLink",value:function(t){return this._links?this._links.push(t):this._links=[t],this}},{key:"addLinks",value:function(t){if(this._links){var e;(e=this._links).push.apply(e,function(t){if(Array.isArray(t))return ao(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ao(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ao(t,e)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}else this._links=t;return this}},{key:"recordException",value:function(t,e){}},{key:"spanContext",value:function(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:+!!this._sampled}}},{key:"setAttribute",value:function(t,e){return void 0===e?delete this._attributes[t]:this._attributes[t]=e,this}},{key:"setAttributes",value:function(t){var e=this;return Object.keys(t).forEach(function(n){return e.setAttribute(n,t[n])}),this}},{key:"updateStartTime",value:function(t){this._startTime=e8(t)}},{key:"setStatus",value:function(t){return this._status=t,this}},{key:"updateName",value:function(t){return this._name=t,this.setAttribute(eD,"custom"),this}},{key:"end",value:function(t){!this._endTime&&(this._endTime=e8(t),function(t){if(E){var e=e6(t),n=e.description,r=e.op,o=t.spanContext().spanId,a=nr(t)===t,i='[Tracing] Finishing "'.concat(void 0===r?"< unknown op >":r,'" ').concat(a?"root ":"",'span "').concat(void 0===n?"< unknown name >":n,'" with ID ').concat(o);N.log(i)}}(this),this._onSpanEnded())}},{key:"getSpanJSON",value:function(){return{data:this._attributes,description:this._name,op:this._attributes[eR],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:e9(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[eM],profile_id:this._attributes[eF],exclusive_time:this._attributes[eH],measurements:oy(this._events),is_segment:this._isStandaloneSpan&&nr(this)===this||void 0,segment_id:this._isStandaloneSpan?nr(this).spanContext().spanId:void 0,links:e3(this._links)}}},{key:"isRecording",value:function(){return!this._endTime&&!!this._sampled}},{key:"addEvent",value:function(t,e,n){E&&N.log("[Tracing] Adding an event to span:",t);var r=as(e)?e:n||tC(),o=as(e)?{}:e||{},a={name:t,time:e8(r),attributes:o};return this._events.push(a),this}},{key:"isStandaloneSpan",value:function(){return!!this._isStandaloneSpan}},{key:"_onSpanEnded",value:function(){var t=t2();if(t&&t.emit("spanEnd",this),this._isStandaloneSpan||this===nr(this)){if(this._isStandaloneSpan){this._sampled?function(t){var e=t2();if(e){var n=t[1];if(!n||0===n.length){e.recordDroppedEvent("before_send","span");return}e.sendEnvelope(t)}}(function(t,e){var n=nu(t[0]),r=null==e?void 0:e.getDsn(),o=null==e?void 0:e.getOptions().tunnel,a=nf({sent_at:new Date().toISOString()},!!n.trace_id&&!!n.public_key&&{trace:n},!!o&&r&&{dsn:ef(r)}),i=null==e?void 0:e.getOptions().beforeSendSpan,c=i?function(t){var e=e6(t),n=i(e);return n||(na(),e)}:e6,s=[],u=!0,l=!1,f=void 0;try{for(var p,d=t[Symbol.iterator]();!(u=(p=d.next()).done);u=!0){var v=p.value,y=c(v);y&&s.push([{type:"span"},y])}}catch(t){l=!0,f=t}finally{try{u||null==d.return||d.return()}finally{if(l)throw f}}return eb(a,s)}([this],t)):(E&&N.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}var e=this._convertSpanToTransaction();e&&(eZ(this).scope||tQ()).captureEvent(e)}}},{key:"_convertSpanToTransaction",value:function(){var t,e,n,r,o,a,i=this;if(au(e6(this))){this._name||(E&&N.warn("Transaction has no name, falling back to ``."),this._name="");var c=eZ(this),s=c.scope,u=c.isolationScope;if(!0===this._sampled){var l=nn(this).filter(function(t){var e;return t!==i&&!((e=t)instanceof ac&&e.isStandaloneSpan())}).map(function(t){return e6(t)}).filter(au),f=this._attributes[eD];delete this._attributes[eq],l.forEach(function(t){delete t.data[eq]});var p=ai({contexts:{trace:(e=(t=this.spanContext()).spanId,n=t.traceId,o=(r=e6(this)).data,a=r.op,{parent_span_id:r.parent_span_id,span_id:e,trace_id:n,data:o,op:a,status:r.status,origin:r.origin,links:r.links})},spans:l.length>1e3?l.sort(function(t,e){return t.start_timestamp-e.start_timestamp}).slice(0,1e3):l,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:s,capturedSpanIsolationScope:u,dynamicSamplingContext:nu(this)}},f&&{transaction_info:{source:f}}),d=oy(this._events);return d&&Object.keys(d).length&&(E&&N.log("[Measurements] Adding measurements to transaction event",JSON.stringify(d,void 0,2)),p.measurements=d),p}}}}],function(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=Array(e);n":r),"name: ".concat(void 0===n?"< unknown name >":n),"ID: ".concat(a)];if(o&&l.push("parent ID: ".concat(o)),!s){var f=e6(c),p=f.op,d=f.description;l.push("root ID: ".concat(c.spanContext().spanId)),p&&l.push("root op: ".concat(p)),d&&l.push("root description: ".concat(d))}N.log("".concat(u,"\n ").concat(l.join("\n ")))}}(n),(e=n)&&(tf(e,eK,u),tf(e,eV,i)),n}({parentSpan:o,spanArguments:n,forceTransaction:r,scope:e})})}function am(t,e){var n=tK(T());return n.withActiveSpan?n.withActiveSpan(t,e):t1(function(n){return tq(n,t||void 0),e(n)})}function ah(t,e,n){var r,o,a,i=t2(),c=(null==i?void 0:i.getOptions())||{},s=t.name,u=t.attributes,l=e.getPropagationContext(),f=function(t){if(Array.isArray(t))return t}(r=e.getScopeData().sdkProcessingMetadata[av]?[!1]:function(t,e,n){if(!eY(t))return[!1];var r,o,a,i,c=void 0;"function"==typeof t.tracesSampler?(i=t.tracesSampler((r=function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=Array(e);ne&&"function"==typeof t.updateStartTime&&t.updateStartTime(e),am(t,function(){var t=ay(a_({startTime:e},o));return t&&t.end(n),t})}function aw(t){var e,n,r=t2();if(r){var o=t.name,a=t.transaction,i=t.attributes,c=t.startTime,s=r.getOptions(),u=s.release,l=s.environment,f=s.sendDefaultPii,p=r.getIntegrationByName("Replay"),d=null==p?void 0:p.getReplayId(),v=tQ(),y=v.getUser(),m=void 0!==y?y.email||y.id||y.ip_address:void 0;try{n=v.getScopeData().contexts.profile.profile_id}catch(t){}return ay({name:o,attributes:a_({release:u,environment:l,user:m||void 0,profile_id:n||void 0,replay_id:d||void 0,transaction:a,"user_agent.original":null===(e=P.navigator)||void 0===e?void 0:e.userAgent,"client.address":f?"{{auto}}":void 0},i),startTime:c,experimental:{standalone:!0}})}}function aj(){return P.addEventListener&&P.performance}function aE(t){return t/1e3}function ak(t){var e="unknown",n="unknown",r="",o=!0,a=!1,i=void 0;try{for(var c,s=t[Symbol.iterator]();!(o=(c=s.next()).done);o=!0){var u,l,f=c.value;if("/"===f){u=t.split("/"),e=(l=function(t){if(Array.isArray(t))return t}(u)||function(t,e){var n,r,o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var a=[],i=!0,c=!1;try{for(o=o.call(t);!(i=(n=o.next()).done)&&(a.push(n.value),a.length!==e);i=!0);}catch(t){c=!0,r=t}finally{try{i||null==o.return||o.return()}finally{if(c)throw r}}return a}}(u,2)||function(t,e){if(t){if("string"==typeof t)return ag(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ag(t,e)}}(u,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],n=l[1];break}if(!isNaN(Number(f))){e="h"===r?"http":r,n=t.split(r)[1];break}r+=f}}catch(t){a=!0,i=t}finally{try{o||null==s.return||s.return()}finally{if(a)throw i}}return r===t&&(e=r),{name:e,version:n}}function aP(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function aT(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n4&&void 0!==arguments[4]?arguments[4]:n,i=e["secureConnection"===(o=n)?"connectEnd":"fetch"===o?"domainLookupStart":"".concat(o,"End")],c=e["".concat(n,"Start")];c&&i&&aS(t,r+aE(c),r+aE(i),{op:"browser.".concat(a),name:e.name,attributes:function(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=Array(e);n1&&void 0!==arguments[1]?arguments[1]:{},o=new Map,a=!1,i="externalFinish",c=!r.disableAutoFinish,s=[],u=r.idleTimeout,l=void 0===u?aB.idleTimeout:u,f=r.finalTimeout,p=void 0===f?aB.finalTimeout:f,d=r.childSpanTimeout,v=void 0===d?aB.childSpanTimeout:d,y=r.beforeSpanEnd,m=t2();if(!m||!eY()){var h=new ar,g=function(t){for(var e=1;e0&&O.setAttribute("sentry.idle_span_discarded_spans",r)}}return O.end=new Proxy(O.end,{apply:function(t,e,n){if(y&&y(O),!(e instanceof ar)){var r,o=function(t){if(Array.isArray(t))return t}(n)||aq(n)||aH(n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=o[0],i=o.slice(1),c=e8(a||tC()),s=nn(O).filter(function(t){return t!==O});if(!s.length)return k(c),Reflect.apply(t,e,[c].concat(aF(i)));var u=s.map(function(t){return e6(t).timestamp}).filter(function(t){return!!t}),l=u.length?(r=Math).max.apply(r,aF(u)):void 0,f=e6(O).start_timestamp,d=Math.min(f?f+p/1e3:1/0,Math.max(f||-1/0,Math.min(c,l||1/0)));return k(d),Reflect.apply(t,e,[d].concat(aF(i)))}}}),s.push(m.on("spanStart",function(t){if(!a&&t!==O&&!e6(t).timestamp&&nn(O).includes(t)){var e;e=t.spanContext().spanId,S(),o.set(e,!0),j(tC()+v/1e3)}})),s.push(m.on("spanEnd",function(t){var e;!a&&(e=t.spanContext().spanId,o.has(e)&&o.delete(e),0===o.size&&w(tC()+l/1e3))})),s.push(m.on("idleSpanEnableAutoFinish",function(t){t===O&&(c=!0,w(),o.size&&j())})),r.disableAutoFinish||w(),setTimeout(function(){a||(O.setStatus({code:2,message:"deadline_exceeded"}),i="finalTimeout",O.end())},p),O}var az=!1;function aW(){var t=no(),e=t&&nr(t);if(e){var n="internal_error";E&&N.log("[Tracing] Root span: ".concat(n," -> Global error occurred")),e.setStatus({code:2,message:n})}}function aG(){var t,e,n,r,o,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t2();if(!((null==(r=t2())?void 0:r.getOptions().enabled)!==!1&&(null==r?void 0:r.getTransport()))||!i)return{};var c=tK(T());if(c.getTraceData)return c.getTraceData(a);var s=tQ(),u=a.span||no(),l=u?e1((o=u.spanContext()).traceId,o.spanId,e5(u)):(e=(t=s.getPropagationContext()).traceId,n=t.sampled,e1(e,t.propagationSpanId,n)),f=function(t){if(t)return function(t){if(0!==Object.keys(t).length)return Object.entries(t).reduce(function(t,e,n){var r=e$(e,2),o=r[0],a=r[1],i="".concat(encodeURIComponent(o),"=").concat(encodeURIComponent(a)),c=0===n?i:"".concat(t,",").concat(i);return c.length>8192?(I&&N.warn("Not adding key: ".concat(o," with val: ").concat(a," to baggage header due to exceeding baggage size limits.")),t):c},"")}(Object.entries(t).reduce(function(t,e){var n=e$(e,2),r=n[0],o=n[1];return o&&(t["".concat(ez).concat(r)]=o),t},{}))}(u?nu(u):ns(i,s));return e0.test(l)?{"sentry-trace":l,baggage:f}:(N.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function aJ(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);nt.length)&&(e=t.length);for(var n=0,r=Array(e);n0&&void 0!==arguments[0]?arguments[0]:0;return((tR()||performance.timeOrigin)+t)/1e3}function a7(t){try{return new URL(t,P.location.origin).href}catch(t){return}}function it(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ie="sentry_previous_trace";function ir(t,e){var n=e6(e);if(!t)return{spanContext:e.spanContext(),startTimestamp:n.start_timestamp};var r=t.spanContext;return r.traceId===n.trace_id?t:(Date.now()/1e3-t.startTimestamp<=3600&&(rt&&N.info("Adding previous_trace ".concat(r," link to span ").concat(function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},c=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return od({},{defaultIntegrations:[tx(),{name:"FunctionToString",setupOnce:function(){r=Function.prototype.toString;try{Function.prototype.toString=function(){for(var t=arguments.length,e=Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:{},e=function(t,e){var r="pageload"===e.op,o=l?l(e):e,a=o.attributes||{};e.name!==o.name&&(a[eD]="custom",o.attributes=a),C.name=o.name,C.source=a[eD];var i=a$(o,{idleTimeout:f,finalTimeout:p,childSpanTimeout:d,disableAutoFinish:r,beforeSpanEnd:function(e){D(),function(t,e){var n=aj(),r=tR();if((null==n?void 0:n.getEntries)&&r){var o=aE(r),a=n.getEntries(),i=e6(t),c=i.op,s=i.start_timestamp;if(a.slice(aA).forEach(function(e){var n=aE(e.startTime),r=aE(Math.max(0,e.duration));if("navigation"!==c||!s||!(o+n3&&void 0!==arguments[3]?arguments[3]:no(),a=o&&nr(o);a&&(E&&N.log("[Measurement] Setting measurement on root span: ".concat(t," = ").concat(e," ").concat(n)),a.addEvent(t,(ov(r={},eU,e),ov(r,eL,n),r)))}(n,r.value,r.unit)}),t.setAttribute("performance.timeOrigin",o),t.setAttribute("performance.activationStart",og()),u=t,g&&(g.element&&u.setAttribute("lcp.element",tr(g.element)),g.id&&u.setAttribute("lcp.id",g.id),g.url&&u.setAttribute("lcp.url",g.url.trim().slice(0,200)),null!=g.loadTime&&u.setAttribute("lcp.loadTime",g.loadTime),null!=g.renderTime&&u.setAttribute("lcp.renderTime",g.renderTime),u.setAttribute("lcp.size",g.size)),(null==b?void 0:b.sources)&&b.sources.forEach(function(t,e){return u.setAttribute("cls.source.".concat(e+1),tr(t.node))})}g=void 0,b=void 0,aI={}}}(e,{recordClsOnPageloadSpan:!u}),tf(t,il,void 0);var n=tQ(),r=n.getPropagationContext();n.setPropagationContext(ii(ia({},r),{traceId:i.spanContext().traceId,sampled:e5(i),dsc:nu(e)}))}});function c(){n&&["interactive","complete"].includes(n.readyState)&&t.emit("idleSpanEnableAutoFinish",i)}tf(t,il,i),r&&n&&(n.addEventListener("readystatechange",function(){c()}),c())};is&&M(function(){console.warn("Multiple browserTracingIntegration instances are not supported.")}),is=!0;var n=P.document;az||(az=!0,r$(aW),rG(aW));var r=ia({},ic,t),o=r.enableInp,a=r.enableLongTask,i=r.enableLongAnimationFrame,c=r._experiments,s=c.enableInteractions,u=c.enableStandaloneClsSpans,l=r.beforeStartSpan,f=r.idleTimeout,p=r.finalTimeout,d=r.childSpanTimeout,_=r.markBackgroundSpan,O=r.traceFetch,S=r.traceXHR,w=r.trackFetchStreamPerformance,j=r.shouldCreateSpanForRequest,k=r.enableHTTPTimings,T=r.instrumentPageLoad,x=r.instrumentNavigation,A=r.linkPreviousTrace,I=r.onRequestSpanStart,D=function(t){var e=t.recordClsStandaloneSpans,n=aj();if(n&&tR()){n.mark&&P.performance.mark("sentry-tracing-init");var r=at("fid",function(t){var e=t.metric,n=e.entries[e.entries.length-1];if(n){var r=aE(tR()),o=aE(n.startTime);aI.fid={value:e.value,unit:"millisecond"},aI["mark.fid"]={value:r+o,unit:"second"}}},o6,v),o=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return at("lcp",t,o5,y,e)}(function(t){var e=t.metric,n=e.entries[e.entries.length-1];n&&(aI.lcp={value:e.value,unit:"millisecond"},g=n)},!0),a=at("ttfb",function(t){var e=t.metric;e.entries[e.entries.length-1]&&(aI.ttfb={value:e.value,unit:"millisecond"})},o9,m),i=e?function(){var t,e,n=0;if(function(){try{return PerformanceObserver.supportedEntryTypes.includes("layout-shift")}catch(t){return!1}}()){var r=!1,o=o2(function(e){var r=e.metric,o=r.entries[r.entries.length-1];o&&(n=r.value,t=o)},!0);oO(function(){a()}),setTimeout(function(){var t=t2();if(t){var n=t.on("startNavigationSpan",function(){a(),null==n||n()}),r=no();if(r){var o=nr(r);"pageload"===e6(o).op&&(e=o.spanContext().spanId)}}},0)}function a(){if(!r){var a,i,c,s,u,l,f,p,d;r=!0,e&&(a=n,i=t,c=e,os&&N.log("Sending CLS span (".concat(a,")")),f=aE((tR()||0)+((null==i?void 0:i.startTime)||0)),p=tQ().getScopeData().transactionName,(d=aw({name:i?tr(null===(s=i.sources[0])||void 0===s?void 0:s.node):"Layout shift",transaction:p,attributes:(aP(u={},eM,"auto.http.browser.cls"),aP(u,eR,"ui.webvital.cls"),aP(u,eH,(null==i?void 0:i.duration)||0),aP(u,"sentry.pageload.span_id",c),u),startTime:f}))&&(d.addEvent("cls",(aP(l={},eL,""),aP(l,eU,a),l)),d.end(f))),o()}}}():o2(function(t){var e=t.metric,n=e.entries[e.entries.length-1];n&&(aI.cls={value:e.value,unit:""},b=n)},!0);return function(){r(),o(),a(),null==i||i()}}return function(){}}({recordClsStandaloneSpans:u||!1});o&&function(){if(aj()&&tR()){at("inp",function(t){var e,n,r=t.metric;if(void 0!=r.value){var o=r.entries.find(function(t){return t.duration===r.value&&aL[t.name]});if(o){var a=o.interactionId,i=aL[o.name],c=aE(tR()+o.startTime),s=aE(r.value),u=no(),l=u?nr(u):void 0,f=(null!=a?aN.get(a):void 0)||l,p=f?e6(f).description:tQ().getScopeData().transactionName,d=aw({name:tr(o.target),transaction:p,attributes:(aR(e={},eM,"auto.http.browser.inp"),aR(e,eR,"ui.interaction.".concat(i)),aR(e,eH,o.duration),e),startTime:c});d&&(d.addEvent("inp",(aR(n={},eL,"millisecond"),aR(n,eU,r.value),n)),d.end(c+s))}}},o7,h)}}(),i&&P.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?new PerformanceObserver(function(t){var e=no();if(e){var n=!0,r=!1,o=void 0;try{for(var a,i=t.getEntries()[Symbol.iterator]();!(n=(a=i.next()).done);n=!0){var c=a.value;if(c.scripts[0]){var s=aE(tR()+c.startTime),u=e6(e),l=u.start_timestamp,f=u.op;if("navigation"!==f||!l||!(s1&&void 0!==arguments[1]?arguments[1]:{};if(t2()===t){H();var o=function(t,e){var n=function(t){if(t){var e,n=t.match(e0);if(n)return"1"===n[3]?e=!0:"0"===n[3]&&(e=!1),{traceId:n[1],parentSampled:e,parentSpanId:n[2]}}}(t),r=eG(e);if(!(null==n?void 0:n.traceId))return{traceId:tg(),sampleRand:Math.random()};var o=function(t,e){var n=eQ(null==e?void 0:e.sample_rand);if(void 0!==n)return n;var r=eQ(null==e?void 0:e.sample_rate);return r&&(null==t?void 0:t.parentSampled)!==void 0?t.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}(n,r);return r&&(r.sample_rand=o.toString()),{traceId:n.traceId,parentSpanId:n.parentSpanId,sampled:n.parentSampled,dsc:r||{},sampleRand:o}}(r.sentryTrace||iu("sentry-trace"),r.baggage||iu("baggage"));tQ().setPropagationContext(o),e(t,ia({op:"pageload"},n))}}),"off"!==A){var B=void 0;t.on("spanStart",function(t){nr(t)===t&&("session-storage"===A?function(t){try{P.sessionStorage.setItem(ie,JSON.stringify(t))}catch(t){rt&&N.warn("Could not store previous trace in sessionStorage",t)}}(ir(function(){try{var t,e=null===(t=P.sessionStorage)||void 0===t?void 0:t.getItem(ie);return JSON.parse(e)}catch(t){return}}(),t)):B=ir(B,t))})}if(P.location){if(T){var $,z,W,G,J=tR();$=t,z={name:P.location.pathname,startTime:J?J/1e3:void 0,attributes:(io(G={},eD,"url"),io(G,eM,"auto.pageload.browser"),G)},$.emit("startPageLoadSpan",z,void 0),tQ().setTransactionName(z.name),$[il]}x&&rp(function(e){var n,r,o,a=e.to,i=e.from;if(void 0===i&&(null==F?void 0:F.indexOf(a))!==-1){F=void 0;return}i!==a&&(F=void 0,n=t,r={name:P.location.pathname,attributes:(io(o={},eD,"url"),io(o,eM,"auto.navigation.browser"),o)},n.emit("startNavigationSpan",r),tQ().setTransactionName(r.name),n[il])})}if(_&&(P.document?P.document.addEventListener("visibilitychange",function(){var t=no();if(t){var e=nr(t);if(P.document.hidden&&e){var n="cancelled",r=e6(e),o=r.op,a=r.status;rt&&N.log("[Tracing] Transaction: ".concat(n," -> since tab moved to the background, op: ").concat(o)),a||e.setStatus({code:2,message:n}),e.setAttribute("sentry.cancellation_reason","document.hidden"),e.end()}}}):rt&&N.warn("[Tracing] Could not set up background tab detection due to lack of global document")),s&&(n=t,r=f,a=p,i=d,c=C,P.document&&addEventListener("click",function(){var t="ui.action.click",e=n[il];if(e&&["navigation","pageload"].includes(e6(e).op)){rt&&N.warn("[Tracing] Did not create ".concat(t," span because a pageload or navigation span is in progress."));return}if(u&&(u.setAttribute(eN,"interactionInterrupted"),u.end(),u=void 0),!c.name){rt&&N.warn("[Tracing] Did not create ".concat(t," transaction because _latestRouteName is missing."));return}u=a$({name:c.name,op:t,attributes:io({},eD,c.source||"url")},{idleTimeout:r,finalTimeout:a,childSpanTimeout:i})},{once:!1,capture:!0})),o)o3("event",q=function(t){var e=t.entries,n=no(),r=n&&nr(n);e.forEach(function(t){if("duration"in t&&r){var e=t.interactionId;if(!(null==e||aN.has(e))){if(aM.length>10){var n=aM.shift();aN.delete(n)}aM.push(e),aN.set(e,r)}}})}),o3("first-input",q);l=t,m=(y=a2({},a6,{traceFetch:O,traceXHR:S,trackFetchStreamPerformance:w,tracePropagationTargets:t.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:j,enableHTTPTimings:k,onRequestSpanStart:I})).traceFetch,h=y.traceXHR,g=y.trackFetchStreamPerformance,b=y.shouldCreateSpanForRequest,E=y.enableHTTPTimings,D=y.tracePropagationTargets,R=y.onRequestSpanStart,M="function"==typeof b?b:function(t){return!0},L=function(t){return function(t,e){var n=to();if(n){try{r=new URL(t,n),o=new URL(n).origin}catch(t){return!1}var r,o,a=r.origin===o;return e?ts(r.toString(),e)||a&&ts(r.pathname,e):a}var i=!!t.match(/^\/(?!\/)/);return e?ts(t,e):i}(t,D)},U={},m&&(l.addEventProcessor(function(t){return"transaction"===t.type&&t.spans&&t.spans.forEach(function(t){if("http.client"===t.op){var e=a4.get(t.span_id);e&&(t.timestamp=e/1e3,a4.delete(t.span_id))}}),t}),g&&(rr(v="fetch-body-resolved",function(t){if(t.response){var e=a8.get(t.response);e&&t.endTimestamp&&a4.set(e,t.endTimestamp)}}),ro(v,function(){return rj(rk)})),rw(function(t){var e=function(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"auto.http.browser";if(t.fetchData){var a,i,c,s,u,l,f,p,d,v,y=t.fetchData,m=y.method,h=y.url,g=eY()&&e(h);if(t.endTimestamp&&g){var b=t.fetchData.__span;if(!b)return;var _=r[b];_&&(function(t,e){if(e.response){eX(t,e.response.status);var n,r=(null===(n=e.response)||void 0===n?void 0:n.headers)&&e.response.headers.get("content-length");if(r){var o=parseInt(r);o>0&&t.setAttribute("http.response_content_length",o)}}else e.error&&t.setStatus({code:2,message:"internal_error"});t.end()}(_,t),delete r[b]);return}var O=!!no(),S=g&&O?ay((a=h,i=m,c=o,{name:(s=function(t,e){var n=t.startsWith("/"),r=n?"thismessage:/":void 0;try{if("canParse"in URL&&!URL.canParse(t,r))return;var o=new URL(t,r);if(n)return{isRelative:n,pathname:o.pathname,search:o.search,hash:o.hash};return o}catch(t){}}(a))?"".concat(i," ").concat(function(t){if(rI(t))return t.pathname;var e=new URL(t);return e.search="",e.hash="",["80","443"].includes(e.port)&&(e.port=""),e.password&&(e.password="%filtered%"),e.username&&(e.username="%filtered%"),e.toString()}(s)):i,attributes:(u=a,l=s,f=i,p=c,v=(aY(d={url:u,type:"fetch","http.method":f},eM,p),aY(d,eR,"http.client"),d),l&&(rI(l)||(v["http.url"]=l.href,v["server.address"]=l.host),l.search&&(v["http.query"]=l.search),l.hash&&(v["http.fragment"]=l.hash)),v)})):new ar;if(t.fetchData.__span=S.spanContext().spanId,r[S.spanContext().spanId]=S,n(t.fetchData.url)){var w=t.args[0],j=t.args[1]||{},E=function(t,e,n){var r=aG({span:n}),o=r["sentry-trace"],a=r.baggage;if(o){var i=e.headers||(tn(t)?t.headers:void 0);if(!i)return aV({},r);if(f=i,"undefined"!=typeof Headers&&tt(f,Headers)){var c=new Headers(i);if(c.set("sentry-trace",o),a){var s=c.get("baggage");if(s){var u=aQ(s);c.set("baggage",u?"".concat(u,",").concat(a):a)}else c.set("baggage",a)}return c}if(Array.isArray(i)){var l=aK(i.filter(function(t){return!(Array.isArray(t)&&"sentry-trace"===t[0])}).map(function(t){if(!Array.isArray(t)||"baggage"!==t[0]||"string"!=typeof t[1])return t;var e=function(t){if(Array.isArray(t))return t}(t)||aX(t)||aZ(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=e[0],r=e[1],o=e.slice(2);return[n,aQ(r)].concat(aK(o))})).concat([["sentry-trace",o]]);return a&&l.push(["baggage",a]),l}var f,p,d,v="baggage"in i?i.baggage:void 0,y=[];return Array.isArray(v)?y=v.map(function(t){return"string"==typeof t?aQ(t):t}).filter(function(t){return""===t}):v&&y.push(aQ(v)),a&&y.push(a),p=aV({},i),d=d={"sentry-trace":o,baggage:y.length>0?y.join(","):void 0},Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(d)):(function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n.push.apply(n,r)}return n})(Object(d)).forEach(function(t){Object.defineProperty(p,t,Object.getOwnPropertyDescriptor(d,t))}),p}}(w,j,eY()&&O?S:void 0);E&&(t.args[1]=j,j.headers=E)}var k=t2();if(k){var P={input:t.args,response:t.response,startTimestamp:t.startTimestamp,endTimestamp:t.endTimestamp};k.emit("beforeOutgoingRequestSpan",S,P)}return S}}(t,M,L,U);if(t.response&&t.fetchData.__span&&a8.set(t.response,t.fetchData.__span),e){var n=a7(t.fetchData.url),r=n?rD(n).host:void 0;e.setAttributes({"http.url":n,"server.address":r}),E&&a5(e),null==R||R(e,{headers:t.headers})}})),h&&rl(function(t){var e,n,r=function(t,e,n,r){var o,a=t.xhr,i=null==a?void 0:a[ru];if(a&&!a.__sentry_own_request__&&i){var c,s,u,l,f=i.url,p=i.method,d=eY()&&e(f);if(t.endTimestamp&&d){var v=a.__sentry_xhr_span_id__;if(!v)return;var y=r[v];y&&void 0!==i.status_code&&(eX(y,i.status_code),y.end(),delete r[v]);return}var m=a7(f),h=m?rD(m):rD(f),g=f.split(/[?#]/,1)[0],b=!!no(),_=d&&b?ay({name:"".concat(p," ").concat(g),attributes:a2((a1(o={url:f,type:"xhr","http.method":p,"http.url":m,"server.address":null==h?void 0:h.host},eM,"auto.http.browser"),a1(o,eR,"http.client"),o),(null==h?void 0:h.search)&&{"http.query":null==h?void 0:h.search},(null==h?void 0:h.hash)&&{"http.fragment":null==h?void 0:h.hash})}):new ar;a.__sentry_xhr_span_id__=_.spanContext().spanId,r[a.__sentry_xhr_span_id__]=_,n(f)&&(c=a,u=(s=aG({span:eY()&&b?_:void 0}))["sentry-trace"],l=s.baggage,u&&function(t,e,n){try{t.setRequestHeader("sentry-trace",e),n&&t.setRequestHeader("baggage",n)}catch(t){}}(c,u,l));var O=t2();return O&&O.emit("beforeOutgoingRequestSpan",_,t),_}}(t,M,L,U);if(r){E&&a5(r);try{e=new Headers(null===(n=t.xhr.__sentry_xhr_v3__)||void 0===n?void 0:n.request_headers)}catch(t){}null==R||R(r,{headers:e})}})}}}()],environment:null!=im?im:"staging",tracesSampleRate:null==ih?.5:parseFloat(ih),sampleRate:null==ih?.5:parseFloat(ih),replaysOnErrorSampleRate:null==ih?.5:parseFloat(ih)}),document.addEventListener("DOMContentLoaded",function(){t={id:null!==(n=null===(e=j.authenticatedUser.id)||void 0===e?void 0:e.toString())&&void 0!==n?n:"1",username:null!==(r=j.authenticatedUser.name)&&void 0!==r?r:"unknown"},t0().setUser(t);var t,e,n,r,o=document.querySelector('meta[name="page-meta"]');(null==o?void 0:o.dataset.internalPageName)&&nZ("internal-page-name",o.dataset.internalPageName);var a=new MutationObserver(function(t){t.forEach(function(t){if("attributes"===t.type&&"data-internal-page-name"===t.attributeName&&t.target instanceof HTMLMetaElement){var e=t.target.dataset.internalPageName;e&&nZ("internal-page-name",e)}})});o&&a.observe(o,{attributes:!0,attributeFilter:["data-internal-page-name"]})})}(); //# debugId=76a37f2c-d218-461b-8b14-402fd07fc25b //# sourceMappingURL=https://sourcemaps.rbxcdn.com/sentry-679ca8c026294967.js.map window.Roblox && window.Roblox.BundleDetector && window.Roblox.BundleDetector.bundleDetected("Sentry");