diff --git a/src/assets/vendor/sentry-8.40.0.bundle.tracing.min.js b/src/assets/vendor/sentry-8.40.0.bundle.tracing.min.js new file mode 100644 index 0000000..ee59350 --- /dev/null +++ b/src/assets/vendor/sentry-8.40.0.bundle.tracing.min.js @@ -0,0 +1,3 @@ +/*! @sentry/browser (Performance Monitoring) 8.40.0 (7ff467c) | https://github.com/getsentry/sentry-javascript */ +var Sentry=function(t){t=window.Sentry||{};const n="8.40.0",e=globalThis;function r(t,r,o){const i=e,s=i.__SENTRY__=i.__SENTRY__||{},c=s[n]=s[n]||{};return c[t]||(c[t]=r())}const o=["debug","info","warn","error","log","assert","trace"],i={};function s(t){if(!("console"in e))return t();const n=e.console,r={},o=Object.keys(i);o.forEach((t=>{const e=i[t];r[t]=n[t],n[t]=e}));try{return t()}finally{o.forEach((t=>{n[t]=r[t]}))}}const c=r("logger",(function(){let t=!1;const n={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return o.forEach((t=>{n[t]=()=>{}})),n})),u=50,a="?",f=/\(error: (.*)\)/,d=/captureMessage|captureException/;function l(...t){const n=t.sort(((t,n)=>t[0]-n[0])).map((t=>t[1]));return(t,e=0,r=0)=>{const o=[],i=t.split("\n");for(let t=e;t1024)continue;const s=f.test(e)?e.replace(f,"$1"):e;if(!s.match(/\S*Error: /)){for(const t of n){const n=t(s);if(n){o.push(n);break}}if(o.length>=u+r)break}}return function(t){if(!t.length)return[];const n=Array.from(t);/sentryWrapped/.test(h(n).function||"")&&n.pop();n.reverse(),d.test(h(n).function||"")&&(n.pop(),d.test(h(n).function||"")&&n.pop());return n.slice(0,u).map((t=>({...t,filename:t.filename||h(n).filename,function:t.function||a})))}(o.slice(r))}}function h(t){return t[t.length-1]||{}}const p="";function m(t){try{return t&&"function"==typeof t&&t.name||p}catch(t){return p}}function g(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 y={},v={};function b(t,n){y[t]=y[t]||[],y[t].push(n)}function _(t,n){if(!v[t]){v[t]=!0;try{n()}catch(t){}}}function w(t,n){const e=t&&y[t];if(e)for(const t of e)try{t(n)}catch(t){}}let S=null;function E(t){const n="error";b(n,t),_(n,$)}function $(){S=e.onerror,e.onerror=function(t,n,e,r,o){return w("error",{column:r,error:o,line:e,msg:t,url:n}),!(!S||S.__SENTRY_LOADER__)&&S.apply(this,arguments)},e.onerror.__SENTRY_INSTRUMENTED__=!0}let T=null;function k(t){const n="unhandledrejection";b(n,t),_(n,I)}function I(){T=e.onunhandledrejection,e.onunhandledrejection=function(t){return w("unhandledrejection",t),!(T&&!T.__SENTRY_LOADER__)||T.apply(this,arguments)},e.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function x(){return A(e),e}function A(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||n,e[n]=e[n]||{}}const j=Object.prototype.toString;function C(t){switch(j.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return U(t,Error)}}function O(t,n){return j.call(t)===`[object ${n}]`}function M(t){return O(t,"ErrorEvent")}function R(t){return O(t,"DOMError")}function L(t){return O(t,"String")}function P(t){return"object"==typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function N(t){return null===t||P(t)||"object"!=typeof t&&"function"!=typeof t}function D(t){return O(t,"Object")}function F(t){return"undefined"!=typeof Event&&U(t,Event)}function q(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function U(t,n){try{return t instanceof n}catch(t){return!1}}function H(t){return!("object"!=typeof t||null===t||!t.__isVue&&!t.t)}const B=e,W=80;function z(t,n={}){if(!t)return"";try{let e=t;const r=5,o=[];let i=0,s=0;const c=" > ",u=c.length;let a;const f=Array.isArray(n)?n:n.keyAttrs,d=!Array.isArray(n)&&n.maxStringLength||W;for(;e&&i++1&&s+o.length*u+a.length>=d));)o.push(a),s+=a.length,e=e.parentNode;return o.reverse().join(c)}catch(t){return""}}function X(t,n){const e=t,r=[];if(!e||!e.tagName)return"";if(B.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 o=n&&n.length?n.filter((t=>e.getAttribute(t))).map((t=>[t,e.getAttribute(t)])):null;if(o&&o.length)o.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else{e.id&&r.push(`#${e.id}`);const t=e.className;if(t&&L(t)){const n=t.split(/\s+/);for(const t of n)r.push(`.${t}`)}}const i=["aria-label","type","name","title","alt"];for(const t of i){const n=e.getAttribute(t);n&&r.push(`[${t}="${n}"]`)}return r.join("")}function G(t){if(!B.HTMLElement)return null;let n=t;for(let t=0;t<5;t++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}function J(t,n=0){return"string"!=typeof t||0===n||t.length<=n?t:`${t.slice(0,n)}...`}function Y(t,n){if(!Array.isArray(t))return"";const e=[];for(let n=0;nK(t,n,e)))}function Q(t,n,e){if(!(n in t))return;const r=t[n],o=e(r);"function"==typeof o&&tt(o,r);try{t[n]=o}catch(t){}}function Z(t,n,e){try{Object.defineProperty(t,n,{value:e,writable:!0,configurable:!0})}catch(t){}}function tt(t,n){try{const e=n.prototype||{};t.prototype=n.prototype=e,Z(t,"__sentry_original__",n)}catch(t){}}function nt(t){return t.__sentry_original__}function et(t){if(C(t))return{message:t.message,name:t.name,stack:t.stack,...ot(t)};if(F(t)){const n={type:t.type,target:rt(t.target),currentTarget:rt(t.currentTarget),...ot(t)};return"undefined"!=typeof CustomEvent&&U(t,CustomEvent)&&(n.detail=t.detail),n}return t}function rt(t){try{return n=t,"undefined"!=typeof Element&&U(n,Element)?z(t):Object.prototype.toString.call(t)}catch(t){return""}var n}function ot(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 it(t){return st(t,new Map)}function st(t,n){if(function(t){if(!D(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.getOwnPropertyNames(t))void 0!==t[e]&&(r[e]=st(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(st(t,n))})),r}return t}const ct=1e3;function ut(){return Date.now()/ct}const at=function(){const{performance:t}=e;if(!t||!t.now)return ut;const n=Date.now()-t.now(),r=null==t.timeOrigin?n:t.timeOrigin;return()=>(r+t.now())/ct}(),ft=(()=>{const{performance:t}=e;if(!t||!t.now)return;const n=36e5,r=t.now(),o=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+r-o):n,s=i16*Math.random();try{if(n&&n.randomUUID)return n.randomUUID().replace(/-/g,"");n&&n.getRandomValues&&(r=()=>{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&r())>>t/4).toString(16)))}function lt(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function ht(t){const{message:n,event_id:e}=t;if(n)return n;const r=lt(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||e||"":e||""}function pt(t,n,e){const r=t.exception=t.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=n||""),i.type||(i.type="Error")}function mt(t,n){const e=lt(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 gt(t){if(t&&t.__sentry_captured__)return!0;try{Z(t,"__sentry_captured__",!0)}catch(t){}return!1}var yt;function vt(t){return new _t((n=>{n(t)}))}function bt(t){return new _t(((n,e)=>{e(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(yt||(yt={}));class _t{constructor(t){_t.prototype.__init.call(this),_t.prototype.__init2.call(this),_t.prototype.__init3.call(this),_t.prototype.__init4.call(this),this.o=yt.PENDING,this.i=[];try{t(this.u,this.l)}catch(t){this.l(t)}}then(t,n){return new _t(((e,r)=>{this.i.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.h()}))}catch(t){return this.then((t=>t),t)}finally(t){return new _t(((n,e)=>{let r,o;return this.then((n=>{o=!1,r=n,t&&t()}),(n=>{o=!0,r=n,t&&t()})).then((()=>{o?e(r):n(r)}))}))}__init(){this.u=t=>{this.p(yt.RESOLVED,t)}}__init2(){this.l=t=>{this.p(yt.REJECTED,t)}}__init3(){this.p=(t,n)=>{this.o===yt.PENDING&&(q(n)?n.then(this.u,this.l):(this.o=t,this.m=n,this.h()))}}__init4(){this.h=()=>{if(this.o===yt.PENDING)return;const t=this.i.slice();this.i=[],t.forEach((t=>{t[0]||(this.o===yt.RESOLVED&&t[1](this.m),this.o===yt.REJECTED&&t[2](this.m),t[0]=!0)}))}}}function wt(t){const n=at(),e={sid:dt(),init:!0,timestamp:n,started:n,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return it({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&&St(e,t),e}function St(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||at(),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:dt()),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 Et(){return{traceId:dt(),spanId:dt().substring(16)}}function $t(t,n,e=2){if(!n||"object"!=typeof n||e<=0)return n;if(t&&n&&0===Object.keys(n).length)return t;const r={...t};for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=$t(r[t],n[t],e-1));return r}const Tt="_sentrySpan";function kt(t,n){n?Z(t,Tt,n):delete t[Tt]}function It(t){return t[Tt]}class xt{constructor(){this.v=!1,this._=[],this.S=[],this.T=[],this.k=[],this.I={},this.A={},this.j={},this.C={},this.O={},this.M=Et()}clone(){const t=new xt;return t.T=[...this.T],t.A={...this.A},t.j={...this.j},t.C={...this.C},t.I=this.I,t.R=this.R,t.L=this.L,t.P=this.P,t.N=this.N,t.S=[...this.S],t.D=this.D,t.k=[...this.k],t.O={...this.O},t.M={...this.M},t.F=this.F,t.q=this.q,kt(t,It(this)),t}setClient(t){this.F=t}setLastEventId(t){this.q=t}getClient(){return this.F}lastEventId(){return this.q}addScopeListener(t){this._.push(t)}addEventProcessor(t){return this.S.push(t),this}setUser(t){return this.I=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this.L&&St(this.L,{user:t}),this.U(),this}getUser(){return this.I}getRequestSession(){return this.D}setRequestSession(t){return this.D=t,this}setTags(t){return this.A={...this.A,...t},this.U(),this}setTag(t,n){return this.A={...this.A,[t]:n},this.U(),this}setExtras(t){return this.j={...this.j,...t},this.U(),this}setExtra(t,n){return this.j={...this.j,[t]:n},this.U(),this}setFingerprint(t){return this.N=t,this.U(),this}setLevel(t){return this.R=t,this.U(),this}setTransactionName(t){return this.P=t,this.U(),this}setContext(t,n){return null===n?delete this.C[t]:this.C[t]=n,this.U(),this}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,[e,r]=n instanceof At?[n.getScopeData(),n.getRequestSession()]:D(n)?[t,t.requestSession]:[],{tags:o,extra:i,user:s,contexts:c,level:u,fingerprint:a=[],propagationContext:f}=e||{};return this.A={...this.A,...o},this.j={...this.j,...i},this.C={...this.C,...c},s&&Object.keys(s).length&&(this.I=s),u&&(this.R=u),a.length&&(this.N=a),f&&(this.M=f),r&&(this.D=r),this}clear(){return this.T=[],this.A={},this.j={},this.I={},this.C={},this.R=void 0,this.P=void 0,this.N=void 0,this.D=void 0,this.L=void 0,kt(this,void 0),this.k=[],this.M=Et(),this.U(),this}addBreadcrumb(t,n){const e="number"==typeof n?n:100;if(e<=0)return this;const r={timestamp:ut(),...t},o=this.T;return o.push(r),this.T=o.length>e?o.slice(-e):o,this.U(),this}getLastBreadcrumb(){return this.T[this.T.length-1]}clearBreadcrumbs(){return this.T=[],this.U(),this}addAttachment(t){return this.k.push(t),this}clearAttachments(){return this.k=[],this}getScopeData(){return{breadcrumbs:this.T,attachments:this.k,contexts:this.C,tags:this.A,extra:this.j,user:this.I,level:this.R,fingerprint:this.N||[],eventProcessors:this.S,propagationContext:this.M,sdkProcessingMetadata:this.O,transactionName:this.P,span:It(this)}}setSDKProcessingMetadata(t){return this.O=$t(this.O,t,2),this}setPropagationContext(t){return this.M=t,this}getPropagationContext(){return this.M}captureException(t,n){const e=n&&n.event_id?n.event_id:dt();if(!this.F)return c.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:dt();if(!this.F)return c.warn("No client configured on scope - will not capture message!"),r;const o=new Error(t);return this.F.captureMessage(t,n,{originalException:t,syntheticException:o,...e,event_id:r},this),r}captureEvent(t,n){const e=n&&n.event_id?n.event_id:dt();return this.F?(this.F.captureEvent(t,{...n,event_id:e},this),e):(c.warn("No client configured on scope - will not capture event!"),e)}U(){this.v||(this.v=!0,this._.forEach((t=>{t(this)})),this.v=!1)}}const At=xt;class jt{constructor(t,n){let e,r;e=t||new At,r=n||new At,this.H=[{scope:e}],this.B=r}withScope(t){const n=this.W();let e;try{e=t(n)}catch(t){throw this.X(),t}return q(e)?e.then((t=>(this.X(),t)),(t=>{throw this.X(),t})):(this.X(),e)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.B}getStackTop(){return this.H[this.H.length-1]}W(){const t=this.getScope().clone();return this.H.push({client:this.getClient(),scope:t}),t}X(){return!(this.H.length<=1)&&!!this.H.pop()}}function Ct(){const t=A(x());return t.stack=t.stack||new jt(r("defaultCurrentScope",(()=>new At)),r("defaultIsolationScope",(()=>new At)))}function Ot(t){return Ct().withScope(t)}function Mt(t,n){const e=Ct();return e.withScope((()=>(e.getStackTop().scope=t,n(t))))}function Rt(t){return Ct().withScope((()=>t(Ct().getIsolationScope())))}function Lt(t){const n=A(t);return n.acs?n.acs:{withIsolationScope:Rt,withScope:Ot,withSetScope:Mt,withSetIsolationScope:(t,n)=>Rt(n),getCurrentScope:()=>Ct().getScope(),getIsolationScope:()=>Ct().getIsolationScope()}}function Pt(){return Lt(x()).getCurrentScope()}function Nt(){return Lt(x()).getIsolationScope()}function Dt(){return r("globalScope",(()=>new At))}function Ft(...t){const n=Lt(x());if(2===t.length){const[e,r]=t;return e?n.withSetScope(e,r):n.withScope(r)}return n.withScope(t[0])}function qt(){return Pt().getClient()}const Ut="_sentryMetrics";function Ht(t){const n=t[Ut];if(!n)return;const e={};for(const[,[t,r]]of n){(e[t]||(e[t]=[])).push(it(r))}return e}const Bt="sentry.source",Wt="sentry.sample_rate",zt="sentry.op",Xt="sentry.origin",Gt="sentry.idle_span_finish_reason",Jt="sentry.measurement_unit",Yt="sentry.measurement_value",Kt="sentry.exclusive_time",Vt=0,Qt=1,Zt=2;function tn(t,n){t.setAttribute("http.response.status_code",n);const e=function(t){if(t<400&&t>=100)return{code:Qt};if(t>=400&&t<500)switch(t){case 401:return{code:Zt,message:"unauthenticated"};case 403:return{code:Zt,message:"permission_denied"};case 404:return{code:Zt,message:"not_found"};case 409:return{code:Zt,message:"already_exists"};case 413:return{code:Zt,message:"failed_precondition"};case 429:return{code:Zt,message:"resource_exhausted"};case 499:return{code:Zt,message:"cancelled"};default:return{code:Zt,message:"invalid_argument"}}if(t>=500&&t<600)switch(t){case 501:return{code:Zt,message:"unimplemented"};case 503:return{code:Zt,message:"unavailable"};case 504:return{code:Zt,message:"deadline_exceeded"};default:return{code:Zt,message:"internal_error"}}return{code:Zt,message:"unknown_error"}}(n);"unknown_error"!==e.message&&t.setStatus(e)}const nn="baggage",en="sentry-",rn=/^sentry-/,on=8192;function sn(t){const n=function(t){if(!t||!L(t)&&!Array.isArray(t))return;if(Array.isArray(t))return t.reduce(((t,n)=>{const e=un(n);return Object.entries(e).forEach((([n,e])=>{t[n]=e})),t}),{});return un(t)}(t);if(!n)return;const e=Object.entries(n).reduce(((t,[n,e])=>{if(n.match(rn)){t[n.slice(en.length)]=e}return t}),{});return Object.keys(e).length>0?e:void 0}function cn(t){if(!t)return;return function(t){if(0===Object.keys(t).length)return;return Object.entries(t).reduce(((t,[n,e],r)=>{const o=`${encodeURIComponent(n)}=${encodeURIComponent(e)}`,i=0===r?o:`${t},${o}`;return i.length>on?t:i}),"")}(Object.entries(t).reduce(((t,[n,e])=>(e&&(t[`${en}${n}`]=e),t)),{}))}function un(t){return t.split(",").map((t=>t.split("=").map((t=>decodeURIComponent(t.trim()))))).reduce(((t,[n,e])=>(n&&e&&(t[n]=e),t)),{})}const an=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function fn(t,n){const e=function(t){if(!t)return;const n=t.match(an);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=sn(n),{traceId:o,parentSpanId:i,parentSampled:s}=e||{};return e?{traceId:o||dt(),parentSpanId:i||dt().substring(16),spanId:dt().substring(16),sampled:s,dsc:r||{}}:{traceId:o||dt(),spanId:dt().substring(16)}}function dn(t=dt(),n=dt().substring(16),e){let r="";return void 0!==e&&(r=e?"-1":"-0"),`${t}-${n}${r}`}const ln=1;function hn(t){const{spanId:n,traceId:e}=t.spanContext(),{data:r,op:o,parent_span_id:i,status:s,origin:c}=vn(t);return it({parent_span_id:i,span_id:n,trace_id:e,data:r,op:o,status:s,origin:c})}function pn(t){const{spanId:n,traceId:e}=t.spanContext(),{parent_span_id:r}=vn(t);return it({parent_span_id:r,span_id:n,trace_id:e})}function mn(t){const{traceId:n,spanId:e}=t.spanContext();return dn(n,e,bn(t))}function gn(t){return"number"==typeof t?yn(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?yn(t.getTime()):at()}function yn(t){return t>9999999999?t/1e3:t}function vn(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:o,name:i,endTime:s,parentSpanId:c,status:u}=t;return it({span_id:n,trace_id:e,data:r,description:i,parent_span_id:c,start_timestamp:gn(o),timestamp:gn(s)||void 0,status:_n(u),op:r[zt],origin:r[Xt],_metrics_summary:Ht(t)})}return{span_id:n,trace_id:e}}catch(t){return{}}}function bn(t){const{traceFlags:n}=t.spanContext();return n===ln}function _n(t){if(t&&t.code!==Vt)return t.code===Qt?"ok":t.message||"unknown_error"}const wn="_sentryChildSpans",Sn="_sentryRootSpan";function En(t,n){const e=t[Sn]||t;Z(n,Sn,e),t[wn]?t[wn].add(n):Z(t,wn,new Set([n]))}function $n(t){const n=new Set;return function t(e){if(!n.has(e)&&bn(e)){n.add(e);const r=e[wn]?Array.from(e[wn]):[];for(const n of r)t(n)}}(t),Array.from(n)}function Tn(t){return t[Sn]||t}function kn(){const t=Lt(x());return t.getActiveSpan?t.getActiveSpan():It(Pt())}function In(t,n,e,r,o,i){const s=kn();s&&function(t,n,e,r,o,i,s){const c=t[Ut]||(t[Ut]=new Map),u=`${n}:${e}@${o}`,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:i}])}(s,t,n,e,r,o,i)}let xn=!1;function An(){xn||(xn=!0,E(jn),k(jn))}function jn(){const t=kn(),n=t&&Tn(t);if(n){const t="internal_error";n.setStatus({code:Zt,message:t})}}jn.tag="sentry_tracingErrorCallback";const Cn="_sentryScope",On="_sentryIsolationScope";function Mn(t){return{scope:t[Cn],isolationScope:t[On]}}function Rn(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const n=qt(),e=t||n&&n.getOptions();return!!e&&(e.enableTracing||"tracesSampleRate"in e||"tracesSampler"in e)}class Ln{constructor(t={}){this.G=t.traceId||dt(),this.J=t.spanId||dt().substring(16)}spanContext(){return{spanId:this.J,traceId:this.G,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}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function Pn(t,n,e=(()=>{})){let r;try{r=t()}catch(t){throw n(t),e(),t}return function(t,n,e){if(q(t))return t.then((t=>(e(),t)),(t=>{throw n(t),e(),t}));return e(),t}(r,n,e)}const Nn="production",Dn="_frozenDsc";function Fn(t,n){Z(t,Dn,n)}function qn(t,n){const e=n.getOptions(),{publicKey:r}=n.getDsn()||{},o=it({environment:e.environment||Nn,release:e.release,public_key:r,trace_id:t});return n.emit("createDsc",o),o}function Un(t){const n=qt();if(!n)return{};const e=qn(vn(t).trace_id||"",n),r=Tn(t),o=r[Dn];if(o)return o;const i=r.spanContext().traceState,s=i&&i.get("sentry.dsc"),c=s&&sn(s);if(c)return c;const u=vn(r),a=u.data||{},f=a[Wt];null!=f&&(e.sample_rate=`${f}`);const d=a[Bt],l=u.description;return"url"!==d&&l&&(e.transaction=l),Rn()&&(e.sampled=String(bn(r))),n.emit("createDsc",e,r),e}function Hn(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}const Bn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Wn(t,n=!1){const{host:e,path:r,pass:o,port:i,projectId:s,protocol:c,publicKey:u}=t;return`${c}://${u}${n&&o?`:${o}`:""}@${e}${i?`:${i}`:""}/${r?`${r}/`:r}${s}`}function zn(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Xn(t){const n="string"==typeof t?function(t){const n=Bn.exec(t);if(!n)return void s((()=>{console.error(`Invalid Sentry Dsn: ${t}`)}));const[e,r,o="",i="",c="",u=""]=n.slice(1);let a="",f=u;const d=f.split("/");if(d.length>1&&(a=d.slice(0,-1).join("/"),f=d.pop()),f){const t=f.match(/^\d+/);t&&(f=t[0])}return zn({host:i,pass:o,path:a,projectId:f,port:c,protocol:e,publicKey:r})}(t):zn(t);if(n)return n}function Gn(t,n=100,e=1/0){try{return Yn("",t,n,e)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function Jn(t,n=3,e=102400){const r=Gn(t,n);return o=r,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(o))>e?Jn(t,n-1,e):r;var o}function Yn(t,n,e=1/0,r=1/0,o=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=l[t];f[t]=Yn(t,n,u-1,r,o),d++}return s(n),f}function Kn(t,n=[]){return[t,n]}function Vn(t,n){const[e,r]=t;return[e,[...r,n]]}function Qn(t,n){const e=t[1];for(const t of e){if(n(t,t[0].type))return!0}return!1}function Zn(t){return e.__SENTRY__&&e.__SENTRY__.encodePolyfill?e.__SENTRY__.encodePolyfill(t):(new TextEncoder).encode(t)}function te(t){const[n,e]=t;let r=JSON.stringify(n);function o(t){"string"==typeof r?r="string"==typeof t?r+t:[Zn(r),t]:r.push("string"==typeof t?Zn(t):t)}for(const t of e){const[n,e]=t;if(o(`\n${JSON.stringify(n)}\n`),"string"==typeof e||e instanceof Uint8Array)o(e);else{let t;try{t=JSON.stringify(e)}catch(n){t=JSON.stringify(Gn(e))}o(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 ne(t){return[{type:"span"},t]}function ee(t){const n="string"==typeof t.data?Zn(t.data):t.data;return[it({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}const re={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 oe(t){return re[t]}function ie(t){if(!t||!t.sdk)return;const{name:n,version:e}=t.sdk;return{name:n,version:e}}function se(t,n,e,r){const o=ie(e),i=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 o=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...n&&{sdk:n},...!!e&&r&&{dsn:Wn(r)},...o&&{trace:it({...o})}}}(t,o,r,n);delete t.sdkProcessingMetadata;return Kn(s,[[{type:i},t]])}function ce(t,n,e,r=kn()){const o=r&&Tn(r);o&&o.addEvent(t,{[Yt]:n,[Jt]:e})}function ue(t){if(!t||0===t.length)return;const n={};return t.forEach((t=>{const e=t.attributes||{},r=e[Jt],o=e[Yt];"string"==typeof r&&"number"==typeof o&&(n[t.name]={value:o,unit:r})})),n}class ae{constructor(t={}){this.G=t.traceId||dt(),this.J=t.spanId||dt().substring(16),this.K=t.startTimestamp||at(),this.V={},this.setAttributes({[Xt]:"manual",[zt]: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.Y=[],this.rt=t.isStandalone,this.et&&this.ot()}addLink(t){return this}addLinks(t){return this}recordException(t,n){}spanContext(){const{J:t,G:n,nt:e}=this;return{spanId:t,traceId:n,traceFlags:e?ln:0}}setAttribute(t,n){return void 0===n?delete this.V[t]:this.V[t]=n,this}setAttributes(t){return Object.keys(t).forEach((n=>this.setAttribute(n,t[n]))),this}updateStartTime(t){this.K=gn(t)}setStatus(t){return this.it=t,this}updateName(t){return this.Z=t,this.setAttribute(Bt,"custom"),this}end(t){this.et||(this.et=gn(t),this.ot())}getSpanJSON(){return it({data:this.V,description:this.Z,op:this.V[zt],parent_span_id:this.tt,span_id:this.J,start_timestamp:this.K,status:_n(this.it),timestamp:this.et,trace_id:this.G,origin:this.V[Xt],_metrics_summary:Ht(this),profile_id:this.V["sentry.profile_id"],exclusive_time:this.V[Kt],measurements:ue(this.Y),is_segment:this.rt&&Tn(this)===this||void 0,segment_id:this.rt?Tn(this).spanContext().spanId:void 0})}isRecording(){return!this.et&&!!this.nt}addEvent(t,n,e){const r=fe(n)?n:e||at(),o=fe(n)?{}:n||{},i={name:t,time:gn(r),attributes:o};return this.Y.push(i),this}isStandaloneSpan(){return!!this.rt}ot(){const t=qt();t&&t.emit("spanEnd",this);if(!(this.rt||this===Tn(this)))return;if(this.rt)return void(this.nt?function(t){const n=qt();if(!n)return;const e=t[1];if(!e||0===e.length)return void n.recordDroppedEvent("before_send","span");n.sendEnvelope(t)}(function(t,n){const e=Un(t[0]),r=n&&n.getDsn(),o=n&&n.getOptions().tunnel,i={sent_at:(new Date).toISOString(),...function(t){return!!t.trace_id&&!!t.public_key}(e)&&{trace:e},...!!o&&r&&{dsn:Wn(r)}},s=n&&n.getOptions().beforeSendSpan,c=s?t=>s(vn(t)):t=>vn(t),u=[];for(const n of t){const t=c(n);t&&u.push(ne(t))}return Kn(i,u)}([this],t)):t&&t.recordDroppedEvent("sample_rate","span"));const n=this.st();if(n){(Mn(this).scope||Pt()).captureEvent(n)}}st(){if(!de(vn(this)))return;this.Z||(this.Z="");const{scope:t,isolationScope:n}=Mn(this),e=(t||Pt()).getClient()||qt();if(!0!==this.nt)return void(e&&e.recordDroppedEvent("sample_rate","transaction"));const r=$n(this).filter((t=>t!==this&&!function(t){return t instanceof ae&&t.isStandaloneSpan()}(t))).map((t=>vn(t))).filter(de),o=this.V[Bt],i={contexts:{trace:hn(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,...it({dynamicSamplingContext:Un(this)})},_metrics_summary:Ht(this),...o&&{transaction_info:{source:o}}},s=ue(this.Y);return s&&Object.keys(s).length&&(i.measurements=s),i}}function fe(t){return t&&"number"==typeof t||t instanceof Date||Array.isArray(t)}function de(t){return!!(t.start_timestamp&&t.timestamp&&t.span_id&&t.trace_id)}const le="__SENTRY_SUPPRESS_TRACING__";function he(t,n){const e=ve();if(e.startSpanManual)return e.startSpanManual(t,n);const r=ye(t),{forceTransaction:o,parentSpan:i}=t;return Ft(t.scope,(()=>we(i)((()=>{const e=Pt(),i=_e(e),s=t.onlyIfParent&&!i?new Ln:ge({parentSpan:i,spanArguments:r,forceTransaction:o,scope:e});function c(){s.end()}return kt(e,s),Pn((()=>n(s,c)),(()=>{const{status:t}=vn(s);!s.isRecording()||t&&"ok"!==t||s.setStatus({code:Zt,message:"internal_error"})}))}))))}function pe(t){const n=ve();if(n.startInactiveSpan)return n.startInactiveSpan(t);const e=ye(t),{forceTransaction:r,parentSpan:o}=t;return(t.scope?n=>Ft(t.scope,n):void 0!==o?t=>me(o,t):t=>t())((()=>{const n=Pt(),o=_e(n);return t.onlyIfParent&&!o?new Ln:ge({parentSpan:o,spanArguments:e,forceTransaction:r,scope:n})}))}function me(t,n){const e=ve();return e.withActiveSpan?e.withActiveSpan(t,n):Ft((e=>(kt(e,t||void 0),n(e))))}function ge({parentSpan:t,spanArguments:n,forceTransaction:e,scope:r}){if(!Rn())return new Ln;const o=Nt();let i;if(t&&!e)i=function(t,n,e){const{spanId:r,traceId:o}=t.spanContext(),i=!n.getScopeData().sdkProcessingMetadata[le]&&bn(t),s=i?new ae({...e,parentSpanId:r,traceId:o,sampled:i}):new Ln({traceId:o});En(t,s);const c=qt();c&&(c.emit("spanStart",s),e.endTimestamp&&c.emit("spanEnd",s));return s}(t,r,n),En(t,i);else if(t){const e=Un(t),{traceId:o,spanId:s}=t.spanContext(),c=bn(t);i=be({traceId:o,parentSpanId:s,...n},r,c),Fn(i,e)}else{const{traceId:t,dsc:e,parentSpanId:s,sampled:c}={...o.getPropagationContext(),...r.getPropagationContext()};i=be({traceId:t,parentSpanId:s,...n},r,c),e&&Fn(i,e)}return function(t,n,e){t&&(Z(t,On,e),Z(t,Cn,n))}(i,r,o),i}function ye(t){const n={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const e={...n};return e.startTimestamp=gn(t.startTime),delete e.startTime,e}return n}function ve(){return Lt(x())}function be(t,n,e){const r=qt(),o=r&&r.getOptions()||{},{name:i="",attributes:s}=t,[c,u]=n.getScopeData().sdkProcessingMetadata[le]?[!1]:function(t,n){if(!Rn(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=Hn(e);return void 0===r?[!1]:r&&Math.random()me(t,n):t=>t()}const Se={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Ee="heartbeatFailed",$e="idleTimeout",Te="finalTimeout",ke="externalFinish";function Ie(t,n={}){const e=new Map;let r,o=!1,i=ke,s=!n.disableAutoFinish;const u=[],{idleTimeout:a=Se.idleTimeout,finalTimeout:f=Se.finalTimeout,childSpanTimeout:d=Se.childSpanTimeout,beforeSpanEnd:l}=n,h=qt();if(!h||!Rn())return new Ln;const p=Pt(),m=kn(),g=function(t){const n=pe(t);return kt(Pt(),n),n}(t);function y(){r&&(clearTimeout(r),r=void 0)}function v(t){y(),r=setTimeout((()=>{!o&&0===e.size&&s&&(i=$e,g.end(t))}),a)}function b(t){r=setTimeout((()=>{!o&&s&&(i=Ee,g.end(t))}),d)}function _(t){o=!0,e.clear(),u.forEach((t=>t())),kt(p,m);const n=vn(g),{start_timestamp:r}=n;if(!r)return;(n.data||{})[Gt]||g.setAttribute(Gt,i),c.log(`[Tracing] Idle span "${n.op}" finished`);const s=$n(g).filter((t=>t!==g));let d=0;s.forEach((n=>{n.isRecording()&&(n.setStatus({code:Zt,message:"cancelled"}),n.end(t));const e=vn(n),{timestamp:r=0,start_timestamp:o=0}=e;r-o<=(f+a)/1e3&&o<=t||(!function(t,n){t[wn]&&t[wn].delete(n)}(g,n),d++)})),d>0&&g.setAttribute("sentry.idle_span_discarded_spans",d)}return g.end=new Proxy(g.end,{apply(t,n,e){l&&l(g);const[r,...o]=e,i=gn(r||at()),s=$n(g).filter((t=>t!==g));if(!s.length)return _(i),Reflect.apply(t,n,[i,...o]);const c=s.map((t=>vn(t).timestamp)).filter((t=>!!t)),u=c.length?Math.max(...c):void 0,a=vn(g).start_timestamp,d=Math.min(a?a+f/1e3:1/0,Math.max(a||-1/0,Math.min(i,u||1/0)));return _(d),Reflect.apply(t,n,[d,...o])}}),u.push(h.on("spanStart",(t=>{if(o||t===g||vn(t).timestamp)return;var n;$n(g).includes(t)&&(n=t.spanContext().spanId,y(),e.set(n,!0),b(at()+d/1e3))}))),u.push(h.on("spanEnd",(t=>{var n;o||(n=t.spanContext().spanId,e.has(n)&&e.delete(n),0===e.size&&v(at()+a/1e3))}))),u.push(h.on("idleSpanEnableAutoFinish",(t=>{t===g&&(s=!0,v(),e.size&&b())}))),n.disableAutoFinish||v(),setTimeout((()=>{o||(g.setStatus({code:Zt,message:"deadline_exceeded"}),i=Te,g.end())}),f),g}function xe(t,n,e,r=0){return new _t(((o,i)=>{const s=t[r];if(null===n||"function"!=typeof s)o(n);else{const c=s({...n},e);q(c)?c.then((n=>xe(t,n,e,r+1).then(o))).then(null,i):xe(t,c,e,r+1).then(o).then(null,i)}}))}const Ae=new WeakMap;function je(t,n){const{fingerprint:e,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=n;!function(t,n){const{extra:e,tags:r,user:o,contexts:i,level:s,transactionName:c}=n,u=it(e);u&&Object.keys(u).length&&(t.extra={...u,...t.extra});const a=it(r);a&&Object.keys(a).length&&(t.tags={...a,...t.tags});const f=it(o);f&&Object.keys(f).length&&(t.user={...f,...t.user});const d=it(i);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:pn(n),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:Un(n),...t.sdkProcessingMetadata};const e=Tn(n),r=vn(e).description;r&&!t.transaction&&"transaction"===t.type&&(t.transaction=r)}(t,r),function(t,n){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[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,o),function(t,n){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...n}}(t,i)}function Ce(t,n){const{extra:e,tags:r,user:o,contexts:i,level:s,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:a,eventProcessors:f,attachments:d,propagationContext:l,transactionName:h,span:p}=n;Oe(t,"extra",e),Oe(t,"tags",r),Oe(t,"user",o),Oe(t,"contexts",i),t.sdkProcessingMetadata=$t(t.sdkProcessingMetadata,c,2),s&&(t.level=s),h&&(t.transactionName=h),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,...l}}function Oe(t,n,e){t[n]=$t(t[n],e,1)}function Me(t,n,r,o,i,s){const{normalizeDepth:c=3,normalizeMaxBreadth:u=1e3}=t,a={...n,event_id:n.event_id||r.event_id||dt(),timestamp:n.timestamp||ut()},f=r.integrations||t.integrations.map((t=>t.name));!function(t,n){const{environment:e,release:r,dist:o,maxValueLength:i=250}=n;"environment"in t||(t.environment="environment"in n?e:Nn);void 0===t.release&&void 0!==r&&(t.release=r);void 0===t.dist&&void 0!==o&&(t.dist=o);t.message&&(t.message=J(t.message,i));const s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=J(s.value,i));const c=t.request;c&&c.url&&(c.url=J(c.url,i))}(a,t),function(t,n){n.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...n])}(a,f),i&&i.emit("applyFrameMetadata",n),void 0===n.type&&function(t,n){const r=function(t){const n=e._sentryDebugIds;if(!n)return{};let r;const o=Ae.get(t);return o?r=o:(r=new Map,Ae.set(t,r)),Object.keys(n).reduce(((e,o)=>{let i;const s=r.get(o);s?i=s:(i=t(o),r.set(o,i));for(let t=i.length-1;t>=0;t--){const r=i[t],s=r&&r.filename;if(r&&s){e[s]=n[o];break}}return e}),{})}(n);try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{t.filename&&(t.debug_id=r[t.filename])}))}))}catch(t){}}(a,t.stackParser);const d=function(t,n){if(!n)return t;const e=t?t.clone():new At;return e.update(n),e}(o,r.captureContext);r.mechanism&&mt(a,r.mechanism);const l=i?i.getEventProcessors():[],h=Dt().getScopeData();if(s){Ce(h,s.getScopeData())}if(d){Ce(h,d.getScopeData())}const p=[...r.attachments||[],...h.attachments];p.length&&(r.attachments=p),je(a,h);return xe([...l,...h.eventProcessors],a,r).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.entries(n).forEach((([t,n])=>{e.push({type:"sourcemap",code_file:t,debug_id:n})}))}(t),"number"==typeof c&&c>0?function(t,n,e){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((t=>({...t,...t.data&&{data:Gn(t.data,n,e)}})))},...t.user&&{user:Gn(t.user,n,e)},...t.contexts&&{contexts:Gn(t.contexts,n,e)},...t.extra&&{extra:Gn(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=Gn(t.contexts.trace.data,n,e)));t.spans&&(r.spans=t.spans.map((t=>({...t,...t.data&&{data:Gn(t.data,n,e)}}))));return r}(t,c,u):t)))}function Re(t){if(t)return function(t){return t instanceof At||"function"==typeof t}(t)||function(t){return Object.keys(t).some((t=>Le.includes(t)))}(t)?{captureContext:t}:t}const Le=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function captureException(t,n){return Pt().captureException(t,Re(n))}function Pe(t,n){return Pt().captureEvent(t,n)}function Ne(t,n){Nt().setContext(t,n)}function De(t){Nt().setExtras(t)}function Fe(t,n){Nt().setExtra(t,n)}function qe(t){Nt().setTags(t)}function Ue(t,n){Nt().setTag(t,n)}function He(t){Nt().setUser(t)}function Be(){return Nt().lastEventId()}function We(t){const n=qt(),r=Nt(),o=Pt(),{release:i,environment:s=Nn}=n&&n.getOptions()||{},{userAgent:c}=e.navigator||{},u=wt({release:i,environment:s,user:o.getUser()||r.getUser(),...c&&{userAgent:c},...t}),a=r.getSession();return a&&"ok"===a.status&&St(a,{status:"exited"}),ze(),r.setSession(u),o.setSession(u),u}function ze(){const t=Nt(),n=Pt(),e=n.getSession()||t.getSession();e&&function(t,n){let e={};"ok"===t.status&&(e={status:"exited"}),St(t,e)}(e),Xe(),t.setSession(),n.setSession()}function Xe(){const t=Nt(),n=Pt(),e=qt(),r=n.getSession()||t.getSession();r&&e&&e.captureSession(r)}function Ge(t=!1){t?ze():Xe()}const Je="7";function Ye(t){const n=t.protocol?`${t.protocol}:`:"",e=t.port?`:${t.port}`:"";return`${n}//${t.host}${e}${t.path?`/${t.path}`:""}/api/`}function Ke(t,n){return e={sentry_key:t.publicKey,sentry_version:Je,...n&&{sentry_client:`${n.name}/${n.version}`}},Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&");var e}function Ve(t,n,e){return n||`${function(t){return`${Ye(t)}${t.projectId}/envelope/`}(t)}?${Ke(t,e)}`}const Qe=[];function Ze(t){const n=t.defaultIntegrations||[],e=t.integrations;let r;if(n.forEach((t=>{t.isDefaultInstance=!0})),Array.isArray(e))r=[...n,...e];else if("function"==typeof e){const t=e(n);r=Array.isArray(t)?t:[t]}else r=n;const o=function(t){const n={};return t.forEach((t=>{const{name:e}=t,r=n[e];r&&!r.isDefaultInstance&&t.isDefaultInstance||(n[e]=t)})),Object.values(n)}(r),i=o.findIndex((t=>"Debug"===t.name));if(i>-1){const[t]=o.splice(i,1);o.push(t)}return o}function tr(t,n){for(const e of n)e&&e.afterAllSetup&&e.afterAllSetup(t)}function nr(t,n,e){if(!e[n.name]){if(e[n.name]=n,-1===Qe.indexOf(n.name)&&"function"==typeof n.setupOnce&&(n.setupOnce(),Qe.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 er 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}}class rr{constructor(t){if(this.ct=t,this._integrations={},this.ut=0,this.ft={},this.dt={},this.S=[],t.dsn&&(this.lt=Xn(t.dsn)),this.lt){const n=Ve(this.lt,t.tunnel,t._metadata?t._metadata.sdk:void 0);this.ht=t.transport({tunnel:this.ct.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,e){const r=dt();if(gt(t))return r;const o={event_id:r,...n};return this.gt(this.eventFromException(t,o).then((t=>this.yt(t,o,e)))),o.event_id}captureMessage(t,n,e,r){const o={event_id:dt(),...e},i=P(t)?t:String(t),s=N(t)?this.eventFromMessage(i,n,o):this.eventFromException(t,o);return this.gt(s.then((t=>this.yt(t,o,r)))),o.event_id}captureEvent(t,n,e){const r=dt();if(n&&n.originalException&>(n.originalException))return r;const o={event_id:r,...n},i=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this.gt(this.yt(t,o,i||e)),o.event_id}captureSession(t){"string"!=typeof t.release||(this.sendSession(t),St(t,{init:!1}))}getDsn(){return this.lt}getOptions(){return this.ct}getSdkMetadata(){return this.ct._metadata}getTransport(){return this.ht}flush(t){const n=this.ht;return n?(this.emit("flush"),this.vt(t).then((e=>n.flush(t).then((t=>e&&t))))):vt(!0)}close(t){return this.flush(t).then((t=>(this.getOptions().enabled=!1,this.emit("close"),t)))}getEventProcessors(){return this.S}addEventProcessor(t){this.S.push(t)}init(){(this.bt()||this.ct.integrations.some((({name:t})=>t.startsWith("Spotlight"))))&&this._t()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];nr(this,t,this._integrations),n||tr(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let e=se(t,this.lt,this.ct._metadata,this.ct.tunnel);for(const t of n.attachments||[])e=Vn(e,ee(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 o=ie(e);return Kn({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&n&&{dsn:Wn(n)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this.lt,this.ct._metadata,this.ct.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,e){if(this.ct.sendClientReports){const r="number"==typeof e?e:1,o=`${t}:${n}`;this.ft[o]=(this.ft[o]||0)+r}}on(t,n){const e=this.dt[t]=this.dt[t]||[];return e.push(n),()=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)}}emit(t,...n){const e=this.dt[t];e&&e.forEach((t=>t(...n)))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this.bt()&&this.ht?this.ht.send(t).then(null,(t=>t)):vt({})}_t(){const{integrations:t}=this.ct;this._integrations=function(t,n){const e={};return n.forEach((n=>{n&&nr(t,n,e)})),e}(this,t),tr(this,t)}wt(t,n){let e=!1,r=!1;const o=n.exception&&n.exception.values;if(o){r=!0;for(const t of o){const n=t.mechanism;if(n&&!1===n.handled){e=!0;break}}}const i="ok"===t.status;(i&&0===t.errors||i&&e)&&(St(t,{...e&&{status:"crashed"},errors:t.errors||Number(r||e)}),this.captureSession(t))}vt(t){return new _t((n=>{let e=0;const r=setInterval((()=>{0==this.ut?(clearInterval(r),n(!0)):(e+=1,t&&e>=t&&(clearInterval(r),n(!1)))}),1)}))}bt(){return!1!==this.getOptions().enabled&&void 0!==this.ht}St(t,n,e,r=Nt()){const o=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i.length>0&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||r.setLastEventId(t.event_id||n.event_id),Me(o,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:o,dsc:i}=n;t.contexts={trace:it({trace_id:e,span_id:r,parent_span_id:o}),...t.contexts};const s=i||qn(e,this);t.sdkProcessingMetadata={dynamicSamplingContext:s,...t.sdkProcessingMetadata}}return t}))}yt(t,n={},e){return this.Et(t,n,e).then((t=>t.event_id),(t=>{}))}Et(t,n,e){const r=this.getOptions(),{sampleRate:o}=r,i=ir(t),s=or(t),c=t.type||"error",u=`before send for type \`${c}\``,a=void 0===o?void 0:Hn(o);if(s&&"number"==typeof a&&Math.random()>a)return this.recordDroppedEvent("sample_rate","error",t),bt(new er(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const f="replay_event"===c?"replay":c,d=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this.St(t,n,e,d).then((e=>{if(null===e)throw this.recordDroppedEvent("event_processor",f,t),new er("An event processor returned `null`, will not send event.","log");if(n.data&&!0===n.data.__sentry__)return e;const o=function(t,n,e,r){const{beforeSend:o,beforeSendTransaction:i,beforeSendSpan:s}=n;if(or(e)&&o)return o(e,r);if(ir(e)){if(e.spans&&s){const n=[];for(const r of e.spans){const e=s(r);e?n.push(e):t.recordDroppedEvent("before_send","span")}e.spans=n}if(i){if(e.spans){const t=e.spans.length;e.sdkProcessingMetadata={...e.sdkProcessingMetadata,spanCountBeforeProcessing:t}}return i(e,r)}}return e}(this,r,e,n);return function(t,n){const e=`${n} must return \`null\` or a valid event.`;if(q(t))return t.then((t=>{if(!D(t)&&null!==t)throw new er(e);return t}),(t=>{throw new er(`${n} rejected with ${t}`)}));if(!D(t)&&null!==t)throw new er(e);return t}(o,u)})).then((r=>{if(null===r){if(this.recordDroppedEvent("before_send",f,t),i){const n=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",n)}throw new er(`${u} returned \`null\`, will not send event.`,"log")}const o=e&&e.getSession();if(!i&&o&&this.wt(o,r),i){const t=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);t>0&&this.recordDroppedEvent("before_send","span",t)}const s=r.transaction_info;if(i&&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 er)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new er(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)}))}gt(t){this.ut++,t.then((t=>(this.ut--,t)),(t=>(this.ut--,t)))}$t(){const t=this.ft;return this.ft={},Object.entries(t).map((([t,n])=>{const[e,r]=t.split(":");return{reason:e,category:r,quantity:n}}))}Tt(){const t=this.$t();if(0===t.length)return;if(!this.lt)return;const n=(e=t,Kn((r=this.ct.tunnel&&Wn(this.lt))?{dsn:r}:{},[[{type:"client_report"},{timestamp:ut(),discarded_events:e}]]));var e,r;this.sendEnvelope(n)}}function or(t){return void 0===t.type}function ir(t){return"transaction"===t.type}function sr(t){Pt().setClient(t)}function cr(t){const n=[];function e(t){return n.splice(n.indexOf(t),1)[0]||Promise.resolve(void 0)}return{$:n,add:function(r){if(!(void 0===t||n.lengthe(o))).then(null,(()=>e(o).then(null,(()=>{})))),o},drain:function(t){return new _t(((e,r)=>{let o=n.length;if(!o)return e(!0);const i=setTimeout((()=>{t&&t>0&&e(!1)}),t);n.forEach((t=>{vt(t).then((()=>{--o||(clearTimeout(i),e(!0))}),r)}))}))}}}const ur=6e4;function ar(t,{statusCode:n,headers:e},r=Date.now()){const o={...t},i=e&&e["x-sentry-rate-limits"],s=e&&e["retry-after"];if(i)for(const t of i.trim().split(",")){const[n,e,,,i]=t.split(":",5),s=parseInt(n,10),c=1e3*(isNaN(s)?60:s);if(e)for(const t of e.split(";"))"metric_bucket"===t&&i&&!i.split(";").includes("custom")||(o[t]=r+c);else o.all=r+c}else s?o.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)?ur:r-n}(s,r):429===n&&(o.all=r+6e4);return o}const fr=64;function dr(t,n,e=cr(t.bufferSize||fr)){let r={};return{send:function(o){const i=[];if(Qn(o,((n,e)=>{const o=oe(e);if(function(t,n,e=Date.now()){return function(t,n){return t[n]||t.all||0}(t,n)>e}(r,o)){const r=lr(n,e);t.recordDroppedEvent("ratelimit_backoff",o,r)}else i.push(n)})),0===i.length)return vt({});const s=Kn(o[0],i),c=n=>{Qn(s,((e,r)=>{const o=lr(e,r);t.recordDroppedEvent(n,oe(r),o)}))};return e.add((()=>n({body:te(s)}).then((t=>(r=ar(r,t),t)),(t=>{throw c("network_error"),t})))).then((t=>t),(t=>{if(t instanceof er)return c("queue_overflow"),vt({});throw t}))},flush:t=>e.drain(t)}}function lr(t,n){if("event"===n||"transaction"===n)return Array.isArray(t)?t[1]:void 0}const hr=100;function pr(t,n){const e=qt(),r=Nt();if(!e)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=hr}=e.getOptions();if(i<=0)return;const c={timestamp:ut(),...t},u=o?s((()=>o(c,n))):c;null!==u&&(e.emit&&e.emit("beforeAddBreadcrumb",u,n),r.addBreadcrumb(u,i))}let mr;const gr=new WeakMap,yr=()=>({name:"FunctionToString",setupOnce(){mr=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=nt(this),e=gr.has(qt())&&void 0!==n?n:this;return mr.apply(e,t)}}catch(t){}},setup(t){gr.set(t,!0)}}),vr=[/^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"],br=(t={})=>({name:"InboundFilters",processEvent(n,e,r){const o=r.getOptions(),i=function(t={},n={}){return{allowUrls:[...t.allowUrls||[],...n.allowUrls||[]],denyUrls:[...t.denyUrls||[],...n.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...n.ignoreErrors||[],...t.disableErrorDefaults?[]:vr],ignoreTransactions:[...t.ignoreTransactions||[],...n.ignoreTransactions||[]],ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(t,o);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=_r(t);return!!e&&V(e,n)}(t,n.denyUrls))return!0;if(!function(t,n){if(!n||!n.length)return!0;const e=_r(t);return!e||V(e,n)}(t,n.allowUrls))return!0;return!1}(n,i)?null:n}});function _r(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}}function wr(t,n,e=250,r,o,i,s){if(!(i.exception&&i.exception.values&&s&&U(s.originalException,Error)))return;const c=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;var u,a;c&&(i.exception.values=(u=Sr(t,n,o,s.originalException,r,i.exception.values,c,0),a=e,u.map((t=>(t.value&&(t.value=J(t.value,a)),t)))))}function Sr(t,n,e,r,o,i,s,c){if(i.length>=e+1)return i;let u=[...i];if(U(r[o],Error)){Er(s,c);const i=t(n,r[o]),a=u.length;$r(i,o,a,c),u=Sr(t,n,e,r[o],o,[i,...u],i,a)}return Array.isArray(r.errors)&&r.errors.forEach(((r,i)=>{if(U(r,Error)){Er(s,c);const a=t(n,r),f=u.length;$r(a,`errors[${i}]`,f,c),u=Sr(t,n,e,r,o,[a,...u],a,f)}})),u}function Er(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 $r(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 Tr(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}}function kr(){"console"in e&&o.forEach((function(t){t in e.console&&Q(e.console,t,(function(n){return i[t]=n,function(...n){w("console",{args:n,level:t});const r=i[t];r&&r.apply(e.console,n)}}))}))}const Ir=["fatal","error","warning","log","info","debug"];function xr(t){return"warn"===t?"warning":Ir.includes(t)?t:"log"}const Ar=()=>{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(!Cr(t,n))return!1;if(!jr(t,n))return!1;return!0}(t,n))return!0;if(function(t,n){const e=Or(n),r=Or(t);if(!e||!r)return!1;if(e.type!==r.type||e.value!==r.value)return!1;if(!Cr(t,n))return!1;if(!jr(t,n))return!1;return!0}(t,n))return!0;return!1}(n,t))return null}catch(t){}return t=n}}};function jr(t,n){let e=g(t),r=g(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)),o=e.get(t);if(o)return o;const i=new n(t);return t.on("flush",(()=>i.flush())),t.on("close",(()=>i.close())),e.set(t,i),i}function Lr(t,n,e,r,o={}){const i=o.client||qt();if(!i)return;const s=kn(),c=s?Tn(s):void 0,u=c&&vn(c).description,{unit:a,tags:f,timestamp:d}=o,{release:l,environment:h}=i.getOptions(),p={};l&&(p.release=l),h&&(p.environment=h),u&&(p.transaction=u);Rr(i,t).add(n,e,r,a,{...p,...f},d)}function Pr(t,n,e,r){Lr(t,Mr,n,Dr(e),r)}const Nr={increment:function(t,n,e=1,r){Lr(t,"c",n,Dr(e),r)},distribution:Pr,set:function(t,n,e,r){Lr(t,"s",n,e,r)},gauge:function(t,n,e,r){Lr(t,"g",n,Dr(e),r)},timing:function(t,n,e,r="second",o){if("function"==typeof e){const r=at();return he({op:"metrics.timing",name:n,startTime:r,onlyIfParent:!0},(i=>Pn((()=>e()),(()=>{}),(()=>{const e=at();Pr(t,n,e-r,{...o,unit:"second"}),i.end(e)}))))}Pr(t,n,e,{...o,unit:r})},getMetricsAggregatorForClient:Rr};function Dr(t){return"string"==typeof t?parseInt(t):t}function Fr(t){return t.replace(/[^\w\-./]+/gi,"")}const qr=[["\n","\\n"],["\r","\\r"],["\t","\\t"],["\\","\\\\"],["|","\\u{7c}"],[",","\\u{2c}"]];function Ur(t){return[...t].reduce(((t,n)=>t+function(t){for(const[n,e]of qr)if(t===n)return e;return t}(n)),"")}function Hr(t,n){c.log(`Flushing aggregated metrics, number of metrics: ${n.length}`);const e=function(t,n,e,r){const o={sent_at:(new Date).toISOString()};e&&e.sdk&&(o.sdk={name:e.sdk.name,version:e.sdk.version});r&&n&&(o.dsn=Wn(n));const i=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 Kn(o,[i])}(n,t.getDsn(),t.getSdkMetadata(),t.getOptions().tunnel);t.sendEnvelope(e)}const Br={c:class{constructor(t){this.m=t}get weight(){return 1}add(t){this.m+=t}toString(){return`${this.m}`}},g:class{constructor(t){this.kt=t,this.It=t,this.xt=t,this.At=t,this.jt=1}get weight(){return 5}add(t){this.kt=t,tthis.xt&&(this.xt=t),this.At+=t,this.jt++}toString(){return`${this.kt}:${this.It}:${this.xt}:${this.At}:${this.jt}`}},[Mr]:class{constructor(t){this.m=[t]}get weight(){return this.m.length}add(t){this.m.push(t)}toString(){return this.m.join(":")}},s:class{constructor(t){this.first=t,this.m=new Set([t])}get weight(){return this.m.size}add(t){this.m.add(t)}toString(){return Array.from(this.m).map((t=>"string"==typeof t?function(t){let n=0;for(let e=0;e>>0}(t):t)).join(":")}}};class Wr{constructor(t){this.F=t,this.Ct=new Map,this.Ot=setInterval((()=>this.flush()),5e3)}add(t,n,e,r="none",o={},i=at()){const s=Math.floor(i),c=n.replace(/[^\w\-.]+/gi,"_");const u=function(t){const n={};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[Fr(e)]=Ur(String(t[e])));return n}(o),a=function(t){return t.replace(/[^\w]+/gi,"_")}(r),f=function(t,n,e,r){return`${t}${n}${e}${Object.entries(it(r)).sort(((t,n)=>t[0].localeCompare(n[0])))}`}(t,c,a,u);let d=this.Ct.get(f);const l=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:Zt,message:"internal_error"});t.end()}(e,t),delete r[n]))}const s=Pt(),c=qt(),{method:u,url:a}=t.fetchData,f=function(t){try{return new URL(t).href}catch(t){return}}(a),d=f?Tr(f).host:void 0,l=!!kn(),h=i&&l?pe({name:`${u} ${a}`,attributes:{url:a,type:"fetch","http.method":u,"http.url":f,"server.address":d,[Xt]:o,[zt]:"http.client"}}):new Ln;if(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,o){const i=Nt(),{traceId:s,spanId:c,sampled:u,dsc:a}={...i.getPropagationContext(),...e.getPropagationContext()},f=o?mn(o):dn(s,c,u),d=cn(a||(o?Un(o):qn(s,n))),l=r.headers||("undefined"!=typeof Request&&U(t,Request)?t.headers:void 0);if(l){if("undefined"!=typeof Headers&&U(l,Headers)){const t=new Headers(l);if(t.set("sentry-trace",f),d){const n=t.get(nn);if(n){const e=Xr(n);t.set(nn,e?`${e},${d}`:d)}else t.set(nn,d)}return t}if(Array.isArray(l)){const t=[...l.filter((t=>!(Array.isArray(t)&&"sentry-trace"===t[0]))).map((t=>{if(Array.isArray(t)&&t[0]===nn&&"string"==typeof t[1]){const[n,e,...r]=t;return[n,Xr(e),...r]}return t})),["sentry-trace",f]];return d&&t.push([nn,d]),t}{const t="baggage"in l?l.baggage:void 0;let n=[];return Array.isArray(t)?n=t.map((t=>"string"==typeof t?Xr(t):t)).filter((t=>""===t)):t&&n.push(Xr(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,Rn()&&l?h:void 0)}return h}function Xr(t){return t.split(",").filter((t=>!t.split("=")[0].startsWith(en))).join(",")}const Gr=function(){return{bindClient(t){Pt().setClient(t)},withScope:Ft,getClient:()=>qt(),getScope:Pt,getIsolationScope:Nt,captureException:(t,n)=>Pt().captureException(t,n),captureMessage:(t,n,e)=>Pt().captureMessage(t,n,e),captureEvent:Pe,addBreadcrumb:pr,setUser:He,setTags:qe,setTag:Ue,setExtra:Fe,setExtras:De,setContext:Ne,getIntegration(t){const n=qt();return n&&n.getIntegrationByName(t.id)||null},startSession:We,endSession:ze,captureSession(t){if(t)return ze();!function(){const t=Pt(),n=qt(),e=t.getSession();n&&e&&n.captureSession(e)}()}}};function Jr(t){return void 0===t?void 0:t>=400&&t<500?"warning":t>=500?"error":void 0}const Yr=e;function Kr(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Vr(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in Yr))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}())return!1;if(Kr(Yr.fetch))return!0;let t=!1;const n=Yr.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=Kr(e.contentWindow.fetch)),n.head.removeChild(e)}catch(t){}return t}function Qr(t,n){const e="fetch";b(e,t),_(e,(()=>Zr(void 0,n)))}function Zr(t,n=!1){n&&!Vr()||Q(e,"fetch",(function(n){return function(...r){const{method:o,url:i}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[n,e]=t;return{url:eo(n),method:no(e,"method")?String(e.method).toUpperCase():"GET"}}const n=t[0];return{url:eo(n),method:no(n,"method")?String(n.method).toUpperCase():"GET"}}(r),s={args:r,fetchData:{method:o,url:i},startTimestamp:1e3*at()};t||w("fetch",{...s});const c=(new Error).stack;return n.apply(e,r).then((async n=>(t?t(n):w("fetch",{...s,endTimestamp:1e3*at(),response:n}),n)),(t=>{throw w("fetch",{...s,endTimestamp:1e3*at(),error:t}),C(t)&&void 0===t.stack&&(t.stack=c,Z(t,"framesToPop",1)),t}))}}))}function to(t){let n;try{n=t.clone()}catch(t){return}!async function(t,n){if(t&&t.body){const e=t.body,r=e.getReader(),o=setTimeout((()=>{e.cancel().then(null,(()=>{}))}),9e4);let i=!0;for(;i;){let t;try{t=setTimeout((()=>{e.cancel().then(null,(()=>{}))}),5e3);const{done:o}=await r.read();clearTimeout(t),o&&(n(),i=!1)}catch(t){i=!1}finally{clearTimeout(t)}}clearTimeout(o),r.releaseLock(),e.cancel().then(null,(()=>{}))}}(n,(()=>{w("fetch-body-resolved",{endTimestamp:1e3*at(),response:t})}))}function no(t,n){return!!t&&"object"==typeof t&&!!t[n]}function eo(t){return"string"==typeof t?t:t?no(t,"url")?t.url:t.toString?t.toString():"":""}const ro=e;function oo(t){let n,e=t[0],r=1;for(;re.call(n,...t))),n=void 0)}return e}const io=()=>{},so=["attachTo","createForm","createWidget","remove"],co=Object.assign((t=>(s((()=>{console.warn("You are using feedbackIntegration() even though this bundle does not include feedback.")})),{name:"Feedback",...so.reduce(((t,n)=>(t[n]=io,t)),{})})),{_isShim:!0}),uo=["start","stop","flush"];const ao=e;let fo=0;function lo(){return fo>0}function ho(t,n={},e){if("function"!=typeof t)return t;try{const n=t.__sentry_wrapped__;if(n)return"function"==typeof n?n:t;if(nt(t))return t}catch(n){return t}const sentryWrapped=function(){const e=Array.prototype.slice.call(arguments);try{const r=e.map((t=>ho(t,n)));return t.apply(this,r)}catch(t){throw fo++,setTimeout((()=>{fo--})),Ft((r=>{r.addEventProcessor((t=>(n.mechanism&&(pt(t,void 0),mt(t,n.mechanism)),t.extra={...t.extra,arguments:e},t))),captureException(t)})),t}};try{for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(sentryWrapped[n]=t[n])}catch(t){}tt(sentryWrapped,t),Z(t,"__sentry_wrapped__",sentryWrapped);try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch(t){}return sentryWrapped}function po(t,n){const e=yo(t,n),r={type:_o(n),value:wo(n)};return e.length&&(r.stacktrace={frames:e}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function mo(t,n,e,r){const o=qt(),i=o&&o.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__:Jn(n,i)};if(s)return{exception:{values:[po(t,s)]},extra:c};const u={exception:{values:[{type:F(n)?n.constructor.name:r?"UnhandledRejection":"Error",value:ko(n,{isUnhandledRejection:r})}]},extra:c};if(e){const n=yo(t,e);n.length&&(u.exception.values[0].stacktrace={frames:n})}return u}function go(t,n){return{exception:{values:[po(t,n)]}}}function yo(t,n){const e=n.stacktrace||n.stack||"",r=function(t){if(t&&vo.test(t.message))return 1;return 0}(n),o=function(t){if("number"==typeof t.framesToPop)return t.framesToPop;return 0}(n);try{return t(e,r,o)}catch(t){}return[]}const vo=/Minified React error #\d+;/i;function bo(t){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&t instanceof WebAssembly.Exception}function _o(t){const n=t&&t.name;if(!n&&bo(t)){return t.message&&Array.isArray(t.message)&&2==t.message.length?t.message[0]:"WebAssembly.Exception"}return n}function wo(t){const n=t&&t.message;return n?n.error&&"string"==typeof n.error.message?n.error.message:bo(t)&&Array.isArray(t.message)&&2==t.message.length?t.message[1]:n:"No error message"}function So(t,n,e,r){const o=$o(t,n,e&&e.syntheticException||void 0,r);return mt(o),o.level="error",e&&e.event_id&&(o.event_id=e.event_id),vt(o)}function Eo(t,n,e="info",r,o){const i=To(t,n,r&&r.syntheticException||void 0,o);return i.level=e,r&&r.event_id&&(i.event_id=r.event_id),vt(i)}function $o(t,n,e,r,o){let i;if(M(n)&&n.error){return go(t,n.error)}if(R(n)||O(n,"DOMException")){const o=n;if("stack"in n)i=go(t,n);else{const n=o.name||(R(o)?"DOMError":"DOMException"),s=o.message?`${n}: ${o.message}`:n;i=To(t,s,e,r),pt(i,s)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}if(C(n))return go(t,n);if(D(n)||F(n)){return i=mo(t,n,e,o),mt(i,{synthetic:!0}),i}return i=To(t,n,e,r),pt(i,`${n}`),mt(i,{synthetic:!0}),i}function To(t,n,e,r){const o={};if(r&&e){const r=yo(t,e);r.length&&(o.exception={values:[{value:n,stacktrace:{frames:r}}]})}if(P(n)){const{__sentry_template_string__:t,__sentry_template_values__:e}=n;return o.logentry={message:t,params:e},o}return o.message=n,o}function ko(t,{isUnhandledRejection:n}){const e=function(t,n=40){const e=Object.keys(et(t));e.sort();const r=e[0];if(!r)return"[object has no keys]";if(r.length>=n)return J(r,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:J(r,n)}return""}(t),r=n?"promise rejection":"exception";if(M(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 Io(t,{metadata:n,tunnel:e,dsn:r}){const o={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:Wn(r)}},i=function(t){return[{type:"user_report"},t]}(t);return Kn(o,[i])}class xo extends rr{constructor(t){const e={parentSpanIsAlwaysRootSpan:!0,...t};!function(t,e,r=[e],o="npm"){const i=t._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${e}`,packages:r.map((t=>({name:`${o}:@sentry/${t}`,version:n}))),version:n}),t._metadata=i}(e,"browser",["browser"],ao.SENTRY_SDK_SOURCE||"cdn"),super(e),e.sendClientReports&&ao.document&&ao.document.addEventListener("visibilitychange",(()=>{"hidden"===ao.document.visibilityState&&this.Tt()}))}eventFromException(t,n){return So(this.ct.stackParser,t,n,this.ct.attachStacktrace)}eventFromMessage(t,n="info",e){return Eo(this.ct.stackParser,t,n,e,this.ct.attachStacktrace)}captureUserFeedback(t){if(!this.bt())return;const n=Io(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}St(t,n,e){return t.platform=t.platform||"javascript",super.St(t,n,e)}}const Ao=(t,n,e,r)=>{let o,i;return s=>{n.value>=0&&(s||r)&&(i=n.value-(o||0),(i||void 0===o)&&(o=n.value,n.delta=i,n.rating=((t,n)=>t>n[1]?"poor":t>n[0]?"needs-improvement":"good")(n.value,e),t(n)))}},jo=e,Co=()=>jo.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Oo=()=>{const t=Co();return t&&t.activationStart||0},Mo=(t,n)=>{const e=Co();let r="navigate";e&&(jo.document&&jo.document.prerendering||Oo()>0?r="prerender":jo.document&&jo.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}},Ro=(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){}},Lo=t=>{const n=n=>{("pagehide"===n.type||jo.document&&"hidden"===jo.document.visibilityState)&&t(n)};jo.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))},Po=t=>{let n=!1;return e=>{n||(t(e),n=!0)}};let No=-1;const Do=t=>{"hidden"===jo.document.visibilityState&&No>-1&&(No="visibilitychange"===t.type?t.timeStamp:0,removeEventListener("visibilitychange",Do,!0),removeEventListener("prerenderingchange",Do,!0))},Fo=()=>(jo.document&&No<0&&(No="hidden"!==jo.document.visibilityState||jo.document.prerendering?1/0:0,addEventListener("visibilitychange",Do,!0),addEventListener("prerenderingchange",Do,!0)),{get firstHiddenTime(){return No}}),qo=t=>{jo.document&&jo.document.prerendering?addEventListener("prerenderingchange",(()=>t()),!0):t()},Uo=[1800,3e3],Ho=[.1,.25],Bo=(t,n={})=>{((t,n={})=>{qo((()=>{const e=Fo(),r=Mo("FCP");let o;const i=Ro("paint",(t=>{t.forEach((t=>{"first-contentful-paint"===t.name&&(i.disconnect(),t.startTime{const e=Mo("CLS",0);let r,o=0,i=[];const s=t=>{t.forEach((t=>{if(!t.hadRecentInput){const n=i[0],e=i[i.length-1];o&&n&&e&&t.startTime-e.startTime<1e3&&t.startTime-n.startTime<5e3?(o+=t.value,i.push(t)):(o=t.value,i=[t])}})),o>e.value&&(e.value=o,e.entries=i,r())},c=Ro("layout-shift",s);c&&(r=Ao(t,e,Ho,n.reportAllChanges),Lo((()=>{s(c.takeRecords()),r(!0)})),setTimeout(r,0))})))},Wo=[100,300],zo=(t,n={})=>{qo((()=>{const e=Fo(),r=Mo("FID");let o;const i=t=>{t.startTime{t.forEach(i)},c=Ro("first-input",s);o=Ao(t,r,Wo,n.reportAllChanges),c&&Lo(Po((()=>{s(c.takeRecords()),c.disconnect()})))}))};let Xo=0,Go=1/0,Jo=0;const Yo=t=>{t.forEach((t=>{t.interactionId&&(Go=Math.min(Go,t.interactionId),Jo=Math.max(Jo,t.interactionId),Xo=Jo?(Jo-Go)/7+1:0)}))};let Ko;const Vo=()=>{"interactionCount"in performance||Ko||(Ko=Ro("event",Yo,{type:"event",buffered:!0,durationThreshold:0}))},Qo=[200,500],Zo=()=>(Ko?Xo:performance.interactionCount||0)-0,ti=[],ni={},ei=t=>{const n=ti[ti.length-1],e=ni[t.interactionId];if(e||ti.length<10||n&&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]};ni[n.id]=n,ti.push(n)}ti.sort(((t,n)=>n.latency-t.latency)),ti.splice(10).forEach((t=>{delete ni[t.id]}))}},ri=(t,n={})=>{qo((()=>{Vo();const e=Mo("INP");let r;const o=t=>{t.forEach((t=>{if(t.interactionId&&ei(t),"first-input"===t.entryType){!ti.some((n=>n.entries.some((n=>t.duration===n.duration&&t.startTime===n.startTime))))&&ei(t)}}));const n=(()=>{const t=Math.min(ti.length-1,Math.floor(Zo()/50));return ti[t]})();n&&n.latency!==e.value&&(e.value=n.latency,e.entries=n.entries,r())},i=Ro("event",o,{durationThreshold:null!=n.durationThreshold?n.durationThreshold:40});r=Ao(t,e,Qo,n.reportAllChanges),i&&("PerformanceEventTiming"in jo&&"interactionId"in PerformanceEventTiming.prototype&&i.observe({type:"first-input",buffered:!0}),Lo((()=>{o(i.takeRecords()),e.value<0&&Zo()>0&&(e.value=0,e.entries=[]),r(!0)})))}))},oi=[2500,4e3],ii={},si=(t,n={})=>{qo((()=>{const e=Fo(),r=Mo("LCP");let o;const i=t=>{const n=t[t.length-1];n&&n.startTime{ii[r.id]||(i(s.takeRecords()),s.disconnect(),ii[r.id]=!0,o(!0))}));["keydown","click"].forEach((t=>{jo.document&&addEventListener(t,(()=>setTimeout(e,0)),!0)})),Lo(e)}}))},ci=[800,1800],ui=t=>{jo.document&&jo.document.prerendering?qo((()=>ui(t))):jo.document&&"complete"!==jo.document.readyState?addEventListener("load",(()=>ui(t)),!0):setTimeout(t,0)},ai=(t,n={})=>{const e=Mo("TTFB"),r=Ao(t,e,ci,n.reportAllChanges);ui((()=>{const t=Co();if(t){const n=t.responseStart;if(n<=0||n>performance.now())return;e.value=Math.max(n-Oo(),0),e.entries=[t],r(!0)}}))},fi={},di={};let li,hi,pi,mi,gi;function yi(t,n=!1){return Ti("cls",t,_i,li,n)}function vi(t,n){return ki(t,n),di[t]||(!function(t){const n={};"event"===t&&(n.durationThreshold=0);Ro(t,(n=>{bi(t,{entries:n})}),n)}(t),di[t]=!0),Ii(t,n)}function bi(t,n){const e=fi[t];if(e&&e.length)for(const t of e)try{t(n)}catch(t){}}function _i(){return Bo((t=>{bi("cls",{metric:t}),li=t}),{reportAllChanges:!0})}function wi(){return zo((t=>{bi("fid",{metric:t}),hi=t}))}function Si(){return si((t=>{bi("lcp",{metric:t}),pi=t}),{reportAllChanges:!0})}function Ei(){return ai((t=>{bi("ttfb",{metric:t}),mi=t}))}function $i(){return ri((t=>{bi("inp",{metric:t}),gi=t}))}function Ti(t,n,e,r,o=!1){let i;return ki(t,n),di[t]||(i=e(),di[t]=!0),r&&n({metric:r}),Ii(t,n,o?i:void 0)}function ki(t,n){fi[t]=fi[t]||[],fi[t].push(n)}function Ii(t,n,e){return()=>{e&&e();const r=fi[t];if(!r)return;const o=r.indexOf(n);-1!==o&&r.splice(o,1)}}function xi(t){return"number"==typeof t&&isFinite(t)}function Ai(t,n,e,{...r}){const o=vn(t).start_timestamp;return o&&o>n&&"function"==typeof t.updateStartTime&&t.updateStartTime(n),me(t,(()=>{const t=pe({startTime:n,...r});return t&&t.end(e),t}))}function ji(t){const n=qt();if(!n)return;const{name:e,transaction:r,attributes:o,startTime:i}=t,{release:s,environment:c}=n.getOptions(),u=n.getIntegrationByName("Replay"),a=u&&u.getReplayId(),f=Pt(),d=f.getUser(),l=void 0!==d?d.email||d.id||d.ip_address:void 0;let h;try{h=f.getScopeData().contexts.profile.profile_id}catch(t){}return pe({name:e,attributes:{release:s,environment:c,user:l||void 0,profile_id:h||void 0,replay_id:a||void 0,transaction:r,"user_agent.original":jo.navigator&&jo.navigator.userAgent,...o},startTime:i,experimental:{standalone:!0}})}function Ci(){return jo&&jo.addEventListener&&jo.performance}function Oi(t){return t/1e3}function Mi(){let t,n,e=0;if(!function(){try{return oo([PerformanceObserver,"access",t=>t.supportedEntryTypes,"optionalAccess",t=>t.includes,"call",t=>t("layout-shift")])}catch(t){return!1}}())return;let r=!1;function o(){r||(r=!0,n&&function(t,n,e){const r=Oi((ft||0)+(oo([n,"optionalAccess",t=>t.startTime])||0)),o=Pt().getScopeData().transactionName,i=n?z(oo([n,"access",t=>t.sources,"access",t=>t[0],"optionalAccess",t=>t.node])):"Layout shift",s=it({[Xt]:"auto.http.browser.cls",[zt]:"ui.webvital.cls",[Kt]:oo([n,"optionalAccess",t=>t.duration])||0,"sentry.pageload.span_id":e}),c=ji({name:i,transaction:o,attributes:s,startTime:r});oo([c,"optionalAccess",t=>t.addEvent,"call",n=>n("cls",{[Jt]:"",[Yt]:t})]),oo([c,"optionalAccess",t=>t.end,"call",t=>t(r)])}(e,t,n),i())}const i=yi((({metric:n})=>{const r=n.entries[n.entries.length-1];r&&(e=n.value,t=r)}),!0);Lo((()=>{o()})),setTimeout((()=>{const t=oo([qt(),"optionalAccess",t=>t.on,"call",n=>n("startNavigationSpan",(()=>{o(),t&&t()}))]),e=kn(),r=e&&Tn(e),i=r&&vn(r);i&&"pageload"===i.op&&(n=r.spanContext().spanId)}),0)}const Ri=2147483647;let Li,Pi,Ni=0,Di={};function Fi({recordClsStandaloneSpans:t}){const n=Ci();if(n&&ft){n.mark&&jo.performance.mark("sentry-tracing-init");const e=Ti("fid",(({metric:t})=>{const n=t.entries[t.entries.length-1];if(!n)return;const e=Oi(ft),r=Oi(n.startTime);Di.fid={value:t.value,unit:"millisecond"},Di["mark.fid"]={value:e+r,unit:"second"}}),wi,hi),r=function(t,n=!1){return Ti("lcp",t,Si,pi,n)}((({metric:t})=>{const n=t.entries[t.entries.length-1];n&&(Di.lcp={value:t.value,unit:"millisecond"},Li=n)}),!0),o=function(t){return Ti("ttfb",t,Ei,mi)}((({metric:t})=>{t.entries[t.entries.length-1]&&(Di.ttfb={value:t.value,unit:"millisecond"})})),i=t?Mi():yi((({metric:t})=>{const n=t.entries[t.entries.length-1];n&&(Di.cls={value:t.value,unit:""},Pi=n)}),!0);return()=>{e(),r(),o(),i&&i()}}return()=>{}}function qi(t,n){const e=Ci();if(!e||!jo.performance.getEntries||!ft)return;const r=Oi(ft),o=e.getEntries(),{op:i,start_timestamp:s}=vn(t);if(o.slice(Ni).forEach((n=>{const e=Oi(n.startTime),o=Oi(Math.max(0,n.duration));if(!("navigation"===i&&s&&r+e{Ui(t,n,r,e)})),Ui(t,n,"secureConnection",e,"TLS/SSL","connectEnd"),Ui(t,n,"fetch",e,"cache","domainLookupStart"),Ui(t,n,"domainLookup",e,"DNS"),function(t,n,e){const r=e+Oi(n.requestStart),o=e+Oi(n.responseEnd),i=e+Oi(n.responseStart);n.responseEnd&&(Ai(t,r,o,{op:"browser.request",name:n.name,attributes:{[Xt]:"auto.ui.browser.metrics"}}),Ai(t,i,o,{op:"browser.response",name:n.name,attributes:{[Xt]:"auto.ui.browser.metrics"}}))}(t,n,e)}(t,n,r);break;case"mark":case"paint":case"measure":{!function(t,n,e,r,o){const i=Co(),s=Oi(i?i.requestStart:0),c=o+Math.max(e,s),u=o+e,a=u+r,f={[Xt]:"auto.resource.browser.metrics"};c!==u&&(f["sentry.browser.measure_happened_before_request"]=!0,f["sentry.browser.measure_start_time"]=c);Ai(t,c,a,{name:n.name,op:n.entryType,attributes:f})}(t,n,e,o,r);const i=Fo(),s=n.startTime{ce(t,n.value,n.unit)})),t.setAttribute("performance.timeOrigin",r),t.setAttribute("performance.activationStart",Oo()),function(t){Li&&(Li.element&&t.setAttribute("lcp.element",z(Li.element)),Li.id&&t.setAttribute("lcp.id",Li.id),Li.url&&t.setAttribute("lcp.url",Li.url.trim().slice(0,200)),null!=Li.loadTime&&t.setAttribute("lcp.loadTime",Li.loadTime),null!=Li.renderTime&&t.setAttribute("lcp.renderTime",Li.renderTime),t.setAttribute("lcp.size",Li.size));Pi&&Pi.sources&&Pi.sources.forEach(((n,e)=>t.setAttribute(`cls.source.${e+1}`,z(n.node))))}(t)}Li=void 0,Pi=void 0,Di={}}function Ui(t,n,e,r,o,i){const s=i?n[i]:n[`${e}End`],c=n[`${e}Start`];c&&s&&Ai(t,r+Oi(c),r+Oi(s),{op:`browser.${o||e}`,name:n.name,attributes:{[Xt]:"auto.ui.browser.metrics"}})}function Hi(t,n,e,r){const o=n[e];null!=o&&o{const e=jo[n]&&jo[n].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(Q(e,"addEventListener",(function(n){return function(e,r,o){if("click"===e||"keypress"==e)try{const r=this,i=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},s=i[e]=i[e]||{refCount:0};if(!s.handler){const r=Yi(t);s.handler=r,n.call(this,e,r,o)}s.refCount++}catch(t){}return n.call(this,e,r,o)}})),Q(e,"removeEventListener",(function(t){return function(n,e,r){if("click"===n||"keypress"==n)try{const e=this,o=e.__sentry_instrumentation_handlers__||{},i=o[n];i&&(i.refCount--,i.refCount<=0&&(t.call(this,n,i.handler,r),i.handler=void 0,delete o[n]),0===Object.keys(o).length&&delete e.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,n,e,r)}})))}))}function Yi(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;Z(e,"_sentryCaptured",!0),r&&!r._sentryId&&Z(r,"_sentryId",dt());const o="keypress"===e.type?"input":e.type;if(!function(t){if(t.type!==zi)return!1;try{if(!t.target||t.target._sentryId!==Xi)return!1}catch(t){}return!0}(e)){t({event:e,name:o,global:n}),zi=e.type,Xi=r?r._sentryId:void 0}clearTimeout(Wi),Wi=jo.setTimeout((()=>{Xi=void 0,zi=void 0}),Bi)}}function Ki(t){const n="history";b(n,t),_(n,Vi)}function Vi(){if(!function(){const t=ro.chrome,n=t&&t.app&&t.app.runtime,e="history"in ro&&!!ro.history.pushState&&!!ro.history.replaceState;return!n&&e}())return;const t=jo.onpopstate;function n(t){return function(...n){const e=n.length>2?n[2]:void 0;if(e){const t=Gi,n=String(e);Gi=n;w("history",{from:t,to:n})}return t.apply(this,n)}}jo.onpopstate=function(...n){const e=jo.location.href,r=Gi;Gi=e;if(w("history",{from:r,to:e}),t)try{return t.apply(this,n)}catch(t){}},Q(jo.history,"pushState",n),Q(jo.history,"replaceState",n)}const Qi={};function Zi(t){Qi[t]=void 0}const ts="__sentry_xhr_v3__";function ns(t){b("xhr",t),_("xhr",es)}function es(){if(!jo.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(t,n,e){const r=1e3*at(),o=L(e[0])?e[0].toUpperCase():void 0,i=function(t){if(L(t))return t;try{return t.toString()}catch(t){}return}(e[1]);if(!o||!i)return t.apply(n,e);n[ts]={method:o,url:i,request_headers:{}},"POST"===o&&i.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const s=()=>{const t=n[ts];if(t&&4===n.readyState){try{t.status_code=n.status}catch(t){}w("xhr",{endTimestamp:1e3*at(),startTimestamp:r,xhr:n})}};return"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply:(t,n,e)=>(s(),t.apply(n,e))}):n.addEventListener("readystatechange",s),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(t,n,e){const[r,o]=e,i=n[ts];return i&&L(r)&&L(o)&&(i.request_headers[r.toLowerCase()]=o),t.apply(n,e)}}),t.apply(n,e)}}),t.send=new Proxy(t.send,{apply(t,n,e){const r=n[ts];if(!r)return t.apply(n,e);void 0!==e[0]&&(r.body=e[0]);return w("xhr",{startTimestamp:1e3*at(),xhr:n}),t.apply(n,e)}})}const rs=[],os=new Map;function is(){if(Ci()&&ft){const t=Ti("inp",(({metric:t})=>{if(null==t.value)return;const n=t.entries.find((n=>n.duration===t.value&&ss[n.name]));if(!n)return;const{interactionId:e}=n,r=ss[n.name],o=Oi(ft+n.startTime),i=Oi(t.value),s=kn(),c=s?Tn(s):void 0,u=(null!=e?os.get(e):void 0)||c,a=u?vn(u).description:Pt().getScopeData().transactionName,f=ji({name:z(n.target),transaction:a,attributes:it({[Xt]:"auto.http.browser.inp",[zt]:`ui.interaction.${r}`,[Kt]:n.duration}),startTime:o});oo([f,"optionalAccess",t=>t.addEvent,"call",n=>n("inp",{[Jt]:"millisecond",[Yt]:t.value})]),oo([f,"optionalAccess",t=>t.end,"call",t=>t(o+i)])}),$i,gi);return()=>{t()}}return()=>{}}const ss={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 cs(t,n=function(t){const n=Qi[t];if(n)return n;let e=jo[t];if(Kr(e))return Qi[t]=e.bind(jo);const r=jo.document;if(r&&"function"==typeof r.createElement)try{const n=r.createElement("iframe");n.hidden=!0,r.head.appendChild(n);const o=n.contentWindow;o&&o[t]&&(e=o[t]),r.head.removeChild(n)}catch(t){}return e?Qi[t]=e.bind(jo):e}("fetch")){let e=0,r=0;return dr(t,(function(o){const i=o.body.length;e+=i,r++;const s={body:o.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:e<=6e4&&r<15,...t.fetchOptions};if(!n)return Zi("fetch"),bt("No fetch implementation available");try{return n(t.url,s).then((t=>(e-=i,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 Zi("fetch"),e-=i,r--,bt(t)}}))}function us(t,n,e,r){const o={filename:t,function:""===n?a:n,in_app:!0};return void 0!==e&&(o.lineno=e),void 0!==r&&(o.colno=r),o}const as=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,fs=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ds=/\((\S*)(?::(\d+))(?::(\d+))\)/,ls=[30,t=>{const n=as.exec(t);if(n){const[,t,e,r]=n;return us(t,a,+e,+r)}const e=fs.exec(t);if(e){if(e[2]&&0===e[2].indexOf("eval")){const t=ds.exec(e[2]);t&&(e[2]=t[1],e[3]=t[2],e[4]=t[3])}const[t,n]=$s(e[1]||a,e[2]);return us(n,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],hs=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ps=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ms=[50,t=>{const n=hs.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){const t=ps.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]||a;return[e,t]=$s(e,t),us(t,e,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}}],gs=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ys=[40,t=>{const n=gs.exec(t);return n?us(n[2],n[1]||a,+n[3],n[4]?+n[4]:void 0):void 0}],vs=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,bs=[10,t=>{const n=vs.exec(t);return n?us(n[2],n[3]||a,+n[1]):void 0}],_s=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,ws=[20,t=>{const n=_s.exec(t);return n?us(n[5],n[3]||n[4]||a,+n[1],+n[2]):void 0}],Ss=[ls,ms],Es=l(...Ss),$s=(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]:a,e?`safari-extension:${n}`:`safari-web-extension:${n}`]:[t,n]},Ts=1024,ks=(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";b(n,t),_(n,kr)}(function(t){return function(n){if(qt()!==t)return;const e={category:"console",data:{arguments:n.args,logger:"console"},level:xr(n.level),message:Y(n.args," ")};if("assert"===n.level){if(!1!==n.args[0])return;e.message=`Assertion failed: ${Y(n.args.slice(1)," ")||"console.assert"}`,e.data.arguments=n.args.slice(1)}pr(e,{input:n.args,level:n.level})}}(t)),n.dom&&(e=function(t,n){return function(e){if(qt()!==t)return;let r,o,i="object"==typeof n?n.serializeAttribute:void 0,s="object"==typeof n&&"number"==typeof n.maxStringLength?n.maxStringLength:void 0;s&&s>Ts&&(s=Ts),"string"==typeof i&&(i=[i]);try{const t=e.event,n=function(t){return!!t&&!!t.target}(t)?t.target:t;r=z(n,{keyAttrs:i,maxStringLength:s}),o=G(n)}catch(t){r=""}if(0===r.length)return;const c={category:`ui.${e.name}`,message:r};o&&(c.data={"ui.component_name":o}),pr(c,{event:e.event,name:e.name,global:e.global})}}(t,n.dom),b("dom",e),_("dom",Ji)),n.xhr&&ns(function(t){return function(n){if(qt()!==t)return;const{startTimestamp:e,endTimestamp:r}=n,o=n.xhr[ts];if(!e||!r||!o)return;const{method:i,url:s,status_code:c,body:u}=o,a={method:i,url:s,status_code:c},f={xhr:n.xhr,input:u,startTimestamp:e,endTimestamp:r};pr({category:"xhr",data:a,type:"http",level:Jr(c)},f)}}(t)),n.fetch&&Qr(function(t){return function(n){if(qt()!==t)return;const{startTimestamp:e,endTimestamp:r}=n;if(r&&(!n.fetchData.url.match(/sentry_key/)||"POST"!==n.fetchData.method))if(n.error){pr({category:"fetch",data:n.fetchData,level:"error",type:"http"},{data:n.error,input:n.args,startTimestamp:e,endTimestamp:r})}else{const t=n.response,o={...n.fetchData,status_code:t&&t.status},i={input:n.args,response:t,startTimestamp:e,endTimestamp:r};pr({category:"fetch",data:o,type:"http",level:Jr(o.status_code)},i)}}}(t)),n.history&&Ki(function(t){return function(n){if(qt()!==t)return;let e=n.from,r=n.to;const o=Tr(ao.location.href);let i=e?Tr(e):void 0;const s=Tr(r);i&&i.path||(i=o),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),o.protocol===i.protocol&&o.host===i.host&&(e=i.relative),pr({category:"navigation",data:{from:e,to:r}})}}(t)),n.sentry&&t.on("beforeSendEvent",function(t){return function(n){qt()===t&&pr({category:"sentry."+("transaction"===n.type?"transaction":"event"),event_id:n.event_id,level:n.level,message:ht(n)},{event:n})}}(t))}}};const Is=["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"],xs=(t={})=>{const n={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:"BrowserApiErrors",setupOnce(){n.setTimeout&&Q(ao,"setTimeout",As),n.setInterval&&Q(ao,"setInterval",As),n.requestAnimationFrame&&Q(ao,"requestAnimationFrame",js),n.XMLHttpRequest&&"XMLHttpRequest"in ao&&Q(XMLHttpRequest.prototype,"send",Cs);const t=n.eventTarget;if(t){(Array.isArray(t)?t:Is).forEach(Os)}}}};function As(t){return function(...n){const e=n[0];return n[0]=ho(e,{mechanism:{data:{function:m(t)},handled:!1,type:"instrument"}}),t.apply(this,n)}}function js(t){return function(n){return t.apply(this,[ho(n,{mechanism:{data:{function:"requestAnimationFrame",handler:m(t)},handled:!1,type:"instrument"}})])}}function Cs(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:m(n)},handled:!1,type:"instrument"}},r=nt(n);return r&&(e.mechanism.data.handler=m(r)),ho(n,e)}))})),t.apply(this,n)}}function Os(t){const n=ao,e=n[t]&&n[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(Q(e,"addEventListener",(function(n){return function(e,r,o){try{"function"==typeof r.handleEvent&&(r.handleEvent=ho(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:m(r),target:t},handled:!1,type:"instrument"}}))}catch(t){}return n.apply(this,[e,ho(r,{mechanism:{data:{function:"addEventListener",handler:m(r),target:t},handled:!1,type:"instrument"}}),o])}})),Q(e,"removeEventListener",(function(t){return function(n,e,r){const o=e;try{const e=o&&o.__sentry_wrapped__;e&&t.call(this,n,e,r)}catch(t){}return t.call(this,n,o,r)}})))}const Ms=(t={})=>{const n={onerror:!0,onunhandledrejection:!0,...t};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(t){n.onerror&&function(t){E((n=>{const{stackParser:e,attachStacktrace:r}=Rs();if(qt()!==t||lo())return;const{msg:o,url:i,line:s,column:c,error:u}=n,f=function(t,n,e,r){const o=t.exception=t.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},c=s.stacktrace=s.stacktrace||{},u=c.frames=c.frames||[],f=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(e,10))?void 0:e,l=L(n)&&n.length>0?n:function(){try{return B.document.location.href}catch(t){return""}}();0===u.length&&u.push({colno:f,filename:l,function:a,in_app:!0,lineno:d});return t}($o(e,u||o,void 0,r,!1),i,s,c);f.level="error",Pe(f,{originalException:u,mechanism:{handled:!1,type:"onerror"}})}))}(t),n.onunhandledrejection&&function(t){k((n=>{const{stackParser:e,attachStacktrace:r}=Rs();if(qt()!==t||lo())return;const o=function(t){if(N(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),i=N(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:$o(e,o,void 0,r,!0);i.level="error",Pe(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}(t)}}};function Rs(){const t=qt();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Ls=()=>({name:"HttpContext",preprocessEvent(t){if(!ao.navigator&&!ao.location&&!ao.document)return;const n=t.request&&t.request.url||ao.location&&ao.location.href,{referrer:e}=ao.document||{},{userAgent:r}=ao.navigator||{},o={...t.request&&t.request.headers,...e&&{Referer:e},...r&&{"User-Agent":r}},i={...t.request,...n&&{url:n},headers:o};t.request=i}}),Ps=(t={})=>{const n=t.limit||5,e=t.key||"cause";return{name:"LinkedErrors",preprocessEvent(t,r,o){const i=o.getOptions();wr(po,i.stackParser,i.maxValueLength,e,n,t,r)}}};function Ns(t){return[br(),yr(),xs(),ks(),Ms(),Ps(),Ar(),Ls()]}const Ds={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",moduleMetadataIntegration:"modulemetadata"},Fs=ao;const qs={increment:function(t,n=1,e){Nr.increment(Wr,t,n,e)},distribution:function(t,n,e){Nr.distribution(Wr,t,n,e)},set:function(t,n,e){Nr.set(Wr,t,n,e)},gauge:function(t,n,e){Nr.gauge(Wr,t,n,e)},timing:function(t,n,e="second",r){return Nr.timing(Wr,t,n,e,r)}};const Us=new WeakMap,Hs=new Map,Bs={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Ws(t,n){const{traceFetch:e,traceXHR:r,trackFetchStreamPerformance:o,shouldCreateSpanForRequest:i,enableHTTPTimings:s,tracePropagationTargets:c}={traceFetch:Bs.traceFetch,traceXHR:Bs.traceXHR,trackFetchStreamPerformance:Bs.trackFetchStreamPerformance,...n},u="function"==typeof i?i:t=>!0,a=t=>function(t,n){const e=ao.location&&ao.location.href;if(e){let r,o;try{r=new URL(t,e),o=new URL(e).origin}catch(t){return!1}const i=r.origin===o;return n?V(r.toString(),n)||i&&V(r.pathname,n):i}{const e=!!t.match(/^\/(?!\/)/);return n?V(t,n):e}}(t,c),f={};e&&(t.addEventProcessor((t=>("transaction"===t.type&&t.spans&&t.spans.forEach((t=>{if("http.client"===t.op){const n=Hs.get(t.span_id);n&&(t.timestamp=n/1e3,Hs.delete(t.span_id))}})),t))),o&&function(t){const n="fetch-body-resolved";b(n,t),_(n,(()=>Zr(to)))}((t=>{if(t.response){const n=Us.get(t.response);n&&t.endTimestamp&&Hs.set(n,t.endTimestamp)}})),Qr((t=>{const n=zr(t,u,a,f);if(t.response&&t.fetchData.__span&&Us.set(t.response,t.fetchData.__span),n){const e=Gs(t.fetchData.url),r=e?Tr(e).host:void 0;n.setAttributes({"http.url":e,"server.address":r})}s&&n&&zs(n)}))),r&&ns((t=>{const n=function(t,n,e,r){const o=t.xhr,i=o&&o[ts];if(!o||o.__sentry_own_request__||!i)return;const s=Rn()&&n(i.url);if(t.endTimestamp&&s){const t=o.__sentry_xhr_span_id__;if(!t)return;const n=r[t];return void(n&&void 0!==i.status_code&&(tn(n,i.status_code),n.end(),delete r[t]))}const c=Gs(i.url),u=c?Tr(c).host:void 0,a=!!kn(),f=s&&a?pe({name:`${i.method} ${i.url}`,attributes:{type:"xhr","http.method":i.method,"http.url":c,url:i.url,"server.address":u,[Xt]:"auto.http.browser",[zt]:"http.client"}}):new Ln;o.__sentry_xhr_span_id__=f.spanContext().spanId,r[o.__sentry_xhr_span_id__]=f;const d=qt();o.setRequestHeader&&e(i.url)&&d&&function(t,n,e){const r=Pt(),o=Nt(),{traceId:i,spanId:s,sampled:c,dsc:u}={...o.getPropagationContext(),...r.getPropagationContext()},a=e&&Rn()?mn(e):dn(i,s,c),f=cn(u||(e?Un(e):qn(i,n)));!function(t,n,e){try{t.setRequestHeader("sentry-trace",n),e&&t.setRequestHeader(nn,e)}catch(t){}}(t,a,f)}(o,d,Rn()&&a?f:void 0);return f}(t,u,a,f);s&&n&&zs(n)}))}function zs(t){const{url:n}=vn(t).data||{};if(!n||"string"!=typeof n)return;const e=vi("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 o of t){if("/"===o){[n,e]=t.split("/");break}if(!isNaN(Number(o))){n="h"===r?"http":r,e=t.split(r)[1];break}r+=o}r===t&&(n=r);return{name:n,version:e}}(t.nextHopProtocol),r=[];if(r.push(["network.protocol.version",e],["network.protocol.name",n]),!ft)return r;return[...r,["http.request.redirect_start",Xs(t.redirectStart)],["http.request.fetch_start",Xs(t.fetchStart)],["http.request.domain_lookup_start",Xs(t.domainLookupStart)],["http.request.domain_lookup_end",Xs(t.domainLookupEnd)],["http.request.connect_start",Xs(t.connectStart)],["http.request.secure_connection_start",Xs(t.secureConnectionStart)],["http.request.connection_end",Xs(t.connectEnd)],["http.request.request_start",Xs(t.requestStart)],["http.request.response_start",Xs(t.responseStart)],["http.request.response_end",Xs(t.responseEnd)]]})(r).forEach((n=>t.setAttribute(...n))),setTimeout(e)}}))}))}function Xs(t=0){return((ft||performance.timeOrigin)+t)/1e3}function Gs(t){try{return new URL(t,ao.location.origin).href}catch(t){return}}const Js={...Se,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...Bs};function Ys(t,n,e){t.emit("startPageLoadSpan",n,e),Pt().setTransactionName(n.name);const r=kn();return"pageload"===(r&&vn(r).op)?r:void 0}function Ks(t,n){Nt().setPropagationContext(Et()),Pt().setPropagationContext(Et()),t.emit("startNavigationSpan",n),Pt().setTransactionName(n.name);const e=kn();return"navigation"===(e&&vn(e).op)?e:void 0}function Vs(t){const n=(e=`meta[name=${t}]`,B.document&&B.document.querySelector?B.document.querySelector(e):null);var e;return n?n.getAttribute("content"):void 0}return An(),t.BrowserClient=xo,t.SDK_VERSION=n,t.SEMANTIC_ATTRIBUTE_SENTRY_OP=zt,t.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN=Xt,t.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE=Wt,t.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE=Bt,t.Scope=At,t.WINDOW=ao,t.addBreadcrumb=pr,t.addEventProcessor=function(t){Nt().addEventProcessor(t)},t.addIntegration=function(t){const n=qt();n&&n.addIntegration(t)},t.breadcrumbsIntegration=ks,t.browserApiErrorsIntegration=xs,t.browserTracingIntegration=(t={})=>{An();const{enableInp:n,enableLongTask:r,enableLongAnimationFrame:o,_experiments:{enableInteractions:i,enableStandaloneClsSpans:s},beforeStartSpan:c,idleTimeout:u,finalTimeout:a,childSpanTimeout:f,markBackgroundSpan:d,traceFetch:l,traceXHR:h,trackFetchStreamPerformance:p,shouldCreateSpanForRequest:m,enableHTTPTimings:g,instrumentPageLoad:y,instrumentNavigation:v}={...Js,...t},b=Fi({recordClsStandaloneSpans:s||!1});n&&is(),o&&e.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?new PerformanceObserver((t=>{const n=kn();if(n)for(const e of t.getEntries()){if(!e.scripts[0])continue;const t=Oi(ft+e.startTime),{start_timestamp:r,op:o}=vn(n);if("navigation"===o&&r&&t{const n=kn();if(!n)return;const{op:e,start_timestamp:r}=vn(n);for(const o of t){const t=Oi(ft+o.startTime),i=Oi(o.duration);"navigation"===e&&r&&t{const n=kn();if(n)for(const e of t)if("click"===e.name){const t=Oi(ft+e.startTime),r=Oi(e.duration),o={name:z(e.target),op:`ui.interaction.${e.name}`,startTime:t,attributes:{[Xt]:"auto.ui.browser.metrics"}},i=G(e.target);i&&(o.attributes["ui.component_name"]=i),Ai(n,t,t+r,o)}}));const _={name:void 0,source:void 0};function w(t,n){const e="pageload"===n.op,r=c?c(n):n,o=r.attributes||{};n.name!==r.name&&(o[Bt]="custom",r.attributes=o),_.name=r.name,_.source=o[Bt];const i=Ie(r,{idleTimeout:u,finalTimeout:a,childSpanTimeout:f,disableAutoFinish:e,beforeSpanEnd:t=>{b(),qi(t,{recordClsOnPageloadSpan:!s})}});function d(){["interactive","complete"].includes(ao.document.readyState)&&t.emit("idleSpanEnableAutoFinish",i)}return e&&ao.document&&(ao.document.addEventListener("readystatechange",(()=>{d()})),d()),i}return{name:"BrowserTracing",afterAllSetup(t){let e,r=ao.location&&ao.location.href;t.on("startNavigationSpan",(n=>{qt()===t&&(e&&!vn(e).timestamp&&e.end(),e=w(t,{op:"navigation",...n}))})),t.on("startPageLoadSpan",((n,r={})=>{if(qt()!==t)return;e&&!vn(e).timestamp&&e.end();const o=fn(r.sentryTrace||Vs("sentry-trace"),r.baggage||Vs("baggage"));Pt().setPropagationContext(o),e=w(t,{op:"pageload",...n})})),t.on("spanEnd",(t=>{const n=vn(t).op;if(t!==Tn(t)||"navigation"!==n&&"pageload"!==n)return;const e=Pt(),r=e.getPropagationContext();e.setPropagationContext({...r,sampled:void 0!==r.sampled?r.sampled:bn(t),dsc:r.dsc||Un(t)})})),ao.location&&(y&&Ys(t,{name:ao.location.pathname,startTime:ft?ft/1e3:void 0,attributes:{[Bt]:"url",[Xt]:"auto.pageload.browser"}}),v&&Ki((({to:n,from:e})=>{void 0===e&&r&&-1!==r.indexOf(n)?r=void 0:e!==n&&(r=void 0,Ks(t,{name:ao.location.pathname,attributes:{[Bt]:"url",[Xt]:"auto.navigation.browser"}}))}))),d&&ao&&ao.document&&ao.document.addEventListener("visibilitychange",(()=>{const t=kn();if(!t)return;const n=Tn(t);if(ao.document.hidden&&n){const t="cancelled",{op:e,status:r}=vn(n);r||n.setStatus({code:Zt,message:t}),n.setAttribute("sentry.cancellation_reason","document.hidden"),n.end()}})),i&&function(t,n,e,r){let o;const i=()=>{const i="ui.action.click",s=kn(),c=s&&Tn(s);if(c){const t=vn(c).op;if(["navigation","pageload"].includes(t))return}o&&(o.setAttribute(Gt,"interactionInterrupted"),o.end(),o=void 0),r.name&&(o=Ie({name:r.name,op:i,attributes:{[Bt]:r.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:e}))};ao.document&&addEventListener("click",i,{once:!1,capture:!0})}(u,a,f,_),n&&function(t){const n=({entries:t})=>{const n=kn(),e=n&&Tn(n);t.forEach((t=>{if(!function(t){return"duration"in t}(t)||!e)return;const n=t.interactionId;if(null!=n&&!os.has(n)){if(rs.length>10){const t=rs.shift();os.delete(t)}rs.push(n),os.set(n,e)}}))};vi("event",n),vi("first-input",n)}(),Ws(t,{traceFetch:l,traceXHR:h,trackFetchStreamPerformance:p,tracePropagationTargets:t.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:m,enableHTTPTimings:g})}}},t.captureEvent=Pe,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 Pt().captureMessage(t,e,r)},t.captureSession=Ge,t.captureUserFeedback=function(t){const n=qt();n&&n.captureUserFeedback(t)},t.chromeStackLineParser=ls,t.close=async function(t){const n=qt();return n?n.close(t):Promise.resolve(!1)},t.continueTrace=({sentryTrace:t,baggage:n},e)=>Ft((r=>{const o=fn(t,n);return r.setPropagationContext(o),e()})),t.createTransport=dr,t.createUserFeedbackEnvelope=Io,t.dedupeIntegration=Ar,t.defaultStackLineParsers=Ss,t.defaultStackParser=Es,t.endSession=ze,t.eventFromException=So,t.eventFromMessage=Eo,t.exceptionFromError=po,t.feedbackAsyncIntegration=co,t.feedbackIntegration=co,t.flush=async function(t){const n=qt();return n?n.flush(t):Promise.resolve(!1)},t.forceLoad=function(){},t.functionToStringIntegration=yr,t.geckoStackLineParser=ms,t.getActiveSpan=kn,t.getClient=qt,t.getCurrentHub=Gr,t.getCurrentScope=Pt,t.getDefaultIntegrations=Ns,t.getGlobalScope=Dt,t.getIsolationScope=Nt,t.getRootSpan=Tn,t.getSpanDescendants=$n,t.globalHandlersIntegration=Ms,t.httpContextIntegration=Ls,t.inboundFiltersIntegration=br,t.init=function(t={}){const n=function(t={}){const n={defaultIntegrations:Ns(),release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:ao.SENTRY_RELEASE&&ao.SENTRY_RELEASE.id?ao.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return null==t.defaultIntegrations&&delete t.defaultIntegrations,{...n,...t}}(t);if(!n.skipBrowserExtensionCheck&&function(){const t=void 0!==ao.window&&ao;if(!t)return!1;const n=t[t.chrome?"chrome":"browser"],e=n&&n.runtime&&n.runtime.id,r=ao.location&&ao.location.href||"",o=!!e&&ao===ao.top&&["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"].some((t=>r.startsWith(`${t}//`))),i=void 0!==t.nw;return!!e&&!o&&!i}())return void s((()=>{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||Es,Array.isArray(r)?l(...r):r),integrations:Ze(n),transport:n.transport||cs};var r;const o=function(t,n){!0===n.debug&&s((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Pt().update(n.initialScope);const e=new t(n);return sr(e),e.init(),e}(xo,e);return n.autoSessionTracking&&function(){if(void 0===ao.document)return;We({ignoreDuration:!0}),Ge(),Ki((({from:t,to:n})=>{void 0!==t&&t!==n&&(We({ignoreDuration:!0}),Ge())}))}(),o},t.isInitialized=function(){return!!qt()},t.lastEventId=Be,t.lazyLoadIntegration=async function(t,e){const r=Ds[t],o=Fs.Sentry=Fs.Sentry||{};if(!r)throw new Error(`Cannot lazy load integration: ${t}`);const i=o[t];if("function"==typeof i&&!("_isShim"in i))return i;const s=function(t){const e=qt(),r=e&&e.getOptions(),o=r&&r.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${n}/${t}.min.js`,o).toString()}(r),c=ao.document.createElement("script");c.src=s,c.crossOrigin="anonymous",c.referrerPolicy="origin",e&&c.setAttribute("nonce",e);const u=new Promise(((t,n)=>{c.addEventListener("load",(()=>t())),c.addEventListener("error",n)})),a=ao.document.currentScript,f=ao.document.body||ao.document.head||a&&a.parentElement;if(!f)throw new Error(`Could not find parent element to insert lazy-loaded ${t} script`);f.appendChild(c);try{await u}catch(n){throw new Error(`Error when loading integration: ${t}`)}const d=o[t];if("function"!=typeof d)throw new Error(`Could not load integration: ${t}`);return d},t.linkedErrorsIntegration=Ps,t.makeFetchTransport=cs,t.metrics=qs,t.onLoad=function(t){t()},t.opera10StackLineParser=bs,t.opera11StackLineParser=ws,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 s((()=>{console.warn("You are using replayIntegration() even though this bundle does not include replay.")})),{name:"Replay",...uo.reduce(((t,n)=>(t[n]=io,t)),{})}},t.setContext=Ne,t.setCurrentClient=sr,t.setExtra=Fe,t.setExtras=De,t.setMeasurement=ce,t.setTag=Ue,t.setTags=qe,t.setUser=He,t.showReportDialog=function(t={}){if(!ao.document)return;const n=Pt(),e=n.getClient(),r=e&&e.getDsn();if(!r)return;if(n&&(t.user={...n.getUser(),...t.user}),!t.eventId){const n=Be();n&&(t.eventId=n)}const o=ao.document.createElement("script");o.async=!0,o.crossOrigin="anonymous",o.src=function(t,n){const e=Xn(t);if(!e)return"";const r=`${Ye(e)}embed/error-page/`;let o=`dsn=${Wn(e)}`;for(const t in n)if("dsn"!==t&&"onClose"!==t)if("user"===t){const t=n.user;if(!t)continue;t.name&&(o+=`&name=${encodeURIComponent(t.name)}`),t.email&&(o+=`&email=${encodeURIComponent(t.email)}`)}else o+=`&${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`;return`${r}?${o}`}(r,t),t.onLoad&&(o.onload=t.onLoad);const{onClose:i}=t;if(i){const t=n=>{if("__sentry_reportdialog_closed__"===n.data)try{i()}finally{ao.removeEventListener("message",t)}};ao.addEventListener("message",t)}const s=ao.document.head||ao.document.body;s&&s.appendChild(o)},t.spanToBaggageHeader=function(t){return cn(Un(t))},t.spanToJSON=vn,t.spanToTraceHeader=mn,t.startBrowserTracingNavigationSpan=Ks,t.startBrowserTracingPageLoadSpan=Ys,t.startInactiveSpan=pe,t.startNewTrace=function(t){return Ft((n=>(n.setPropagationContext(Et()),me(null,t))))},t.startSession=We,t.startSpan=function(t,n){const e=ve();if(e.startSpan)return e.startSpan(t,n);const r=ye(t),{forceTransaction:o,parentSpan:i}=t;return Ft(t.scope,(()=>we(i)((()=>{const e=Pt(),i=_e(e),s=t.onlyIfParent&&!i?new Ln:ge({parentSpan:i,spanArguments:r,forceTransaction:o,scope:e});return kt(e,s),Pn((()=>n(s)),(()=>{const{status:t}=vn(s);!s.isRecording()||t&&"ok"!==t||s.setStatus({code:Zt,message:"internal_error"})}),(()=>s.end()))}))))},t.startSpanManual=he,t.suppressTracing=function(t){const n=ve();return n.suppressTracing?n.suppressTracing(t):Ft((n=>(n.setSDKProcessingMetadata({[le]:!0}),t())))},t.winjsStackLineParser=ys,t.withActiveSpan=me,t.withIsolationScope=function(...t){const n=Lt(x());if(2===t.length){const[e,r]=t;return e?n.withSetIsolationScope(e,r):n.withIsolationScope(r)}return n.withIsolationScope(t[0])},t.withScope=Ft,t}({}); +//# sourceMappingURL=bundle.tracing.min.js.map diff --git a/src/js/sentry-loader.js b/src/js/sentry-loader.js index c064168..0d70605 100644 --- a/src/js/sentry-loader.js +++ b/src/js/sentry-loader.js @@ -187,13 +187,13 @@ // 生产环境:加载 SDK // =================================== - // Sentry SDK CDN URL (v8.x) - 使用 jsDelivr 镜像(国内访问更快) - var SENTRY_SDK_URL = 'https://cdn.jsdelivr.net/npm/@sentry/browser@8.40.0/build/bundles/bundle.tracing.min.js'; + // Sentry SDK URL (v8.x) - 使用本地托管的 bundle(避免国内 CDN 访问问题) + var SENTRY_SDK_URL = '/src/assets/vendor/sentry-8.40.0.bundle.tracing.min.js'; // 创建 script 标签 var script = document.createElement('script'); script.src = SENTRY_SDK_URL; - script.crossOrigin = 'anonymous'; + // 本地资源不需要 crossOrigin script.async = true; script.onload = function() {