From 24abbf3f772a4246a463322d3422210340596aae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikke=20Schir=C3=A9n?= Date: Wed, 12 Jun 2024 17:26:20 +0200 Subject: [PATCH] updated sentry js lib --- CHANGELOG.md | 6 ++++++ libs/bundle.min.js | 4 ++-- plugin.json | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 769889e..a84b5b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change log +## [5.0.15] - 2024-05-06 + +### Changed + +- Sentry Javascript library updated to version 8.9.2 + ## [5.0.14] - 2024-05-06 ### Changed diff --git a/libs/bundle.min.js b/libs/bundle.min.js index 9403c3f..7db9de7 100644 --- a/libs/bundle.min.js +++ b/libs/bundle.min.js @@ -1,2 +1,2 @@ -/*! @sentry/browser & @sentry/tracing 7.106.0 (6b3f70d) | https://github.com/getsentry/sentry-javascript */ -var Sentry=function(t){const n=Object.prototype.toString;function e(t){switch(n.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return l(t,Error)}}function r(t,e){return n.call(t)===`[object ${e}]`}function i(t){return r(t,"ErrorEvent")}function s(t){return r(t,"DOMError")}function o(t){return r(t,"String")}function c(t){return"object"==typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function u(t){return null===t||c(t)||"object"!=typeof t&&"function"!=typeof t}function a(t){return r(t,"Object")}function h(t){return"undefined"!=typeof Event&&l(t,Event)}function f(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function d(t){return"number"==typeof t&&t!=t}function l(t,n){try{return t instanceof n}catch(t){return!1}}function p(t){return!("object"!=typeof t||null===t||!t.__isVue&&!t.t)}function m(t,n=0){return"string"!=typeof t||0===n||t.length<=n?t:`${t.slice(0,n)}...`}function g(t,n){if(!Array.isArray(t))return"";const e=[];for(let n=0;ny(t,n,e)))}function _(t,n,e=250,r,i,s,o){if(!(s.exception&&s.exception.values&&o&&l(o.originalException,Error)))return;const c=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;var u,a;c&&(s.exception.values=(u=b(t,n,i,o.originalException,r,s.exception.values,c,0),a=e,u.map((t=>(t.value&&(t.value=m(t.value,a)),t)))))}function b(t,n,e,r,i,s,o,c){if(s.length>=e+1)return s;let u=[...s];if(l(r[i],Error)){S(o,c);const s=t(n,r[i]),a=u.length;w(s,i,a,c),u=b(t,n,e,r[i],i,[s,...u],s,a)}return Array.isArray(r.errors)&&r.errors.forEach(((r,s)=>{if(l(r,Error)){S(o,c);const a=t(n,r),h=u.length;w(a,`errors[${s}]`,h,c),u=b(t,n,e,r,i,[a,...u],a,h)}})),u}function S(t,n){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,..."AggregateError"===t.type&&{is_exception_group:!0},exception_id:n}}function w(t,n,e,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:n,exception_id:e,parent_id:r}}function T(t){return t&&t.Math==Math?t:void 0}const E="object"==typeof globalThis&&T(globalThis)||"object"==typeof window&&T(window)||"object"==typeof self&&T(self)||"object"==typeof global&&T(global)||function(){return this}()||{};function $(){return E}function x(t,n,e){const r=e||E,i=r.__SENTRY__=r.__SENTRY__||{};return i[t]||(i[t]=n())}const k=$();function I(t,n={}){if(!t)return"";try{let e=t;const r=5,i=[];let s=0,o=0;const c=" > ",u=c.length;let a;const h=Array.isArray(n)?n:n.keyAttrs,f=!Array.isArray(n)&&n.maxStringLength||80;for(;e&&s++1&&o+i.length*u+a.length>=f));)i.push(a),o+=a.length,e=e.parentNode;return i.reverse().join(c)}catch(t){return""}}function O(t,n){const e=t,r=[];let i,s,c,u,a;if(!e||!e.tagName)return"";if(k.HTMLElement&&e instanceof HTMLElement&&e.dataset&&e.dataset.sentryComponent)return e.dataset.sentryComponent;r.push(e.tagName.toLowerCase());const h=n&&n.length?n.filter((t=>e.getAttribute(t))).map((t=>[t,e.getAttribute(t)])):null;if(h&&h.length)h.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else if(e.id&&r.push(`#${e.id}`),i=e.className,i&&o(i))for(s=i.split(/\s+/),a=0;a{const r=R[t];e[t]=n[t],n[t]=r}));try{return t()}finally{r.forEach((t=>{n[t]=e[t]}))}}const D=function(){let t=!1;const n={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return C.forEach((t=>{n[t]=()=>{}})),n}(),A=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function N(t,n=!1){const{host:e,path:r,pass:i,port:s,projectId:o,protocol:c,publicKey:u}=t;return`${c}://${u}${n&&i?`:${i}`:""}@${e}${s?`:${s}`:""}/${r?`${r}/`:r}${o}`}function L(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function P(t){const n="string"==typeof t?function(t){const n=A.exec(t);if(!n)return void M((()=>{console.error(`Invalid Sentry Dsn: ${t}`)}));const[e,r,i="",s,o="",c]=n.slice(1);let u="",a=c;const h=a.split("/");if(h.length>1&&(u=h.slice(0,-1).join("/"),a=h.pop()),a){const t=a.match(/^\d+/);t&&(a=t[0])}return L({host:s,pass:i,path:u,projectId:a,port:o,protocol:e,publicKey:r})}(t):L(t);if(n)return n}class q extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function H(t,n,e){if(!(n in t))return;const r=t[n],i=e(r);"function"==typeof i&&U(i,r),t[n]=i}function F(t,n,e){try{Object.defineProperty(t,n,{value:e,writable:!0,configurable:!0})}catch(t){}}function U(t,n){try{const e=n.prototype||{};t.prototype=n.prototype=e,F(t,"__sentry_original__",n)}catch(t){}}function B(t){return t.__sentry_original__}function W(t){if(e(t))return{message:t.message,name:t.name,stack:t.stack,...X(t)};if(h(t)){const n={type:t.type,target:z(t.target),currentTarget:z(t.currentTarget),...X(t)};return"undefined"!=typeof CustomEvent&&l(t,CustomEvent)&&(n.detail=t.detail),n}return t}function z(t){try{return n=t,"undefined"!=typeof Element&&l(n,Element)?I(t):Object.prototype.toString.call(t)}catch(t){return""}var n}function X(t){if("object"==typeof t&&null!==t){const n={};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}return{}}function G(t){return J(t,new Map)}function J(t,n){if(function(t){if(!a(t))return!1;try{const n=Object.getPrototypeOf(t).constructor.name;return!n||"Object"===n}catch(t){return!0}}(t)){const e=n.get(t);if(void 0!==e)return e;const r={};n.set(t,r);for(const e of Object.keys(t))void 0!==t[e]&&(r[e]=J(t[e],n));return r}if(Array.isArray(t)){const e=n.get(t);if(void 0!==e)return e;const r=[];return n.set(t,r),t.forEach((t=>{r.push(J(t,n))})),r}return t}const K=/\(error: (.*)\)/,V=/captureMessage|captureException/;function Y(...t){const n=t.sort(((t,n)=>t[0]-n[0])).map((t=>t[1]));return(t,e=0)=>{const r=[],i=t.split("\n");for(let t=e;t1024)continue;const s=K.test(e)?e.replace(K,"$1"):e;if(!s.match(/\S*Error: /)){for(const t of n){const n=t(s);if(n){r.push(n);break}}if(r.length>=50)break}}return function(t){if(!t.length)return[];const n=Array.from(t);/sentryWrapped/.test(n[n.length-1].function||"")&&n.pop();n.reverse(),V.test(n[n.length-1].function||"")&&(n.pop(),V.test(n[n.length-1].function||"")&&n.pop());return n.slice(0,50).map((t=>({...t,filename:t.filename||n[n.length-1].filename,function:t.function||"?"})))}(r)}}const Z="";function Q(t){try{return t&&"function"==typeof t&&t.name||Z}catch(t){return Z}}const tt={},nt={};function et(t,n){tt[t]=tt[t]||[],tt[t].push(n)}function rt(t,n){nt[t]||(n(),nt[t]=!0)}function it(t,n){const e=t&&tt[t];if(e)for(const t of e)try{t(n)}catch(t){}}function st(){"console"in E&&C.forEach((function(t){t in E.console&&H(E.console,t,(function(n){return R[t]=n,function(...n){it("console",{args:n,level:t});const e=R[t];e&&e.apply(E.console,n)}}))}))}function ot(){const t=E,n=t.crypto||t.msCrypto;let e=()=>16*Math.random();try{if(n&&n.randomUUID)return n.randomUUID().replace(/-/g,"");n&&n.getRandomValues&&(e=()=>{const t=new Uint8Array(1);return n.getRandomValues(t),t[0]})}catch(t){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^(15&e())>>t/4).toString(16)))}function ct(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function ut(t){const{message:n,event_id:e}=t;if(n)return n;const r=ct(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||e||"":e||""}function at(t,n,e){const r=t.exception=t.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=n||""),s.type||(s.type=e||"Error")}function ht(t,n){const e=ct(t);if(!e)return;const r=e.mechanism;if(e.mechanism={type:"generic",handled:!0,...r,...n},n&&"data"in n){const t={...r&&r.data,...n.data};e.mechanism.data=t}}function ft(t){if(t&&t.__sentry_captured__)return!0;try{F(t,"__sentry_captured__",!0)}catch(t){}return!1}function dt(t){return Array.isArray(t)?t:[t]}const lt=E;let pt,mt,gt;function yt(){if(!lt.document)return;const t=it.bind(null,"dom"),n=vt(t,!0);lt.document.addEventListener("click",n,!1),lt.document.addEventListener("keypress",n,!1),["EventTarget","Node"].forEach((n=>{const e=lt[n]&<[n].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(H(e,"addEventListener",(function(n){return function(e,r,i){if("click"===e||"keypress"==e)try{const r=this,s=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},o=s[e]=s[e]||{refCount:0};if(!o.handler){const r=vt(t);o.handler=r,n.call(this,e,r,i)}o.refCount++}catch(t){}return n.call(this,e,r,i)}})),H(e,"removeEventListener",(function(t){return function(n,e,r){if("click"===n||"keypress"==n)try{const e=this,i=e.__sentry_instrumentation_handlers__||{},s=i[n];s&&(s.refCount--,s.refCount<=0&&(t.call(this,n,s.handler,r),s.handler=void 0,delete i[n]),0===Object.keys(i).length&&delete e.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,n,e,r)}})))}))}function vt(t,n=!1){return e=>{if(!e||e._sentryCaptured)return;const r=function(t){try{return t.target}catch(t){return null}}(e);if(function(t,n){return"keypress"===t&&(!n||!n.tagName||"INPUT"!==n.tagName&&"TEXTAREA"!==n.tagName&&!n.isContentEditable)}(e.type,r))return;F(e,"_sentryCaptured",!0),r&&!r._sentryId&&F(r,"_sentryId",ot());const i="keypress"===e.type?"input":e.type;if(!function(t){if(t.type!==mt)return!1;try{if(!t.target||t.target._sentryId!==gt)return!1}catch(t){}return!0}(e)){t({event:e,name:i,global:n}),mt=e.type,gt=r?r._sentryId:void 0}clearTimeout(pt),pt=lt.setTimeout((()=>{gt=void 0,mt=void 0}),1e3)}}const _t=$();function bt(){if(!("fetch"in _t))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}function St(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function wt(t){const n="fetch";et(n,t),rt(n,Tt)}function Tt(){(function(){if("string"==typeof EdgeRuntime)return!0;if(!bt())return!1;if(St(_t.fetch))return!0;let t=!1;const n=_t.document;if(n&&"function"==typeof n.createElement)try{const e=n.createElement("iframe");e.hidden=!0,n.head.appendChild(e),e.contentWindow&&e.contentWindow.fetch&&(t=St(e.contentWindow.fetch)),n.head.removeChild(e)}catch(t){}return t})()&&H(E,"fetch",(function(t){return function(...n){const{method:e,url:r}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[n,e]=t;return{url:$t(n),method:Et(e,"method")?String(e.method).toUpperCase():"GET"}}const n=t[0];return{url:$t(n),method:Et(n,"method")?String(n.method).toUpperCase():"GET"}}(n),i={args:n,fetchData:{method:e,url:r},startTimestamp:Date.now()};return it("fetch",{...i}),t.apply(E,n).then((t=>(it("fetch",{...i,endTimestamp:Date.now(),response:t}),t)),(t=>{throw it("fetch",{...i,endTimestamp:Date.now(),error:t}),t}))}}))}function Et(t,n){return!!t&&"object"==typeof t&&!!t[n]}function $t(t){return"string"==typeof t?t:t?Et(t,"url")?t.url:t.toString?t.toString():"":""}let xt=null;function kt(t){const n="error";et(n,t),rt(n,It)}function It(){xt=E.onerror,E.onerror=function(t,n,e,r,i){const s={column:r,error:i,line:e,msg:t,url:n};return it("error",s),!(!xt||xt.__SENTRY_LOADER__)&&xt.apply(this,arguments)},E.onerror.__SENTRY_INSTRUMENTED__=!0}let Ot=null;function jt(t){const n="unhandledrejection";et(n,t),rt(n,Ct)}function Ct(){Ot=E.onunhandledrejection,E.onunhandledrejection=function(t){const n=t;return it("unhandledrejection",n),!(Ot&&!Ot.__SENTRY_LOADER__)||Ot.apply(this,arguments)},E.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Rt=$();const Mt=E;let Dt;function At(t){const n="history";et(n,t),rt(n,Nt)}function Nt(){if(!function(){const t=Rt.chrome,n=t&&t.app&&t.app.runtime,e="history"in Rt&&!!Rt.history.pushState&&!!Rt.history.replaceState;return!n&&e}())return;const t=Mt.onpopstate;function n(t){return function(...n){const e=n.length>2?n[2]:void 0;if(e){const t=Dt,n=String(e);Dt=n;it("history",{from:t,to:n})}return t.apply(this,n)}}Mt.onpopstate=function(...n){const e=Mt.location.href,r=Dt;Dt=e;if(it("history",{from:r,to:e}),t)try{return t.apply(this,n)}catch(t){}},H(Mt.history,"pushState",n),H(Mt.history,"replaceState",n)}const Lt=E;function Pt(t){et("xhr",t),rt("xhr",qt)}function qt(){if(!Lt.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;H(t,"open",(function(t){return function(...n){const e=Date.now(),r=o(n[0])?n[0].toUpperCase():void 0,i=function(t){if(o(t))return t;try{return t.toString()}catch(t){}return}(n[1]);if(!r||!i)return t.apply(this,n);this.__sentry_xhr_v3__={method:r,url:i,request_headers:{}},"POST"===r&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const s=()=>{const t=this.__sentry_xhr_v3__;if(t&&4===this.readyState){try{t.status_code=this.status}catch(t){}it("xhr",{args:[r,i],endTimestamp:Date.now(),startTimestamp:e,xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?H(this,"onreadystatechange",(function(t){return function(...n){return s(),t.apply(this,n)}})):this.addEventListener("readystatechange",s),H(this,"setRequestHeader",(function(t){return function(...n){const[e,r]=n,i=this.__sentry_xhr_v3__;return i&&o(e)&&o(r)&&(i.request_headers[e.toLowerCase()]=r),t.apply(this,n)}})),t.apply(this,n)}})),H(t,"send",(function(t){return function(...n){const e=this.__sentry_xhr_v3__;if(!e)return t.apply(this,n);void 0!==n[0]&&(e.body=n[0]);return it("xhr",{args:[e.method,e.url],startTimestamp:Date.now(),xhr:this}),t.apply(this,n)}}))}function Ht(t,n=100,e=1/0){try{return Ut("",t,n,e)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function Ft(t,n=3,e=102400){const r=Ht(t,n);return i=r,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(i))>e?Ft(t,n-1,e):r;var i}function Ut(t,n,e=1/0,r=1/0,i=function(){const t="function"==typeof WeakSet,n=t?new WeakSet:[];return[function(e){if(t)return!!n.has(e)||(n.add(e),!1);for(let t=0;t=r){f[t]="[MaxProperties ~]";break}const n=m[t];f[t]=Ut(t,n,u-1,r,i),l++}return o(n),f}var Bt;function Wt(t){return new Xt((n=>{n(t)}))}function zt(t){return new Xt(((n,e)=>{e(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(Bt||(Bt={}));class Xt{constructor(t){Xt.prototype.__init.call(this),Xt.prototype.__init2.call(this),Xt.prototype.__init3.call(this),Xt.prototype.__init4.call(this),this.o=Bt.PENDING,this.u=[];try{t(this.h,this.l)}catch(t){this.l(t)}}then(t,n){return new Xt(((e,r)=>{this.u.push([!1,n=>{if(t)try{e(t(n))}catch(t){r(t)}else e(n)},t=>{if(n)try{e(n(t))}catch(t){r(t)}else r(t)}]),this.p()}))}catch(t){return this.then((t=>t),t)}finally(t){return new Xt(((n,e)=>{let r,i;return this.then((n=>{i=!1,r=n,t&&t()}),(n=>{i=!0,r=n,t&&t()})).then((()=>{i?e(r):n(r)}))}))}__init(){this.h=t=>{this.m(Bt.RESOLVED,t)}}__init2(){this.l=t=>{this.m(Bt.REJECTED,t)}}__init3(){this.m=(t,n)=>{this.o===Bt.PENDING&&(f(n)?n.then(this.h,this.l):(this.o=t,this.v=n,this.p()))}}__init4(){this.p=()=>{if(this.o===Bt.PENDING)return;const t=this.u.slice();this.u=[],t.forEach((t=>{t[0]||(this.o===Bt.RESOLVED&&t[1](this.v),this.o===Bt.REJECTED&&t[2](this.v),t[0]=!0)}))}}}function Gt(t){const n=[];function e(t){return n.splice(n.indexOf(t),1)[0]}return{$:n,add:function(r){if(!(void 0===t||n.lengthe(i))).then(null,(()=>e(i).then(null,(()=>{})))),i},drain:function(t){return new Xt(((e,r)=>{let i=n.length;if(!i)return e(!0);const s=setTimeout((()=>{t&&t>0&&e(!1)}),t);n.forEach((t=>{Wt(t).then((()=>{--i||(clearTimeout(s),e(!0))}),r)}))}))}}}function Jt(t){if(!t)return{};const n=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!n)return{};const e=n[6]||"",r=n[8]||"";return{host:n[4],path:n[5],protocol:n[2],search:e,hash:r,relative:n[5]+e+r}}const Kt=["fatal","error","warning","log","info","debug"];function Vt(t){return"warn"===t?"warning":Kt.includes(t)?t:"log"}function Yt(){return Date.now()/1e3}const Zt=function(){const{performance:t}=E;if(!t||!t.now)return Yt;const n=Date.now()-t.now(),e=null==t.timeOrigin?n:t.timeOrigin;return()=>(e+t.now())/1e3}(),Qt=(()=>{const{performance:t}=E;if(!t||!t.now)return;const n=36e5,e=t.now(),r=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+e-r):n,s=i{const e=on(n);for(const n of Object.keys(e))t[n]=e[n];return t}),{});else{if(!t)return;n=on(t)}const e=Object.entries(n).reduce(((t,[n,e])=>{if(n.match(en)){t[n.slice(nn.length)]=e}return t}),{});return Object.keys(e).length>0?e:void 0}function sn(t){if(!t)return;return function(t){if(0===Object.keys(t).length)return;return Object.entries(t).reduce(((t,[n,e],r)=>{const i=`${encodeURIComponent(n)}=${encodeURIComponent(e)}`,s=0===r?i:`${t},${i}`;return s.length>8192?t:s}),"")}(Object.entries(t).reduce(((t,[n,e])=>(e&&(t[`sentry-${n}`]=e),t)),{}))}function on(t){return t.split(",").map((t=>t.split("=").map((t=>decodeURIComponent(t.trim()))))).reduce(((t,[n,e])=>(t[n]=e,t)),{})}const cn=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function un(t){if(!t)return;const n=t.match(cn);if(!n)return;let e;return"1"===n[3]?e=!0:"0"===n[3]&&(e=!1),{traceId:n[1],parentSampled:e,parentSpanId:n[2]}}function an(t=ot(),n=ot().substring(16),e){let r="";return void 0!==e&&(r=e?"-1":"-0"),`${t}-${n}${r}`}function hn(t,n=[]){return[t,n]}function fn(t,n){const[e,r]=t;return[e,[...r,n]]}function dn(t,n){const e=t[1];for(const t of e){if(n(t,t[0].type))return!0}return!1}function ln(t,n){return(n||new TextEncoder).encode(t)}function pn(t,n){const[e,r]=t;let i=JSON.stringify(e);function s(t){"string"==typeof i?i="string"==typeof t?i+t:[ln(i,n),t]:i.push("string"==typeof t?ln(t,n):t)}for(const t of r){const[n,e]=t;if(s(`\n${JSON.stringify(n)}\n`),"string"==typeof e||e instanceof Uint8Array)s(e);else{let t;try{t=JSON.stringify(e)}catch(n){t=JSON.stringify(Ht(e))}s(t)}}return"string"==typeof i?i:function(t){const n=t.reduce(((t,n)=>t+n.length),0),e=new Uint8Array(n);let r=0;for(const n of t)e.set(n,r),r+=n.length;return e}(i)}function mn(t,n){const e="string"==typeof t.data?ln(t.data,n):t.data;return[G({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}const gn={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"unknown"};function yn(t){return gn[t]}function vn(t){if(!t||!t.sdk)return;const{name:n,version:e}=t.sdk;return{name:n,version:e}}function _n(t,{statusCode:n,headers:e},r=Date.now()){const i={...t},s=e&&e["x-sentry-rate-limits"],o=e&&e["retry-after"];if(s)for(const t of s.trim().split(",")){const[n,e]=t.split(":",2),s=parseInt(n,10),o=1e3*(isNaN(s)?60:s);if(e)for(const t of e.split(";"))i[t]=r+o;else i.all=r+o}else o?i.all=r+function(t,n=Date.now()){const e=parseInt(`${t}`,10);if(!isNaN(e))return 1e3*e;const r=Date.parse(`${t}`);return isNaN(r)?6e4:r-n}(o,r):429===n&&(i.all=r+6e4);return i}function bn(t,n){const e={type:n.name||n.constructor.name,value:n.message},r=function(t,n){return t(n.stack||"",1)}(t,n);return r.length&&(e.stacktrace={frames:r}),e}class Sn{static __initStatic(){this.id="Feedback"}constructor(t){this.name=Sn.id,M((()=>{console.warn("You are using new Feedback() even though this bundle does not include Feedback.")}))}setupOnce(){}openDialog(){}closeDialog(){}attachTo(){}createWidget(){}removeWidget(){}getWidget(){}remove(){}}Sn.__initStatic();class wn{static __initStatic(){this.id="Replay"}constructor(t){this.name=wn.id,M((()=>{console.warn("You are using new Replay() even though this bundle does not include replay.")}))}setupOnce(){}start(){}stop(){}flush(){}}wn.__initStatic();const Tn="production";function En(){return x("globalEventProcessors",(()=>[]))}function $n(t){En().push(t)}function xn(t,n,e,r=0){return new Xt(((i,s)=>{const o=t[r];if(null===n||"function"!=typeof o)i(n);else{const c=o({...n},e);f(c)?c.then((n=>xn(t,n,e,r+1).then(i))).then(null,s):xn(t,c,e,r+1).then(i).then(null,s)}}))}function kn(t){const n=Zt(),e={sid:ot(),init:!0,timestamp:n,started:n,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return G({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(e)};return t&&In(e,t),e}function In(t,n={}){if(n.user&&(!t.ipAddress&&n.user.ip_address&&(t.ipAddress=n.user.ip_address),t.did||n.did||(t.did=n.user.id||n.user.email||n.user.username)),t.timestamp=n.timestamp||Zt(),n.abnormal_mechanism&&(t.abnormal_mechanism=n.abnormal_mechanism),n.ignoreDuration&&(t.ignoreDuration=n.ignoreDuration),n.sid&&(t.sid=32===n.sid.length?n.sid:ot()),void 0!==n.init&&(t.init=n.init),!t.did&&n.did&&(t.did=`${n.did}`),"number"==typeof n.started&&(t.started=n.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof n.duration)t.duration=n.duration;else{const n=t.timestamp-t.started;t.duration=n>=0?n:0}n.release&&(t.release=n.release),n.environment&&(t.environment=n.environment),!t.ipAddress&&n.ipAddress&&(t.ipAddress=n.ipAddress),!t.userAgent&&n.userAgent&&(t.userAgent=n.userAgent),"number"==typeof n.errors&&(t.errors=n.errors),n.status&&(t.status=n.status)}function On(t,n){let e={};n?e={status:n}:"ok"===t.status&&(e={status:"exited"}),In(t,e)}function jn(t){const{spanId:n,traceId:e}=t.spanContext(),{data:r,op:i,parent_span_id:s,status:o,tags:c,origin:u}=Dn(t);return G({data:r,op:i,parent_span_id:s,span_id:n,status:o,tags:c,trace_id:e,origin:u})}function Cn(t){const{traceId:n,spanId:e}=t.spanContext();return an(n,e,An(t))}function Rn(t){return"number"==typeof t?Mn(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Mn(t.getTime()):Zt()}function Mn(t){return t>9999999999?t/1e3:t}function Dn(t){return function(t){return"function"==typeof t.getSpanJSON}(t)?t.getSpanJSON():"function"==typeof t.toJSON?t.toJSON():{}}function An(t){const{traceFlags:n}=t.spanContext();return Boolean(1&n)}function Nn(t,n,e,r,i,s){const{normalizeDepth:o=3,normalizeMaxBreadth:c=1e3}=t,u={...n,event_id:n.event_id||e.event_id||ot(),timestamp:n.timestamp||Yt()},a=e.integrations||t.integrations.map((t=>t.name));!function(t,n){const{environment:e,release:r,dist:i,maxValueLength:s=250}=n;"environment"in t||(t.environment="environment"in n?e:Tn);void 0===t.release&&void 0!==r&&(t.release=r);void 0===t.dist&&void 0!==i&&(t.dist=i);t.message&&(t.message=m(t.message,s));const o=t.exception&&t.exception.values&&t.exception.values[0];o&&o.value&&(o.value=m(o.value,s));const c=t.request;c&&c.url&&(c.url=m(c.url,s))}(u,t),function(t,n){n.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...n])}(u,a),void 0===n.type&&function(t,n){const e=E._sentryDebugIds;if(!e)return;let r;const i=Ln.get(n);i?r=i:(r=new Map,Ln.set(n,r));const s=Object.keys(e).reduce(((t,i)=>{let s;const o=r.get(i);o?s=o:(s=n(i),r.set(i,s));for(let n=s.length-1;n>=0;n--){const r=s[n];if(r.filename){t[r.filename]=e[i];break}}return t}),{});try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{t.filename&&(t.debug_id=s[t.filename])}))}))}catch(t){}}(u,t.stackParser);const h=function(t,n){if(!n)return t;const e=t?t.clone():new ee;return e.update(n),e}(r,e.captureContext);e.mechanism&&ht(u,e.mechanism);const f=i&&i.getEventProcessors?i.getEventProcessors():[],d=function(){ne||(ne=new ee);return ne}().getScopeData();if(s){Qn(d,s.getScopeData())}if(h){Qn(d,h.getScopeData())}const l=[...e.attachments||[],...d.attachments];l.length&&(e.attachments=l),Zn(u,d);return xn([...f,...En(),...d.eventProcessors],u,e).then((t=>(t&&function(t){const n={};try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{t.debug_id&&(t.abs_path?n[t.abs_path]=t.debug_id:t.filename&&(n[t.filename]=t.debug_id),delete t.debug_id)}))}))}catch(t){}if(0===Object.keys(n).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const e=t.debug_meta.images;Object.keys(n).forEach((t=>{e.push({type:"sourcemap",code_file:t,debug_id:n[t]})}))}(t),"number"==typeof o&&o>0?function(t,n,e){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((t=>({...t,...t.data&&{data:Ht(t.data,n,e)}})))},...t.user&&{user:Ht(t.user,n,e)},...t.contexts&&{contexts:Ht(t.contexts,n,e)},...t.extra&&{extra:Ht(t.extra,n,e)}};t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=Ht(t.contexts.trace.data,n,e)));t.spans&&(r.spans=t.spans.map((t=>{const r=Dn(t).data;return r&&(t.data=Ht(r,n,e)),t})));return r}(t,o,c):t)))}const Ln=new WeakMap;function Pn(t){if(t)return function(t){return t instanceof ee||"function"==typeof t}(t)||function(t){return Object.keys(t).some((t=>qn.includes(t)))}(t)?{captureContext:t}:t}const qn=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function captureException(t,n){return he().captureException(t,Pn(n))}function Hn(t,n){return he().captureEvent(t,n)}function Fn(t,n){he().addBreadcrumb(t,n)}function Un(...t){const n=he();if(2===t.length){const[e,r]=t;return e?n.withScope((()=>(n.getStackTop().scope=e,r(e)))):n.withScope(r)}return n.withScope(t[0])}function Bn(){return he().getClient()}function Wn(){return he().getScope()}function zn(t){const n=Bn(),e=fe(),r=Wn(),{release:i,environment:s=Tn}=n&&n.getOptions()||{},{userAgent:o}=E.navigator||{},c=kn({release:i,environment:s,user:r.getUser()||e.getUser(),...o&&{userAgent:o},...t}),u=e.getSession();return u&&"ok"===u.status&&In(u,{status:"exited"}),Xn(),e.setSession(c),r.setSession(c),c}function Xn(){const t=fe(),n=Wn(),e=n.getSession()||t.getSession();e&&On(e),Gn(),t.setSession(),n.setSession()}function Gn(){const t=fe(),n=Wn(),e=Bn(),r=n.getSession()||t.getSession();r&&e&&e.captureSession&&e.captureSession(r)}function Jn(t=!1){t?Xn():Gn()}function Kn(t){return t.transaction}function Vn(t,n,e){const r=n.getOptions(),{publicKey:i}=n.getDsn()||{},{segment:s}=e&&e.getUser()||{},o=G({environment:r.environment||Tn,release:r.release,user_segment:s,public_key:i,trace_id:t});return n.emit&&n.emit("createDsc",o),o}function Yn(t){const n=Bn();if(!n)return{};const e=Vn(Dn(t).trace_id||"",n,Wn()),r=Kn(t);if(!r)return e;const i=r&&r._frozenDynamicSamplingContext;if(i)return i;const{sampleRate:s,source:o}=r.metadata;null!=s&&(e.sample_rate=`${s}`);const c=Dn(r);return o&&"url"!==o&&(e.transaction=c.description),e.sampled=String(An(r)),n.emit&&n.emit("createDsc",e),e}function Zn(t,n){const{fingerprint:e,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=n;!function(t,n){const{extra:e,tags:r,user:i,contexts:s,level:o,transactionName:c}=n,u=G(e);u&&Object.keys(u).length&&(t.extra={...u,...t.extra});const a=G(r);a&&Object.keys(a).length&&(t.tags={...a,...t.tags});const h=G(i);h&&Object.keys(h).length&&(t.user={...h,...t.user});const f=G(s);f&&Object.keys(f).length&&(t.contexts={...f,...t.contexts});o&&(t.level=o);c&&(t.transaction=c)}(t,n),r&&function(t,n){t.contexts={trace:jn(n),...t.contexts};const e=Kn(n);if(e){t.sdkProcessingMetadata={dynamicSamplingContext:Yn(n),...t.sdkProcessingMetadata};const r=Dn(e).description;r&&(t.tags={transaction:r,...t.tags})}}(t,r),function(t,n){t.fingerprint=t.fingerprint?dt(t.fingerprint):[],n&&(t.fingerprint=t.fingerprint.concat(n));t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}(t,e),function(t,n){const e=[...t.breadcrumbs||[],...n];t.breadcrumbs=e.length?e:void 0}(t,i),function(t,n){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...n}}(t,s)}function Qn(t,n){const{extra:e,tags:r,user:i,contexts:s,level:o,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:a,eventProcessors:h,attachments:f,propagationContext:d,transactionName:l,span:p}=n;te(t,"extra",e),te(t,"tags",r),te(t,"user",i),te(t,"contexts",s),te(t,"sdkProcessingMetadata",c),o&&(t.level=o),l&&(t.transactionName=l),p&&(t.span=p),u.length&&(t.breadcrumbs=[...t.breadcrumbs,...u]),a.length&&(t.fingerprint=[...t.fingerprint,...a]),h.length&&(t.eventProcessors=[...t.eventProcessors,...h]),f.length&&(t.attachments=[...t.attachments,...f]),t.propagationContext={...t.propagationContext,...d}}function te(t,n,e){if(e&&Object.keys(e).length){t[n]={...t[n]};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[n][r]=e[r])}}let ne;class ee{constructor(){this._=!1,this.S=[],this.T=[],this.k=[],this.I=[],this.O={},this.j={},this.C={},this.R={},this.M={},this.D=re()}static clone(t){return t?t.clone():new ee}clone(){const t=new ee;return t.k=[...this.k],t.j={...this.j},t.C={...this.C},t.R={...this.R},t.O=this.O,t.A=this.A,t.N=this.N,t.L=this.L,t.P=this.P,t.q=this.q,t.T=[...this.T],t.H=this.H,t.I=[...this.I],t.M={...this.M},t.D={...this.D},t.F=this.F,t}setClient(t){this.F=t}getClient(){return this.F}addScopeListener(t){this.S.push(t)}addEventProcessor(t){return this.T.push(t),this}setUser(t){return this.O=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this.L&&In(this.L,{user:t}),this.U(),this}getUser(){return this.O}getRequestSession(){return this.H}setRequestSession(t){return this.H=t,this}setTags(t){return this.j={...this.j,...t},this.U(),this}setTag(t,n){return this.j={...this.j,[t]:n},this.U(),this}setExtras(t){return this.C={...this.C,...t},this.U(),this}setExtra(t,n){return this.C={...this.C,[t]:n},this.U(),this}setFingerprint(t){return this.q=t,this.U(),this}setLevel(t){return this.A=t,this.U(),this}setTransactionName(t){return this.P=t,this.U(),this}setContext(t,n){return null===n?delete this.R[t]:this.R[t]=n,this.U(),this}setSpan(t){return this.N=t,this.U(),this}getSpan(){return this.N}getTransaction(){const t=this.N;return t&&t.transaction}setSession(t){return t?this.L=t:delete this.L,this.U(),this}getSession(){return this.L}update(t){if(!t)return this;const n="function"==typeof t?t(this):t;if(n instanceof ee){const t=n.getScopeData();this.j={...this.j,...t.tags},this.C={...this.C,...t.extra},this.R={...this.R,...t.contexts},t.user&&Object.keys(t.user).length&&(this.O=t.user),t.level&&(this.A=t.level),t.fingerprint.length&&(this.q=t.fingerprint),n.getRequestSession()&&(this.H=n.getRequestSession()),t.propagationContext&&(this.D=t.propagationContext)}else if(a(n)){const n=t;this.j={...this.j,...n.tags},this.C={...this.C,...n.extra},this.R={...this.R,...n.contexts},n.user&&(this.O=n.user),n.level&&(this.A=n.level),n.fingerprint&&(this.q=n.fingerprint),n.requestSession&&(this.H=n.requestSession),n.propagationContext&&(this.D=n.propagationContext)}return this}clear(){return this.k=[],this.j={},this.C={},this.O={},this.R={},this.A=void 0,this.P=void 0,this.q=void 0,this.H=void 0,this.N=void 0,this.L=void 0,this.U(),this.I=[],this.D=re(),this}addBreadcrumb(t,n){const e="number"==typeof n?n:100;if(e<=0)return this;const r={timestamp:Yt(),...t},i=this.k;return i.push(r),this.k=i.length>e?i.slice(-e):i,this.U(),this}getLastBreadcrumb(){return this.k[this.k.length-1]}clearBreadcrumbs(){return this.k=[],this.U(),this}addAttachment(t){return this.I.push(t),this}getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this.I=[],this}getScopeData(){const{k:t,I:n,R:e,j:r,C:i,O:s,A:o,q:c,T:u,D:a,M:h,P:f,N:d}=this;return{breadcrumbs:t,attachments:n,contexts:e,tags:r,extra:i,user:s,level:o,fingerprint:c||[],eventProcessors:u,propagationContext:a,sdkProcessingMetadata:h,transactionName:f,span:d}}applyToEvent(t,n={},e=[]){Zn(t,this.getScopeData());return xn([...e,...En(),...this.T],t,n)}setSDKProcessingMetadata(t){return this.M={...this.M,...t},this}setPropagationContext(t){return this.D=t,this}getPropagationContext(){return this.D}captureException(t,n){const e=n&&n.event_id?n.event_id:ot();if(!this.F)return D.warn("No client configured on scope - will not capture exception!"),e;const r=new Error("Sentry syntheticException");return this.F.captureException(t,{originalException:t,syntheticException:r,...n,event_id:e},this),e}captureMessage(t,n,e){const r=e&&e.event_id?e.event_id:ot();if(!this.F)return D.warn("No client configured on scope - will not capture message!"),r;const i=new Error(t);return this.F.captureMessage(t,n,{originalException:t,syntheticException:i,...e,event_id:r},this),r}captureEvent(t,n){const e=n&&n.event_id?n.event_id:ot();return this.F?(this.F.captureEvent(t,{...n,event_id:e},this),e):(D.warn("No client configured on scope - will not capture event!"),e)}U(){this._||(this._=!0,this.S.forEach((t=>{t(this)})),this._=!1)}}function re(){return{traceId:ot(),spanId:ot().substring(16)}}const ie="7.106.0",se=parseFloat(ie),oe=100;class ce{constructor(t,n,e,r=se){let i,s;this.B=r,n?i=n:(i=new ee,i.setClient(t)),e?s=e:(s=new ee,s.setClient(t)),this.W=[{scope:i}],t&&this.bindClient(t),this.X=s}isOlderThan(t){return this.B(this.popScope(),t)),(t=>{throw this.popScope(),t})):(this.popScope(),e)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.X}getStack(){return this.W}getStackTop(){return this.W[this.W.length-1]}captureException(t,n){const e=this.G=n&&n.event_id?n.event_id:ot(),r=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:r,...n,event_id:e}),e}captureMessage(t,n,e){const r=this.G=e&&e.event_id?e.event_id:ot(),i=new Error(t);return this.getScope().captureMessage(t,n,{originalException:t,syntheticException:i,...e,event_id:r}),r}captureEvent(t,n){const e=n&&n.event_id?n.event_id:ot();return t.type||(this.G=e),this.getScope().captureEvent(t,{...n,event_id:e}),e}lastEventId(){return this.G}addBreadcrumb(t,n){const{scope:e,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=oe}=r.getOptions&&r.getOptions()||{};if(s<=0)return;const o={timestamp:Yt(),...t},c=i?M((()=>i(o,n))):o;null!==c&&(r.emit&&r.emit("beforeAddBreadcrumb",c,n),e.addBreadcrumb(c,s))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,n){this.getScope().setTag(t,n),this.getIsolationScope().setTag(t,n)}setExtra(t,n){this.getScope().setExtra(t,n),this.getIsolationScope().setExtra(t,n)}setContext(t,n){this.getScope().setContext(t,n),this.getIsolationScope().setContext(t,n)}configureScope(t){const{scope:n,client:e}=this.getStackTop();e&&t(n)}run(t){const n=ae(this);try{t(this)}finally{ae(n)}}getIntegration(t){const n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch(t){return null}}startTransaction(t,n){const e=this.J("startTransaction",t,n);return e}traceHeaders(){return this.J("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this.K()}endSession(){const t=this.getStackTop().scope,n=t.getSession();n&&On(n),this.K(),t.setSession()}startSession(t){const{scope:n,client:e}=this.getStackTop(),{release:r,environment:i=Tn}=e&&e.getOptions()||{},{userAgent:s}=E.navigator||{},o=kn({release:r,environment:i,user:n.getUser(),...s&&{userAgent:s},...t}),c=n.getSession&&n.getSession();return c&&"ok"===c.status&&In(c,{status:"exited"}),this.endSession(),n.setSession(o),o}shouldSendDefaultPii(){const t=this.getClient(),n=t&&t.getOptions();return Boolean(n&&n.sendDefaultPii)}K(){const{scope:t,client:n}=this.getStackTop(),e=t.getSession();e&&n&&n.captureSession&&n.captureSession(e)}J(t,...n){const e=ue().__SENTRY__;if(e&&e.extensions&&"function"==typeof e.extensions[t])return e.extensions[t].apply(this,n)}}function ue(){return E.__SENTRY__=E.__SENTRY__||{extensions:{},hub:void 0},E}function ae(t){const n=ue(),e=le(n);return pe(n,t),e}function he(){const t=ue();if(t.__SENTRY__&&t.__SENTRY__.acs){const n=t.__SENTRY__.acs.getCurrentHub();if(n)return n}return function(t=ue()){n=t,n&&n.__SENTRY__&&n.__SENTRY__.hub&&!le(t).isOlderThan(se)||pe(t,new ce);var n;return le(t)}(t)}function fe(){return he().getIsolationScope()}function de(t,n={}){const e=ue();return e.__SENTRY__&&e.__SENTRY__.acs?e.__SENTRY__.acs.runWithAsyncContext(t,n):t()}function le(t){return x("hub",(()=>new ce),t)}function pe(t,n){if(!t)return!1;return(t.__SENTRY__=t.__SENTRY__||{}).hub=n,!0}function me(t){return(t||he()).getScope().getTransaction()}let ge=!1;function ye(){const t=me();if(t){const n="internal_error";t.setStatus(n)}}var ve;function _e(t,n){t.setTag("http.status_code",String(n)),t.setData("http.response.status_code",n);const e=function(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(n);"unknown_error"!==e&&t.setStatus(e)}function be(t,n,e=(()=>{})){let r;try{r=t()}catch(t){throw n(t),e(),t}return function(t,n,e){if(f(t))return t.then((t=>(e(),t)),(t=>{throw n(t),e(),t}));return e(),t}(r,n,e)}function Se(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const n=Bn(),e=t||n&&n.getOptions();return!!e&&(e.enableTracing||"tracesSampleRate"in e||"tracesSampler"in e)}function we(t){if(!Se())return;const n=$e(t),e=he(),r=t.scope?t.scope.getSpan():Te();if(t.onlyIfParent&&!r)return;const i=(t.scope||Wn()).clone();return Ee(e,{parentSpan:r,spanContext:n,forceTransaction:t.forceTransaction,scope:i})}function Te(){return Wn().getSpan()}ye.tag="sentry_tracingErrorCallback",function(t){t.Ok="ok";t.DeadlineExceeded="deadline_exceeded";t.Unauthenticated="unauthenticated";t.PermissionDenied="permission_denied";t.NotFound="not_found";t.ResourceExhausted="resource_exhausted";t.InvalidArgument="invalid_argument";t.Unimplemented="unimplemented";t.Unavailable="unavailable";t.InternalError="internal_error";t.UnknownError="unknown_error";t.Cancelled="cancelled";t.AlreadyExists="already_exists";t.FailedPrecondition="failed_precondition";t.Aborted="aborted";t.OutOfRange="out_of_range";t.DataLoss="data_loss"}(ve||(ve={}));function Ee(t,{parentSpan:n,spanContext:e,forceTransaction:r,scope:i}){if(!Se())return;const s=fe();let o;if(n&&!r)o=n.startChild(e);else if(n){const r=Yn(n),{traceId:i,spanId:s}=n.spanContext(),c=An(n);o=t.startTransaction({traceId:i,parentSpanId:s,parentSampled:c,...e,metadata:{dynamicSamplingContext:r,...e.metadata}})}else{const{traceId:n,dsc:r,parentSpanId:c,sampled:u}={...s.getPropagationContext(),...i.getPropagationContext()};o=t.startTransaction({traceId:n,parentSpanId:c,parentSampled:u,...e,metadata:{dynamicSamplingContext:r,...e.metadata}})}return i.setSpan(o),function(t,n,e){t&&(F(t,ke,e),F(t,xe,n))}(o,i,s),o}function $e(t){if(t.startTime){const n={...t};return n.startTimestamp=Rn(t.startTime),delete n.startTime,n}return t}const xe="_sentryScope",ke="_sentryIsolationScope";let Ie;function Oe(t){return Ie?Ie.get(t):void 0}function je(t){const n=Oe(t);if(!n)return;const e={};for(const[,[t,r]]of n)e[t]||(e[t]=[]),e[t].push(G(r));return e}const Ce="sentry.source",Re="sentry.sample_rate",Me="sentry.op",De="sentry.origin";class Ae{constructor(t=1e3){this.V=t,this.spans=[]}add(t){this.spans.length>this.V?t.spanRecorder=void 0:this.spans.push(t)}}class Ne{constructor(t={}){this.Y=t.traceId||ot(),this.Z=t.spanId||ot().substring(16),this.tt=t.startTimestamp||Zt(),this.tags=t.tags?{...t.tags}:{},this.data=t.data?{...t.data}:{},this.instrumenter=t.instrumenter||"sentry",this.nt={},this.setAttributes({[De]:t.origin||"manual",[Me]:t.op,...t.attributes}),this.et=t.name||t.description,t.parentSpanId&&(this.rt=t.parentSpanId),"sampled"in t&&(this.it=t.sampled),t.status&&(this.st=t.status),t.endTimestamp&&(this.ot=t.endTimestamp),t.exclusiveTime&&(this.ct=t.exclusiveTime),this.ut=t.measurements?{...t.measurements}:{}}get name(){return this.et||""}set name(t){this.updateName(t)}get description(){return this.et}set description(t){this.et=t}get traceId(){return this.Y}set traceId(t){this.Y=t}get spanId(){return this.Z}set spanId(t){this.Z=t}set parentSpanId(t){this.rt=t}get parentSpanId(){return this.rt}get sampled(){return this.it}set sampled(t){this.it=t}get attributes(){return this.nt}set attributes(t){this.nt=t}get startTimestamp(){return this.tt}set startTimestamp(t){this.tt=t}get endTimestamp(){return this.ot}set endTimestamp(t){this.ot=t}get status(){return this.st}set status(t){this.st=t}get op(){return this.nt["sentry.op"]}set op(t){this.setAttribute(Me,t)}get origin(){return this.nt["sentry.origin"]}set origin(t){this.setAttribute(De,t)}spanContext(){const{Z:t,Y:n,it:e}=this;return{spanId:t,traceId:n,traceFlags:e?1:0}}startChild(t){const n=new Ne({...t,parentSpanId:this.Z,sampled:this.it,traceId:this.Y});n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n);const e=Kn(this);return n.transaction=e,n}setTag(t,n){return this.tags={...this.tags,[t]:n},this}setData(t,n){return this.data={...this.data,[t]:n},this}setAttribute(t,n){void 0===n?delete this.nt[t]:this.nt[t]=n}setAttributes(t){Object.keys(t).forEach((n=>this.setAttribute(n,t[n])))}setStatus(t){return this.st=t,this}setHttpStatus(t){return _e(this,t),this}setName(t){this.updateName(t)}updateName(t){return this.et=t,this}isSuccess(){return"ok"===this.st}finish(t){return this.end(t)}end(t){if(this.ot)return;Kn(this);this.ot=Rn(t)}toTraceparent(){return Cn(this)}toContext(){return G({data:this.ht(),description:this.et,endTimestamp:this.ot,op:this.op,parentSpanId:this.rt,sampled:this.it,spanId:this.Z,startTimestamp:this.tt,status:this.st,tags:this.tags,traceId:this.Y})}updateWithContext(t){return this.data=t.data||{},this.et=t.name||t.description,this.ot=t.endTimestamp,this.op=t.op,this.rt=t.parentSpanId,this.it=t.sampled,this.Z=t.spanId||this.Z,this.tt=t.startTimestamp||this.tt,this.st=t.status,this.tags=t.tags||{},this.Y=t.traceId||this.Y,this}getTraceContext(){return jn(this)}getSpanJSON(){return G({data:this.ht(),description:this.et,op:this.nt["sentry.op"],parent_span_id:this.rt,span_id:this.Z,start_timestamp:this.tt,status:this.st,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.ot,trace_id:this.Y,origin:this.nt["sentry.origin"],ft:je(this),profile_id:this.nt.profile_id,exclusive_time:this.ct,measurements:Object.keys(this.ut).length>0?this.ut:void 0})}isRecording(){return!this.ot&&!!this.it}toJSON(){return this.getSpanJSON()}ht(){const{data:t,nt:n}=this,e=Object.keys(t).length>0,r=Object.keys(n).length>0;if(e||r)return e&&r?{...t,...n}:e?t:n}}class Le extends Ne{constructor(t,n){super(t),this.R={},this.dt=n||he(),this.et=t.name||"",this.lt={...t.metadata},this.gt=t.trimEnd,this.transaction=this;const e=this.lt.dynamicSamplingContext;e&&(this._frozenDynamicSamplingContext={...e})}get name(){return this.et}set name(t){this.setName(t)}get metadata(){return{source:"custom",spanMetadata:{},...this.lt,...this.nt["sentry.source"]&&{source:this.nt["sentry.source"]},...this.nt["sentry.sample_rate"]&&{sampleRate:this.nt["sentry.sample_rate"]}}}set metadata(t){this.lt=t}setName(t,n="custom"){this.et=t,this.setAttribute(Ce,n)}updateName(t){return this.et=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new Ae(t)),this.spanRecorder.add(this)}setContext(t,n){null===n?delete this.R[t]:this.R[t]=n}setMeasurement(t,n,e=""){this.ut[t]={value:n,unit:e}}setMetadata(t){this.lt={...this.lt,...t}}end(t){const n=Rn(t),e=this.yt(n);if(e)return this.dt.captureEvent(e)}toContext(){return G({...super.toContext(),name:this.et,trimEnd:this.gt})}updateWithContext(t){return super.updateWithContext(t),this.et=t.name||"",this.gt=t.trimEnd,this}getDynamicSamplingContext(){return Yn(this)}setHub(t){this.dt=t}getProfileId(){if(void 0!==this.R&&void 0!==this.R.profile)return this.R.profile.profile_id}yt(t){if(void 0!==this.ot)return;this.et||(this.et=""),super.end(t);const n=this.dt.getClient();if(n&&n.emit&&n.emit("finishTransaction",this),!0!==this.it)return void(n&&n.recordDroppedEvent("sample_rate","transaction"));const e=this.spanRecorder?this.spanRecorder.spans.filter((t=>t!==this&&Dn(t).timestamp)):[];if(this.gt&&e.length>0){const t=e.map((t=>Dn(t).timestamp)).filter(Boolean);this.ot=t.reduce(((t,n)=>t>n?t:n))}const{scope:r,isolationScope:i}={scope:(s=this).vt,isolationScope:s._t};var s;const{metadata:o}=this,{source:c}=o,u={contexts:{...this.R,trace:jn(this)},spans:e,start_timestamp:this.tt,tags:this.tags,timestamp:this.ot,transaction:this.et,type:"transaction",sdkProcessingMetadata:{...o,capturedSpanScope:r,capturedSpanIsolationScope:i,...G({dynamicSamplingContext:Yn(this)})},ft:je(this),...c&&{transaction_info:{source:c}}};return Object.keys(this.ut).length>0&&(u.measurements=this.ut),u}}const Pe={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},qe=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class He extends Ae{constructor(t,n,e,r){super(r),this.bt=t,this.St=n,this.transactionSpanId=e}add(t){if(t.spanContext().spanId!==this.transactionSpanId){const n=t.end;t.end=(...e)=>(this.St(t.spanContext().spanId),n.apply(t,e)),void 0===Dn(t).timestamp&&this.bt(t.spanContext().spanId)}super.add(t)}}class Fe extends Le{constructor(t,n,e=Pe.idleTimeout,r=Pe.finalTimeout,i=Pe.heartbeatInterval,s=!1,o=!1){super(t,n),this.wt=n,this.Tt=e,this.Et=r,this.$t=i,this.xt=s,this.activities={},this.kt=0,this.It=!1,this.Ot=!1,this.jt=[],this.Ct=qe[4],this.Rt=!o,s&&n.getScope().setSpan(this),o||this.Mt(),setTimeout((()=>{this.It||(this.setStatus("deadline_exceeded"),this.Ct=qe[3],this.end())}),this.Et)}end(t){const n=Rn(t);if(this.It=!0,this.activities={},"ui.action.click"===this.op&&this.setAttribute("finishReason",this.Ct),this.spanRecorder){for(const t of this.jt)t(this,n);this.spanRecorder.spans=this.spanRecorder.spans.filter((t=>{if(t.spanContext().spanId===this.spanContext().spanId)return!0;Dn(t).timestamp||(t.setStatus("cancelled"),t.end(n));const{start_timestamp:e,timestamp:r}=Dn(t),i=e&&e{this.It||this.bt(t)},e=t=>{this.It||this.St(t)};this.spanRecorder=new He(n,e,this.spanContext().spanId,t),this.Dt()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:n}={restartOnChildSpanChange:!0}){this.Ot=!1===n,this.At&&(clearTimeout(this.At),this.At=void 0,0===Object.keys(this.activities).length&&this.Ot&&(this.Ct=qe[5],this.end(t)))}setFinishReason(t){this.Ct=t}sendAutoFinishSignal(){this.Rt||(this.Mt(),this.Rt=!0)}Mt(t){this.cancelIdleTimeout(),this.At=setTimeout((()=>{this.It||0!==Object.keys(this.activities).length||(this.Ct=qe[1],this.end(t))}),this.Tt)}bt(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this.Ot}),this.activities[t]=!0}St(t){if(this.activities[t]&&delete this.activities[t],0===Object.keys(this.activities).length){const t=Zt();this.Ot?this.Rt&&(this.Ct=qe[5],this.end(t)):this.Mt(t+this.Tt/1e3)}}Nt(){if(this.It)return;const t=Object.keys(this.activities).join("");t===this.Lt?this.kt++:this.kt=1,this.Lt=t,this.kt>=3?this.Rt&&(this.setStatus("deadline_exceeded"),this.Ct=qe[0],this.end()):this.Dt()}Dt(){setTimeout((()=>{this.Nt()}),this.$t)}}function Ue(t,n,e){if(!Se(n))return t.sampled=!1,t;if(void 0!==t.sampled)return t.setAttribute(Re,Number(t.sampled)),t;let r;return"function"==typeof n.tracesSampler?(r=n.tracesSampler(e),t.setAttribute(Re,Number(r))):void 0!==e.parentSampled?r=e.parentSampled:void 0!==n.tracesSampleRate?(r=n.tracesSampleRate,t.setAttribute(Re,Number(r))):(r=1,t.setAttribute(Re,r)),function(t){if(d(t)||"number"!=typeof t&&"boolean"!=typeof t)return!1;if(t<0||t>1)return!1;return!0}(r)&&r?(t.sampled=Math.random()`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&");var e}function Ve(t,n={}){const e="string"==typeof n?n:n.tunnel,r="string"!=typeof n&&n.lt?n.lt.sdk:void 0;return e||`${function(t){return`${Je(t)}${t.projectId}/envelope/`}(t)}?${Ke(t,r)}`}const Ye=[];function Ze(t){const n=t.defaultIntegrations||[],e=t.integrations;let r;n.forEach((t=>{t.isDefaultInstance=!0})),r=Array.isArray(e)?[...n,...e]:"function"==typeof e?dt(e(n)):n;const i=function(t){const n={};return t.forEach((t=>{const{name:e}=t,r=n[e];r&&!r.isDefaultInstance&&t.isDefaultInstance||(n[e]=t)})),Object.keys(n).map((t=>n[t]))}(r),s=function(t,n){for(let e=0;e"Debug"===t.name));if(-1!==s){const[t]=i.splice(s,1);i.push(t)}return i}function Qe(t,n){for(const e of n)e&&e.afterAllSetup&&e.afterAllSetup(t)}function tr(t,n,e){if(!e[n.name]){if(e[n.name]=n,-1===Ye.indexOf(n.name)&&(n.setupOnce($n,he),Ye.push(n.name)),n.setup&&"function"==typeof n.setup&&n.setup(t),t.on&&"function"==typeof n.preprocessEvent){const e=n.preprocessEvent.bind(n);t.on("preprocessEvent",((n,r)=>e(n,r,t)))}if(t.addEventProcessor&&"function"==typeof n.processEvent){const e=n.processEvent.bind(n),r=Object.assign(((n,r)=>e(n,r,t)),{id:n.name});t.addEventProcessor(r)}}}function nr(t,n){return Object.assign((function(...t){return n(...t)}),{id:t})}const er=/[^a-zA-Z0-9_/.-]+/g,rr=/[^\w\d\s_:/@.{}[\]$-]+/g;function ir(t,n,e,r){const i={sent_at:(new Date).toISOString()};e&&e.sdk&&(i.sdk={name:e.sdk.name,version:e.sdk.version}),r&&n&&(i.dsn=N(n));const s=function(t){const n=function(t){let n="";for(const e of t){const t=Object.entries(e.tags),r=t.length>0?`|#${t.map((([t,n])=>`${t}:${n}`)).join(",")}`:"";n+=`${e.name}@${e.unit}:${e.metric}|${e.metricType}${r}|T${e.timestamp}\n`}return n}(t);return[{type:"statsd",length:n.length},n]}(t);return hn(i,[s])}function sr(t){return void 0===t.type}function or(t){return"transaction"===t.type}const cr={c:class{constructor(t){this.v=t}get weight(){return 1}add(t){this.v+=t}toString(){return`${this.v}`}},g:class{constructor(t){this.Pt=t,this.qt=t,this.Ht=t,this.Ft=t,this.Ut=1}get weight(){return 5}add(t){this.Pt=t,tthis.Ht&&(this.Ht=t),this.Ft+=t,this.Ut++}toString(){return`${this.Pt}:${this.qt}:${this.Ht}:${this.Ft}:${this.Ut}`}},d:class{constructor(t){this.v=[t]}get weight(){return this.v.length}add(t){this.v.push(t)}toString(){return this.v.join(":")}},s:class{constructor(t){this.first=t,this.v=new Set([t])}get weight(){return this.v.size}add(t){this.v.add(t)}toString(){return Array.from(this.v).map((t=>"string"==typeof t?function(t){let n=0;for(let e=0;e>>0}(t):t)).join(":")}}};function ur(t){const n=he().getStackTop();n.client=t,n.scope.setClient(t)}function ar(t,n,e=Gt(t.bufferSize||30)){let r={};function i(i){const s=[];if(dn(i,((n,e)=>{const i=yn(e);if(function(t,n,e=Date.now()){return function(t,n){return t[n]||t.all||0}(t,n)>e}(r,i)){const r=hr(n,e);t.recordDroppedEvent("ratelimit_backoff",i,r)}else s.push(n)})),0===s.length)return Wt();const o=hn(i[0],s),c=n=>{dn(o,((e,r)=>{const i=hr(e,r);t.recordDroppedEvent(n,yn(r),i)}))};return e.add((()=>n({body:pn(o,t.textEncoder)}).then((t=>(r=_n(r,t),t)),(t=>{throw c("network_error"),t})))).then((t=>t),(t=>{if(t instanceof q)return c("queue_overflow"),Wt();throw t}))}return i.__sentry__baseTransport__=!0,{send:i,flush:t=>e.drain(t)}}function hr(t,n){if("event"===n||"transaction"===n)return Array.isArray(t)?t[1]:void 0}const fr=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],dr=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],lr="InboundFilters",pr=(t={})=>({name:lr,setupOnce(){},processEvent(n,e,r){const i=r.getOptions(),s=function(t={},n={}){return{allowUrls:[...t.allowUrls||[],...n.allowUrls||[]],denyUrls:[...t.denyUrls||[],...n.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...n.ignoreErrors||[],...t.disableErrorDefaults?[]:fr],ignoreTransactions:[...t.ignoreTransactions||[],...n.ignoreTransactions||[],...t.disableTransactionDefaults?[]:dr],ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(t,i);return function(t,n){if(n.ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(t){}return!1}(t))return!0;if(function(t,n){if(t.type||!n||!n.length)return!1;return function(t){const n=[];t.message&&n.push(t.message);let e;try{e=t.exception.values[t.exception.values.length-1]}catch(t){}e&&e.value&&(n.push(e.value),e.type&&n.push(`${e.type}: ${e.value}`));return n}(t).some((t=>v(t,n)))}(t,n.ignoreErrors))return!0;if(function(t,n){if("transaction"!==t.type||!n||!n.length)return!1;const e=t.transaction;return!!e&&v(e,n)}(t,n.ignoreTransactions))return!0;if(function(t,n){if(!n||!n.length)return!1;const e=gr(t);return!!e&&v(e,n)}(t,n.denyUrls))return!0;if(!function(t,n){if(!n||!n.length)return!0;const e=gr(t);return!e||v(e,n)}(t,n.allowUrls))return!0;return!1}(n,s)?null:n}}),mr=nr(lr,pr);function gr(t){try{let n;try{n=t.exception.values[0].stacktrace.frames}catch(t){}return n?function(t=[]){for(let n=t.length-1;n>=0;n--){const e=t[n];if(e&&""!==e.filename&&"[native code]"!==e.filename)return e.filename||null}return null}(n):null}catch(t){return null}}let yr;const vr="FunctionToString",_r=new WeakMap,br=()=>({name:vr,setupOnce(){yr=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=B(this),e=_r.has(Bn())&&void 0!==n?n:this;return yr.apply(e,t)}}catch(t){}},setup(t){_r.set(t,!0)}}),Sr=nr(vr,br),wr="LinkedErrors",Tr=nr(wr,((t={})=>{const n=t.limit||5,e=t.key||"cause";return{name:wr,setupOnce(){},preprocessEvent(t,r,i){const s=i.getOptions();_(bn,s.stackParser,s.maxValueLength,e,n,t,r)}}}));var Er=Object.freeze({__proto__:null,FunctionToString:Sr,InboundFilters:mr,LinkedErrors:Tr});class $r{constructor(t){this.F=t,this.Bt=new Map,this.Wt=setInterval((()=>this.flush()),5e3)}add(t,n,e,r="none",i={},s=Zt()){const o=Math.floor(s),c=n.replace(er,"_"),u=function(t){const n={};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e.replace(er,"_")]=String(t[e]).replace(rr,""));return n}(i),a=function(t,n,e,r){return`${t}${n}${e}${Object.entries(G(r)).sort(((t,n)=>t[0].localeCompare(n[0])))}`}(t,c,r,u);let h=this.Bt.get(a);const f=h&&"s"===t?h.metric.weight:0;h?(h.metric.add(e),h.timestampt));this.F.captureAggregateMetrics(t)}this.Bt.clear()}}close(){clearInterval(this.Wt),this.flush()}}const xr="MetricsAggregator",kr=()=>({name:xr,setupOnce(){},setup(t){t.metricsAggregator=new $r(t)}});function Ir(t,n,e,r={}){const i=Bn(),s=Wn();if(i){if(!i.metricsAggregator)return;const{unit:o,tags:c,timestamp:u}=r,{release:a,environment:h}=i.getOptions(),f=s.getTransaction(),d={};a&&(d.release=a),h&&(d.environment=h),f&&(d.transaction=Dn(f).description||""),i.metricsAggregator.add(t,n,e,o,{...d,...c},u)}}const Or={increment:function(t,n=1,e){Ir("c",t,n,e)},distribution:function(t,n,e){Ir("d",t,n,e)},set:function(t,n,e){Ir("s",t,n,e)},gauge:function(t,n,e){Ir("g",t,n,e)},MetricsAggregator:nr(xr,kr),metricsAggregatorIntegration:kr},jr=Er,Cr=E;const Rr=(t,n,e)=>{let r,i;return s=>{n.value>=0&&(s||e)&&(i=n.value-(r||0),(i||void 0===r)&&(r=n.value,n.delta=i,t(n)))}},Mr=()=>Cr.__WEB_VITALS_POLYFILL__?Cr.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const t=Cr.performance.timing,n=Cr.performance.navigation.type,e={entryType:"navigation",startTime:0,type:2==n?"back_forward":1===n?"reload":"navigate"};for(const n in t)"navigationStart"!==n&&"toJSON"!==n&&(e[n]=Math.max(t[n]-t.navigationStart,0));return e})()):Cr.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Dr=()=>{const t=Mr();return t&&t.activationStart||0},Ar=(t,n)=>{const e=Mr();let r="navigate";return e&&(r=Cr.document.prerendering||Dr()>0?"prerender":e.type.replace(/_/g,"-")),{name:t,value:void 0===n?-1:n,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},Nr=(t,n,e)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver((t=>{n(t.getEntries())}));return r.observe(Object.assign({type:t,buffered:!0},e||{})),r}}catch(t){}},Lr=(t,n)=>{const e=r=>{"pagehide"!==r.type&&"hidden"!==Cr.document.visibilityState||(t(r),n&&(removeEventListener("visibilitychange",e,!0),removeEventListener("pagehide",e,!0)))};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)};let Pr=-1;const qr=()=>(Pr<0&&(Pr="hidden"!==Cr.document.visibilityState||Cr.document.prerendering?1/0:0,Lr((({timeStamp:t})=>{Pr=t}),!0)),{get firstHiddenTime(){return Pr}}),Hr={},Fr={},Ur={};let Br,Wr,zr;function Xr(t,n){return Zr(t,n),Ur[t]||(!function(t){const n={};"event"===t&&(n.durationThreshold=0);Nr(t,(n=>{Gr(t,{entries:n})}),n)}(t),Ur[t]=!0),Qr(t,n)}function Gr(t,n){const e=Fr[t];if(e&&e.length)for(const t of e)try{t(n)}catch(t){}}function Jr(){return(t=>{const n=Ar("CLS",0);let e,r=0,i=[];const s=t=>{t.forEach((t=>{if(!t.hadRecentInput){const s=i[0],o=i[i.length-1];r&&0!==i.length&&t.startTime-o.startTime<1e3&&t.startTime-s.startTime<5e3?(r+=t.value,i.push(t)):(r=t.value,i=[t]),r>n.value&&(n.value=r,n.entries=i,e&&e())}}))},o=Nr("layout-shift",s);if(o){e=Rr(t,n);const r=()=>{s(o.takeRecords()),e(!0)};return Lr(r),r}})((t=>{Gr("cls",{metric:t}),Br=t}))}function Kr(){return(t=>{const n=qr(),e=Ar("FID");let r;const i=t=>{t.startTime{t.forEach(i)},o=Nr("first-input",s);r=Rr(t,e),o&&Lr((()=>{s(o.takeRecords()),o.disconnect()}),!0)})((t=>{Gr("fid",{metric:t}),Wr=t}))}function Vr(){return(t=>{const n=qr(),e=Ar("LCP");let r;const i=t=>{const i=t[t.length-1];if(i){const t=Math.max(i.startTime-Dr(),0);t{Hr[e.id]||(i(s.takeRecords()),s.disconnect(),Hr[e.id]=!0,r(!0))};return["keydown","click"].forEach((t=>{addEventListener(t,n,{once:!0,capture:!0})})),Lr(n,!0),n}})((t=>{Gr("lcp",{metric:t}),zr=t}))}function Yr(t,n,e,r,i=!1){let s;return Zr(t,n),Ur[t]||(s=e(),Ur[t]=!0),r&&n({metric:r}),Qr(t,n,i?s:void 0)}function Zr(t,n){Fr[t]=Fr[t]||[],Fr[t].push(n)}function Qr(t,n,e){return()=>{e&&e();const r=Fr[t];if(!r)return;const i=r.indexOf(n);-1!==i&&r.splice(i,1)}}function ti(t){return"number"==typeof t&&isFinite(t)}function ni(t,{startTimestamp:n,...e}){return n&&t.startTimestamp>n&&(t.startTimestamp=n),t.startChild({startTimestamp:n,...e})}function ei(t){return t/1e3}function ri(){return Cr&&Cr.addEventListener&&Cr.performance}let ii,si,oi=0,ci={};function ui(){const t=ri();if(t&&Qt){t.mark&&Cr.performance.mark("sentry-tracing-init");const n=Yr("fid",(({metric:t})=>{const n=t.entries[t.entries.length-1];if(!n)return;const e=ei(Qt),r=ei(n.startTime);ci.fid={value:t.value,unit:"millisecond"},ci["mark.fid"]={value:e+r,unit:"second"}}),Kr,Wr),e=function(t,n=!1){return Yr("cls",t,Jr,Br,n)}((({metric:t})=>{const n=t.entries[t.entries.length-1];n&&(ci.cls={value:t.value,unit:""},si=n)}),!0),r=function(t,n=!1){return Yr("lcp",t,Vr,zr,n)}((({metric:t})=>{const n=t.entries[t.entries.length-1];n&&(ci.lcp={value:t.value,unit:"millisecond"},ii=n)}),!0);return()=>{n(),e(),r()}}return()=>{}}function ai(t){const n=ri();if(!n||!Cr.performance.getEntries||!Qt)return;const e=ei(Qt),r=n.getEntries();let i,s;const{op:o,start_timestamp:c}=Dn(t);if(r.slice(oi).forEach((n=>{const r=ei(n.startTime),o=ei(n.duration);if(!("navigation"===t.op&&c&&e+r{hi(t,n,r,e)})),hi(t,n,"secureConnection",e,"TLS/SSL","connectEnd"),hi(t,n,"fetch",e,"cache","domainLookupStart"),hi(t,n,"domainLookup",e,"DNS"),function(t,n,e){n.responseEnd&&(ni(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:e+ei(n.requestStart),endTimestamp:e+ei(n.responseEnd)}),ni(t,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:e+ei(n.responseStart),endTimestamp:e+ei(n.responseEnd)}))}(t,n,e)}(t,n,e),i=e+ei(n.responseStart),s=e+ei(n.requestStart);break;case"mark":case"paint":case"measure":{!function(t,n,e,r,i){const s=i+e,o=s+r;ni(t,{description:n.name,endTimestamp:o,op:n.entryType,origin:"auto.resource.browser.metrics",startTimestamp:s})}(t,n,r,o,e);const i=qr(),s=n.startTime{if(!ci[t]||!c||e>=c)return;const n=ci[t].value,r=e+ei(n),i=Math.abs(1e3*(r-c));ci[t].value=i}));const n=ci["mark.fid"];n&&ci.fid&&(ni(t,{description:"first input delay",endTimestamp:n.value+ei(ci.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:n.value}),delete ci["mark.fid"]),"fcp"in ci||delete ci.cls,Object.keys(ci).forEach((t=>{!function(t,n,e){const r=me();r&&r.setMeasurement(t,n,e)}(t,ci[t].value,ci[t].unit)})),function(t){ii&&(ii.element&&t.setTag("lcp.element",I(ii.element)),ii.id&&t.setTag("lcp.id",ii.id),ii.url&&t.setTag("lcp.url",ii.url.trim().slice(0,200)),t.setTag("lcp.size",ii.size));si&&si.sources&&si.sources.forEach(((n,e)=>t.setTag(`cls.source.${e+1}`,I(n.node))))}(t)}ii=void 0,si=void 0,ci={}}function hi(t,n,e,r,i,s){const o=s?n[s]:n[`${e}End`],c=n[`${e}Start`];c&&o&&ni(t,{op:"browser",origin:"auto.browser.browser.metrics",description:i||e,startTimestamp:r+ei(c),endTimestamp:r+ei(o)})}function fi(t,n,e,r){const i=n[e];null!=i&&i<2147483647&&(t[r]=i)}function di(t,n,e,r,i="auto.http.browser"){if(!Se()||!t.fetchData)return;const s=n(t.fetchData.url);if(t.endTimestamp&&s){const n=t.fetchData.__span;if(!n)return;const e=r[n];if(e){if(t.response){_e(e,t.response.status);const n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){const t=parseInt(n);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus("internal_error");e.end(),delete r[n]}return}const o=Wn(),c=Bn(),{method:u,url:a}=t.fetchData,h=s?we({name:`${u} ${a}`,onlyIfParent:!0,attributes:{url:a,type:"fetch","http.method":u,[De]:i},op:"http.client"}):void 0;if(h&&(t.fetchData.__span=h.spanContext().spanId,r[h.spanContext().spanId]=h),e(t.fetchData.url)&&c){const n=t.args[0];t.args[1]=t.args[1]||{};const e=t.args[1];e.headers=function(t,n,e,r,i){const s=i||e.getSpan(),o=fe(),{traceId:c,spanId:u,sampled:a,dsc:h}={...o.getPropagationContext(),...e.getPropagationContext()},f=s?Cn(s):an(c,u,a),d=sn(h||(s?Yn(s):Vn(c,n,e))),p=r.headers||("undefined"!=typeof Request&&l(t,Request)?t.headers:void 0);if(p){if("undefined"!=typeof Headers&&l(p,Headers)){const t=new Headers(p);return t.append("sentry-trace",f),d&&t.append(tn,d),t}if(Array.isArray(p)){const t=[...p,["sentry-trace",f]];return d&&t.push([tn,d]),t}{const t="baggage"in p?p.baggage:void 0,n=[];return Array.isArray(t)?n.push(...t):t&&n.push(t),d&&n.push(d),{...p,"sentry-trace":f,baggage:n.length>0?n.join(","):void 0}}}return{"sentry-trace":f,baggage:d}}(n,c,o,e,h)}return h}const li=["localhost",/^\/(?!\/)/],pi={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:li,tracePropagationTargets:li};function mi(t){const{traceFetch:n,traceXHR:e,tracePropagationTargets:r,tracingOrigins:i,shouldCreateSpanForRequest:s,enableHTTPTimings:o}={traceFetch:pi.traceFetch,traceXHR:pi.traceXHR,...t},c="function"==typeof s?s:t=>!0,u=t=>function(t,n){return v(t,n||li)}(t,r||i),a={};n&&wt((t=>{const n=di(t,c,u,a);o&&n&&gi(n)})),e&&Pt((t=>{const n=function(t,n,e,r){const i=t.xhr,s=i&&i.__sentry_xhr_v3__;if(!Se()||!i||i.__sentry_own_request__||!s)return;const o=n(s.url);if(t.endTimestamp&&o){const t=i.__sentry_xhr_span_id__;if(!t)return;const n=r[t];return void(n&&void 0!==s.status_code&&(_e(n,s.status_code),n.end(),delete r[t]))}const c=Wn(),u=fe(),a=o?we({name:`${s.method} ${s.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":s.method,url:s.url,[De]:"auto.http.browser"},op:"http.client"}):void 0;a&&(i.__sentry_xhr_span_id__=a.spanContext().spanId,r[i.__sentry_xhr_span_id__]=a);const h=Bn();if(i.setRequestHeader&&e(s.url)&&h){const{traceId:t,spanId:n,sampled:e,dsc:r}={...u.getPropagationContext(),...c.getPropagationContext()};!function(t,n,e){try{t.setRequestHeader("sentry-trace",n),e&&t.setRequestHeader(tn,e)}catch(t){}}(i,a?Cn(a):an(t,n,e),sn(r||(a?Yn(a):Vn(t,h,c))))}return a}(t,c,u,a);o&&n&&gi(n)}))}function gi(t){const{url:n}=Dn(t).data||{};if(!n||"string"!=typeof n)return;const e=Xr("resource",(({entries:r})=>{r.forEach((r=>{if(function(t){return"resource"===t.entryType&&"initiatorType"in t&&"string"==typeof t.nextHopProtocol&&("fetch"===t.initiatorType||"xmlhttprequest"===t.initiatorType)}(r)&&r.name.endsWith(n)){(function(t){const{name:n,version:e}=function(t){let n="unknown",e="unknown",r="";for(const i of t){if("/"===i){[n,e]=t.split("/");break}if(!isNaN(Number(i))){n="h"===r?"http":r,e=t.split(r)[1];break}r+=i}r===t&&(n=r);return{name:n,version:e}}(t.nextHopProtocol),r=[];if(r.push(["network.protocol.version",e],["network.protocol.name",n]),!Qt)return r;return[...r,["http.request.redirect_start",yi(t.redirectStart)],["http.request.fetch_start",yi(t.fetchStart)],["http.request.domain_lookup_start",yi(t.domainLookupStart)],["http.request.domain_lookup_end",yi(t.domainLookupEnd)],["http.request.connect_start",yi(t.connectStart)],["http.request.secure_connection_start",yi(t.secureConnectionStart)],["http.request.connection_end",yi(t.connectEnd)],["http.request.request_start",yi(t.requestStart)],["http.request.response_start",yi(t.responseStart)],["http.request.response_end",yi(t.responseEnd)]]})(r).forEach((n=>t.setAttribute(...n))),setTimeout(e)}}))}))}function yi(t=0){return((Qt||performance.timeOrigin)+t)/1e3}const vi={...Pe,markBackgroundTransactions:!0,routingInstrumentation:function(t,n=!0,e=!0){if(!Cr||!Cr.location)return;let r,i=Cr.location.href;n&&(r=t({name:Cr.location.pathname,startTimestamp:Qt?Qt/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),e&&At((({to:n,from:e})=>{void 0===e&&i&&-1!==i.indexOf(n)?i=void 0:e!==n&&(i=void 0,r&&r.end(),r=t({name:Cr.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))}))},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...pi};class _i{constructor(t){this.name="BrowserTracing",this.zt=!1,Xe(),this.options={...vi,...t},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this.Xt=ui(),this.options.enableLongTask&&Xr("longtask",(({entries:t})=>{for(const n of t){const t=me();if(!t)return;const e=ei(Qt+n.startTime),r=ei(n.duration);t.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:e,endTimestamp:e+r})}})),this.options._experiments.enableInteractions&&Xr("event",(({entries:t})=>{for(const n of t){const t=me();if(!t)return;if("click"===n.name){const e=ei(Qt+n.startTime),r=ei(n.duration),i={description:I(n.target),op:`ui.interaction.${n.name}`,origin:"auto.ui.browser.metrics",startTimestamp:e,endTimestamp:e+r},s=j(n.target);s&&(i.attributes={"ui.component_name":s}),t.startChild(i)}}}))}setupOnce(t,n){this.Gt=n;const e=n().getClient(),r=e&&e.getOptions(),{routingInstrumentation:i,startTransactionOnLocationChange:s,startTransactionOnPageLoad:o,markBackgroundTransactions:c,traceFetch:u,traceXHR:a,shouldCreateSpanForRequest:h,enableHTTPTimings:f,_experiments:d}=this.options,l=r&&r.tracePropagationTargets,p=l||this.options.tracePropagationTargets;i((t=>{const e=this.Jt(t);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(e,t,n),e}),o,s),c&&Cr&&Cr.document&&Cr.document.addEventListener("visibilitychange",(()=>{const t=me();if(Cr.document.hidden&&t){const n="cancelled",{op:e,status:r}=Dn(t);r||t.setStatus(n),t.setTag("visibilitychange","document.hidden"),t.end()}})),d.enableInteractions&&this.Kt(),mi({traceFetch:u,traceXHR:a,tracePropagationTargets:p,shouldCreateSpanForRequest:h,enableHTTPTimings:f})}Jt(t){if(!this.Gt)return;const n=this.Gt(),{beforeNavigate:e,idleTimeout:r,finalTimeout:i,heartbeatInterval:s}=this.options,o="pageload"===t.op;let c;if(o){const n=o?bi("sentry-trace"):"",e=o?bi("baggage"):void 0,{traceId:r,dsc:i,parentSpanId:s,sampled:u}=function(t,n){const e=un(t),r=rn(n),{traceId:i,parentSpanId:s,parentSampled:o}=e||{};return e?{traceId:i||ot(),parentSpanId:s||ot().substring(16),spanId:ot().substring(16),sampled:o,dsc:r||{}}:{traceId:i||ot(),spanId:ot().substring(16)}}(n,e);c={traceId:r,parentSpanId:s,parentSampled:u,...t,metadata:{...t.metadata,dynamicSamplingContext:i},trimEnd:!0}}else c={trimEnd:!0,...t};const u="function"==typeof e?e(c):c,a=void 0===u?{...c,sampled:!1}:u;a.metadata=a.name!==c.name?{...a.metadata,source:"custom"}:a.metadata,this.Vt=a.name,this.Yt=function(t){const n=t.attributes&&t.attributes["sentry.source"],e=t.data&&t.data["sentry.source"],r=t.metadata&&t.metadata.source;return n||e||r}(a),a.sampled;const{location:h}=Cr,f=ze(n,a,r,i,!0,{location:h},s,o);return o&&(Cr.document.addEventListener("readystatechange",(()=>{["interactive","complete"].includes(Cr.document.readyState)&&f.sendAutoFinishSignal()})),["interactive","complete"].includes(Cr.document.readyState)&&f.sendAutoFinishSignal()),f.registerBeforeFinishCallback((t=>{this.Xt(),ai(t)})),f}Kt(){let t;const n=()=>{const{idleTimeout:n,finalTimeout:e,heartbeatInterval:r}=this.options,i=me();if(i&&i.op&&["navigation","pageload"].includes(i.op))return;if(t&&(t.setFinishReason("interactionInterrupted"),t.end(),t=void 0),!this.Gt)return;if(!this.Vt)return;const s=this.Gt(),{location:o}=Cr,c={name:this.Vt,op:"ui.action.click",trimEnd:!0,data:{[Ce]:this.Yt||"url"}};t=ze(s,c,n,e,!0,{location:o},r)};["click"].forEach((t=>{addEventListener(t,n,{once:!1,capture:!0})}))}}function bi(t){const n=(e=`meta[name=${t}]`,k.document&&k.document.querySelector?k.document.querySelector(e):null);var e;return n?n.getAttribute("content"):void 0}function Si(){Xe()}const wi=E;let Ti=0;function Ei(){return Ti>0}function $i(){Ti++,setTimeout((()=>{Ti--}))}function xi(t,n={},e){if("function"!=typeof t)return t;try{const n=t.__sentry_wrapped__;if(n)return n;if(B(t))return t}catch(n){return t}const sentryWrapped=function(){const r=Array.prototype.slice.call(arguments);try{e&&"function"==typeof e&&e.apply(this,arguments);const i=r.map((t=>xi(t,n)));return t.apply(this,i)}catch(t){throw $i(),Un((e=>{e.addEventProcessor((t=>(n.mechanism&&(at(t,void 0,void 0),ht(t,n.mechanism)),t.extra={...t.extra,arguments:r},t))),captureException(t)})),t}};try{for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(sentryWrapped[n]=t[n])}catch(t){}U(sentryWrapped,t),F(t,"__sentry_wrapped__",sentryWrapped);try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch(t){}return sentryWrapped}function ki(t,n){const e=Oi(t,n),r={type:n&&n.name,value:Ci(n)};return e.length&&(r.stacktrace={frames:e}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Ii(t,n){return{exception:{values:[ki(t,n)]}}}function Oi(t,n){const e=n.stacktrace||n.stack||"",r=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(ji.test(t.message))return 1}return 0}(n);try{return t(e,r)}catch(t){}return[]}const ji=/Minified React error #\d+;/i;function Ci(t){const n=t&&t.message;return n?n.error&&"string"==typeof n.error.message?n.error.message:n:"No error message"}function Ri(t,n,e,r){const i=Di(t,n,e&&e.syntheticException||void 0,r);return ht(i),i.level="error",e&&e.event_id&&(i.event_id=e.event_id),Wt(i)}function Mi(t,n,e="info",r,i){const s=Ai(t,n,r&&r.syntheticException||void 0,i);return s.level=e,r&&r.event_id&&(s.event_id=r.event_id),Wt(s)}function Di(t,n,o,c,u){let f;if(i(n)&&n.error){return Ii(t,n.error)}if(s(n)||r(n,"DOMException")){const e=n;if("stack"in n)f=Ii(t,n);else{const n=e.name||(s(e)?"DOMError":"DOMException"),r=e.message?`${n}: ${e.message}`:n;f=Ai(t,r,o,c),at(f,r)}return"code"in e&&(f.tags={...f.tags,"DOMException.code":`${e.code}`}),f}if(e(n))return Ii(t,n);if(a(n)||h(n)){return f=function(t,n,e,r){const i=Bn(),s=i&&i.getOptions().normalizeDepth,o={exception:{values:[{type:h(n)?n.constructor.name:r?"UnhandledRejection":"Error",value:Ni(n,{isUnhandledRejection:r})}]},extra:{__serialized__:Ft(n,s)}};if(e){const n=Oi(t,e);n.length&&(o.exception.values[0].stacktrace={frames:n})}return o}(t,n,o,u),ht(f,{synthetic:!0}),f}return f=Ai(t,n,o,c),at(f,`${n}`,void 0),ht(f,{synthetic:!0}),f}function Ai(t,n,e,r){const i={};if(r&&e){const r=Oi(t,e);r.length&&(i.exception={values:[{value:n,stacktrace:{frames:r}}]})}if(c(n)){const{__sentry_template_string__:t,__sentry_template_values__:e}=n;return i.logentry={message:t,params:e},i}return i.message=n,i}function Ni(t,{isUnhandledRejection:n}){const e=function(t,n=40){const e=Object.keys(W(t));if(e.sort(),!e.length)return"[object has no keys]";if(e[0].length>=n)return m(e[0],n);for(let t=e.length;t>0;t--){const r=e.slice(0,t).join(", ");if(!(r.length>n))return t===e.length?r:m(r,n)}return""}(t),r=n?"promise rejection":"exception";if(i(t))return`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``;if(h(t)){return`Event \`${function(t){try{const n=Object.getPrototypeOf(t);return n?n.constructor.name:void 0}catch(t){}}(t)}\` (type=${t.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${e}`}function Li(t,{metadata:n,tunnel:e,dsn:r}){const i={event_id:t.event_id,sent_at:(new Date).toISOString(),...n&&n.sdk&&{sdk:{name:n.sdk.name,version:n.sdk.version}},...!!e&&!!r&&{dsn:N(r)}},s=function(t){return[{type:"user_report"},t]}(t);return hn(i,[s])}class Pi extends class{constructor(t){if(this.Zt=t,this._integrations={},this.Qt=!1,this.tn=0,this.nn={},this.en={},this.T=[],t.dsn&&(this.rn=P(t.dsn)),this.rn){const n=Ve(this.rn,t);this.sn=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,e){if(ft(t))return;let r=n&&n.event_id;return this.cn(this.eventFromException(t,n).then((t=>this.un(t,n,e))).then((t=>{r=t}))),r}captureMessage(t,n,e,r){let i=e&&e.event_id;const s=c(t)?t:String(t),o=u(t)?this.eventFromMessage(s,n,e):this.eventFromException(t,e);return this.cn(o.then((t=>this.un(t,e,r))).then((t=>{i=t}))),i}captureEvent(t,n,e){if(n&&n.originalException&&ft(n.originalException))return;let r=n&&n.event_id;const i=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this.cn(this.un(t,n,i||e).then((t=>{r=t}))),r}captureSession(t){"string"!=typeof t.release||(this.sendSession(t),In(t,{init:!1}))}getDsn(){return this.rn}getOptions(){return this.Zt}getSdkMetadata(){return this.Zt.lt}getTransport(){return this.sn}flush(t){const n=this.sn;return n?(this.metricsAggregator&&this.metricsAggregator.flush(),this.an(t).then((e=>n.flush(t).then((t=>e&&t))))):Wt(!0)}close(t){return this.flush(t).then((t=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),t)))}getEventProcessors(){return this.T}addEventProcessor(t){this.T.push(t)}setupIntegrations(t){(t&&!this.Qt||this.hn()&&!this.Qt)&&this.fn()}init(){this.hn()&&this.fn()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch(t){return null}}addIntegration(t){const n=this._integrations[t.name];tr(this,t,this._integrations),n||Qe(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let e=Ge(t,this.rn,this.Zt.lt,this.Zt.tunnel);for(const t of n.attachments||[])e=fn(e,mn(t,this.Zt.transportOptions&&this.Zt.transportOptions.textEncoder));const r=this.dn(e);r&&r.then((n=>this.emit("afterSendEvent",t,n)),null)}sendSession(t){const n=function(t,n,e,r){const i=vn(e);return hn({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&n&&{dsn:N(n)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this.rn,this.Zt.lt,this.Zt.tunnel);this.dn(n)}recordDroppedEvent(t,n,e){if(this.Zt.sendClientReports){const e=`${t}:${n}`;this.nn[e]=this.nn[e]+1||1}}captureAggregateMetrics(t){const n=ir(t,this.rn,this.Zt.lt,this.Zt.tunnel);this.dn(n)}on(t,n){this.en[t]||(this.en[t]=[]),this.en[t].push(n)}emit(t,...n){this.en[t]&&this.en[t].forEach((t=>t(...n)))}fn(){const{integrations:t}=this.Zt;this._integrations=function(t,n){const e={};return n.forEach((n=>{n&&tr(t,n,e)})),e}(this,t),Qe(this,t),this.Qt=!0}ln(t,n){let e=!1,r=!1;const i=n.exception&&n.exception.values;if(i){r=!0;for(const t of i){const n=t.mechanism;if(n&&!1===n.handled){e=!0;break}}}const s="ok"===t.status;(s&&0===t.errors||s&&e)&&(In(t,{...e&&{status:"crashed"},errors:t.errors||Number(r||e)}),this.captureSession(t))}an(t){return new Xt((n=>{let e=0;const r=setInterval((()=>{0==this.tn?(clearInterval(r),n(!0)):(e+=1,t&&e>=t&&(clearInterval(r),n(!1)))}),1)}))}hn(){return!1!==this.getOptions().enabled&&void 0!==this.sn}pn(t,n,e,r=fe()){const i=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s.length>0&&(n.integrations=s),this.emit("preprocessEvent",t,n),Nn(i,t,n,e,this,r).then((t=>{if(null===t)return t;const n={...r.getPropagationContext(),...e?e.getPropagationContext():void 0};if(!(t.contexts&&t.contexts.trace)&&n){const{traceId:r,spanId:i,parentSpanId:s,dsc:o}=n;t.contexts={trace:{trace_id:r,span_id:i,parent_span_id:s},...t.contexts};const c=o||Vn(r,this,e);t.sdkProcessingMetadata={dynamicSamplingContext:c,...t.sdkProcessingMetadata}}return t}))}un(t,n={},e){return this.mn(t,n,e).then((t=>t.event_id),(t=>{}))}mn(t,n,e){const r=this.getOptions(),{sampleRate:i}=r,s=or(t),o=sr(t),c=t.type||"error",u=`before send for type \`${c}\``;if(o&&"number"==typeof i&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",t),zt(new q(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const h="replay_event"===c?"replay":c,d=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this.pn(t,n,e,d).then((e=>{if(null===e)throw this.recordDroppedEvent("event_processor",h,t),new q("An event processor returned `null`, will not send event.","log");if(n.data&&!0===n.data.__sentry__)return e;const i=function(t,n,e){const{beforeSend:r,beforeSendTransaction:i}=t;if(sr(n)&&r)return r(n,e);if(or(n)&&i)return i(n,e);return n}(r,e,n);return function(t,n){const e=`${n} must return \`null\` or a valid event.`;if(f(t))return t.then((t=>{if(!a(t)&&null!==t)throw new q(e);return t}),(t=>{throw new q(`${n} rejected with ${t}`)}));if(!a(t)&&null!==t)throw new q(e);return t}(i,u)})).then((r=>{if(null===r)throw this.recordDroppedEvent("before_send",h,t),new q(`${u} returned \`null\`, will not send event.`,"log");const i=e&&e.getSession();!s&&i&&this.ln(i,r);const o=r.transaction_info;if(s&&o&&r.transaction!==t.transaction){const t="custom";r.transaction_info={...o,source:t}}return this.sendEvent(r,n),r})).then(null,(t=>{if(t instanceof q)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new q(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)}))}cn(t){this.tn++,t.then((t=>(this.tn--,t)),(t=>(this.tn--,t)))}dn(t){if(this.emit("beforeEnvelope",t),this.hn()&&this.sn)return this.sn.send(t).then(null,(t=>{}))}gn(){const t=this.nn;return this.nn={},Object.keys(t).map((n=>{const[e,r]=n.split(":");return{reason:e,category:r,quantity:t[n]}}))}}{constructor(t){!function(t,n,e=[n],r="npm"){const i=t.lt||{};i.sdk||(i.sdk={name:`sentry.javascript.${n}`,packages:e.map((t=>({name:`${r}:@sentry/${t}`,version:ie}))),version:ie}),t.lt=i}(t,"browser",["browser"],wi.SENTRY_SDK_SOURCE||"npm"),super(t),t.sendClientReports&&wi.document&&wi.document.addEventListener("visibilitychange",(()=>{"hidden"===wi.document.visibilityState&&this.yn()}))}eventFromException(t,n){return Ri(this.Zt.stackParser,t,n,this.Zt.attachStacktrace)}eventFromMessage(t,n="info",e){return Mi(this.Zt.stackParser,t,n,e,this.Zt.attachStacktrace)}captureUserFeedback(t){if(!this.hn())return;const n=Li(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.dn(n)}pn(t,n,e){return t.platform=t.platform||"javascript",super.pn(t,n,e)}yn(){const t=this.gn();if(0===t.length)return;if(!this.rn)return;const n=(e=t,hn((r=this.Zt.tunnel&&N(this.rn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:i||Yt(),discarded_events:e}]]));var e,r,i;this.dn(n)}}let qi;function Hi(t,n=function(){if(qi)return qi;if(St(wi.fetch))return qi=wi.fetch.bind(wi);const t=wi.document;let n=wi.fetch;if(t&&"function"==typeof t.createElement)try{const e=t.createElement("iframe");e.hidden=!0,t.head.appendChild(e);const r=e.contentWindow;r&&r.fetch&&(n=r.fetch),t.head.removeChild(e)}catch(t){}return qi=n.bind(wi)}()){let e=0,r=0;return ar(t,(function(i){const s=i.body.length;e+=s,r++;const o={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:e<=6e4&&r<15,...t.fetchOptions};try{return n(t.url,o).then((t=>(e-=s,r--,{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}})))}catch(t){return qi=void 0,e-=s,r--,zt(t)}}))}function Fi(t){return ar(t,(function(n){return new Xt(((e,r)=>{const i=new XMLHttpRequest;i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&e({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",t.url);for(const n in t.headers)Object.prototype.hasOwnProperty.call(t.headers,n)&&i.setRequestHeader(n,t.headers[n]);i.send(n.body)}))}))}const Ui="?";function Bi(t,n,e,r){const i={filename:t,function:n,in_app:!0};return void 0!==e&&(i.lineno=e),void 0!==r&&(i.colno=r),i}const Wi=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,zi=/\((\S*)(?::(\d+))(?::(\d+))\)/,Xi=[30,t=>{const n=Wi.exec(t);if(n){if(n[2]&&0===n[2].indexOf("eval")){const t=zi.exec(n[2]);t&&(n[2]=t[1],n[3]=t[2],n[4]=t[3])}const[t,e]=is(n[1]||Ui,n[2]);return Bi(e,t,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],Gi=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ji=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ki=[50,t=>{const n=Gi.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){const t=Ji.exec(n[3]);t&&(n[1]=n[1]||"eval",n[3]=t[1],n[4]=t[2],n[5]="")}let t=n[3],e=n[1]||Ui;return[e,t]=is(e,t),Bi(t,e,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}}],Vi=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Yi=[40,t=>{const n=Vi.exec(t);return n?Bi(n[2],n[1]||Ui,+n[3],n[4]?+n[4]:void 0):void 0}],Zi=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,Qi=[10,t=>{const n=Zi.exec(t);return n?Bi(n[2],n[3]||Ui,+n[1]):void 0}],ts=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,ns=[20,t=>{const n=ts.exec(t);return n?Bi(n[5],n[3]||n[4]||Ui,+n[1],+n[2]):void 0}],es=[Xi,Ki,Yi],rs=Y(...es),is=(t,n)=>{const e=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return e||r?[-1!==t.indexOf("@")?t.split("@")[0]:Ui,e?`safari-extension:${n}`:`safari-web-extension:${n}`]:[t,n]},ss=1024,os="Breadcrumbs",cs=(t={})=>{const n={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:os,setupOnce(){},setup(t){var e;n.console&&function(t){const n="console";et(n,t),rt(n,st)}(function(t){return function(n){if(Bn()!==t)return;const e={category:"console",data:{arguments:n.args,logger:"console"},level:Vt(n.level),message:g(n.args," ")};if("assert"===n.level){if(!1!==n.args[0])return;e.message=`Assertion failed: ${g(n.args.slice(1)," ")||"console.assert"}`,e.data.arguments=n.args.slice(1)}Fn(e,{input:n.args,level:n.level})}}(t)),n.dom&&(e=function(t,n){return function(e){if(Bn()!==t)return;let r,i,s="object"==typeof n?n.serializeAttribute:void 0,o="object"==typeof n&&"number"==typeof n.maxStringLength?n.maxStringLength:void 0;o&&o>ss&&(o=ss),"string"==typeof s&&(s=[s]);try{const t=e.event,n=function(t){return!!t&&!!t.target}(t)?t.target:t;r=I(n,{keyAttrs:s,maxStringLength:o}),i=j(n)}catch(t){r=""}if(0===r.length)return;const c={category:`ui.${e.name}`,message:r};i&&(c.data={"ui.component_name":i}),Fn(c,{event:e.event,name:e.name,global:e.global})}}(t,n.dom),et("dom",e),rt("dom",yt)),n.xhr&&Pt(function(t){return function(n){if(Bn()!==t)return;const{startTimestamp:e,endTimestamp:r}=n,i=n.xhr.__sentry_xhr_v3__;if(!e||!r||!i)return;const{method:s,url:o,status_code:c,body:u}=i;Fn({category:"xhr",data:{method:s,url:o,status_code:c},type:"http"},{xhr:n.xhr,input:u,startTimestamp:e,endTimestamp:r})}}(t)),n.fetch&&wt(function(t){return function(n){if(Bn()!==t)return;const{startTimestamp:e,endTimestamp:r}=n;if(r&&(!n.fetchData.url.match(/sentry_key/)||"POST"!==n.fetchData.method))if(n.error){Fn({category:"fetch",data:n.fetchData,level:"error",type:"http"},{data:n.error,input:n.args,startTimestamp:e,endTimestamp:r})}else{const t=n.response;Fn({category:"fetch",data:{...n.fetchData,status_code:t&&t.status},type:"http"},{input:n.args,response:t,startTimestamp:e,endTimestamp:r})}}}(t)),n.history&&At(function(t){return function(n){if(Bn()!==t)return;let e=n.from,r=n.to;const i=Jt(wi.location.href);let s=e?Jt(e):void 0;const o=Jt(r);s&&s.path||(s=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===s.protocol&&i.host===s.host&&(e=s.relative),Fn({category:"navigation",data:{from:e,to:r}})}}(t)),n.sentry&&t.on&&t.on("beforeSendEvent",function(t){return function(n){Bn()===t&&Fn({category:"sentry."+("transaction"===n.type?"transaction":"event"),event_id:n.event_id,level:n.level,message:ut(n)},{event:n})}}(t))}}},us=nr(os,cs);const as="Dedupe",hs=()=>{let t;return{name:as,setupOnce(){},processEvent(n){if(n.type)return n;try{if(function(t,n){if(!n)return!1;if(function(t,n){const e=t.message,r=n.message;if(!e&&!r)return!1;if(e&&!r||!e&&r)return!1;if(e!==r)return!1;if(!ls(t,n))return!1;if(!ds(t,n))return!1;return!0}(t,n))return!0;if(function(t,n){const e=ps(n),r=ps(t);if(!e||!r)return!1;if(e.type!==r.type||e.value!==r.value)return!1;if(!ls(t,n))return!1;if(!ds(t,n))return!1;return!0}(t,n))return!0;return!1}(n,t))return null}catch(t){}return t=n}}},fs=nr(as,hs);function ds(t,n){let e=ms(t),r=ms(n);if(!e&&!r)return!0;if(e&&!r||!e&&r)return!1;if(e=e,r=r,r.length!==e.length)return!1;for(let t=0;t{const n={onerror:!0,onunhandledrejection:!0,...t};return{name:gs,setupOnce(){Error.stackTraceLimit=50},setup(t){n.onerror&&function(t){kt((n=>{const{stackParser:e,attachStacktrace:r}=bs();if(Bn()!==t||Ei())return;const{msg:s,url:c,line:u,column:a,error:h}=n,f=void 0===h&&o(s)?function(t,n,e,r){const s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o=i(t)?t.message:t,c="Error";const u=o.match(s);u&&(c=u[1],o=u[2]);return _s({exception:{values:[{type:c,value:o}]}},n,e,r)}(s,c,u,a):_s(Di(e,h||s,void 0,r,!1),c,u,a);f.level="error",Hn(f,{originalException:h,mechanism:{handled:!1,type:"onerror"}})}))}(t),n.onunhandledrejection&&function(t){jt((n=>{const{stackParser:e,attachStacktrace:r}=bs();if(Bn()!==t||Ei())return;const i=function(t){if(u(t))return t;const n=t;try{if("reason"in n)return n.reason;if("detail"in n&&"reason"in n.detail)return n.detail.reason}catch(t){}return t}(n),s=u(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:Di(e,i,void 0,r,!0);s.level="error",Hn(s,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}(t)}}},vs=nr(gs,ys);function _s(t,n,e,r){const i=t.exception=t.exception||{},s=i.values=i.values||[],c=s[0]=s[0]||{},u=c.stacktrace=c.stacktrace||{},a=u.frames=u.frames||[],h=isNaN(parseInt(r,10))?void 0:r,f=isNaN(parseInt(e,10))?void 0:e,d=o(n)&&n.length>0?n:function(){try{return k.document.location.href}catch(t){return""}}();return 0===a.length&&a.push({colno:h,filename:d,function:"?",in_app:!0,lineno:f}),t}function bs(){const t=Bn();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Ss="HttpContext",ws=()=>({name:Ss,setupOnce(){},preprocessEvent(t){if(!wi.navigator&&!wi.location&&!wi.document)return;const n=t.request&&t.request.url||wi.location&&wi.location.href,{referrer:e}=wi.document||{},{userAgent:r}=wi.navigator||{},i={...t.request&&t.request.headers,...e&&{Referer:e},...r&&{"User-Agent":r}},s={...t.request,...n&&{url:n},headers:i};t.request=s}}),Ts=nr(Ss,ws),Es="LinkedErrors",$s=(t={})=>{const n=t.limit||5,e=t.key||"cause";return{name:Es,setupOnce(){},preprocessEvent(t,r,i){const s=i.getOptions();_(ki,s.stackParser,s.maxValueLength,e,n,t,r)}}},xs=nr(Es,$s),ks=["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"],Is="TryCatch",Os=(t={})=>{const n={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:Is,setupOnce(){n.setTimeout&&H(wi,"setTimeout",Cs),n.setInterval&&H(wi,"setInterval",Cs),n.requestAnimationFrame&&H(wi,"requestAnimationFrame",Rs),n.XMLHttpRequest&&"XMLHttpRequest"in wi&&H(XMLHttpRequest.prototype,"send",Ms);const t=n.eventTarget;if(t){(Array.isArray(t)?t:ks).forEach(Ds)}}}},js=nr(Is,Os);function Cs(t){return function(...n){const e=n[0];return n[0]=xi(e,{mechanism:{data:{function:Q(t)},handled:!1,type:"instrument"}}),t.apply(this,n)}}function Rs(t){return function(n){return t.apply(this,[xi(n,{mechanism:{data:{function:"requestAnimationFrame",handler:Q(t)},handled:!1,type:"instrument"}})])}}function Ms(t){return function(...n){const e=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((t=>{t in e&&"function"==typeof e[t]&&H(e,t,(function(n){const e={mechanism:{data:{function:t,handler:Q(n)},handled:!1,type:"instrument"}},r=B(n);return r&&(e.mechanism.data.handler=Q(r)),xi(n,e)}))})),t.apply(this,n)}}function Ds(t){const n=wi,e=n[t]&&n[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(H(e,"addEventListener",(function(n){return function(e,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=xi(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Q(r),target:t},handled:!1,type:"instrument"}}))}catch(t){}return n.apply(this,[e,xi(r,{mechanism:{data:{function:"addEventListener",handler:Q(r),target:t},handled:!1,type:"instrument"}}),i])}})),H(e,"removeEventListener",(function(t){return function(n,e,r){const i=e;try{const e=i&&i.__sentry_wrapped__;e&&t.call(this,n,e,r)}catch(t){}return t.call(this,n,i,r)}})))}const As=[pr(),br(),Os(),cs(),ys(),$s(),hs(),ws()];function Ns(t){return[...As]}var Ls=Object.freeze({__proto__:null,GlobalHandlers:vs,TryCatch:js,Breadcrumbs:us,LinkedErrors:xs,HttpContext:Ts,Dedupe:fs});let Ps={};wi.Sentry&&wi.Sentry.Integrations&&(Ps=wi.Sentry.Integrations);const qs={...Ps,...jr,...Ls};return qs.Replay=wn,qs.BrowserTracing=_i,Si(),t.Breadcrumbs=us,t.BrowserClient=Pi,t.BrowserTracing=_i,t.Dedupe=fs,t.Feedback=Sn,t.FunctionToString=Sr,t.GlobalHandlers=vs,t.HttpContext=Ts,t.Hub=ce,t.InboundFilters=mr,t.Integrations=qs,t.LinkedErrors=xs,t.Replay=wn,t.SDK_VERSION=ie,t.SEMANTIC_ATTRIBUTE_SENTRY_OP=Me,t.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN=De,t.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE=Re,t.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE=Ce,t.Scope=ee,t.Span=Ne,t.TryCatch=js,t.WINDOW=wi,t.addBreadcrumb=Fn,t.addEventProcessor=function(t){const n=Bn();n&&n.addEventProcessor&&n.addEventProcessor(t)},t.addExtensionMethods=Si,t.addGlobalEventProcessor=$n,t.addIntegration=function(t){const n=Bn();n&&n.addIntegration&&n.addIntegration(t)},t.breadcrumbsIntegration=cs,t.browserApiErrorsIntegration=Os,t.browserTracingIntegration=function(t={}){const n=t;return"boolean"==typeof t.markBackgroundSpan&&(n.markBackgroundTransactions=t.markBackgroundSpan),"boolean"==typeof t.instrumentPageLoad&&(n.startTransactionOnPageLoad=t.instrumentPageLoad),"boolean"==typeof t.instrumentNavigation&&(n.startTransactionOnLocationChange=t.instrumentNavigation),new _i(n)},t.captureEvent=Hn,t.captureException=captureException,t.captureMessage=function(t,n){const e="string"==typeof n?n:void 0,r="string"!=typeof n?{captureContext:n}:void 0;return he().captureMessage(t,e,r)},t.captureSession=Jn,t.captureUserFeedback=function(t){const n=Bn();n&&n.captureUserFeedback(t)},t.chromeStackLineParser=Xi,t.close=async function(t){const n=Bn();return n?n.close(t):Promise.resolve(!1)},t.configureScope=function(t){he().configureScope(t)},t.continueTrace=({sentryTrace:t,baggage:n},e)=>{const r=Wn(),{traceparentData:i,dynamicSamplingContext:s,propagationContext:o}=function(t,n){const e=un(t),r=rn(n),{traceId:i,parentSpanId:s,parentSampled:o}=e||{};return e?{traceparentData:e,dynamicSamplingContext:r||{},propagationContext:{traceId:i||ot(),parentSpanId:s||ot().substring(16),spanId:ot().substring(16),sampled:o,dsc:r||{}}}:{traceparentData:e,dynamicSamplingContext:void 0,propagationContext:{traceId:i||ot(),spanId:ot().substring(16)}}}(t,n);r.setPropagationContext(o);const c={...i,metadata:G({dynamicSamplingContext:s})};return e?de((()=>e(c))):c},t.createTransport=ar,t.createUserFeedbackEnvelope=Li,t.dedupeIntegration=hs,t.defaultIntegrations=As,t.defaultStackLineParsers=es,t.defaultStackParser=rs,t.endSession=Xn,t.eventFromException=Ri,t.eventFromMessage=Mi,t.exceptionFromError=ki,t.feedbackIntegration=function(t){return new Sn({})},t.flush=async function(t){const n=Bn();return n?n.flush(t):Promise.resolve(!1)},t.forceLoad=function(){},t.functionToStringIntegration=br,t.geckoStackLineParser=Ki,t.getActiveSpan=Te,t.getClient=Bn,t.getCurrentHub=he,t.getCurrentScope=Wn,t.getDefaultIntegrations=Ns,t.getHubFromCarrier=le,t.globalHandlersIntegration=ys,t.httpContextIntegration=ws,t.inboundFiltersIntegration=pr,t.init=function(t={}){void 0===t.defaultIntegrations&&(t.defaultIntegrations=Ns()),void 0===t.release&&("string"==typeof __SENTRY_RELEASE__&&(t.release=__SENTRY_RELEASE__),wi.SENTRY_RELEASE&&wi.SENTRY_RELEASE.id&&(t.release=wi.SENTRY_RELEASE.id)),void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0);const n={...t,stackParser:(e=t.stackParser||rs,Array.isArray(e)?Y(...e):e),integrations:Ze(t),transport:t.transport||(bt()?Hi:Fi)};var e;!function(t,n){!0===n.debug&&M((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Wn().update(n.initialScope);const e=new t(n);ur(e),function(t){t.init?t.init():t.setupIntegrations&&t.setupIntegrations()}(e)}(Pi,n),t.autoSessionTracking&&function(){if(void 0===wi.document)return;zn({ignoreDuration:!0}),Jn(),At((({from:t,to:n})=>{void 0!==t&&t!==n&&(zn({ignoreDuration:!0}),Jn())}))}()},t.isInitialized=function(){return!!Bn()},t.lastEventId=function(){return he().lastEventId()},t.linkedErrorsIntegration=$s,t.makeFetchTransport=Hi,t.makeMain=ae,t.makeXHRTransport=Fi,t.metrics=Or,t.onLoad=function(t){t()},t.opera10StackLineParser=Qi,t.opera11StackLineParser=ns,t.parameterize=function(t,...n){const e=new String(String.raw(t,...n));return e.__sentry_template_string__=t.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),e.__sentry_template_values__=n,e},t.replayIntegration=function(t){return new wn({})},t.setContext=function(t,n){he().setContext(t,n)},t.setCurrentClient=ur,t.setExtra=function(t,n){he().setExtra(t,n)},t.setExtras=function(t){he().setExtras(t)},t.setTag=function(t,n){he().setTag(t,n)},t.setTags=function(t){he().setTags(t)},t.setUser=function(t){he().setUser(t)},t.showReportDialog=(t={},n=he())=>{if(!wi.document)return;const{client:e,scope:r}=n.getStackTop(),i=t.dsn||e&&e.getDsn();if(!i)return;r&&(t.user={...r.getUser(),...t.user}),t.eventId||(t.eventId=n.lastEventId());const s=wi.document.createElement("script");s.async=!0,s.crossOrigin="anonymous",s.src=function(t,n){const e=P(t);if(!e)return"";const r=`${Je(e)}embed/error-page/`;let i=`dsn=${N(e)}`;for(const t in n)if("dsn"!==t&&"onClose"!==t)if("user"===t){const t=n.user;if(!t)continue;t.name&&(i+=`&name=${encodeURIComponent(t.name)}`),t.email&&(i+=`&email=${encodeURIComponent(t.email)}`)}else i+=`&${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`;return`${r}?${i}`}(i,t),t.onLoad&&(s.onload=t.onLoad);const{onClose:o}=t;if(o){const t=n=>{if("__sentry_reportdialog_closed__"===n.data)try{o()}finally{wi.removeEventListener("message",t)}};wi.addEventListener("message",t)}const c=wi.document.head||wi.document.body;c&&c.appendChild(s)},t.startInactiveSpan=we,t.startSession=zn,t.startSpan=function(t,n){const e=$e(t);return de((()=>Un(t.scope,(r=>{const i=he(),s=r.getSpan(),o=t.onlyIfParent&&!s?void 0:Ee(i,{parentSpan:s,spanContext:e,forceTransaction:t.forceTransaction,scope:r});return be((()=>n(o)),(()=>{if(o){const{status:t}=Dn(o);t&&"ok"!==t||o.setStatus("internal_error")}}),(()=>o&&o.end()))}))))},t.startSpanManual=function(t,n){const e=$e(t);return de((()=>Un(t.scope,(r=>{const i=he(),s=r.getSpan(),o=t.onlyIfParent&&!s?void 0:Ee(i,{parentSpan:s,spanContext:e,forceTransaction:t.forceTransaction,scope:r});function c(){o&&o.end()}return be((()=>n(o,c)),(()=>{if(o&&o.isRecording()){const{status:t}=Dn(o);t&&"ok"!==t||o.setStatus("internal_error")}}))}))))},t.startTransaction=function(t,n){return he().startTransaction({...t},n)},t.winjsStackLineParser=Yi,t.withActiveSpan=function(t,n){return Un((e=>(e.setSpan(t),n(e))))},t.withIsolationScope=function(t){return de((()=>t(fe())))},t.withScope=Un,t.wrap=function(t){return xi(t)()},t}({}); +/*! @sentry/browser (Performance Monitoring) 8.9.2 (9ff5b48) | https://github.com/getsentry/sentry-javascript */ +var Sentry=function(t){const n=Object.prototype.toString;function e(t){switch(n.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return h(t,Error)}}function r(t,e){return n.call(t)===`[object ${e}]`}function i(t){return r(t,"ErrorEvent")}function o(t){return r(t,"DOMError")}function s(t){return r(t,"String")}function c(t){return"object"==typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function u(t){return null===t||c(t)||"object"!=typeof t&&"function"!=typeof t}function a(t){return r(t,"Object")}function f(t){return"undefined"!=typeof Event&&h(t,Event)}function d(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function h(t,n){try{return t instanceof n}catch(t){return!1}}function l(t){return!("object"!=typeof t||null===t||!t.__isVue&&!t.t)}function p(t,n=0){return"string"!=typeof t||0===n||t.length<=n?t:`${t.slice(0,n)}...`}function m(t,n){if(!Array.isArray(t))return"";const e=[];for(let n=0;ng(t,n,e)))}function y(t,n,e=250,r,i,o,s){if(!(o.exception&&o.exception.values&&s&&h(s.originalException,Error)))return;const c=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;var u,a;c&&(o.exception.values=(u=b(t,n,i,s.originalException,r,o.exception.values,c,0),a=e,u.map((t=>(t.value&&(t.value=p(t.value,a)),t)))))}function b(t,n,e,r,i,o,s,c){if(o.length>=e+1)return o;let u=[...o];if(h(r[i],Error)){_(s,c);const o=t(n,r[i]),a=u.length;w(o,i,a,c),u=b(t,n,e,r[i],i,[o,...u],o,a)}return Array.isArray(r.errors)&&r.errors.forEach(((r,o)=>{if(h(r,Error)){_(s,c);const a=t(n,r),f=u.length;w(a,`errors[${o}]`,f,c),u=b(t,n,e,r,i,[a,...u],a,f)}})),u}function _(t,n){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,..."AggregateError"===t.type&&{is_exception_group:!0},exception_id:n}}function w(t,n,e,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:n,exception_id:e,parent_id:r}}const S="8.9.2",E=globalThis;function $(t,n,e){const r=e||E,i=r.__SENTRY__=r.__SENTRY__||{},o=i[S]=i[S]||{};return o[t]||(o[t]=n())}const T=E,k=80;function I(t,n={}){if(!t)return"";try{let e=t;const r=5,i=[];let o=0,s=0;const c=" > ",u=c.length;let a;const f=Array.isArray(n)?n:n.keyAttrs,d=!Array.isArray(n)&&n.maxStringLength||k;for(;e&&o++1&&s+i.length*u+a.length>=d));)i.push(a),s+=a.length,e=e.parentNode;return i.reverse().join(c)}catch(t){return""}}function x(t,n){const e=t,r=[];let i,o,c,u,a;if(!e||!e.tagName)return"";if(T.HTMLElement&&e instanceof HTMLElement&&e.dataset){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}r.push(e.tagName.toLowerCase());const f=n&&n.length?n.filter((t=>e.getAttribute(t))).map((t=>[t,e.getAttribute(t)])):null;if(f&&f.length)f.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else if(e.id&&r.push(`#${e.id}`),i=e.className,i&&s(i))for(o=i.split(/\s+/),a=0;a{const r=R[t];e[t]=n[t],n[t]=r}));try{return t()}finally{r.forEach((t=>{n[t]=e[t]}))}}const M=function(){let t=!1;const n={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return C.forEach((t=>{n[t]=()=>{}})),n}(),A=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function L(t,n=!1){const{host:e,path:r,pass:i,port:o,projectId:s,protocol:c,publicKey:u}=t;return`${c}://${u}${n&&i?`:${i}`:""}@${e}${o?`:${o}`:""}/${r?`${r}/`:r}${s}`}function N(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function D(t){const n="string"==typeof t?function(t){const n=A.exec(t);if(!n)return void O((()=>{console.error(`Invalid Sentry Dsn: ${t}`)}));const[e,r,i="",o,s="",c]=n.slice(1);let u="",a=c;const f=a.split("/");if(f.length>1&&(u=f.slice(0,-1).join("/"),a=f.pop()),a){const t=a.match(/^\d+/);t&&(a=t[0])}return N({host:o,pass:i,path:u,projectId:a,port:s,protocol:e,publicKey:r})}(t):N(t);if(n)return n}class P extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function q(t,n,e){if(!(n in t))return;const r=t[n],i=e(r);"function"==typeof i&&U(i,r),t[n]=i}function F(t,n,e){try{Object.defineProperty(t,n,{value:e,writable:!0,configurable:!0})}catch(t){}}function U(t,n){try{const e=n.prototype||{};t.prototype=n.prototype=e,F(t,"__sentry_original__",n)}catch(t){}}function H(t){return t.__sentry_original__}function B(t){if(e(t))return{message:t.message,name:t.name,stack:t.stack,...W(t)};if(f(t)){const n={type:t.type,target:z(t.target),currentTarget:z(t.currentTarget),...W(t)};return"undefined"!=typeof CustomEvent&&h(t,CustomEvent)&&(n.detail=t.detail),n}return t}function z(t){try{return n=t,"undefined"!=typeof Element&&h(n,Element)?I(t):Object.prototype.toString.call(t)}catch(t){return""}var n}function W(t){if("object"==typeof t&&null!==t){const n={};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}return{}}function X(t){return G(t,new Map)}function G(t,n){if(function(t){if(!a(t))return!1;try{const n=Object.getPrototypeOf(t).constructor.name;return!n||"Object"===n}catch(t){return!0}}(t)){const e=n.get(t);if(void 0!==e)return e;const r={};n.set(t,r);for(const e of Object.keys(t))void 0!==t[e]&&(r[e]=G(t[e],n));return r}if(Array.isArray(t)){const e=n.get(t);if(void 0!==e)return e;const r=[];return n.set(t,r),t.forEach((t=>{r.push(G(t,n))})),r}return t}const J=50,Y="?",K=/\(error: (.*)\)/,V=/captureMessage|captureException/;function Q(...t){const n=t.sort(((t,n)=>t[0]-n[0])).map((t=>t[1]));return(t,e=0,r=0)=>{const i=[],o=t.split("\n");for(let t=e;t1024)continue;const s=K.test(e)?e.replace(K,"$1"):e;if(!s.match(/\S*Error: /)){for(const t of n){const n=t(s);if(n){i.push(n);break}}if(i.length>=J+r)break}}return function(t){if(!t.length)return[];const n=Array.from(t);/sentryWrapped/.test(n[n.length-1].function||"")&&n.pop();n.reverse(),V.test(n[n.length-1].function||"")&&(n.pop(),V.test(n[n.length-1].function||"")&&n.pop());return n.slice(0,J).map((t=>({...t,filename:t.filename||n[n.length-1].filename,function:t.function||Y})))}(i.slice(r))}}const Z="";function tt(t){try{return t&&"function"==typeof t&&t.name||Z}catch(t){return Z}}function nt(t){const n=t.exception;if(n){const t=[];try{return n.values.forEach((n=>{n.stacktrace.frames&&t.push(...n.stacktrace.frames)})),t}catch(t){return}}}const et={},rt={};function it(t,n){et[t]=et[t]||[],et[t].push(n)}function ot(t,n){rt[t]||(n(),rt[t]=!0)}function st(t,n){const e=t&&et[t];if(e)for(const t of e)try{t(n)}catch(t){}}function ct(){"console"in E&&C.forEach((function(t){t in E.console&&q(E.console,t,(function(n){return R[t]=n,function(...n){st("console",{args:n,level:t});const e=R[t];e&&e.apply(E.console,n)}}))}))}const ut=E;function at(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function ft(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in ut))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}())return!1;if(at(ut.fetch))return!0;let t=!1;const n=ut.document;if(n&&"function"==typeof n.createElement)try{const e=n.createElement("iframe");e.hidden=!0,n.head.appendChild(e),e.contentWindow&&e.contentWindow.fetch&&(t=at(e.contentWindow.fetch)),n.head.removeChild(e)}catch(t){}return t}const dt=1e3;function ht(){return Date.now()/dt}const lt=function(){const{performance:t}=E;if(!t||!t.now)return ht;const n=Date.now()-t.now(),e=null==t.timeOrigin?n:t.timeOrigin;return()=>(e+t.now())/dt}(),pt=(()=>{const{performance:t}=E;if(!t||!t.now)return;const n=36e5,e=t.now(),r=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+e-r):n,o=i(st("fetch",{...o,endTimestamp:1e3*lt(),response:t}),t)),(t=>{throw st("fetch",{...o,endTimestamp:1e3*lt(),error:t}),e(t)&&void 0===t.stack&&(t.stack=s,F(t,"framesToPop",1)),t}))}}))}function vt(t,n){return!!t&&"object"==typeof t&&!!t[n]}function yt(t){return"string"==typeof t?t:t?vt(t,"url")?t.url:t.toString?t.toString():"":""}let bt=null;function _t(t){const n="error";it(n,t),ot(n,wt)}function wt(){bt=E.onerror,E.onerror=function(t,n,e,r,i){return st("error",{column:r,error:i,line:e,msg:t,url:n}),!(!bt||bt.__SENTRY_LOADER__)&&bt.apply(this,arguments)},E.onerror.__SENTRY_INSTRUMENTED__=!0}let St=null;function Et(t){const n="unhandledrejection";it(n,t),ot(n,$t)}function $t(){St=E.onunhandledrejection,E.onunhandledrejection=function(t){return st("unhandledrejection",t),!(St&&!St.__SENTRY_LOADER__)||St.apply(this,arguments)},E.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Tt(){const t=E,n=t.crypto||t.msCrypto;let e=()=>16*Math.random();try{if(n&&n.randomUUID)return n.randomUUID().replace(/-/g,"");n&&n.getRandomValues&&(e=()=>{const t=new Uint8Array(1);return n.getRandomValues(t),t[0]})}catch(t){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^(15&e())>>t/4).toString(16)))}function kt(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function It(t){const{message:n,event_id:e}=t;if(n)return n;const r=kt(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||e||"":e||""}function xt(t,n,e){const r=t.exception=t.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=n||""),o.type||(o.type=e||"Error")}function jt(t,n){const e=kt(t);if(!e)return;const r=e.mechanism;if(e.mechanism={type:"generic",handled:!0,...r,...n},n&&"data"in n){const t={...r&&r.data,...n.data};e.mechanism.data=t}}function Ct(t){if(t&&t.__sentry_captured__)return!0;try{F(t,"__sentry_captured__",!0)}catch(t){}return!1}function Rt(t){return Array.isArray(t)?t:[t]}function Ot(t,n=100,e=1/0){try{return At("",t,n,e)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function Mt(t,n=3,e=102400){const r=Ot(t,n);return i=r,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(i))>e?Mt(t,n-1,e):r;var i}function At(t,n,e=1/0,r=1/0,i=function(){const t="function"==typeof WeakSet,n=t?new WeakSet:[];return[function(e){if(t)return!!n.has(e)||(n.add(e),!1);for(let t=0;t=r){d[t]="[MaxProperties ~]";break}const n=p[t];d[t]=At(t,n,u-1,r,i),h++}return s(n),d}var Lt;function Nt(t){return new Pt((n=>{n(t)}))}function Dt(t){return new Pt(((n,e)=>{e(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(Lt||(Lt={}));class Pt{constructor(t){Pt.prototype.__init.call(this),Pt.prototype.__init2.call(this),Pt.prototype.__init3.call(this),Pt.prototype.__init4.call(this),this.o=Lt.PENDING,this.u=[];try{t(this.h,this.l)}catch(t){this.l(t)}}then(t,n){return new Pt(((e,r)=>{this.u.push([!1,n=>{if(t)try{e(t(n))}catch(t){r(t)}else e(n)},t=>{if(n)try{e(n(t))}catch(t){r(t)}else r(t)}]),this.p()}))}catch(t){return this.then((t=>t),t)}finally(t){return new Pt(((n,e)=>{let r,i;return this.then((n=>{i=!1,r=n,t&&t()}),(n=>{i=!0,r=n,t&&t()})).then((()=>{i?e(r):n(r)}))}))}__init(){this.h=t=>{this.m(Lt.RESOLVED,t)}}__init2(){this.l=t=>{this.m(Lt.REJECTED,t)}}__init3(){this.m=(t,n)=>{this.o===Lt.PENDING&&(d(n)?n.then(this.h,this.l):(this.o=t,this.v=n,this.p()))}}__init4(){this.p=()=>{if(this.o===Lt.PENDING)return;const t=this.u.slice();this.u=[],t.forEach((t=>{t[0]||(this.o===Lt.RESOLVED&&t[1](this.v),this.o===Lt.REJECTED&&t[2](this.v),t[0]=!0)}))}}}function qt(t){const n=[];function e(t){return n.splice(n.indexOf(t),1)[0]}return{$:n,add:function(r){if(!(void 0===t||n.lengthe(i))).then(null,(()=>e(i).then(null,(()=>{})))),i},drain:function(t){return new Pt(((e,r)=>{let i=n.length;if(!i)return e(!0);const o=setTimeout((()=>{t&&t>0&&e(!1)}),t);n.forEach((t=>{Nt(t).then((()=>{--i||(clearTimeout(o),e(!0))}),r)}))}))}}}function Ft(t){if(!t)return{};const n=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!n)return{};const e=n[6]||"",r=n[8]||"";return{host:n[4],path:n[5],protocol:n[2],search:e,hash:r,relative:n[5]+e+r}}const Ut=["fatal","error","warning","log","info","debug"];function Ht(t){return"warn"===t?"warning":Ut.includes(t)?t:"log"}const Bt="baggage",zt="sentry-",Wt=/^sentry-/,Xt=8192;function Gt(t){const n=function(t){if(!t||!s(t)&&!Array.isArray(t))return;if(Array.isArray(t))return t.reduce(((t,n)=>{const e=Yt(n);for(const n of Object.keys(e))t[n]=e[n];return t}),{});return Yt(t)}(t);if(!n)return;const e=Object.entries(n).reduce(((t,[n,e])=>{if(n.match(Wt)){t[n.slice(zt.length)]=e}return t}),{});return Object.keys(e).length>0?e:void 0}function Jt(t){if(!t)return;return function(t){if(0===Object.keys(t).length)return;return Object.entries(t).reduce(((t,[n,e],r)=>{const i=`${encodeURIComponent(n)}=${encodeURIComponent(e)}`,o=0===r?i:`${t},${i}`;return o.length>Xt?t:o}),"")}(Object.entries(t).reduce(((t,[n,e])=>(e&&(t[`${zt}${n}`]=e),t)),{}))}function Yt(t){return t.split(",").map((t=>t.split("=").map((t=>decodeURIComponent(t.trim()))))).reduce(((t,[n,e])=>(t[n]=e,t)),{})}const Kt=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Vt(t,n){const e=function(t){if(!t)return;const n=t.match(Kt);if(!n)return;let e;return"1"===n[3]?e=!0:"0"===n[3]&&(e=!1),{traceId:n[1],parentSampled:e,parentSpanId:n[2]}}(t),r=Gt(n),{traceId:i,parentSpanId:o,parentSampled:s}=e||{};return e?{traceId:i||Tt(),parentSpanId:o||Tt().substring(16),spanId:Tt().substring(16),sampled:s,dsc:r||{}}:{traceId:i||Tt(),spanId:Tt().substring(16)}}function Qt(t=Tt(),n=Tt().substring(16),e){let r="";return void 0!==e&&(r=e?"-1":"-0"),`${t}-${n}${r}`}function Zt(t,n=[]){return[t,n]}function tn(t,n){const[e,r]=t;return[e,[...r,n]]}function nn(t,n){const e=t[1];for(const t of e){if(n(t,t[0].type))return!0}return!1}function en(t){return E.__SENTRY__&&E.__SENTRY__.encodePolyfill?E.__SENTRY__.encodePolyfill(t):(new TextEncoder).encode(t)}function rn(t){const[n,e]=t;let r=JSON.stringify(n);function i(t){"string"==typeof r?r="string"==typeof t?r+t:[en(r),t]:r.push("string"==typeof t?en(t):t)}for(const t of e){const[n,e]=t;if(i(`\n${JSON.stringify(n)}\n`),"string"==typeof e||e instanceof Uint8Array)i(e);else{let t;try{t=JSON.stringify(e)}catch(n){t=JSON.stringify(Ot(e))}i(t)}}return"string"==typeof r?r:function(t){const n=t.reduce(((t,n)=>t+n.length),0),e=new Uint8Array(n);let r=0;for(const n of t)e.set(n,r),r+=n.length;return e}(r)}function on(t){return[{type:"span"},t]}function sn(t){const n="string"==typeof t.data?en(t.data):t.data;return[X({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}const cn={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",statsd:"metric_bucket"};function un(t){return cn[t]}function an(t){if(!t||!t.sdk)return;const{name:n,version:e}=t.sdk;return{name:n,version:e}}const fn=6e4;function dn(t,{statusCode:n,headers:e},r=Date.now()){const i={...t},o=e&&e["x-sentry-rate-limits"],s=e&&e["retry-after"];if(o)for(const t of o.trim().split(",")){const[n,e,,,o]=t.split(":",5),s=parseInt(n,10),c=1e3*(isNaN(s)?60:s);if(e)for(const t of e.split(";"))"metric_bucket"===t&&o&&!o.split(";").includes("custom")||(i[t]=r+c);else i.all=r+c}else s?i.all=r+function(t,n=Date.now()){const e=parseInt(`${t}`,10);if(!isNaN(e))return 1e3*e;const r=Date.parse(`${t}`);return isNaN(r)?fn:r-n}(s,r):429===n&&(i.all=r+6e4);return i}function hn(){return{traceId:Tt(),spanId:Tt().substring(16)}}const ln=E;const pn=()=>{},mn=["attachTo","createWidget","remove"];function gn(t){return O((()=>{console.warn("You are using feedbackIntegration() even though this bundle does not include feedback.")})),{name:"Feedback",...mn.reduce(((t,n)=>(t[n]=pn,t)),{})}}const vn=["start","stop","flush"];function yn(){return bn(E),E}function bn(t){const n=t.__SENTRY__=t.__SENTRY__||{};return n.version=n.version||S,n[S]=n[S]||{}}function _n(t){const n=lt(),e={sid:Tt(),init:!0,timestamp:n,started:n,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return X({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(e)};return t&&wn(e,t),e}function wn(t,n={}){if(n.user&&(!t.ipAddress&&n.user.ip_address&&(t.ipAddress=n.user.ip_address),t.did||n.did||(t.did=n.user.id||n.user.email||n.user.username)),t.timestamp=n.timestamp||lt(),n.abnormal_mechanism&&(t.abnormal_mechanism=n.abnormal_mechanism),n.ignoreDuration&&(t.ignoreDuration=n.ignoreDuration),n.sid&&(t.sid=32===n.sid.length?n.sid:Tt()),void 0!==n.init&&(t.init=n.init),!t.did&&n.did&&(t.did=`${n.did}`),"number"==typeof n.started&&(t.started=n.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof n.duration)t.duration=n.duration;else{const n=t.timestamp-t.started;t.duration=n>=0?n:0}n.release&&(t.release=n.release),n.environment&&(t.environment=n.environment),!t.ipAddress&&n.ipAddress&&(t.ipAddress=n.ipAddress),!t.userAgent&&n.userAgent&&(t.userAgent=n.userAgent),"number"==typeof n.errors&&(t.errors=n.errors),n.status&&(t.status=n.status)}const Sn="_sentrySpan";function En(t,n){n?F(t,Sn,n):delete t[Sn]}function $n(t){return t[Sn]}class Tn{constructor(){this._=!1,this.S=[],this.T=[],this.k=[],this.I=[],this.j={},this.C={},this.R={},this.O={},this.M={},this.A=hn()}clone(){const t=new Tn;return t.k=[...this.k],t.C={...this.C},t.R={...this.R},t.O={...this.O},t.j=this.j,t.L=this.L,t.N=this.N,t.D=this.D,t.P=this.P,t.T=[...this.T],t.q=this.q,t.I=[...this.I],t.M={...this.M},t.A={...this.A},t.F=this.F,t.U=this.U,En(t,$n(this)),t}setClient(t){this.F=t}setLastEventId(t){this.U=t}getClient(){return this.F}lastEventId(){return this.U}addScopeListener(t){this.S.push(t)}addEventProcessor(t){return this.T.push(t),this}setUser(t){return this.j=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this.N&&wn(this.N,{user:t}),this.H(),this}getUser(){return this.j}getRequestSession(){return this.q}setRequestSession(t){return this.q=t,this}setTags(t){return this.C={...this.C,...t},this.H(),this}setTag(t,n){return this.C={...this.C,[t]:n},this.H(),this}setExtras(t){return this.R={...this.R,...t},this.H(),this}setExtra(t,n){return this.R={...this.R,[t]:n},this.H(),this}setFingerprint(t){return this.P=t,this.H(),this}setLevel(t){return this.L=t,this.H(),this}setTransactionName(t){return this.D=t,this.H(),this}setContext(t,n){return null===n?delete this.O[t]:this.O[t]=n,this.H(),this}setSession(t){return t?this.N=t:delete this.N,this.H(),this}getSession(){return this.N}update(t){if(!t)return this;const n="function"==typeof t?t(this):t,[e,r]=n instanceof kn?[n.getScopeData(),n.getRequestSession()]:a(n)?[t,t.requestSession]:[],{tags:i,extra:o,user:s,contexts:c,level:u,fingerprint:f=[],propagationContext:d}=e||{};return this.C={...this.C,...i},this.R={...this.R,...o},this.O={...this.O,...c},s&&Object.keys(s).length&&(this.j=s),u&&(this.L=u),f.length&&(this.P=f),d&&(this.A=d),r&&(this.q=r),this}clear(){return this.k=[],this.C={},this.R={},this.j={},this.O={},this.L=void 0,this.D=void 0,this.P=void 0,this.q=void 0,this.N=void 0,En(this,void 0),this.I=[],this.A=hn(),this.H(),this}addBreadcrumb(t,n){const e="number"==typeof n?n:100;if(e<=0)return this;const r={timestamp:ht(),...t},i=this.k;return i.push(r),this.k=i.length>e?i.slice(-e):i,this.H(),this}getLastBreadcrumb(){return this.k[this.k.length-1]}clearBreadcrumbs(){return this.k=[],this.H(),this}addAttachment(t){return this.I.push(t),this}clearAttachments(){return this.I=[],this}getScopeData(){return{breadcrumbs:this.k,attachments:this.I,contexts:this.O,tags:this.C,extra:this.R,user:this.j,level:this.L,fingerprint:this.P||[],eventProcessors:this.T,propagationContext:this.A,sdkProcessingMetadata:this.M,transactionName:this.D,span:$n(this)}}setSDKProcessingMetadata(t){return this.M={...this.M,...t},this}setPropagationContext(t){return this.A=t,this}getPropagationContext(){return this.A}captureException(t,n){const e=n&&n.event_id?n.event_id:Tt();if(!this.F)return M.warn("No client configured on scope - will not capture exception!"),e;const r=new Error("Sentry syntheticException");return this.F.captureException(t,{originalException:t,syntheticException:r,...n,event_id:e},this),e}captureMessage(t,n,e){const r=e&&e.event_id?e.event_id:Tt();if(!this.F)return M.warn("No client configured on scope - will not capture message!"),r;const i=new Error(t);return this.F.captureMessage(t,n,{originalException:t,syntheticException:i,...e,event_id:r},this),r}captureEvent(t,n){const e=n&&n.event_id?n.event_id:Tt();return this.F?(this.F.captureEvent(t,{...n,event_id:e},this),e):(M.warn("No client configured on scope - will not capture event!"),e)}H(){this._||(this._=!0,this.S.forEach((t=>{t(this)})),this._=!1)}}const kn=Tn;class In{constructor(t,n){let e,r;e=t||new kn,r=n||new kn,this.B=[{scope:e}],this.W=r}withScope(t){const n=this.X();let e;try{e=t(n)}catch(t){throw this.G(),t}return d(e)?e.then((t=>(this.G(),t)),(t=>{throw this.G(),t})):(this.G(),e)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.W}getStack(){return this.B}getStackTop(){return this.B[this.B.length-1]}X(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}G(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}}function xn(){const t=bn(yn());return t.stack=t.stack||new In($("defaultCurrentScope",(()=>new kn)),$("defaultIsolationScope",(()=>new kn)))}function jn(t){return xn().withScope(t)}function Cn(t,n){const e=xn();return e.withScope((()=>(e.getStackTop().scope=t,n(t))))}function Rn(t){return xn().withScope((()=>t(xn().getIsolationScope())))}function On(t){const n=bn(t);return n.acs?n.acs:{withIsolationScope:Rn,withScope:jn,withSetScope:Cn,withSetIsolationScope:(t,n)=>Rn(n),getCurrentScope:()=>xn().getScope(),getIsolationScope:()=>xn().getIsolationScope()}}function Mn(){return On(yn()).getCurrentScope()}function An(){return On(yn()).getIsolationScope()}function Ln(){return $("globalScope",(()=>new kn))}function Nn(...t){const n=On(yn());if(2===t.length){const[e,r]=t;return e?n.withSetScope(e,r):n.withScope(r)}return n.withScope(t[0])}function Dn(){return Mn().getClient()}const Pn="_sentryMetrics";function qn(t){const n=t[Pn];if(!n)return;const e={};for(const[,[t,r]]of n)e[t]||(e[t]=[]),e[t].push(X(r));return e}const Fn="sentry.source",Un="sentry.sample_rate",Hn="sentry.op",Bn="sentry.origin",zn="sentry.idle_span_finish_reason",Wn="sentry.measurement_unit",Xn="sentry.measurement_value",Gn="sentry.exclusive_time",Jn=0,Yn=1,Kn=2;function Vn(t,n){t.setAttribute("http.response.status_code",n);const e=function(t){if(t<400&&t>=100)return{code:Yn};if(t>=400&&t<500)switch(t){case 401:return{code:Kn,message:"unauthenticated"};case 403:return{code:Kn,message:"permission_denied"};case 404:return{code:Kn,message:"not_found"};case 409:return{code:Kn,message:"already_exists"};case 413:return{code:Kn,message:"failed_precondition"};case 429:return{code:Kn,message:"resource_exhausted"};case 499:return{code:Kn,message:"cancelled"};default:return{code:Kn,message:"invalid_argument"}}if(t>=500&&t<600)switch(t){case 501:return{code:Kn,message:"unimplemented"};case 503:return{code:Kn,message:"unavailable"};case 504:return{code:Kn,message:"deadline_exceeded"};default:return{code:Kn,message:"internal_error"}}return{code:Kn,message:"unknown_error"}}(n);"unknown_error"!==e.message&&t.setStatus(e)}const Qn=1;function Zn(t){const{spanId:n,traceId:e}=t.spanContext(),{data:r,op:i,parent_span_id:o,status:s,origin:c}=ie(t);return X({parent_span_id:o,span_id:n,trace_id:e,data:r,op:i,status:s,origin:c})}function te(t){const{spanId:n,traceId:e}=t.spanContext(),{parent_span_id:r}=ie(t);return X({parent_span_id:r,span_id:n,trace_id:e})}function ne(t){const{traceId:n,spanId:e}=t.spanContext();return Qt(n,e,oe(t))}function ee(t){return"number"==typeof t?re(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?re(t.getTime()):lt()}function re(t){return t>9999999999?t/1e3:t}function ie(t){if(function(t){return"function"==typeof t.getSpanJSON}(t))return t.getSpanJSON();try{const{spanId:n,traceId:e}=t.spanContext();if(function(t){const n=t;return!!(n.attributes&&n.startTime&&n.name&&n.endTime&&n.status)}(t)){const{attributes:r,startTime:i,name:o,endTime:s,parentSpanId:c,status:u}=t;return X({span_id:n,trace_id:e,data:r,description:o,parent_span_id:c,start_timestamp:ee(i),timestamp:ee(s)||void 0,status:se(u),op:r[Hn],origin:r[Bn],_metrics_summary:qn(t)})}return{span_id:n,trace_id:e}}catch(t){return{}}}function oe(t){const{traceFlags:n}=t.spanContext();return n===Qn}function se(t){if(t&&t.code!==Jn)return t.code===Yn?"ok":t.message||"unknown_error"}const ce="_sentryChildSpans",ue="_sentryRootSpan";function ae(t,n){const e=t[ue]||t;F(n,ue,e),t[ce]?t[ce].add(n):F(t,ce,new Set([n]))}function fe(t){const n=new Set;return function t(e){if(!n.has(e)&&oe(e)){n.add(e);const r=e[ce]?Array.from(e[ce]):[];for(const n of r)t(n)}}(t),Array.from(n)}function de(t){return t[ue]||t}function he(){const t=On(yn());return t.getActiveSpan?t.getActiveSpan():$n(Mn())}function le(t,n,e,r,i,o){const s=he();s&&function(t,n,e,r,i,o,s){const c=t[Pn]||(t[Pn]=new Map),u=`${n}:${e}@${i}`,a=c.get(s);if(a){const[,t]=a;c.set(s,[u,{min:Math.min(t.min,r),max:Math.max(t.max,r),count:t.count+=1,sum:t.sum+=r,tags:t.tags}])}else c.set(s,[u,{min:r,max:r,count:1,sum:r,tags:o}])}(s,t,n,e,r,i,o)}let pe=!1;function me(){pe||(pe=!0,_t(ge),Et(ge))}function ge(){const t=he(),n=t&&de(t);if(n){const t="internal_error";n.setStatus({code:Kn,message:t})}}ge.tag="sentry_tracingErrorCallback";const ve="_sentryScope",ye="_sentryIsolationScope";function be(t){return{scope:t[ve],isolationScope:t[ye]}}function _e(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const n=t||function(){const t=Dn();return t&&t.getOptions()}();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}class we{constructor(t={}){this.J=t.traceId||Tt(),this.Y=t.spanId||Tt().substring(16)}spanContext(){return{spanId:this.Y,traceId:this.J,traceFlags:0}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,e){return this}}function Se(t,n,e=(()=>{})){let r;try{r=t()}catch(t){throw n(t),e(),t}return function(t,n,e){if(d(t))return t.then((t=>(e(),t)),(t=>{throw n(t),e(),t}));return e(),t}(r,n,e)}const Ee="production",$e="_frozenDsc";function Te(t,n){F(t,$e,n)}function ke(t,n){const e=n.getOptions(),{publicKey:r}=n.getDsn()||{},i=X({environment:e.environment||Ee,release:e.release,public_key:r,trace_id:t});return n.emit("createDsc",i),i}function Ie(t){const n=Dn();if(!n)return{};const e=ke(ie(t).trace_id||"",n),r=de(t);if(!r)return e;const i=r[$e];if(i)return i;const o=ie(r),s=o.data||{},c=s[Un];null!=c&&(e.sample_rate=`${c}`);const u=s[Fn];return u&&"url"!==u&&(e.transaction=o.description),e.sampled=String(oe(r)),n.emit("createDsc",e),e}function xe(t){if("boolean"==typeof t)return Number(t);const n="string"==typeof t?parseFloat(t):t;return"number"!=typeof n||isNaN(n)||n<0||n>1?void 0:n}function je(t,n,e,r){const i=an(e),o=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,n){n&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||n.name,t.sdk.version=t.sdk.version||n.version,t.sdk.integrations=[...t.sdk.integrations||[],...n.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...n.packages||[]])}(t,e&&e.sdk);const s=function(t,n,e,r){const i=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...n&&{sdk:n},...!!e&&r&&{dsn:L(r)},...i&&{trace:X({...i})}}}(t,i,r,n);delete t.sdkProcessingMetadata;return Zt(s,[[{type:o},t]])}function Ce(t,n,e){const r=he(),i=r&&de(r);i&&i.addEvent(t,{[Xn]:n,[Wn]:e})}function Re(t){if(!t||0===t.length)return;const n={};return t.forEach((t=>{const e=t.attributes||{},r=e[Wn],i=e[Xn];"string"==typeof r&&"number"==typeof i&&(n[t.name]={value:i,unit:r})})),n}class Oe{constructor(t={}){this.J=t.traceId||Tt(),this.Y=t.spanId||Tt().substring(16),this.K=t.startTimestamp||lt(),this.V={},this.setAttributes({[Bn]:"manual",[Hn]:t.op,...t.attributes}),this.Z=t.name,t.parentSpanId&&(this.tt=t.parentSpanId),"sampled"in t&&(this.nt=t.sampled),t.endTimestamp&&(this.et=t.endTimestamp),this.i=[],this.rt=t.isStandalone,this.et&&this.it()}spanContext(){const{Y:t,J:n,nt:e}=this;return{spanId:t,traceId:n,traceFlags:e?Qn:0}}setAttribute(t,n){void 0===n?delete this.V[t]:this.V[t]=n}setAttributes(t){Object.keys(t).forEach((n=>this.setAttribute(n,t[n])))}updateStartTime(t){this.K=ee(t)}setStatus(t){return this.ot=t,this}updateName(t){return this.Z=t,this}end(t){this.et||(this.et=ee(t),this.it())}getSpanJSON(){return X({data:this.V,description:this.Z,op:this.V[Hn],parent_span_id:this.tt,span_id:this.Y,start_timestamp:this.K,status:se(this.ot),timestamp:this.et,trace_id:this.J,origin:this.V[Bn],_metrics_summary:qn(this),profile_id:this.V["sentry.profile_id"],exclusive_time:this.V[Gn],measurements:Re(this.i),is_segment:this.rt&&de(this)===this||void 0,segment_id:this.rt?de(this).spanContext().spanId:void 0})}isRecording(){return!this.et&&!!this.nt}addEvent(t,n,e){const r=Me(n)?n:e||lt(),i=Me(n)?{}:n||{},o={name:t,time:ee(r),attributes:i};return this.i.push(o),this}isStandaloneSpan(){return!!this.rt}it(){const t=Dn();t&&t.emit("spanEnd",this);if(!(this.rt||this===de(this)))return;if(this.rt)return void function(t){const n=Dn();if(!n)return;const e=t[1];if(!e||0===e.length)return void n.recordDroppedEvent("before_send","span");const r=n.getTransport();r&&r.send(t).then(null,(t=>{}))}(function(t,n){const e=Ie(t[0]),r=n&&n.getDsn(),i=n&&n.getOptions().tunnel,o={sent_at:(new Date).toISOString(),...function(t){return!!t.trace_id&&!!t.public_key}(e)&&{trace:e},...!!i&&r&&{dsn:L(r)}},s=n&&n.getOptions().beforeSendSpan,c=s?t=>s(ie(t)):t=>ie(t),u=[];for(const n of t){const t=c(n);t&&u.push(on(t))}return Zt(o,u)}([this],t));const n=this.st();if(n){(be(this).scope||Mn()).captureEvent(n)}}st(){if(!Ae(ie(this)))return;this.Z||(this.Z="");const{scope:t,isolationScope:n}=be(this),e=(t||Mn()).getClient()||Dn();if(!0!==this.nt)return void(e&&e.recordDroppedEvent("sample_rate","transaction"));const r=fe(this).filter((t=>t!==this&&!function(t){return t instanceof Oe&&t.isStandaloneSpan()}(t))).map((t=>ie(t))).filter(Ae),i=this.V[Fn],o={contexts:{trace:Zn(this)},spans:r.length>1e3?r.sort(((t,n)=>t.start_timestamp-n.start_timestamp)).slice(0,1e3):r,start_timestamp:this.K,timestamp:this.et,transaction:this.Z,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,...X({dynamicSamplingContext:Ie(this)})},_metrics_summary:qn(this),...i&&{transaction_info:{source:i}}},s=Re(this.i);return s&&Object.keys(s).length&&(o.measurements=s),o}}function Me(t){return t&&"number"==typeof t||t instanceof Date||Array.isArray(t)}function Ae(t){return!!(t.start_timestamp&&t.timestamp&&t.span_id&&t.trace_id)}const Le="__SENTRY_SUPPRESS_TRACING__";function Ne(t,n){const e=Ue();if(e.startSpanManual)return e.startSpanManual(t,n);const r=Fe(t);return Nn(t.scope,(e=>{const i=Be(e),o=t.onlyIfParent&&!i?new we:qe({parentSpan:i,spanContext:r,forceTransaction:t.forceTransaction,scope:e});function s(){o.end()}return En(e,o),Se((()=>n(o,s)),(()=>{const{status:t}=ie(o);!o.isRecording()||t&&"ok"!==t||o.setStatus({code:Kn,message:"internal_error"})}))}))}function De(t){const n=Ue();if(n.startInactiveSpan)return n.startInactiveSpan(t);const e=Fe(t),r=t.scope||Mn(),i=Be(r);return t.onlyIfParent&&!i?new we:qe({parentSpan:i,spanContext:e,forceTransaction:t.forceTransaction,scope:r})}function Pe(t,n){const e=Ue();return e.withActiveSpan?e.withActiveSpan(t,n):Nn((e=>(En(e,t||void 0),n(e))))}function qe({parentSpan:t,spanContext:n,forceTransaction:e,scope:r}){if(!_e())return new we;const i=An();let o;if(t&&!e)o=function(t,n,e){const{spanId:r,traceId:i}=t.spanContext(),o=!n.getScopeData().sdkProcessingMetadata[Le]&&oe(t),s=o?new Oe({...e,parentSpanId:r,traceId:i,sampled:o}):new we({traceId:i});ae(t,s);const c=Dn();c&&(c.emit("spanStart",s),e.endTimestamp&&c.emit("spanEnd",s));return s}(t,r,n),ae(t,o);else if(t){const e=Ie(t),{traceId:i,spanId:s}=t.spanContext(),c=oe(t);o=He({traceId:i,parentSpanId:s,...n},r,c),Te(o,e)}else{const{traceId:t,dsc:e,parentSpanId:s,sampled:c}={...i.getPropagationContext(),...r.getPropagationContext()};o=He({traceId:t,parentSpanId:s,...n},r,c),e&&Te(o,e)}return function(t,n,e){t&&(F(t,ye,e),F(t,ve,n))}(o,r,i),o}function Fe(t){const n={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const e={...n};return e.startTimestamp=ee(t.startTime),delete e.startTime,e}return n}function Ue(){return On(yn())}function He(t,n,e){const r=Dn(),i=r&&r.getOptions()||{},{name:o="",attributes:s}=t,[c,u]=n.getScopeData().sdkProcessingMetadata[Le]?[!1]:function(t,n){if(!_e(t))return[!1];let e;e="function"==typeof t.tracesSampler?t.tracesSampler(n):void 0!==n.parentSampled?n.parentSampled:void 0!==t.tracesSampleRate?t.tracesSampleRate:1;const r=xe(e);return void 0===r?[!1]:r&&Math.random(){!i&&0===e.size&&s&&(o=Xe,p.end(t))}),c)}function v(t){r=setTimeout((()=>{!i&&s&&(o=We,p.end(t))}),a)}function y(t){i=!0,e.clear(),En(h,l);const n=ie(p),{start_timestamp:r}=n;if(!r)return;(n.data||{})[zn]||p.setAttribute(zn,o),M.log(`[Tracing] Idle span "${n.op}" finished`);const s=fe(p).filter((t=>t!==p));let a=0;s.forEach((n=>{n.isRecording()&&(n.setStatus({code:Kn,message:"cancelled"}),n.end(t));const e=ie(n),{timestamp:r=0,start_timestamp:i=0}=e;r-i<=(u+c)/1e3&&i<=t||(!function(t,n){t[ce]&&t[ce].delete(n)}(p,n),a++)})),a>0&&p.setAttribute("sentry.idle_span_discarded_spans",a)}return p.end=new Proxy(p.end,{apply(t,n,e){f&&f(p);const[r,...i]=e,o=ee(r||lt()),s=fe(p).filter((t=>t!==p));if(!s.length)return y(o),Reflect.apply(t,n,[o,...i]);const c=s.map((t=>ie(t).timestamp)).filter((t=>!!t)),a=c.length?Math.max(...c):void 0,d=ie(p).start_timestamp,h=Math.min(d?d+u/1e3:1/0,Math.max(d||-1/0,Math.min(o,a||1/0)));return y(h),Reflect.apply(t,n,[h,...i])}}),d.on("spanStart",(t=>{if(i||t===p||ie(t).timestamp)return;var n;fe(p).includes(t)&&(n=t.spanContext().spanId,m(),e.set(n,!0),v(lt()+a/1e3))})),d.on("spanEnd",(t=>{var n;i||(n=t.spanContext().spanId,e.has(n)&&e.delete(n),0===e.size&&g(lt()+c/1e3))})),d.on("idleSpanEnableAutoFinish",(t=>{t===p&&(s=!0,g(),e.size&&v())})),n.disableAutoFinish||g(),setTimeout((()=>{i||(p.setStatus({code:Kn,message:"deadline_exceeded"}),o=Ge,p.end())}),u),p}function Ke(t,n,e,r=0){return new Pt(((i,o)=>{const s=t[r];if(null===n||"function"!=typeof s)i(n);else{const c=s({...n},e);d(c)?c.then((n=>Ke(t,n,e,r+1).then(i))).then(null,o):Ke(t,c,e,r+1).then(i).then(null,o)}}))}function Ve(t,n){const{fingerprint:e,span:r,breadcrumbs:i,sdkProcessingMetadata:o}=n;!function(t,n){const{extra:e,tags:r,user:i,contexts:o,level:s,transactionName:c}=n,u=X(e);u&&Object.keys(u).length&&(t.extra={...u,...t.extra});const a=X(r);a&&Object.keys(a).length&&(t.tags={...a,...t.tags});const f=X(i);f&&Object.keys(f).length&&(t.user={...f,...t.user});const d=X(o);d&&Object.keys(d).length&&(t.contexts={...d,...t.contexts});s&&(t.level=s);c&&"transaction"!==t.type&&(t.transaction=c)}(t,n),r&&function(t,n){t.contexts={trace:te(n),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:Ie(n),...t.sdkProcessingMetadata};const e=de(n),r=ie(e).description;r&&!t.transaction&&"transaction"===t.type&&(t.transaction=r)}(t,r),function(t,n){t.fingerprint=t.fingerprint?Rt(t.fingerprint):[],n&&(t.fingerprint=t.fingerprint.concat(n));t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}(t,e),function(t,n){const e=[...t.breadcrumbs||[],...n];t.breadcrumbs=e.length?e:void 0}(t,i),function(t,n){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...n}}(t,o)}function Qe(t,n){const{extra:e,tags:r,user:i,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:a,eventProcessors:f,attachments:d,propagationContext:h,transactionName:l,span:p}=n;Ze(t,"extra",e),Ze(t,"tags",r),Ze(t,"user",i),Ze(t,"contexts",o),Ze(t,"sdkProcessingMetadata",c),s&&(t.level=s),l&&(t.transactionName=l),p&&(t.span=p),u.length&&(t.breadcrumbs=[...t.breadcrumbs,...u]),a.length&&(t.fingerprint=[...t.fingerprint,...a]),f.length&&(t.eventProcessors=[...t.eventProcessors,...f]),d.length&&(t.attachments=[...t.attachments,...d]),t.propagationContext={...t.propagationContext,...h}}function Ze(t,n,e){if(e&&Object.keys(e).length){t[n]={...t[n]};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[n][r]=e[r])}}function tr(t,n,e,r,i,o){const{normalizeDepth:s=3,normalizeMaxBreadth:c=1e3}=t,u={...n,event_id:n.event_id||e.event_id||Tt(),timestamp:n.timestamp||ht()},a=e.integrations||t.integrations.map((t=>t.name));!function(t,n){const{environment:e,release:r,dist:i,maxValueLength:o=250}=n;"environment"in t||(t.environment="environment"in n?e:Ee);void 0===t.release&&void 0!==r&&(t.release=r);void 0===t.dist&&void 0!==i&&(t.dist=i);t.message&&(t.message=p(t.message,o));const s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=p(s.value,o));const c=t.request;c&&c.url&&(c.url=p(c.url,o))}(u,t),function(t,n){n.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...n])}(u,a),void 0===n.type&&function(t,n){const e=E._sentryDebugIds;if(!e)return;let r;const i=nr.get(n);i?r=i:(r=new Map,nr.set(n,r));const o=Object.keys(e).reduce(((t,i)=>{let o;const s=r.get(i);s?o=s:(o=n(i),r.set(i,o));for(let n=o.length-1;n>=0;n--){const r=o[n];if(r.filename){t[r.filename]=e[i];break}}return t}),{});try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{t.filename&&(t.debug_id=o[t.filename])}))}))}catch(t){}}(u,t.stackParser);const f=function(t,n){if(!n)return t;const e=t?t.clone():new kn;return e.update(n),e}(r,e.captureContext);e.mechanism&&jt(u,e.mechanism);const d=i?i.getEventProcessors():[],h=Ln().getScopeData();if(o){Qe(h,o.getScopeData())}if(f){Qe(h,f.getScopeData())}const l=[...e.attachments||[],...h.attachments];l.length&&(e.attachments=l),Ve(u,h);return Ke([...d,...h.eventProcessors],u,e).then((t=>(t&&function(t){const n={};try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{t.debug_id&&(t.abs_path?n[t.abs_path]=t.debug_id:t.filename&&(n[t.filename]=t.debug_id),delete t.debug_id)}))}))}catch(t){}if(0===Object.keys(n).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const e=t.debug_meta.images;Object.keys(n).forEach((t=>{e.push({type:"sourcemap",code_file:t,debug_id:n[t]})}))}(t),"number"==typeof s&&s>0?function(t,n,e){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((t=>({...t,...t.data&&{data:Ot(t.data,n,e)}})))},...t.user&&{user:Ot(t.user,n,e)},...t.contexts&&{contexts:Ot(t.contexts,n,e)},...t.extra&&{extra:Ot(t.extra,n,e)}};t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=Ot(t.contexts.trace.data,n,e)));t.spans&&(r.spans=t.spans.map((t=>({...t,...t.data&&{data:Ot(t.data,n,e)}}))));return r}(t,s,c):t)))}const nr=new WeakMap;function er(t){if(t)return function(t){return t instanceof kn||"function"==typeof t}(t)||function(t){return Object.keys(t).some((t=>rr.includes(t)))}(t)?{captureContext:t}:t}const rr=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function captureException(t,n){return Mn().captureException(t,er(n))}function ir(t,n){return Mn().captureEvent(t,n)}function or(t,n){An().setContext(t,n)}function sr(t){An().setExtras(t)}function cr(t,n){An().setExtra(t,n)}function ur(t){An().setTags(t)}function ar(t,n){An().setTag(t,n)}function fr(t){An().setUser(t)}function dr(){return An().lastEventId()}function hr(t){const n=Dn(),e=An(),r=Mn(),{release:i,environment:o=Ee}=n&&n.getOptions()||{},{userAgent:s}=E.navigator||{},c=_n({release:i,environment:o,user:r.getUser()||e.getUser(),...s&&{userAgent:s},...t}),u=e.getSession();return u&&"ok"===u.status&&wn(u,{status:"exited"}),lr(),e.setSession(c),r.setSession(c),c}function lr(){const t=An(),n=Mn(),e=n.getSession()||t.getSession();e&&function(t,n){let e={};n?e={status:n}:"ok"===t.status&&(e={status:"exited"}),wn(t,e)}(e),pr(),t.setSession(),n.setSession()}function pr(){const t=An(),n=Mn(),e=Dn(),r=n.getSession()||t.getSession();r&&e&&e.captureSession(r)}function mr(t=!1){t?lr():pr()}const gr="7";function vr(t){const n=t.protocol?`${t.protocol}:`:"",e=t.port?`:${t.port}`:"";return`${n}//${t.host}${e}${t.path?`/${t.path}`:""}/api/`}function yr(t,n){return e={sentry_key:t.publicKey,sentry_version:gr,...n&&{sentry_client:`${n.name}/${n.version}`}},Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&");var e}function br(t,n,e){return n||`${function(t){return`${vr(t)}${t.projectId}/envelope/`}(t)}?${yr(t,e)}`}const _r=[];function wr(t){const n=t.defaultIntegrations||[],e=t.integrations;let r;n.forEach((t=>{t.isDefaultInstance=!0})),r=Array.isArray(e)?[...n,...e]:"function"==typeof e?Rt(e(n)):n;const i=function(t){const n={};return t.forEach((t=>{const{name:e}=t,r=n[e];r&&!r.isDefaultInstance&&t.isDefaultInstance||(n[e]=t)})),Object.keys(n).map((t=>n[t]))}(r),o=function(t,n){for(let e=0;e"Debug"===t.name));if(-1!==o){const[t]=i.splice(o,1);i.push(t)}return i}function Sr(t,n){for(const e of n)e&&e.afterAllSetup&&e.afterAllSetup(t)}function Er(t,n,e){if(!e[n.name]){if(e[n.name]=n,-1===_r.indexOf(n.name)&&"function"==typeof n.setupOnce&&(n.setupOnce(),_r.push(n.name)),n.setup&&"function"==typeof n.setup&&n.setup(t),"function"==typeof n.preprocessEvent){const e=n.preprocessEvent.bind(n);t.on("preprocessEvent",((n,r)=>e(n,r,t)))}if("function"==typeof n.processEvent){const e=n.processEvent.bind(n),r=Object.assign(((n,r)=>e(n,r,t)),{id:n.name});t.addEventProcessor(r)}}}class $r{constructor(t){if(this.ct=t,this._integrations={},this.ut=0,this.ft={},this.dt={},this.T=[],t.dsn&&(this.ht=D(t.dsn)),this.ht){const n=br(this.ht,t.tunnel,t.lt?t.lt.sdk:void 0);this.gt=t.transport({tunnel:this.ct.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,e){const r=Tt();if(Ct(t))return r;const i={event_id:r,...n};return this.vt(this.eventFromException(t,i).then((t=>this.yt(t,i,e)))),i.event_id}captureMessage(t,n,e,r){const i={event_id:Tt(),...e},o=c(t)?t:String(t),s=u(t)?this.eventFromMessage(o,n,i):this.eventFromException(t,i);return this.vt(s.then((t=>this.yt(t,i,r)))),i.event_id}captureEvent(t,n,e){const r=Tt();if(n&&n.originalException&&Ct(n.originalException))return r;const i={event_id:r,...n},o=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this.vt(this.yt(t,i,o||e)),i.event_id}captureSession(t){"string"!=typeof t.release||(this.sendSession(t),wn(t,{init:!1}))}getDsn(){return this.ht}getOptions(){return this.ct}getSdkMetadata(){return this.ct.lt}getTransport(){return this.gt}flush(t){const n=this.gt;return n?(this.emit("flush"),this.bt(t).then((e=>n.flush(t).then((t=>e&&t))))):Nt(!0)}close(t){return this.flush(t).then((t=>(this.getOptions().enabled=!1,this.emit("close"),t)))}getEventProcessors(){return this.T}addEventProcessor(t){this.T.push(t)}init(){this._t()&&this.wt()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];Er(this,t,this._integrations),n||Sr(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let e=je(t,this.ht,this.ct.lt,this.ct.tunnel);for(const t of n.attachments||[])e=tn(e,sn(t));const r=this.sendEnvelope(e);r&&r.then((n=>this.emit("afterSendEvent",t,n)),null)}sendSession(t){const n=function(t,n,e,r){const i=an(e);return Zt({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&n&&{dsn:L(n)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this.ht,this.ct.lt,this.ct.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,e){if(this.ct.sendClientReports){const e=`${t}:${n}`;this.ft[e]=this.ft[e]+1||1}}on(t,n){this.dt[t]||(this.dt[t]=[]),this.dt[t].push(n)}emit(t,...n){this.dt[t]&&this.dt[t].forEach((t=>t(...n)))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._t()&&this.gt?this.gt.send(t).then(null,(t=>t)):Nt({})}wt(){const{integrations:t}=this.ct;this._integrations=function(t,n){const e={};return n.forEach((n=>{n&&Er(t,n,e)})),e}(this,t),Sr(this,t)}St(t,n){let e=!1,r=!1;const i=n.exception&&n.exception.values;if(i){r=!0;for(const t of i){const n=t.mechanism;if(n&&!1===n.handled){e=!0;break}}}const o="ok"===t.status;(o&&0===t.errors||o&&e)&&(wn(t,{...e&&{status:"crashed"},errors:t.errors||Number(r||e)}),this.captureSession(t))}bt(t){return new Pt((n=>{let e=0;const r=setInterval((()=>{0==this.ut?(clearInterval(r),n(!0)):(e+=1,t&&e>=t&&(clearInterval(r),n(!1)))}),1)}))}_t(){return!1!==this.getOptions().enabled&&void 0!==this.gt}Et(t,n,e,r=An()){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||r.setLastEventId(t.event_id||n.event_id),tr(i,t,n,e,this,r).then((t=>{if(null===t)return t;const n={...r.getPropagationContext(),...e?e.getPropagationContext():void 0};if(!(t.contexts&&t.contexts.trace)&&n){const{traceId:e,spanId:r,parentSpanId:i,dsc:o}=n;t.contexts={trace:X({trace_id:e,span_id:r,parent_span_id:i}),...t.contexts};const s=o||ke(e,this);t.sdkProcessingMetadata={dynamicSamplingContext:s,...t.sdkProcessingMetadata}}return t}))}yt(t,n={},e){return this.$t(t,n,e).then((t=>t.event_id),(t=>{}))}$t(t,n,e){const r=this.getOptions(),{sampleRate:i}=r,o=kr(t),s=Tr(t),c=t.type||"error",u=`before send for type \`${c}\``,f=void 0===i?void 0:xe(i);if(s&&"number"==typeof f&&Math.random()>f)return this.recordDroppedEvent("sample_rate","error",t),Dt(new P(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const h="replay_event"===c?"replay":c,l=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this.Et(t,n,e,l).then((e=>{if(null===e)throw this.recordDroppedEvent("event_processor",h,t),new P("An event processor returned `null`, will not send event.","log");if(n.data&&!0===n.data.__sentry__)return e;const i=function(t,n,e){const{beforeSend:r,beforeSendTransaction:i,beforeSendSpan:o}=t;if(Tr(n)&&r)return r(n,e);if(kr(n)){if(n.spans&&o){const t=[];for(const e of n.spans){const n=o(e);n&&t.push(n)}n.spans=t}if(i)return i(n,e)}return n}(r,e,n);return function(t,n){const e=`${n} must return \`null\` or a valid event.`;if(d(t))return t.then((t=>{if(!a(t)&&null!==t)throw new P(e);return t}),(t=>{throw new P(`${n} rejected with ${t}`)}));if(!a(t)&&null!==t)throw new P(e);return t}(i,u)})).then((r=>{if(null===r)throw this.recordDroppedEvent("before_send",h,t),new P(`${u} returned \`null\`, will not send event.`,"log");const i=e&&e.getSession();!o&&i&&this.St(i,r);const s=r.transaction_info;if(o&&s&&r.transaction!==t.transaction){const t="custom";r.transaction_info={...s,source:t}}return this.sendEvent(r,n),r})).then(null,(t=>{if(t instanceof P)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new P(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)}))}vt(t){this.ut++,t.then((t=>(this.ut--,t)),(t=>(this.ut--,t)))}Tt(){const t=this.ft;return this.ft={},Object.keys(t).map((n=>{const[e,r]=n.split(":");return{reason:e,category:r,quantity:t[n]}}))}}function Tr(t){return void 0===t.type}function kr(t){return"transaction"===t.type}function Ir(t){Mn().setClient(t)}const xr=64;function jr(t,n,e=qt(t.bufferSize||xr)){let r={};return{send:function(i){const o=[];if(nn(i,((n,e)=>{const i=un(e);if(function(t,n,e=Date.now()){return function(t,n){return t[n]||t.all||0}(t,n)>e}(r,i)){const r=Cr(n,e);t.recordDroppedEvent("ratelimit_backoff",i,r)}else o.push(n)})),0===o.length)return Nt({});const s=Zt(i[0],o),c=n=>{nn(s,((e,r)=>{const i=Cr(e,r);t.recordDroppedEvent(n,un(r),i)}))};return e.add((()=>n({body:rn(s)}).then((t=>(r=dn(r,t),t)),(t=>{throw c("network_error"),t})))).then((t=>t),(t=>{if(t instanceof P)return c("queue_overflow"),Nt({});throw t}))},flush:t=>e.drain(t)}}function Cr(t,n){if("event"===n||"transaction"===n)return Array.isArray(t)?t[1]:void 0}const Rr=100;function Or(t,n){const e=Dn(),r=An();if(!e)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=Rr}=e.getOptions();if(o<=0)return;const s={timestamp:ht(),...t},c=i?O((()=>i(s,n))):s;null!==c&&(e.emit&&e.emit("beforeAddBreadcrumb",c,n),r.addBreadcrumb(c,o))}let Mr;const Ar=new WeakMap,Lr=()=>({name:"FunctionToString",setupOnce(){Mr=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=H(this),e=Ar.has(Dn())&&void 0!==n?n:this;return Mr.apply(e,t)}}catch(t){}},setup(t){Ar.set(t,!0)}}),Nr=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],Dr=(t={})=>({name:"InboundFilters",processEvent(n,e,r){const i=r.getOptions(),o=function(t={},n={}){return{allowUrls:[...t.allowUrls||[],...n.allowUrls||[]],denyUrls:[...t.denyUrls||[],...n.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...n.ignoreErrors||[],...t.disableErrorDefaults?[]:Nr],ignoreTransactions:[...t.ignoreTransactions||[],...n.ignoreTransactions||[]],ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(t,i);return function(t,n){if(n.ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(t){}return!1}(t))return!0;if(function(t,n){if(t.type||!n||!n.length)return!1;return function(t){const n=[];t.message&&n.push(t.message);let e;try{e=t.exception.values[t.exception.values.length-1]}catch(t){}e&&e.value&&(n.push(e.value),e.type&&n.push(`${e.type}: ${e.value}`));return n}(t).some((t=>v(t,n)))}(t,n.ignoreErrors))return!0;if(function(t){if(t.type)return!1;if(!t.exception||!t.exception.values||0===t.exception.values.length)return!1;return!t.message&&!t.exception.values.some((t=>t.stacktrace||t.type&&"Error"!==t.type||t.value))}(t))return!0;if(function(t,n){if("transaction"!==t.type||!n||!n.length)return!1;const e=t.transaction;return!!e&&v(e,n)}(t,n.ignoreTransactions))return!0;if(function(t,n){if(!n||!n.length)return!1;const e=Pr(t);return!!e&&v(e,n)}(t,n.denyUrls))return!0;if(!function(t,n){if(!n||!n.length)return!0;const e=Pr(t);return!e||v(e,n)}(t,n.allowUrls))return!0;return!1}(n,o)?null:n}});function Pr(t){try{let n;try{n=t.exception.values[0].stacktrace.frames}catch(t){}return n?function(t=[]){for(let n=t.length-1;n>=0;n--){const e=t[n];if(e&&""!==e.filename&&"[native code]"!==e.filename)return e.filename||null}return null}(n):null}catch(t){return null}}const qr=()=>{let t;return{name:"Dedupe",processEvent(n){if(n.type)return n;try{if(function(t,n){if(!n)return!1;if(function(t,n){const e=t.message,r=n.message;if(!e&&!r)return!1;if(e&&!r||!e&&r)return!1;if(e!==r)return!1;if(!Ur(t,n))return!1;if(!Fr(t,n))return!1;return!0}(t,n))return!0;if(function(t,n){const e=Hr(n),r=Hr(t);if(!e||!r)return!1;if(e.type!==r.type||e.value!==r.value)return!1;if(!Ur(t,n))return!1;if(!Fr(t,n))return!1;return!0}(t,n))return!0;return!1}(n,t))return null}catch(t){}return t=n}}};function Fr(t,n){let e=nt(t),r=nt(n);if(!e&&!r)return!0;if(e&&!r||!e&&r)return!1;if(r.length!==e.length)return!1;for(let t=0;tnew WeakMap)),r=e.get(t);if(r)return r;const i=new n(t);return t.on("flush",(()=>i.flush())),t.on("close",(()=>i.close())),e.set(t,i),i}function Wr(t,n,e,r,i={}){const o=i.client||Dn();if(!o)return;const s=he(),c=s?de(s):void 0,u=c&&ie(c).description,{unit:a,tags:f,timestamp:d}=i,{release:h,environment:l}=o.getOptions(),p={};h&&(p.release=h),l&&(p.environment=l),u&&(p.transaction=u);zr(o,t).add(n,e,r,a,{...p,...f},d)}function Xr(t,n,e,r){Wr(t,Br,n,Jr(e),r)}const Gr={increment:function(t,n,e=1,r){Wr(t,"c",n,Jr(e),r)},distribution:Xr,set:function(t,n,e,r){Wr(t,"s",n,e,r)},gauge:function(t,n,e,r){Wr(t,"g",n,Jr(e),r)},timing:function(t,n,e,r="second",i){if("function"==typeof e){const r=lt();return Ne({op:"metrics.timing",name:n,startTime:r,onlyIfParent:!0},(o=>Se((()=>e()),(()=>{}),(()=>{const e=lt();Xr(t,n,e-r,{...i,unit:"second"}),o.end(e)}))))}Xr(t,n,e,{...i,unit:r})},getMetricsAggregatorForClient:zr};function Jr(t){return"string"==typeof t?parseInt(t):t}function Yr(t){return t.replace(/[^\w\-./]+/gi,"")}const Kr=[["\n","\\n"],["\r","\\r"],["\t","\\t"],["\\","\\\\"],["|","\\u{7c}"],[",","\\u{2c}"]];function Vr(t){return[...t].reduce(((t,n)=>t+function(t){for(const[n,e]of Kr)if(t===n)return e;return t}(n)),"")}function Qr(t,n){M.log(`Flushing aggregated metrics, number of metrics: ${n.length}`);const e=function(t,n,e,r){const i={sent_at:(new Date).toISOString()};e&&e.sdk&&(i.sdk={name:e.sdk.name,version:e.sdk.version});r&&n&&(i.dsn=L(n));const o=function(t){const n=function(t){let n="";for(const e of t){const t=Object.entries(e.tags),r=t.length>0?`|#${t.map((([t,n])=>`${t}:${n}`)).join(",")}`:"";n+=`${e.name}@${e.unit}:${e.metric}|${e.metricType}${r}|T${e.timestamp}\n`}return n}(t);return[{type:"statsd",length:n.length},n]}(t);return Zt(i,[o])}(n,t.getDsn(),t.getSdkMetadata(),t.getOptions().tunnel);t.sendEnvelope(e)}const Zr={c:class{constructor(t){this.v=t}get weight(){return 1}add(t){this.v+=t}toString(){return`${this.v}`}},g:class{constructor(t){this.kt=t,this.It=t,this.xt=t,this.jt=t,this.Ct=1}get weight(){return 5}add(t){this.kt=t,tthis.xt&&(this.xt=t),this.jt+=t,this.Ct++}toString(){return`${this.kt}:${this.It}:${this.xt}:${this.jt}:${this.Ct}`}},[Br]:class{constructor(t){this.v=[t]}get weight(){return this.v.length}add(t){this.v.push(t)}toString(){return this.v.join(":")}},s:class{constructor(t){this.first=t,this.v=new Set([t])}get weight(){return this.v.size}add(t){this.v.add(t)}toString(){return Array.from(this.v).map((t=>"string"==typeof t?function(t){let n=0;for(let e=0;e>>0}(t):t)).join(":")}}};class ti{constructor(t){this.F=t,this.Rt=new Map,this.Ot=setInterval((()=>this.flush()),5e3)}add(t,n,e,r="none",i={},o=lt()){const s=Math.floor(o),c=n.replace(/[^\w\-.]+/gi,"_");const u=function(t){const n={};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[Yr(e)]=Vr(String(t[e])));return n}(i),a=function(t){return t.replace(/[^\w]+/gi,"_")}(r),f=function(t,n,e,r){return`${t}${n}${e}${Object.entries(X(r)).sort(((t,n)=>t[0].localeCompare(n[0])))}`}(t,c,a,u);let d=this.Rt.get(f);const h=d&&"s"===t?d.metric.weight:0;d?(d.metric.add(e),d.timestamp0&&t.setAttribute("http.response_content_length",n)}}else n.error&&t.setStatus({code:Kn,message:"internal_error"});t.end()}(e,t),delete r[n]))}const s=Mn(),c=Dn(),{method:u,url:a}=t.fetchData,f=function(t){try{return new URL(t).href}catch(t){return}}(a),d=f?Ft(f).host:void 0,l=!!he(),p=o&&l?De({name:`${u} ${a}`,attributes:{url:a,type:"fetch","http.method":u,"http.url":f,"server.address":d,[Bn]:i,[Hn]:"http.client"}}):new we;if(t.fetchData.__span=p.spanContext().spanId,r[p.spanContext().spanId]=p,e(t.fetchData.url)&&c){const n=t.args[0];t.args[1]=t.args[1]||{};const e=t.args[1];e.headers=function(t,n,e,r,i){const o=An(),{traceId:s,spanId:c,sampled:u,dsc:a}={...o.getPropagationContext(),...e.getPropagationContext()},f=i?ne(i):Qt(s,c,u),d=Jt(a||(i?Ie(i):ke(s,n))),l=r.headers||("undefined"!=typeof Request&&h(t,Request)?t.headers:void 0);if(l){if("undefined"!=typeof Headers&&h(l,Headers)){const t=new Headers(l);return t.append("sentry-trace",f),d&&t.append(Bt,d),t}if(Array.isArray(l)){const t=[...l,["sentry-trace",f]];return d&&t.push([Bt,d]),t}{const t="baggage"in l?l.baggage:void 0,n=[];return Array.isArray(t)?n.push(...t):t&&n.push(t),d&&n.push(d),{...l,"sentry-trace":f,baggage:n.length>0?n.join(","):void 0}}}return{"sentry-trace":f,baggage:d}}(n,c,s,e,_e()&&l?p:void 0)}return p}const ei=function(){return{bindClient(t){Mn().setClient(t)},withScope:Nn,getClient:()=>Dn(),getScope:Mn,getIsolationScope:An,captureException:(t,n)=>Mn().captureException(t,n),captureMessage:(t,n,e)=>Mn().captureMessage(t,n,e),captureEvent:ir,addBreadcrumb:Or,setUser:fr,setTags:ur,setTag:ar,setExtra:cr,setExtras:sr,setContext:or,getIntegration(t){const n=Dn();return n&&n.getIntegrationByName(t.id)||null},startSession:hr,endSession:lr,captureSession(t){if(t)return lr();!function(){const t=Mn(),n=Dn(),e=t.getSession();n&&e&&n.captureSession(e)}()}}};const ri=E;let ii=0;function oi(){return ii>0}function si(t,n={},e){if("function"!=typeof t)return t;try{const n=t.__sentry_wrapped__;if(n)return n;if(H(t))return t}catch(n){return t}const sentryWrapped=function(){const r=Array.prototype.slice.call(arguments);try{e&&"function"==typeof e&&e.apply(this,arguments);const i=r.map((t=>si(t,n)));return t.apply(this,i)}catch(t){throw ii++,setTimeout((()=>{ii--})),Nn((e=>{e.addEventProcessor((t=>(n.mechanism&&(xt(t,void 0,void 0),jt(t,n.mechanism)),t.extra={...t.extra,arguments:r},t))),captureException(t)})),t}};try{for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(sentryWrapped[n]=t[n])}catch(t){}U(sentryWrapped,t),F(t,"__sentry_wrapped__",sentryWrapped);try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch(t){}return sentryWrapped}function ci(t,n){const e=fi(t,n),r={type:n&&n.name,value:hi(n)};return e.length&&(r.stacktrace={frames:e}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function ui(t,n,e,r){const i=Dn(),o=i&&i.getOptions().normalizeDepth,s=function(t){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const e=t[n];if(e instanceof Error)return e}return}(n),c={__serialized__:Mt(n,o)};if(s)return{exception:{values:[ci(t,s)]},extra:c};const u={exception:{values:[{type:f(n)?n.constructor.name:r?"UnhandledRejection":"Error",value:vi(n,{isUnhandledRejection:r})}]},extra:c};if(e){const n=fi(t,e);n.length&&(u.exception.values[0].stacktrace={frames:n})}return u}function ai(t,n){return{exception:{values:[ci(t,n)]}}}function fi(t,n){const e=n.stacktrace||n.stack||"",r=function(t){if(t&&di.test(t.message))return 1;return 0}(n),i=function(t){if("number"==typeof t.framesToPop)return t.framesToPop;return 0}(n);try{return t(e,r,i)}catch(t){}return[]}const di=/Minified React error #\d+;/i;function hi(t){const n=t&&t.message;return n?n.error&&"string"==typeof n.error.message?n.error.message:n:"No error message"}function li(t,n,e,r){const i=mi(t,n,e&&e.syntheticException||void 0,r);return jt(i),i.level="error",e&&e.event_id&&(i.event_id=e.event_id),Nt(i)}function pi(t,n,e="info",r,i){const o=gi(t,n,r&&r.syntheticException||void 0,i);return o.level=e,r&&r.event_id&&(o.event_id=r.event_id),Nt(o)}function mi(t,n,s,c,u){let d;if(i(n)&&n.error){return ai(t,n.error)}if(o(n)||r(n,"DOMException")){const e=n;if("stack"in n)d=ai(t,n);else{const n=e.name||(o(e)?"DOMError":"DOMException"),r=e.message?`${n}: ${e.message}`:n;d=gi(t,r,s,c),xt(d,r)}return"code"in e&&(d.tags={...d.tags,"DOMException.code":`${e.code}`}),d}if(e(n))return ai(t,n);if(a(n)||f(n)){return d=ui(t,n,s,u),jt(d,{synthetic:!0}),d}return d=gi(t,n,s,c),xt(d,`${n}`,void 0),jt(d,{synthetic:!0}),d}function gi(t,n,e,r){const i={};if(r&&e){const r=fi(t,e);r.length&&(i.exception={values:[{value:n,stacktrace:{frames:r}}]})}if(c(n)){const{__sentry_template_string__:t,__sentry_template_values__:e}=n;return i.logentry={message:t,params:e},i}return i.message=n,i}function vi(t,{isUnhandledRejection:n}){const e=function(t,n=40){const e=Object.keys(B(t));if(e.sort(),!e.length)return"[object has no keys]";if(e[0].length>=n)return p(e[0],n);for(let t=e.length;t>0;t--){const r=e.slice(0,t).join(", ");if(!(r.length>n))return t===e.length?r:p(r,n)}return""}(t),r=n?"promise rejection":"exception";if(i(t))return`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``;if(f(t)){return`Event \`${function(t){try{const n=Object.getPrototypeOf(t);return n?n.constructor.name:void 0}catch(t){}}(t)}\` (type=${t.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${e}`}function yi(t,{metadata:n,tunnel:e,dsn:r}){const i={event_id:t.event_id,sent_at:(new Date).toISOString(),...n&&n.sdk&&{sdk:{name:n.sdk.name,version:n.sdk.version}},...!!e&&!!r&&{dsn:L(r)}},o=function(t){return[{type:"user_report"},t]}(t);return Zt(i,[o])}class bi extends $r{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t};!function(t,n,e=[n],r="npm"){const i=t.lt||{};i.sdk||(i.sdk={name:`sentry.javascript.${n}`,packages:e.map((t=>({name:`${r}:@sentry/${t}`,version:S}))),version:S}),t.lt=i}(n,"browser",["browser"],ri.SENTRY_SDK_SOURCE||"npm"),super(n),n.sendClientReports&&ri.document&&ri.document.addEventListener("visibilitychange",(()=>{"hidden"===ri.document.visibilityState&&this.Mt()}))}eventFromException(t,n){return li(this.ct.stackParser,t,n,this.ct.attachStacktrace)}eventFromMessage(t,n="info",e){return pi(this.ct.stackParser,t,n,e,this.ct.attachStacktrace)}captureUserFeedback(t){if(!this._t())return;const n=yi(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}Et(t,n,e){return t.platform=t.platform||"javascript",super.Et(t,n,e)}Mt(){const t=this.Tt();if(0===t.length)return;if(!this.ht)return;const n=(e=t,Zt((r=this.ct.tunnel&&L(this.ht))?{dsn:r}:{},[[{type:"client_report"},{timestamp:i||ht(),discarded_events:e}]]));var e,r,i;this.sendEnvelope(n)}}const _i=(t,n,e,r)=>{let i,o;return s=>{n.value>=0&&(s||r)&&(o=n.value-(i||0),(o||void 0===i)&&(i=n.value,n.delta=o,n.rating=((t,n)=>t>n[1]?"poor":t>n[0]?"needs-improvement":"good")(n.value,e),t(n)))}},wi=E,Si=()=>wi.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Ei=()=>{const t=Si();return t&&t.activationStart||0},$i=(t,n)=>{const e=Si();let r="navigate";e&&(wi.document&&wi.document.prerendering||Ei()>0?r="prerender":wi.document&&wi.document.wasDiscarded?r="restore":e.type&&(r=e.type.replace(/_/g,"-")));return{name:t,value:void 0===n?-1:n,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},Ti=(t,n,e)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver((t=>{Promise.resolve().then((()=>{n(t.getEntries())}))}));return r.observe(Object.assign({type:t,buffered:!0},e||{})),r}}catch(t){}},ki=t=>{const n=n=>{("pagehide"===n.type||wi.document&&"hidden"===wi.document.visibilityState)&&t(n)};wi.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))},Ii=t=>{let n=!1;return e=>{n||(t(e),n=!0)}};let xi=-1;const ji=t=>{"hidden"===wi.document.visibilityState&&xi>-1&&(xi="visibilitychange"===t.type?t.timeStamp:0,removeEventListener("visibilitychange",ji,!0),removeEventListener("prerenderingchange",ji,!0))},Ci=()=>(wi.document&&xi<0&&(xi="hidden"!==wi.document.visibilityState||wi.document.prerendering?1/0:0,addEventListener("visibilitychange",ji,!0),addEventListener("prerenderingchange",ji,!0)),{get firstHiddenTime(){return xi}}),Ri=t=>{wi.document&&wi.document.prerendering?addEventListener("prerenderingchange",(()=>t()),!0):t()},Oi=[1800,3e3],Mi=[.1,.25],Ai=(t,n={})=>{((t,n={})=>{Ri((()=>{const e=Ci(),r=$i("FCP");let i;const o=Ti("paint",(t=>{t.forEach((t=>{"first-contentful-paint"===t.name&&(o.disconnect(),t.startTime{const e=$i("CLS",0);let r,i=0,o=[];const s=t=>{t.forEach((t=>{if(!t.hadRecentInput){const n=o[0],e=o[o.length-1];i&&t.startTime-e.startTime<1e3&&t.startTime-n.startTime<5e3?(i+=t.value,o.push(t)):(i=t.value,o=[t])}})),i>e.value&&(e.value=i,e.entries=o,r())},c=Ti("layout-shift",s);c&&(r=_i(t,e,Mi,n.reportAllChanges),ki((()=>{s(c.takeRecords()),r(!0)})),setTimeout(r,0))})))},Li=[100,300],Ni=(t,n={})=>{Ri((()=>{const e=Ci(),r=$i("FID");let i;const o=t=>{t.startTime{t.forEach(o)},c=Ti("first-input",s);i=_i(t,r,Li,n.reportAllChanges),c&&ki(Ii((()=>{s(c.takeRecords()),c.disconnect()})))}))};let Di=0,Pi=1/0,qi=0;const Fi=t=>{t.forEach((t=>{t.interactionId&&(Pi=Math.min(Pi,t.interactionId),qi=Math.max(qi,t.interactionId),Di=qi?(qi-Pi)/7+1:0)}))};let Ui;const Hi=()=>{"interactionCount"in performance||Ui||(Ui=Ti("event",Fi,{type:"event",buffered:!0,durationThreshold:0}))},Bi=[200,500],zi=()=>(Ui?Di:performance.interactionCount||0)-0,Wi=[],Xi={},Gi=t=>{const n=Wi[Wi.length-1],e=Xi[t.interactionId];if(e||Wi.length<10||t.duration>n.latency){if(e)e.entries.push(t),e.latency=Math.max(e.latency,t.duration);else{const n={id:t.interactionId,latency:t.duration,entries:[t]};Xi[n.id]=n,Wi.push(n)}Wi.sort(((t,n)=>n.latency-t.latency)),Wi.splice(10).forEach((t=>{delete Xi[t.id]}))}},Ji=(t,n={})=>{Ri((()=>{Hi();const e=$i("INP");let r;const i=t=>{t.forEach((t=>{if(t.interactionId&&Gi(t),"first-input"===t.entryType){!Wi.some((n=>n.entries.some((n=>t.duration===n.duration&&t.startTime===n.startTime))))&&Gi(t)}}));const n=(()=>{const t=Math.min(Wi.length-1,Math.floor(zi()/50));return Wi[t]})();n&&n.latency!==e.value&&(e.value=n.latency,e.entries=n.entries,r())},o=Ti("event",i,{durationThreshold:null!=n.durationThreshold?n.durationThreshold:40});r=_i(t,e,Bi,n.reportAllChanges),o&&("PerformanceEventTiming"in wi&&"interactionId"in PerformanceEventTiming.prototype&&o.observe({type:"first-input",buffered:!0}),ki((()=>{i(o.takeRecords()),e.value<0&&zi()>0&&(e.value=0,e.entries=[]),r(!0)})))}))},Yi=[2500,4e3],Ki={},Vi=(t,n={})=>{Ri((()=>{const e=Ci(),r=$i("LCP");let i;const o=t=>{const n=t[t.length-1];n&&n.startTime{Ki[r.id]||(o(s.takeRecords()),s.disconnect(),Ki[r.id]=!0,i(!0))}));["keydown","click"].forEach((t=>{wi.document&&addEventListener(t,(()=>setTimeout(e,0)),!0)})),ki(e)}}))},Qi=[800,1800],Zi=t=>{wi.document&&wi.document.prerendering?Ri((()=>Zi(t))):wi.document&&"complete"!==wi.document.readyState?addEventListener("load",(()=>Zi(t)),!0):setTimeout(t,0)},to=(t,n={})=>{const e=$i("TTFB"),r=_i(t,e,Qi,n.reportAllChanges);Zi((()=>{const t=Si();if(t){const n=t.responseStart;if(n<=0||n>performance.now())return;e.value=Math.max(n-Ei(),0),e.entries=[t],r(!0)}}))},no={},eo={};let ro,io,oo,so,co;function uo(t,n){return vo(t,n),eo[t]||(!function(t){const n={};"event"===t&&(n.durationThreshold=0);Ti(t,(n=>{ao(t,{entries:n})}),n)}(t),eo[t]=!0),yo(t,n)}function ao(t,n){const e=no[t];if(e&&e.length)for(const t of e)try{t(n)}catch(t){}}function fo(){return Ai((t=>{ao("cls",{metric:t}),ro=t}),{reportAllChanges:!0})}function ho(){return Ni((t=>{ao("fid",{metric:t}),io=t}))}function lo(){return Vi((t=>{ao("lcp",{metric:t}),oo=t}),{reportAllChanges:!0})}function po(){return to((t=>{ao("ttfb",{metric:t}),so=t}))}function mo(){return Ji((t=>{ao("inp",{metric:t}),co=t}))}function go(t,n,e,r,i=!1){let o;return vo(t,n),eo[t]||(o=e(),eo[t]=!0),r&&n({metric:r}),yo(t,n,i?o:void 0)}function vo(t,n){no[t]=no[t]||[],no[t].push(n)}function yo(t,n,e){return()=>{e&&e();const r=no[t];if(!r)return;const i=r.indexOf(n);-1!==i&&r.splice(i,1)}}function bo(t){return"number"==typeof t&&isFinite(t)}function _o(t,n,e,{...r}){const i=ie(t).start_timestamp;return i&&i>n&&"function"==typeof t.updateStartTime&&t.updateStartTime(n),Pe(t,(()=>{const t=De({startTime:n,...r});return t&&t.end(e),t}))}function wo(){return wi&&wi.addEventListener&&wi.performance}function So(t){return t/1e3}const Eo=2147483647;let $o,To,ko=0,Io={};function xo(){const t=wo();if(t&&pt){t.mark&&wi.performance.mark("sentry-tracing-init");const n=go("fid",(({metric:t})=>{const n=t.entries[t.entries.length-1];if(!n)return;const e=So(pt),r=So(n.startTime);Io.fid={value:t.value,unit:"millisecond"},Io["mark.fid"]={value:e+r,unit:"second"}}),ho,io),e=function(t,n=!1){return go("cls",t,fo,ro,n)}((({metric:t})=>{const n=t.entries[t.entries.length-1];n&&(Io.cls={value:t.value,unit:""},To=n)}),!0),r=function(t,n=!1){return go("lcp",t,lo,oo,n)}((({metric:t})=>{const n=t.entries[t.entries.length-1];n&&(Io.lcp={value:t.value,unit:"millisecond"},$o=n)}),!0),i=function(t){return go("ttfb",t,po,so)}((({metric:t})=>{t.entries[t.entries.length-1]&&(Io.ttfb={value:t.value,unit:"millisecond"})}));return()=>{n(),e(),r(),i()}}return()=>{}}function jo(t){const n=wo();if(!n||!wi.performance.getEntries||!pt)return;const e=So(pt),r=n.getEntries(),{op:i,start_timestamp:o}=ie(t);if(r.slice(ko).forEach((n=>{const r=So(n.startTime),s=So(n.duration);if(!("navigation"===i&&o&&e+r{Co(t,n,r,e)})),Co(t,n,"secureConnection",e,"TLS/SSL","connectEnd"),Co(t,n,"fetch",e,"cache","domainLookupStart"),Co(t,n,"domainLookup",e,"DNS"),function(t,n,e){n.responseEnd&&(_o(t,e+So(n.requestStart),e+So(n.responseEnd),{op:"browser",name:"request",attributes:{[Bn]:"auto.ui.browser.metrics"}}),_o(t,e+So(n.responseStart),e+So(n.responseEnd),{op:"browser",name:"response",attributes:{[Bn]:"auto.ui.browser.metrics"}}))}(t,n,e)}(t,n,e);break;case"mark":case"paint":case"measure":{!function(t,n,e,r,i){const o=i+e,s=o+r;_o(t,o,s,{name:n.name,op:n.entryType,attributes:{[Bn]:"auto.resource.browser.metrics"}})}(t,n,r,s,e);const i=Ci(),o=n.startTime{if(!Io[t]||!o||e>=o)return;const n=Io[t].value,r=e+So(n),i=Math.abs(1e3*(r-o));Io[t].value=i}));const n=Io["mark.fid"];n&&Io.fid&&(_o(t,n.value,n.value+So(Io.fid.value),{name:"first input delay",op:"ui.action",attributes:{[Bn]:"auto.ui.browser.metrics"}}),delete Io["mark.fid"]),"fcp"in Io||delete Io.cls,Object.keys(Io).forEach((t=>{Ce(t,Io[t].value,Io[t].unit)})),function(t){$o&&($o.element&&t.setAttribute("lcp.element",I($o.element)),$o.id&&t.setAttribute("lcp.id",$o.id),$o.url&&t.setAttribute("lcp.url",$o.url.trim().slice(0,200)),t.setAttribute("lcp.size",$o.size));To&&To.sources&&To.sources.forEach(((n,e)=>t.setAttribute(`cls.source.${e+1}`,I(n.node))))}(t)}$o=void 0,To=void 0,Io={}}function Co(t,n,e,r,i,o){const s=o?n[o]:n[`${e}End`],c=n[`${e}Start`];c&&s&&_o(t,r+So(c),r+So(s),{op:"browser",name:i||e,attributes:{[Bn]:"auto.ui.browser.metrics"}})}function Ro(t,n,e,r){const i=n[e];null!=i&&i{const e=wi[n]&&wi[n].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(q(e,"addEventListener",(function(n){return function(e,r,i){if("click"===e||"keypress"==e)try{const r=this,o=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},s=o[e]=o[e]||{refCount:0};if(!s.handler){const r=Po(t);s.handler=r,n.call(this,e,r,i)}s.refCount++}catch(t){}return n.call(this,e,r,i)}})),q(e,"removeEventListener",(function(t){return function(n,e,r){if("click"===n||"keypress"==n)try{const e=this,i=e.__sentry_instrumentation_handlers__||{},o=i[n];o&&(o.refCount--,o.refCount<=0&&(t.call(this,n,o.handler,r),o.handler=void 0,delete i[n]),0===Object.keys(i).length&&delete e.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,n,e,r)}})))}))}function Po(t,n=!1){return e=>{if(!e||e._sentryCaptured)return;const r=function(t){try{return t.target}catch(t){return null}}(e);if(function(t,n){return"keypress"===t&&(!n||!n.tagName||"INPUT"!==n.tagName&&"TEXTAREA"!==n.tagName&&!n.isContentEditable)}(e.type,r))return;F(e,"_sentryCaptured",!0),r&&!r._sentryId&&F(r,"_sentryId",Tt());const i="keypress"===e.type?"input":e.type;if(!function(t){if(t.type!==Ao)return!1;try{if(!t.target||t.target._sentryId!==Lo)return!1}catch(t){}return!0}(e)){t({event:e,name:i,global:n}),Ao=e.type,Lo=r?r._sentryId:void 0}clearTimeout(Mo),Mo=wi.setTimeout((()=>{Lo=void 0,Ao=void 0}),Oo)}}function qo(t){const n="history";it(n,t),ot(n,Fo)}function Fo(){if(!function(){const t=ln.chrome,n=t&&t.app&&t.app.runtime,e="history"in ln&&!!ln.history.pushState&&!!ln.history.replaceState;return!n&&e}())return;const t=wi.onpopstate;function n(t){return function(...n){const e=n.length>2?n[2]:void 0;if(e){const t=No,n=String(e);No=n;st("history",{from:t,to:n})}return t.apply(this,n)}}wi.onpopstate=function(...n){const e=wi.location.href,r=No;No=e;if(st("history",{from:r,to:e}),t)try{return t.apply(this,n)}catch(t){}},q(wi.history,"pushState",n),q(wi.history,"replaceState",n)}const Uo={};function Ho(t){Uo[t]=void 0}const Bo="__sentry_xhr_v3__";function zo(t){it("xhr",t),ot("xhr",Wo)}function Wo(){if(!wi.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;q(t,"open",(function(t){return function(...n){const e=1e3*lt(),r=s(n[0])?n[0].toUpperCase():void 0,i=function(t){if(s(t))return t;try{return t.toString()}catch(t){}return}(n[1]);if(!r||!i)return t.apply(this,n);this[Bo]={method:r,url:i,request_headers:{}},"POST"===r&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const o=()=>{const t=this[Bo];if(t&&4===this.readyState){try{t.status_code=this.status}catch(t){}st("xhr",{endTimestamp:1e3*lt(),startTimestamp:e,xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?q(this,"onreadystatechange",(function(t){return function(...n){return o(),t.apply(this,n)}})):this.addEventListener("readystatechange",o),q(this,"setRequestHeader",(function(t){return function(...n){const[e,r]=n,i=this[Bo];return i&&s(e)&&s(r)&&(i.request_headers[e.toLowerCase()]=r),t.apply(this,n)}})),t.apply(this,n)}})),q(t,"send",(function(t){return function(...n){const e=this[Bo];if(!e)return t.apply(this,n);void 0!==n[0]&&(e.body=n[0]);return st("xhr",{startTimestamp:1e3*lt(),xhr:this}),t.apply(this,n)}}))}const Xo=[],Go=new Map;function Jo(){if(wo()&&pt){const t=go("inp",(({metric:t})=>{const n=Dn();if(!n||null==t.value)return;const e=t.entries.find((n=>n.duration===t.value&&Yo[n.name]));if(!e)return;const{interactionId:r}=e,i=Yo[e.name],o=n.getOptions(),s=So(pt+e.startTime),c=So(t.value),u=Mn(),a=he(),f=a?de(a):void 0,d=(null!=r?Go.get(r):void 0)||(f?ie(f).description:u.getScopeData().transactionName),h=u.getUser(),l=n.getIntegrationByName("Replay"),p=l&&l.getReplayId(),m=void 0!==h?h.email||h.id||h.ip_address:void 0;let g;try{g=u.getScopeData().contexts.profile.profile_id}catch(t){}const v=De({name:I(e.target),op:`ui.interaction.${i}`,attributes:X({release:o.release,environment:o.environment,transaction:d,[Gn]:t.value,[Bn]:"auto.http.browser.inp",user:m||void 0,profile_id:g||void 0,replay_id:p||void 0}),startTime:s,experimental:{standalone:!0}});v.addEvent("inp",{[Wn]:"millisecond",[Xn]:t.value}),v.end(s+c)}),mo,co);return()=>{t()}}return()=>{}}const Yo={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function Ko(t,n=function(t){const n=Uo[t];if(n)return n;let e=wi[t];if(at(e))return Uo[t]=e.bind(wi);const r=wi.document;if(r&&"function"==typeof r.createElement)try{const n=r.createElement("iframe");n.hidden=!0,r.head.appendChild(n);const i=n.contentWindow;i&&i[t]&&(e=i[t]),r.head.removeChild(n)}catch(t){}return e?Uo[t]=e.bind(wi):e}("fetch")){let e=0,r=0;return jr(t,(function(i){const o=i.body.length;e+=o,r++;const s={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:e<=6e4&&r<15,...t.fetchOptions};if(!n)return Ho("fetch"),Dt("No fetch implementation available");try{return n(t.url,s).then((t=>(e-=o,r--,{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}})))}catch(t){return Ho("fetch"),e-=o,r--,Dt(t)}}))}function Vo(t,n,e,r){const i={filename:t,function:""===n?Y:n,in_app:!0};return void 0!==e&&(i.lineno=e),void 0!==r&&(i.colno=r),i}const Qo=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Zo=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ts=/\((\S*)(?::(\d+))(?::(\d+))\)/,ns=[30,t=>{const n=Qo.exec(t);if(n){const[,t,e,r]=n;return Vo(t,Y,+e,+r)}const e=Zo.exec(t);if(e){if(e[2]&&0===e[2].indexOf("eval")){const t=ts.exec(e[2]);t&&(e[2]=t[1],e[3]=t[2],e[4]=t[3])}const[t,n]=ls(e[1]||Y,e[2]);return Vo(n,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],es=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,rs=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,is=[50,t=>{const n=es.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){const t=rs.exec(n[3]);t&&(n[1]=n[1]||"eval",n[3]=t[1],n[4]=t[2],n[5]="")}let t=n[3],e=n[1]||Y;return[e,t]=ls(e,t),Vo(t,e,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}}],os=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ss=[40,t=>{const n=os.exec(t);return n?Vo(n[2],n[1]||Y,+n[3],n[4]?+n[4]:void 0):void 0}],cs=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,us=[10,t=>{const n=cs.exec(t);return n?Vo(n[2],n[3]||Y,+n[1]):void 0}],as=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,fs=[20,t=>{const n=as.exec(t);return n?Vo(n[5],n[3]||n[4]||Y,+n[1],+n[2]):void 0}],ds=[ns,is],hs=Q(...ds),ls=(t,n)=>{const e=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return e||r?[-1!==t.indexOf("@")?t.split("@")[0]:Y,e?`safari-extension:${n}`:`safari-web-extension:${n}`]:[t,n]},ps=1024,ms=(t={})=>{const n={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:"Breadcrumbs",setup(t){var e;n.console&&function(t){const n="console";it(n,t),ot(n,ct)}(function(t){return function(n){if(Dn()!==t)return;const e={category:"console",data:{arguments:n.args,logger:"console"},level:Ht(n.level),message:m(n.args," ")};if("assert"===n.level){if(!1!==n.args[0])return;e.message=`Assertion failed: ${m(n.args.slice(1)," ")||"console.assert"}`,e.data.arguments=n.args.slice(1)}Or(e,{input:n.args,level:n.level})}}(t)),n.dom&&(e=function(t,n){return function(e){if(Dn()!==t)return;let r,i,o="object"==typeof n?n.serializeAttribute:void 0,s="object"==typeof n&&"number"==typeof n.maxStringLength?n.maxStringLength:void 0;s&&s>ps&&(s=ps),"string"==typeof o&&(o=[o]);try{const t=e.event,n=function(t){return!!t&&!!t.target}(t)?t.target:t;r=I(n,{keyAttrs:o,maxStringLength:s}),i=j(n)}catch(t){r=""}if(0===r.length)return;const c={category:`ui.${e.name}`,message:r};i&&(c.data={"ui.component_name":i}),Or(c,{event:e.event,name:e.name,global:e.global})}}(t,n.dom),it("dom",e),ot("dom",Do)),n.xhr&&zo(function(t){return function(n){if(Dn()!==t)return;const{startTimestamp:e,endTimestamp:r}=n,i=n.xhr[Bo];if(!e||!r||!i)return;const{method:o,url:s,status_code:c,body:u}=i;Or({category:"xhr",data:{method:o,url:s,status_code:c},type:"http"},{xhr:n.xhr,input:u,startTimestamp:e,endTimestamp:r})}}(t)),n.fetch&&mt(function(t){return function(n){if(Dn()!==t)return;const{startTimestamp:e,endTimestamp:r}=n;if(r&&(!n.fetchData.url.match(/sentry_key/)||"POST"!==n.fetchData.method))if(n.error){Or({category:"fetch",data:n.fetchData,level:"error",type:"http"},{data:n.error,input:n.args,startTimestamp:e,endTimestamp:r})}else{const t=n.response;Or({category:"fetch",data:{...n.fetchData,status_code:t&&t.status},type:"http"},{input:n.args,response:t,startTimestamp:e,endTimestamp:r})}}}(t)),n.history&&qo(function(t){return function(n){if(Dn()!==t)return;let e=n.from,r=n.to;const i=Ft(ri.location.href);let o=e?Ft(e):void 0;const s=Ft(r);o&&o.path||(o=i),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),i.protocol===o.protocol&&i.host===o.host&&(e=o.relative),Or({category:"navigation",data:{from:e,to:r}})}}(t)),n.sentry&&t.on("beforeSendEvent",function(t){return function(n){Dn()===t&&Or({category:"sentry."+("transaction"===n.type?"transaction":"event"),event_id:n.event_id,level:n.level,message:It(n)},{event:n})}}(t))}}};const gs=["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"],vs=(t={})=>{const n={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:"BrowserApiErrors",setupOnce(){n.setTimeout&&q(ri,"setTimeout",ys),n.setInterval&&q(ri,"setInterval",ys),n.requestAnimationFrame&&q(ri,"requestAnimationFrame",bs),n.XMLHttpRequest&&"XMLHttpRequest"in ri&&q(XMLHttpRequest.prototype,"send",_s);const t=n.eventTarget;if(t){(Array.isArray(t)?t:gs).forEach(ws)}}}};function ys(t){return function(...n){const e=n[0];return n[0]=si(e,{mechanism:{data:{function:tt(t)},handled:!1,type:"instrument"}}),t.apply(this,n)}}function bs(t){return function(n){return t.apply(this,[si(n,{mechanism:{data:{function:"requestAnimationFrame",handler:tt(t)},handled:!1,type:"instrument"}})])}}function _s(t){return function(...n){const e=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((t=>{t in e&&"function"==typeof e[t]&&q(e,t,(function(n){const e={mechanism:{data:{function:t,handler:tt(n)},handled:!1,type:"instrument"}},r=H(n);return r&&(e.mechanism.data.handler=tt(r)),si(n,e)}))})),t.apply(this,n)}}function ws(t){const n=ri,e=n[t]&&n[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(q(e,"addEventListener",(function(n){return function(e,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=si(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:tt(r),target:t},handled:!1,type:"instrument"}}))}catch(t){}return n.apply(this,[e,si(r,{mechanism:{data:{function:"addEventListener",handler:tt(r),target:t},handled:!1,type:"instrument"}}),i])}})),q(e,"removeEventListener",(function(t){return function(n,e,r){const i=e;try{const e=i&&i.__sentry_wrapped__;e&&t.call(this,n,e,r)}catch(t){}return t.call(this,n,i,r)}})))}const Ss=(t={})=>{const n={onerror:!0,onunhandledrejection:!0,...t};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(t){n.onerror&&function(t){_t((n=>{const{stackParser:e,attachStacktrace:r}=Es();if(Dn()!==t||oi())return;const{msg:i,url:o,line:c,column:u,error:a}=n,f=function(t,n,e,r){const i=t.exception=t.exception||{},o=i.values=i.values||[],c=o[0]=o[0]||{},u=c.stacktrace=c.stacktrace||{},a=u.frames=u.frames||[],f=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(e,10))?void 0:e,h=s(n)&&n.length>0?n:function(){try{return T.document.location.href}catch(t){return""}}();0===a.length&&a.push({colno:f,filename:h,function:Y,in_app:!0,lineno:d});return t}(mi(e,a||i,void 0,r,!1),o,c,u);f.level="error",ir(f,{originalException:a,mechanism:{handled:!1,type:"onerror"}})}))}(t),n.onunhandledrejection&&function(t){Et((n=>{const{stackParser:e,attachStacktrace:r}=Es();if(Dn()!==t||oi())return;const i=function(t){if(u(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}(n),o=u(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:mi(e,i,void 0,r,!0);o.level="error",ir(o,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}(t)}}};function Es(){const t=Dn();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const $s=()=>({name:"HttpContext",preprocessEvent(t){if(!ri.navigator&&!ri.location&&!ri.document)return;const n=t.request&&t.request.url||ri.location&&ri.location.href,{referrer:e}=ri.document||{},{userAgent:r}=ri.navigator||{},i={...t.request&&t.request.headers,...e&&{Referer:e},...r&&{"User-Agent":r}},o={...t.request,...n&&{url:n},headers:i};t.request=o}}),Ts=(t={})=>{const n=t.limit||5,e=t.key||"cause";return{name:"LinkedErrors",preprocessEvent(t,r,i){const o=i.getOptions();y(ci,o.stackParser,o.maxValueLength,e,n,t,r)}}};function ks(t){return[Dr(),Lr(),vs(),ms(),Ss(),Ts(),qr(),$s()]}const Is={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",debugIntegration:"debug",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",sessionTimingIntegration:"sessiontiming",browserProfilingIntegration:"browserprofiling"},xs=ri;const js={increment:function(t,n=1,e){Gr.increment(ti,t,n,e)},distribution:function(t,n,e){Gr.distribution(ti,t,n,e)},set:function(t,n,e){Gr.set(ti,t,n,e)},gauge:function(t,n,e){Gr.gauge(ti,t,n,e)},timing:function(t,n,e="second",r){return Gr.timing(ti,t,n,e,r)}};const Cs={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0};function Rs(t){const{traceFetch:n,traceXHR:e,shouldCreateSpanForRequest:r,enableHTTPTimings:i,tracePropagationTargets:o}={traceFetch:Cs.traceFetch,traceXHR:Cs.traceXHR,...t},s="function"==typeof r?r:t=>!0,c=t=>function(t,n){const e=ri.location&&ri.location.href;if(e){let r,i;try{r=new URL(t,e),i=new URL(e).origin}catch(t){return!1}const o=r.origin===i;return n?v(r.toString(),n)||o&&v(r.pathname,n):o}{const e=!!t.match(/^\/(?!\/)/);return n?v(t,n):e}}(t,o),u={};n&&mt((t=>{const n=ni(t,s,c,u);if(n){const e=As(t.fetchData.url),r=e?Ft(e).host:void 0;n.setAttributes({"http.url":e,"server.address":r})}i&&n&&Os(n)})),e&&zo((t=>{const n=function(t,n,e,r){const i=t.xhr,o=i&&i[Bo];if(!i||i.__sentry_own_request__||!o)return;const s=_e()&&n(o.url);if(t.endTimestamp&&s){const t=i.__sentry_xhr_span_id__;if(!t)return;const n=r[t];return void(n&&void 0!==o.status_code&&(Vn(n,o.status_code),n.end(),delete r[t]))}const c=As(o.url),u=c?Ft(c).host:void 0,a=!!he(),f=s&&a?De({name:`${o.method} ${o.url}`,attributes:{type:"xhr","http.method":o.method,"http.url":c,url:o.url,"server.address":u,[Bn]:"auto.http.browser",[Hn]:"http.client"}}):new we;i.__sentry_xhr_span_id__=f.spanContext().spanId,r[i.__sentry_xhr_span_id__]=f;const d=Dn();i.setRequestHeader&&e(o.url)&&d&&function(t,n,e){const r=Mn(),i=An(),{traceId:o,spanId:s,sampled:c,dsc:u}={...i.getPropagationContext(),...r.getPropagationContext()},a=e&&_e()?ne(e):Qt(o,s,c),f=Jt(u||(e?Ie(e):ke(o,n)));!function(t,n,e){try{t.setRequestHeader("sentry-trace",n),e&&t.setRequestHeader(Bt,e)}catch(t){}}(t,a,f)}(i,d,_e()&&a?f:void 0);return f}(t,s,c,u);i&&n&&Os(n)}))}function Os(t){const{url:n}=ie(t).data||{};if(!n||"string"!=typeof n)return;const e=uo("resource",(({entries:r})=>{r.forEach((r=>{if(function(t){return"resource"===t.entryType&&"initiatorType"in t&&"string"==typeof t.nextHopProtocol&&("fetch"===t.initiatorType||"xmlhttprequest"===t.initiatorType)}(r)&&r.name.endsWith(n)){(function(t){const{name:n,version:e}=function(t){let n="unknown",e="unknown",r="";for(const i of t){if("/"===i){[n,e]=t.split("/");break}if(!isNaN(Number(i))){n="h"===r?"http":r,e=t.split(r)[1];break}r+=i}r===t&&(n=r);return{name:n,version:e}}(t.nextHopProtocol),r=[];if(r.push(["network.protocol.version",e],["network.protocol.name",n]),!pt)return r;return[...r,["http.request.redirect_start",Ms(t.redirectStart)],["http.request.fetch_start",Ms(t.fetchStart)],["http.request.domain_lookup_start",Ms(t.domainLookupStart)],["http.request.domain_lookup_end",Ms(t.domainLookupEnd)],["http.request.connect_start",Ms(t.connectStart)],["http.request.secure_connection_start",Ms(t.secureConnectionStart)],["http.request.connection_end",Ms(t.connectEnd)],["http.request.request_start",Ms(t.requestStart)],["http.request.response_start",Ms(t.responseStart)],["http.request.response_end",Ms(t.responseEnd)]]})(r).forEach((n=>t.setAttribute(...n))),setTimeout(e)}}))}))}function Ms(t=0){return((pt||performance.timeOrigin)+t)/1e3}function As(t){try{return new URL(t,ri.location.origin).href}catch(t){return}}const Ls={...ze,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableInp:!0,_experiments:{},...Cs};function Ns(t,n,e){t.emit("startPageLoadSpan",n,e),Mn().setTransactionName(n.name);const r=he();return"pageload"===(r&&ie(r).op)?r:void 0}function Ds(t,n){An().setPropagationContext(hn()),Mn().setPropagationContext(hn()),t.emit("startNavigationSpan",n),Mn().setTransactionName(n.name);const e=he();return"navigation"===(e&&ie(e).op)?e:void 0}function Ps(t){const n=(e=`meta[name=${t}]`,T.document&&T.document.querySelector?T.document.querySelector(e):null);var e;return n?n.getAttribute("content"):void 0}return me(),t.BrowserClient=bi,t.SDK_VERSION=S,t.SEMANTIC_ATTRIBUTE_SENTRY_OP=Hn,t.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN=Bn,t.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE=Un,t.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE=Fn,t.Scope=kn,t.WINDOW=ri,t.addBreadcrumb=Or,t.addEventProcessor=function(t){An().addEventProcessor(t)},t.addIntegration=function(t){const n=Dn();n&&n.addIntegration(t)},t.breadcrumbsIntegration=ms,t.browserApiErrorsIntegration=vs,t.browserTracingIntegration=(t={})=>{me();const{enableInp:n,enableLongTask:e,_experiments:{enableInteractions:r},beforeStartSpan:i,idleTimeout:o,finalTimeout:s,childSpanTimeout:c,markBackgroundSpan:u,traceFetch:a,traceXHR:f,shouldCreateSpanForRequest:d,enableHTTPTimings:h,instrumentPageLoad:l,instrumentNavigation:p}={...Ls,...t},m=xo();n&&Jo(),e&&uo("longtask",(({entries:t})=>{for(const n of t){if(!he())return;const t=So(pt+n.startTime),e=So(n.duration),r=De({name:"Main UI thread blocked",op:"ui.long-task",startTime:t,attributes:{[Bn]:"auto.ui.browser.metrics"}});r&&r.end(t+e)}})),r&&uo("event",(({entries:t})=>{for(const n of t){if(!he())return;if("click"===n.name){const t=So(pt+n.startTime),e=So(n.duration),r={name:I(n.target),op:`ui.interaction.${n.name}`,startTime:t,attributes:{[Bn]:"auto.ui.browser.metrics"}},i=j(n.target);i&&(r.attributes["ui.component_name"]=i);const o=De(r);o&&o.end(t+e)}}}));const g={name:void 0,source:void 0};function v(t,n){const e="pageload"===n.op,r=i?i(n):n,u=r.attributes||{};n.name!==r.name&&(u[Fn]="custom",r.attributes=u),g.name=r.name,g.source=u[Fn];const a=Ye(r,{idleTimeout:o,finalTimeout:s,childSpanTimeout:c,disableAutoFinish:e,beforeSpanEnd:t=>{m(),jo(t)}});function f(){["interactive","complete"].includes(ri.document.readyState)&&t.emit("idleSpanEnableAutoFinish",a)}return e&&ri.document&&(ri.document.addEventListener("readystatechange",(()=>{f()})),f()),a}return{name:"BrowserTracing",afterAllSetup(t){let e,i=ri.location&&ri.location.href;t.on("startNavigationSpan",(n=>{Dn()===t&&(e&&e.end(),e=v(t,{op:"navigation",...n}))})),t.on("startPageLoadSpan",((n,r={})=>{if(Dn()!==t)return;e&&e.end();const i=Vt(r.sentryTrace||Ps("sentry-trace"),r.baggage||Ps("baggage"));Mn().setPropagationContext(i),e=v(t,{op:"pageload",...n})})),t.on("spanEnd",(t=>{const n=ie(t).op;if(t!==de(t)||"navigation"!==n&&"pageload"!==n)return;const e=Mn(),r=e.getPropagationContext();e.setPropagationContext({...r,sampled:void 0!==r.sampled?r.sampled:oe(t),dsc:r.dsc||Ie(t)})})),ri.location&&(l&&Ns(t,{name:ri.location.pathname,startTime:pt?pt/1e3:void 0,attributes:{[Fn]:"url",[Bn]:"auto.pageload.browser"}}),p&&qo((({to:n,from:e})=>{void 0===e&&i&&-1!==i.indexOf(n)?i=void 0:e!==n&&(i=void 0,Ds(t,{name:ri.location.pathname,attributes:{[Fn]:"url",[Bn]:"auto.navigation.browser"}}))}))),u&&ri&&ri.document&&ri.document.addEventListener("visibilitychange",(()=>{const t=he();if(!t)return;const n=de(t);if(ri.document.hidden&&n){const t="cancelled",{op:e,status:r}=ie(n);r||n.setStatus({code:Kn,message:t}),n.setAttribute("sentry.cancellation_reason","document.hidden"),n.end()}})),r&&function(t,n,e,r){let i;const o=()=>{const o="ui.action.click",s=he(),c=s&&de(s);if(c){const t=ie(c).op;if(["navigation","pageload"].includes(t))return}i&&(i.setAttribute(zn,"interactionInterrupted"),i.end(),i=void 0),r.name&&(i=Ye({name:r.name,op:o,attributes:{[Fn]:r.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:e}))};ri.document&&addEventListener("click",o,{once:!1,capture:!0})}(o,s,c,g),n&&function(t){const n=({entries:n})=>{n.forEach((n=>{if(!function(t){return"duration"in t}(n)||!t.name)return;const e=n.interactionId;if(null!=e&&!Go.has(e)){if(Xo.length>10){const t=Xo.shift();Go.delete(t)}Xo.push(e),Go.set(e,t.name)}}))};uo("event",n),uo("first-input",n)}(g),Rs({traceFetch:a,traceXHR:f,tracePropagationTargets:t.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:d,enableHTTPTimings:h})}}},t.captureEvent=ir,t.captureException=captureException,t.captureMessage=function(t,n){const e="string"==typeof n?n:void 0,r="string"!=typeof n?{captureContext:n}:void 0;return Mn().captureMessage(t,e,r)},t.captureSession=mr,t.captureUserFeedback=function(t){const n=Dn();n&&n.captureUserFeedback(t)},t.chromeStackLineParser=ns,t.close=async function(t){const n=Dn();return n?n.close(t):Promise.resolve(!1)},t.continueTrace=({sentryTrace:t,baggage:n},e)=>Nn((r=>{const i=Vt(t,n);return r.setPropagationContext(i),e()})),t.createTransport=jr,t.createUserFeedbackEnvelope=yi,t.dedupeIntegration=qr,t.defaultStackLineParsers=ds,t.defaultStackParser=hs,t.endSession=lr,t.eventFromException=li,t.eventFromMessage=pi,t.exceptionFromError=ci,t.feedbackAsyncIntegration=gn,t.feedbackIntegration=gn,t.flush=async function(t){const n=Dn();return n?n.flush(t):Promise.resolve(!1)},t.forceLoad=function(){},t.functionToStringIntegration=Lr,t.geckoStackLineParser=is,t.getActiveSpan=he,t.getClient=Dn,t.getCurrentHub=ei,t.getCurrentScope=Mn,t.getDefaultIntegrations=ks,t.getGlobalScope=Ln,t.getIsolationScope=An,t.getRootSpan=de,t.getSpanDescendants=fe,t.globalHandlersIntegration=Ss,t.httpContextIntegration=$s,t.inboundFiltersIntegration=Dr,t.init=function(t={}){const n=function(t={}){return{defaultIntegrations:ks(),release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:ri.SENTRY_RELEASE&&ri.SENTRY_RELEASE.id?ri.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0,...t}}(t);if(function(){const t=ri[ri.chrome?"chrome":"browser"],n=t&&t.runtime&&t.runtime.id,e=ri.location&&ri.location.href||"",r=!!n&&ri===ri.top&&["chrome-extension:","moz-extension:","ms-browser-extension:"].some((t=>e.startsWith(`${t}//`)));return!!n&&!r}())return void O((()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}));const e={...n,stackParser:(r=n.stackParser||hs,Array.isArray(r)?Q(...r):r),integrations:wr(n),transport:n.transport||Ko};var r;!function(t,n){!0===n.debug&&O((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Mn().update(n.initialScope);const e=new t(n);Ir(e),e.init()}(bi,e),n.autoSessionTracking&&function(){if(void 0===ri.document)return;hr({ignoreDuration:!0}),mr(),qo((({from:t,to:n})=>{void 0!==t&&t!==n&&(hr({ignoreDuration:!0}),mr())}))}()},t.isInitialized=function(){return!!Dn()},t.lastEventId=dr,t.lazyLoadIntegration=async function(t){const n=Is[t],e=xs.Sentry=xs.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${t}`);const r=e[t];if("function"==typeof r)return r;const i=function(t){const n=Dn(),e=n&&n.getOptions(),r=e&&e.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${S}/${t}.min.js`,r).toString()}(n),o=ri.document.createElement("script");o.src=i,o.crossOrigin="anonymous";const s=new Promise(((t,n)=>{o.addEventListener("load",(()=>t())),o.addEventListener("error",n)}));ri.document.body.appendChild(o);try{await s}catch(n){throw new Error(`Error when loading integration: ${t}`)}const c=e[t];if("function"!=typeof c)throw new Error(`Could not load integration: ${t}`);return c},t.linkedErrorsIntegration=Ts,t.makeFetchTransport=Ko,t.metrics=js,t.onLoad=function(t){t()},t.opera10StackLineParser=us,t.opera11StackLineParser=fs,t.parameterize=function(t,...n){const e=new String(String.raw(t,...n));return e.__sentry_template_string__=t.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),e.__sentry_template_values__=n,e},t.replayIntegration=function(t){return O((()=>{console.warn("You are using replayIntegration() even though this bundle does not include replay.")})),{name:"Replay",...vn.reduce(((t,n)=>(t[n]=pn,t)),{})}},t.setContext=or,t.setCurrentClient=Ir,t.setExtra=cr,t.setExtras=sr,t.setMeasurement=Ce,t.setTag=ar,t.setTags=ur,t.setUser=fr,t.showReportDialog=function(t={}){if(!ri.document)return;const n=Mn(),e=n.getClient(),r=e&&e.getDsn();if(!r)return;if(n&&(t.user={...n.getUser(),...t.user}),!t.eventId){const n=dr();n&&(t.eventId=n)}const i=ri.document.createElement("script");i.async=!0,i.crossOrigin="anonymous",i.src=function(t,n){const e=D(t);if(!e)return"";const r=`${vr(e)}embed/error-page/`;let i=`dsn=${L(e)}`;for(const t in n)if("dsn"!==t&&"onClose"!==t)if("user"===t){const t=n.user;if(!t)continue;t.name&&(i+=`&name=${encodeURIComponent(t.name)}`),t.email&&(i+=`&email=${encodeURIComponent(t.email)}`)}else i+=`&${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`;return`${r}?${i}`}(r,t),t.onLoad&&(i.onload=t.onLoad);const{onClose:o}=t;if(o){const t=n=>{if("__sentry_reportdialog_closed__"===n.data)try{o()}finally{ri.removeEventListener("message",t)}};ri.addEventListener("message",t)}const s=ri.document.head||ri.document.body;s&&s.appendChild(i)},t.spanToBaggageHeader=function(t){return Jt(Ie(t))},t.spanToJSON=ie,t.spanToTraceHeader=ne,t.startBrowserTracingNavigationSpan=Ds,t.startBrowserTracingPageLoadSpan=Ns,t.startInactiveSpan=De,t.startNewTrace=function(t){return Nn((n=>(n.setPropagationContext(hn()),Pe(null,t))))},t.startSession=hr,t.startSpan=function(t,n){const e=Ue();if(e.startSpan)return e.startSpan(t,n);const r=Fe(t);return Nn(t.scope,(e=>{const i=Be(e),o=t.onlyIfParent&&!i?new we:qe({parentSpan:i,spanContext:r,forceTransaction:t.forceTransaction,scope:e});return En(e,o),Se((()=>n(o)),(()=>{const{status:t}=ie(o);!o.isRecording()||t&&"ok"!==t||o.setStatus({code:Kn,message:"internal_error"})}),(()=>o.end()))}))},t.startSpanManual=Ne,t.winjsStackLineParser=ss,t.withActiveSpan=Pe,t.withIsolationScope=function(...t){const n=On(yn());if(2===t.length){const[e,r]=t;return e?n.withSetIsolationScope(e,r):n.withIsolationScope(r)}return n.withIsolationScope(t[0])},t.withScope=Nn,t}({}); diff --git a/plugin.json b/plugin.json index 4d50c58..ecdef69 100644 --- a/plugin.json +++ b/plugin.json @@ -1,7 +1,7 @@ { "name": "Sentry", "description": "Log Matomo errors to Sentry", - "version": "5.0.14", + "version": "5.0.15", "theme": false, "require": { "matomo": ">=5.0.0-stable,<6.0.0-b1",