PageSourceSearch

https://www.snap.com/mwp/chunks/dist-VERECCEQ.mjs

js snap.com collected 2026-09-24 08:24:06 UTC 178,265 bytes, 37 lines download raw bytes

1
2      // Merge in the client-visible compile-time environment.
3      window.process = {
4        ...window.process,
5        env: {
6          ...window.process?.env,
7          ...({"CI_COMMIT":"c710bdeace0f21cb93a5c7a6953d7fe969fc3207","CI_PIPELINE_ID":"ccdb44e1-5b2e-423b-85c3-deedbf639a4a","GOOGLE_CLOUD_PROJECT":"marketing-web-platform","DEPLOYMENT_TYPE":"production","NODE_ENV":"production","PREVIEW":"false","SITE_CONFIG":"snap"})
8        }
9      };
10
11      // Stop crashing when certain node libraries are imported.
12      window.global = window.global ?? {};
13    
14import{a as ja,b as za}from"./chunk-FDYQK22J.mjs";import{a as Ga,b as Wa,c as wr}from"./chunk-OPQGJ4WA.mjs";import{a as $a}from"./chunk-L4PA2Z2X.mjs";import{B as Ua,I as Ba,J as Ha,K as kr}from"./chunk-IOWTC3PU.mjs";function qa(){}function Ya(){}function Va(){}function Ja(){}var _=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var E=globalThis;var ce="10.41.0";function se(){return Et(E),E}function Et(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||ce,t[ce]=t[ce]||{}}function we(e,t,n=E){let r=n.__SENTRY__=n.__SENTRY__||{},o=r[ce]=r[ce]||{};return o[e]||(o[e]=t())}var Dn=["debug","info","warn","error","log","assert","trace"],Uf="Sentry Logger ",en={};function be(e){if(!("console"in E))return e();let t=E.console,n={},r=Object.keys(en);r.forEach(o=>{let i=en[o];n[o]=t[o],t[o]=i});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function Bf(){ci().enabled=!0}function Hf(){ci().enabled=!1}function Ka(){return ci().enabled}function $f(...e){ai("log",...e)}function Gf(...e){ai("warn",...e)}function Wf(...e){ai("error",...e)}function ai(e,...t){_&&Ka()&&be(()=>{E.console[e](`${Uf}[${e}]:`,...t)})}function ci(){return _?we("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var f={enable:Bf,disable:Hf,isEnabled:Ka,log:$f,warn:Gf,error:Wf};var Xa=/\(error: (.*)\)/,Za=/captureMessage|captureException/;function Dr(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{let i=[],s=n.split(`
15`);for(let a=r;a<s.length;a++){let c=s[a];c.length>1024&&(c=c.slice(0,1024));let u=Xa.test(c)?c.replace(Xa,"$1"):c;if(!u.match(/\S*Error: /)){for(let p of t){let d=p(u);if(d){i.push(d);break}}if(i.length>=50+o)break}}return Qa(i.slice(o))}}function pi(e){return Array.isArray(e)?Dr(...e):e}function Qa(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(Mr(t).function||"")&&t.pop(),t.reverse(),Za.test(Mr(t).function||"")&&(t.pop(),Za.test(Mr(t).function||"")&&t.pop()),t.slice(0,50).map(n=>({...n,filename:n.filename||Mr(t).filename,function:n.function||"?"}))}function Mr(e){return e[e.length-1]||{}}var ui="<anonymous>";function ue(e){try{return!e||typeof e!="function"?ui:e.name||ui}catch{return ui}}function tn(e){let t=e.exception;if(t){let n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}function Fr(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}function ec(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}var Ur={},tc={};function ee(e,t){Ur[e]=Ur[e]||[],Ur[e].push(t)}function te(e,t){if(!tc[e]){tc[e]=!0;try{t()}catch(n){_&&f.error(`Error while instrumenting ${e}`,n)}}}function $(e,t){let n=e&&Ur[e];if(n)for(let r of n)try{r(t)}catch(o){_&&f.error(`Error while triggering instrumentation handler.
16Type: ${e}
17Name: ${ue(r)}
18Error:`,o)}}var fi=null;function Fn(e){let t="error";ee(t,e),te(t,jf)}function jf(){fi=E.onerror,E.onerror=function(e,t,n,r,o){return $("error",{column:r,error:o,line:n,msg:e,url:t}),fi?fi.apply(this,arguments):!1},E.onerror.__SENTRY_INSTRUMENTED__=!0}var di=null;function Un(e){let t="unhandledrejection";ee(t,e),te(t,zf)}function zf(){di=E.onunhandledrejection,E.onunhandledrejection=function(e){return $("unhandledrejection",e),di?di.apply(this,arguments):!0},E.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var nc=Object.prototype.toString;function ne(e){switch(nc.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Se(e,Error)}}function nn(e,t){return nc.call(e)===`[object ${t}]`}
18function Bn(e){return nn(e,"ErrorEvent")}function Br(e){return nn(e,"DOMError")}function li(e){return nn(e,"DOMException")}function ae(e){return nn(e,"String")}function Pt(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Me(e){return e===null||Pt(e)||typeof e!="object"&&typeof e!="function"}function pe(e){return nn(e,"Object")}function Ot(e){return typeof Event<"u"&&Se(e,Event)}function mi(e){return typeof Element<"u"&&Se(e,Element)}function gi(e){return nn(e,"RegExp")}function Re(e){return!!(e?.then&&typeof e.then=="function")}function _i(e){return pe(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Se(e,t){try{return e instanceof t}catch{return!1}}function Hn(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}function $n(e){return typeof Request<"u"&&Se(e,Request)}var hi=E,qf=80;function j(e,t={}){if(!e)return"<unknown>";try{let n=e,r=5,o=[],i=0,s=0,a=" > ",c=a.length,u,p=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||qf;for(;n&&i++<r&&(u=Yf(n,p),!(u==="html"||i>1&&s+o.length*c+u.length>=d));)o.push(u),s+=u.length,n=n.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function Yf(e,t){let n=e,r=[];if(!n?.tagName)return"";if(hi.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let o=t?.length?t.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(o?.length)o.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let s=n.className;if(s&&ae(s)){let a=s.split(/\s+/);for(let c of a)r.push(`.${c}`)}}let i=["aria-label","type","name","title","alt"];for(let s of i){let a=n.getAttribute(s);a&&r.push(`[${s}="${a}"]`)}return r.join("")}function De(){try{return hi.document.location.href}catch{return""}}function Gn(e){if(!hi.HTMLElement)return null;let t=e,n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function B(e,t,n){if(!(t in e))return;let r=e[t];if(typeof r!="function")return;let o=n(r);typeof o=="function"&&Hr(o,r);try{e[t]=o}catch{_&&f.log(`Failed to replace method "${t}" in object`,e)}}function D(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{_&&f.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Hr(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,D(e,"__sentry_original__",t)}catch{}}function Lt(e){return e.__sentry_original__}function $r(e){if(ne(e))return{message:e.message,name:e.name,stack:e.stack,...oc(e)};if(Ot(e)){let t={type:e.type,target:rc(e.target),currentTarget:rc(e.currentTarget),...oc(e)};return typeof CustomEvent<"u"&&Se(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function rc(e){try{return mi(e)?j(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function oc(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function Si(e){let t=Object.keys($r(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}var rn;function kt(e){if(rn!==void 0)return rn?rn(e):e();let t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=E;return t in n&&typeof n[t]=="function"?(rn=n[t],rn(e)):(rn=null,e())}function fe(){return kt(()=>Math.random())}function wt(){return kt(()=>Date.now())}function Ye(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Wn(e,t){let n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);let o=Math.max(t-60,0);o<5&&(o=0);let i=Math.min(o+140,r);return i>r-5&&(i=r),i===r&&(o=Math.max(i-140,0)),n=n.slice(o,i),o>0&&(n=`'{snip} ${n}`),i<r&&(n+=" {snip}"),n}function Mt(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let o=e[r];try{Hn(o)?n.push(Fr(o)):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function on(e,t,n=!1){return ae(e)?gi(t)?t.test(e):ae(t)?n?e===t:e.includes(t):!1:!1}function Ae(e,t=[],n=!1){return t.some(r=>on(e,r,n))}function Vf(){let e=E;return e.crypto||e.msCrypto}var Ei;function Jf(){return fe()*16}function k(e=Vf()){try{if(e?.randomUUID)return kt(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Ei||(Ei="10000000100040008000"+1e11),Ei.replace(/[018]/g,t=>(t^(Jf()&15)>>t/4).toString(16))}function ic(e){return e.exception?.values?.[0]}function Ve(e){let{message:t,event_id:n}=e;if(t)return t;let r=ic(e);return r?r.type&&r.value?`${r.type}: ${r.value}
18`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function sn(e,t,n){let r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function de(e,t){let n=ic(e);if(!n)return;let r={type:"generic",handled:!0},o=n.mechanism;if(n.mechanism={...r,...o,...t},t&&"data"in t){let i={...o?.data,...t.data};n.mechanism.data=i}}function Ti(e,t,n=5){if(t.lineno===void 0)return;let r=e.length,o=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,o-n),o).map(s=>Wn(s,0));let i=Math.min(r-1,o);t.context_line=Wn(e[i],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map(s=>Wn(s,0))}function Gr(e){if(sc(e))return!0;try{D(e,"__sentry_captured__",!0)}catch{}return!1}function sc(e){try{return e.__sentry_captured__}catch{}}var cc=1e3;function Ee(){return wt()/cc}function Kf(){let{performance:e}=E;if(!e?.now||!e.timeOrigin)return Ee;let t=e.timeOrigin;return()=>(t+kt(()=>e.now()))/cc}var ac;function N(){return(ac??(ac=Kf()))()}var Ii=null;function Xf(){let{performance:e}=E;if(!e?.now)return;let t=3e5,n=kt(()=>e.now()),r=wt(),o=e.timeOrigin;if(typeof o=="number"&&Math.abs(o+n-r)<t)return o;let i=e.timing?.navigationStart;return typeof i=="number"&&Math.abs(i+n-r)<t?i:r-n}function F(){return Ii===null&&(Ii=Xf()),Ii}function uc(e){let t=N(),n={sid:k(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Zf(n)};return e&&st(n,e),n}function st(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||N(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:k()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function pc(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),st(e,n)}function Zf(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function Tt(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=Tt(r[o],t[o],n-1));return r}function J(){return k()}function re(){return k().substring(16)}var yi="_sentrySpan";function Fe(e,t){t?D(e,yi,t):delete e[yi]}function Dt(e){return e[yi]}var Qf=100,oe=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:J(),sampleRand:fe()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Fe(t,Dt(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&st(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t=="function"?t(this):t,r=n instanceof e?n.getScopeData():pe(n)?t:void 0,{tags:o,attributes:i,extra:s,user:a,contexts:c,level:u,fingerprint:p=[],propagationContext:d,conversationId:m}=r||{};return this._tags={...this._tags,...o},this._attributes={...this._attributes,...i},this._extra={...this._extra,...s},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),p.length&&(this._fingerprint=p),d&&(this._propagationContext=d),m&&(this._conversationId=m),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Fe(this,void 0),this._attachments=[],this.setPropagationContext({traceId:J(),sampleRand:fe()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:Qf;if(r<=0)return this;let o={timestamp:Ee(),...t,message:t.message?Ye(t.message,2048):t.message};return this._breadcrumbs.push(o),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Dt(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Tt(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n?.event_id||k();if(!this._client)return _&&f.warn("No client configured on scope - will not capture exception!"),r;let o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureMessage(t,n,r){let o=r?.event_id||k();if(!this._client)return _&&f.warn("No client configured on scope - will not capture message!"),o;let i=r?.syntheticException??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:o},this),o}captureEvent(t,n){let r=t.event_id||n?.event_id||k();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(_&&f.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEac
18h(t=>{t(this)}),this._notifyingListeners=!1)}};function fc(){return we("defaultCurrentScope",()=>new oe)}function dc(){return we("defaultIsolationScope",()=>new oe)}var bi=class{constructor(t,n){let r;t?r=t:r=new oe;let o;n?o=n:o=new oe,this._stack=[{scope:r}],this._isolationScope=o}withScope(t){let n=this._pushScope(),r;try{r=t(n)}catch(o){throw this._popScope(),o}return Re(r)?r.then(o=>(this._popScope(),o),o=>{throw this._popScope(),o}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function an(){let e=se(),t=Et(e);return t.stack=t.stack||new bi(fc(),dc())}function ed(e){return an().withScope(e)}function td(e,t){let n=an();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function lc(e){return an().withScope(()=>e(an().getIsolationScope()))}function mc(){return{withIsolationScope:lc,withScope:ed,withSetScope:td,withSetIsolationScope:(e,t)=>lc(t),getCurrentScope:()=>an().getScope(),getIsolationScope:()=>an().getIsolationScope()}}function ve(e){let t=Et(e);return t.acs?t.acs:mc()}function b(){let e=se();return ve(e).getCurrentScope()}function w(){let e=se();return ve(e).getIsolationScope()}function at(){return we("globalScope",()=>new oe)}function K(...e){let t=se(),n=ve(t);if(e.length===2){let[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function Wr(...e){let t=se(),n=ve(t);if(e.length===2){let[r,o]=e;return r?n.withSetIsolationScope(r,o):n.withIsolationScope(o)}return n.withIsolationScope(e[0])}function S(){return b().getClient()}function Ri(e){let t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:o}=t,i={trace_id:n,span_id:o||re()};return r&&(i.parent_span_id=r),i}var G="sentry.source",ct="sentry.sample_rate",jn="sentry.previous_trace_sample_rate",W="sentry.op",C="sentry.origin",It="sentry.idle_span_finish_reason",Je="sentry.measurement_unit",Ke="sentry.measurement_value",cn="sentry.custom_span_name",un="sentry.profile_id",Ne="sentry.exclusive_time";var Ai="sentry.link.type",vi="gen_ai.conversation.id";function jr(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"internal_error"}}function Ft(e,t){e.setAttribute("http.response.status_code",t);let n=jr(t);n.message!=="unknown_error"&&e.setStatus(n)}var gc="_sentryScope",_c="_sentryIsolationScope";function nd(e){try{let t=E.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function rd(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function hc(e,t,n){e&&(D(e,_c,nd(n)),D(e,gc,t))}function Ut(e){let t=e;return{scope:t[gc],isolationScope:rd(t[_c])}}var zr="sentry-",od=/^sentry-/,id=8192;function pn(e){let t=sd(e);if(!t)return;let n=Object.entries(t).reduce((r,[o,i])=>{if(o.match(od)){let s=o.slice(zr.length);r[s]=i}return r},{});if(Object.keys(n).length>0)return n}function qr(e){if(!e)return;let t=Object.entries(e).reduce((n,[r,o])=>(o&&(n[`${zr}${r}`]=o),n),{});return ad(t)}function sd(e){if(!(!e||!ae(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{let r=Sc(n);return Object.entries(r).forEach(([o,i])=>{t[o]=i}),t},{}):Sc(e)}function Sc(e){return e.split(",").map(t=>{let n=t.indexOf("=");if(n===-1)return[];let r=t.slice(0,n),o=t.slice(n+1);return[r,o].map(i=>{try{return decodeURIComponent(i.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function ad(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],o)=>{let i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,s=o===0?i:`${t},${i}`;return s.length>id?(_&&f.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):s},"")}var cd=/^o(\d+)\./,ud=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function pd(e){return e==="http"||e==="https"}function Y(e,t=!1){let{host:n,path:r,pass:o,port:i,projectId:s,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${s}`}function Yr(e){let t=ud.exec(e);if(!t){be(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,o="",i="",s="",a=""]=t.slice(1),c="",u=a,p=u.split("/");if(p.length>1&&(c=p.slice(0,-1).join("/"),u=p.pop()),u){let d=u.match(/^\d+/);
18d&&(u=d[0])}return Ec({host:i,pass:o,path:c,projectId:u,port:s,protocol:n,publicKey:r})}function Ec(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function fd(e){if(!_)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(f.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:n.match(/^\d+$/)?pd(r)?t&&isNaN(parseInt(t,10))?(f.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(f.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(f.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function dd(e){return e.match(cd)?.[1]}function Vr(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=dd(n)),r}function zn(e){let t=typeof e=="string"?Yr(e):Ec(e);if(!(!t||!fd(t)))return t}function ut(e){if(typeof e=="boolean")return Number(e);let t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}var Jr=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Tc(e){if(!e)return;let t=e.match(Jr);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function qn(e,t){let n=Tc(e),r=pn(t);if(!n?.traceId)return{traceId:J(),sampleRand:fe()};let o=ld(n,r);r&&(r.sample_rand=o.toString());let{traceId:i,parentSpanId:s,parentSampled:a}=n;return{traceId:i,parentSpanId:s,sampled:a,dsc:r||{},sampleRand:o}}function Yn(e=J(),t=re(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function Vn(e=J(),t=re(),n){return`00-${e}-${t}-${n?"01":"00"}`}function ld(e,t){let n=ut(t?.sample_rand);if(n!==void 0)return n;let r=ut(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?fe()*r:r+fe()*(1-r):fe()}function Ni(e,t){let n=Vr(e);return t&&n&&t!==n?(f.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):(e.getOptions().strictTraceContinuation||!1)&&(t&&!n||!t&&n)?(f.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${n})`),!1):!0}var Kr=0,Xr=1,Ic=!1;function Rc(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:i,status:s,origin:a,links:c}=I(e);return{parent_span_id:i,span_id:t,trace_id:n,data:r,op:o,status:s,origin:a,links:c}}function Ci(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:I(e).parent_span_id,i=Ut(e).scope,s=r?i?.getPropagationContext().propagationSpanId||re():t;return{parent_span_id:o,span_id:s,trace_id:n}}function Jn(e){let{traceId:t,spanId:n}=e.spanContext(),r=Te(e);return Yn(t,n,r)}function Ac(e){let{traceId:t,spanId:n}=e.spanContext(),r=Te(e);return Vn(t,n,r)}function Zr(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...o},attributes:i})=>({span_id:t,trace_id:n,sampled:r===Xr,attributes:i,...o}))}function Ue(e){return typeof e=="number"?yc(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?yc(e.getTime()):N()}function yc(e){return e>9999999999?e/1e3:e}function I(e){if(_d(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(gd(e)){let{attributes:r,startTime:o,name:i,endTime:s,status:a,links:c}=e,u="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:i,parent_span_id:u,start_timestamp:Ue(o),timestamp:Ue(s)||void 0,status:Qr(a),op:r[W],origin:r[C],links:Zr(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function gd(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function _d(e){return typeof e.getSpanJSON=="function"}function Te(e){let{traceFlags:t}=e.spanContext();return t===Xr}function Qr(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"internal_error"}var Bt="_sentryChildSpans",xi="_sentryRootSpan";function eo(e,t){let n=e[xi]||e;D(t,xi,n),e[Bt]?e[Bt].add(t):D(e,Bt,new Set([t]))}function vc(e,t){e[Bt]&&e[Bt].delete(t)}function pt(e){let t=new Set;function n(r){if(!t.has(r)&&Te(r)){t.add(r);let o=r[Bt]?Array.from(r[Bt]):[];for(let i of o)n(i)}}return n(e),Array.from(t)}function v(e){return e[xi]||e}function O(){let e=se(),t=ve(e);return t.getActiveSpan?t.getActiveSpan():Dt(b())}function Kn(){Ic||(be(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),Ic=!0)}function Pi(e,t){e.updateName(t),e.setAttributes({[G]:"custom",[cn]:t})}var Nc=!1;function Xn(){if(Nc)return;
18function e(){let t=O(),n=t&&v(t);if(n){let r="internal_error";_&&f.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:2,message:r})}}e.tag="sentry_tracingErrorCallback",Nc=!0,Fn(e),Un(e)}function H(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=e||S()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function xc(e){f.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Ht(e,t){if(!t?.length||!e.description)return!1;for(let n of t){if(hd(n)){if(on(e.description,n))return _&&xc(e),!0;continue}if(!n.name&&!n.op)continue;let r=n.name?on(e.description,n.name):!0,o=n.op?e.op&&on(e.op,n.op):!0;if(r&&o)return _&&xc(e),!0}return!1}function Cc(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let o of e)o.parent_span_id===r&&(o.parent_span_id=n)}function hd(e){return typeof e=="string"||e instanceof RegExp}var dt="production";var Pc="_frozenDsc";function fn(e,t){D(e,Pc,t)}function Oi(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||dt,release:n.release,public_key:r,trace_id:e,org_id:Vr(t)};return t.emit("createDsc",o),o}function Zn(e,t){let n=t.getPropagationContext();return n.dsc||Oi(n.traceId,e)}function X(e){let t=S();if(!t)return{};let n=v(e),r=I(n),o=r.data,i=n.spanContext().traceState,s=i?.get("sentry.sample_rate")??o[ct]??o[jn];function a(g){return(typeof s=="number"||typeof s=="string")&&(g.sample_rate=`${s}`),g}let c=n[Pc];if(c)return a(c);let u=i?.get("sentry.dsc"),p=u&&pn(u);if(p)return a(p);let d=Oi(e.spanContext().traceId,t),m=o[G],l=r.description;return m!=="url"&&l&&(d.transaction=l),H()&&(d.sampled=String(Te(n)),d.sample_rand=i?.get("sentry.sample_rand")??Ut(n).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,n),d}function Li(e){let t=X(e);return qr(t)}var ie=class{constructor(t={}){this._traceId=t.traceId||J(),this._spanId=t.spanId||re()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:Kr}}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,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}};function le(e,t=100,n=1/0){try{return ki("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function to(e,t=3,n=100*1024){let r=le(e,t);return Id(r)>n?to(e,t-1,n):r}function ki(e,t,n=1/0,r=1/0,o=yd()){let[i,s]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;let a=Sd(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(i(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let l=u.toJSON();return ki("",l,c-1,r,o)}catch{}let p=Array.isArray(t)?[]:{},d=0,m=$r(t);for(let l in m){if(!Object.prototype.hasOwnProperty.call(m,l))continue;if(d>=r){p[l]="[MaxProperties ~]";break}let g=m[l];p[l]=ki(l,g,c-1,r,o),d++}return s(t),p}function Sd(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Hn(t))return Fr(t);if(_i(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${ue(t)}
18]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=Ed(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Ed(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function Td(e){return~-encodeURI(e).split(/%..|./).length}function Id(e){return Td(JSON.stringify(e))}function yd(){let e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function z(e,t=[]){return[e,t]}function wi(e,t){let[n,r]=e;return[n,[...r,t]]}function Ie(e,t){let n=e[1];for(let r of n){let o=r[0].type;if(t(r,o))return!0}return!1}function dn(e,t){return Ie(e,(n,r)=>t.includes(r))}function no(e){let t=Et(E);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function bd(e){let t=Et(E);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function yt(e){let[t,n]=e,r=JSON.stringify(t);function o(i){typeof r=="string"?r=typeof i=="string"?r+i:[no(r),i]:r.push(typeof i=="string"?no(i):i)}for(let i of n){let[s,a]=i;if(o(`
19${JSON.stringify(s)}
20`),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(le(a))}o(c)}}return typeof r=="string"?r:Rd(r)}function Rd(e){let t=e.reduce((o,i)=>o+i.length,0),n=new Uint8Array(t),r=0;for(let o of e)n.set(o,r),r+=o.length;return n}function Mi(e){let t=typeof e=="string"?no(e):e;function n(s){let a=t.subarray(0,s);return t=t.subarray(s+1),a}function r(){let s=t.indexOf(10);return s<0&&(s=t.length),JSON.parse(bd(n(s)))}let o=r(),i=[];for(;t.length;){let s=r(),a=typeof s.length=="number"?s.length:void 0;i.push([s,a?n(a):r()])}return[o,i]}function Di(e){return[{type:"span"},e]}function Fi(e){let t=typeof e.data=="string"?no(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Ad={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"};function ro(e){return Ad[e]}function ln(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ui(e,t,n,r){let o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Y(r)},...o&&{trace:o}}}function vd(e,t){if(!t)return e;let n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function Oc(e,t,n,r){let o=ln(n),i={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Y(t)}},s="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return z(i,[s])}function Lc(e,t,n,r){let o=ln(n),i=e.type&&e.type!=="replay_event"?e.type:"event";vd(e,n?.sdk);let s=Ui(e,o,r,t);return delete e.sdkProcessingMetadata,z(s,[[{type:i},e]])}function kc(e,t){function n(l){return!!l.trace_id&&!!l.public_key}let r=X(e[0]),o=t?.getDsn(),i=t?.getOptions().tunnel,s={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&o&&{dsn:Y(o)}},{beforeSendSpan:a,ignoreSpans:c}=t?.getOptions()||{},u=c?.length?e.filter(l=>!Ht(I(l),c)):e,p=e.length-u.length;p&&t?.recordDroppedEvent("before_send","span",p);let d=a?l=>{let g=I(l),R=a(g);return R||(Kn(),g)}:I,m=[];for(let l of u){let g=d(l);g&&m.push(Di(g))}return z(s,m)}function wc(e){if(!_)return;let{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=I(e),{spanId:o}=e.spanContext(),i=Te(e),s=v(e),a=s===e,c=`[Tracing] Starting ${i?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${o}`];if(r&&u.push(`parent ID: ${r}`),!a){let{op:p,description:d}=I(s);u.push(`root ID: ${s.spanContext().spanId}`),p&&u.push(`root op: ${p}`),d&&u.push(`root description: ${d}`)}f.log(`${c}
21  ${u.join(`
22  `)}`)}function Mc(e){if(!_)return;let{description:t="< unknown name >",op:n="< unknown op >"}=I(e),{spanId:r}=e.spanContext(),i=v(e)===e,s=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;f.log(s)}function Qn(e,t,n,r=O()){let o=r&&v(r);o&&(_&&f.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),o.addEvent(e,{[Ke]:t,[Je]:n}))}function oo(e){if(!e||e.length===0)return;let t={};return e.forEach(n=>{let r=n.attributes||{},o=r[Je],i=r[Ke];
22typeof o=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:o})}),t}var Dc=1e3,bt=class{constructor(t={}){this._traceId=t.traceId||J(),this._spanId=t.spanId||re(),this._startTime=t.startTimestamp||N(),this._links=t.links,this._attributes={},this.setAttributes({[C]:"manual",[W]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){let{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Xr:Kr}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=Ue(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(G,"custom"),this}end(t){this._endTime||(this._endTime=Ue(t),Mc(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[W],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Qr(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[C],profile_id:this._attributes[un],exclusive_time:this._attributes[Ne],measurements:oo(this._events),is_segment:this._isStandaloneSpan&&v(this)===this||void 0,segment_id:this._isStandaloneSpan?v(this).spanContext().spanId:void 0,links:Zr(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){_&&f.log("[Tracing] Adding an event to span:",t);let o=Fc(n)?n:r||N(),i=Fc(n)?{}:n||{},s={name:t,time:Ue(o),attributes:i};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let t=S();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===v(this)))return;if(this._isStandaloneSpan){this._sampled?xd(kc([this],t)):(_&&f.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}let r=this._convertSpanToTransaction();r&&(Ut(this).scope||b()).captureEvent(r)}_convertSpanToTransaction(){if(!Uc(I(this)))return;this._name||(_&&f.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");let{scope:t,isolationScope:n}=Ut(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;let i=pt(this).filter(p=>p!==this&&!Nd(p)).map(p=>I(p)).filter(Uc),s=this._attributes[G];
22delete this._attributes[cn],i.forEach(p=>{delete p.data[cn]});let a={contexts:{trace:Rc(this)},spans:i.length>Dc?i.sort((p,d)=>p.start_timestamp-d.start_timestamp).slice(0,Dc):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:X(this)},request:r,...s&&{transaction_info:{source:s}}},c=oo(this._events);return c&&Object.keys(c).length&&(_&&f.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),a.measurements=c),a}};function Fc(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Uc(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Nd(e){return e instanceof bt&&e.isStandaloneSpan()}function xd(e){let t=S();if(!t)return;let n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function Bi(e,t,n=()=>{},r=()=>{}){let o;try{o=e()}catch(i){throw t(i),n(),i}return Cd(o,t,n,r)}function Cd(e,t,n,r){return Re(e)?e.then(o=>(n(),r(o),o),o=>{throw t(o),n(),o}):(n(),r(e),e)}function Bc(e,t,n){if(!H(e))return[!1];let r,o;typeof e.tracesSampler=="function"?(o=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?o=t.parentSampled:typeof e.tracesSampleRate<"u"&&(o=e.tracesSampleRate,r=!0);let i=ut(o);if(i===void 0)return _&&f.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),[!1];if(!i)return _&&f.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,i,r];let s=n<i;return s||_&&f.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[s,i,r]}var io="__SENTRY_SUPPRESS_TRACING__";function er(e,t){let n=tr();if(n.startSpan)return n.startSpan(e,t);let r=ji(e),{forceTransaction:o,parentSpan:i,scope:s}=e,a=s?.clone();return K(a,()=>$c(i)(()=>{let u=b(),p=zi(u,i),m=e.onlyIfParent&&!p?new ie:Wi({parentSpan:p,spanArguments:r,forceTransaction:o,scope:u});return Fe(u,m),Bi(()=>t(m),()=>{let{status:l}=I(m);m.isRecording()&&(!l||l==="ok")&&m.setStatus({code:2,message:"internal_error"})},()=>{m.end()})}))}function Hi(e,t){let n=tr();if(n.startSpanManual)return n.startSpanManual(e,t);let r=ji(e),{forceTransaction:o,parentSpan:i,scope:s}=e,a=s?.clone();return K(a,()=>$c(i)(()=>{let u=b(),p=zi(u,i),m=e.onlyIfParent&&!p?new ie:Wi({parentSpan:p,spanArguments:r,forceTransaction:o,scope:u});return Fe(u,m),Bi(()=>t(m,()=>m.end()),()=>{let{status:l}=I(m);m.isRecording()&&(!l||l==="ok")&&m.setStatus({code:2,message:"internal_error"})})}))}function me(e){let t=tr();if(t.startInactiveSpan)return t.startInactiveSpan(e);let n=ji(e),{forceTransaction:r,parentSpan:o}=e;return(e.scope?s=>K(e.scope,s):o!==void 0?s=>Rt(o,s):s=>s())(()=>{let s=b(),a=zi(s,o);return e.onlyIfParent&&!a?new ie:Wi({parentSpan:a,spanArguments:n,forceTransaction:r,scope:s})})}var $i=(e,t)=>{let n=se(),r=ve(n);if(r.continueTrace)return r.continueTrace(e,t);let{sentryTrace:o,baggage:i}=e,s=S(),a=pn(i);return s&&!Ni(s,a?.org_id)?so(t):K(c=>{let u=qn(o,i);return c.setPropagationContext(u),Fe(c,void 0),t()})};function Rt(e,t){let n=tr();return n.withActiveSpan?n.withActiveSpan(e,t):K(r=>(Fe(r,e||void 0),t(r)))}function Gi(e){let t=tr();return t.suppressTracing?t.suppressTracing(e):K(n=>{n.setSDKProcessingMetadata({[io]:!0});let r=e();return n.setSDKProcessingMetadata({[io]:void 0}),r})}function so(e){return K(t=>(t.setPropagationContext({traceId:J(),sampleRand:fe()}),_&&f.log(`Starting a new trace with id ${t.getPropagationContext().traceId}`),Rt(null,e)))}function Wi({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!H()){let s=new ie;if(n||!e){let a={sampled:"false",sample_rate:"0",transaction:t.name,...X(s)};fn(s,a)}return s}let o=w(),i;if(e&&!n)i=Pd(e,r,t),eo(e,i);else if(e){let s=X(e),{traceId:a,spanId:c}=e.spanContext(),u=Te(e);i=Hc({traceId:a,parentSpanId:c,...t},r,u),fn(i,s)}else{let{traceId:s,dsc:a,parentSpanId:c,sampled:u}={...o.getPropagationContext(),...r.getPropagationContext()};i=Hc({traceId:s,parentSpanId:c,...t},r,u),a&&fn(i,a)}return wc(i),hc(i,r,o),i}function ji(e){let n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let r={...n};return r.startTimestamp=Ue(e.startTime),delete r.startTime,r}return n}function tr(){let e=se();return ve(e)}function Hc(e,t,n){let r=S(),o=r?.getOptions()||{},{name:i=""}=e,s={spanAttributes:{...e.attributes},spanName:i,parentSampled:n};r?.emit("beforeSampling",s,{decision:!1});let a=s.parentSampled??n,c=s.spanAttributes,u=t.getPropagationContext(),[p,d,m]=t.getScopeData().sdkProcessingMetadata[io]?[!1]:Bc(o,{name:i,parentSampled:a,attributes:c,parentSampleRate:ut(u.dsc?.sample_rate)},u.sampleRand),l=new bt({...e,attributes:{[G]:"custom",[ct]:d!==void 0&&m?d:void 0,...c},sampled:p});return!p&&r&&(_&&f.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",l),l}function Pd(e,t,n){let{spanId:r,traceId:o}=e.spanContext(),i=t.getScopeData().sdkProcessingMetadata[io]?!1:Te(e),s=i?new bt({...n,parentSpanId:r,traceId:o,sampled:i}):new ie({traceId:o});eo(e,s);let a=S();return a&&(a.emit("spanStart",s),n.endTimestamp&&a.emit("spanEnd",s)),s}function zi(e,t){if(t)return t;if(t===null)return;let n=Dt(e);
22if(!n)return;let r=S();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?v(n):n}function $c(e){return e!==void 0?t=>Rt(e,t):t=>t()}var mn={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Od="heartbeatFailed",Ld="idleTimeout",kd="finalTimeout",wd="externalFinish";function ao(e,t={}){let n=new Map,r=!1,o,i=wd,s=!t.disableAutoFinish,a=[],{idleTimeout:c=mn.idleTimeout,finalTimeout:u=mn.finalTimeout,childSpanTimeout:p=mn.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:m=!0}=t,l=S();if(!l||!H()){let P=new ie,q={sample_rate:"0",sampled:"false",...X(P)};return fn(P,q),P}let g=b(),R=O(),A=Md(e);A.end=new Proxy(A.end,{apply(P,q,Qt){if(d&&d(A),q instanceof ie)return;let[Lr,...ze]=Qt,wn=Lr||N(),ot=Ue(wn),V=pt(A).filter(x=>x!==A),xt=I(A);if(!V.length||!m)return Or(ot),Reflect.apply(P,q,[ot,...ze]);let qe=l.getOptions().ignoreSpans,St=V?.reduce((x,Q)=>{let he=I(Q);return!he.timestamp||qe&&Ht(he,qe)?x:x?Math.max(x,he.timestamp):he.timestamp},void 0),L=xt.start_timestamp,Z=Math.min(L?L+u/1e3:1/0,Math.max(L||-1/0,Math.min(ot,St||1/0)));return Or(Z),Reflect.apply(P,q,[Z,...ze])}});function U(){o&&(clearTimeout(o),o=void 0)}function _e(P){U(),o=setTimeout(()=>{!r&&n.size===0&&s&&(i=Ld,A.end(P))},c)}function Pr(P){o=setTimeout(()=>{!r&&s&&(i=Od,A.end(P))},p)}function ii(P){U(),n.set(P,!0);let q=N();Pr(q+p/1e3)}function si(P){if(n.has(P)&&n.delete(P),n.size===0){let q=N();_e(q+c/1e3)}}function Or(P){r=!0,n.clear(),a.forEach(V=>V()),Fe(g,R);let q=I(A),{start_timestamp:Qt}=q;if(!Qt)return;q.data[It]||A.setAttribute(It,i);let ze=q.status;(!ze||ze==="unknown")&&A.setStatus({code:1}),f.log(`[Tracing] Idle span "${q.op}" finished`);let wn=pt(A).filter(V=>V!==A),ot=0;wn.forEach(V=>{V.isRecording()&&(V.setStatus({code:2,message:"cancelled"}),V.end(P),_&&f.log("[Tracing] Cancelling span since span ended early",JSON.stringify(V,void 0,2)));let xt=I(V),{timestamp:qe=0,start_timestamp:St=0}=xt,L=St<=P,Z=(u+c)/1e3,x=qe-St<=Z;if(_){let Q=JSON.stringify(V,void 0,2);L?x||f.log("[Tracing] Discarding span since it finished after idle span final timeout",Q):f.log("[Tracing] Discarding span since it happened after idle span was finished",Q)}(!x||!L)&&(vc(A,V),ot++)}),ot>0&&A.setAttribute("sentry.idle_span_discarded_spans",ot)}return a.push(l.on("spanStart",P=>{if(r||P===A||I(P).timestamp||P instanceof bt&&P.isStandaloneSpan())return;pt(A).includes(P)&&ii(P.spanContext().spanId)})),a.push(l.on("spanEnd",P=>{r||si(P.spanContext().spanId)})),a.push(l.on("idleSpanEnableAutoFinish",P=>{P===A&&(s=!0,_e(),n.size&&Pr())})),t.disableAutoFinish||_e(),setTimeout(()=>{r||(A.setStatus({code:2,message:"deadline_exceeded"}),i=kd,A.end())},u),A}function Md(e){let t=me(e);return Fe(b(),t),_&&f.log("[Tracing] Started span is an idle span"),t}var qi=0,Gc=1,Wc=2;function Xe(e){return new nr(t=>{t(e)})}function $t(e){return new nr((t,n)=>{n(e)})}var nr=class e{constructor(t){this._state=qi,this._handlers=[],this._runExecutor(t)}then(t,n){return new e((r,o)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(s){o(s)}},i=>{if(!n)o(i);else try{r(n(i))}catch(s){o(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let o,i;return this.then(s=>{i=!1,o=s,t&&t()},s=>{i=!0,o=s,t&&t()}).then(()=>{if(i){r(o);return}n(o)})})}_executeHandlers(){if(this._state===qi)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Gc&&n[1](this._value),this._state===Wc&&n[2](this._value),n[0]=!0)})}_runExecutor(t){let n=(i,s)=>{if(this._state===qi){if(Re(s)){s.then(r,o);return}this._state=i,this._value=s,this._executeHandlers()}},r=i=>{n(Gc,i)},o=i=>{n(Wc,i)};try{t(r,o)}catch(i){o(i)}}};function jc(e,t,n,r=0){try{let o=Yi(t,n,e,r);
22return Re(o)?o:Xe(o)}catch(o){return $t(o)}}function Yi(e,t,n,r){let o=n[r];if(!e||!o)return e;let i=o({...e},t);return _&&i===null&&f.log(`Event processor "${o.id||"?"}" dropped event`),Re(i)?i.then(s=>Yi(s,t,n,r+1)):Yi(i,t,n,r+1)}var Gt,zc,qc,At;function co(e){let t=E._sentryDebugIds,n=E._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(At&&r.length===zc&&o.length===qc)return At;zc=r.length,qc=o.length,At={},Gt||(Gt={});let i=(s,a)=>{for(let c of s){let u=a[c],p=Gt?.[c];if(p&&At&&u)At[p[0]]=u,Gt&&(Gt[c]=[p[0],u]);else if(u){let d=e(c);for(let m=d.length-1;m>=0;m--){let g=d[m]?.filename;if(g&&At&&Gt){At[g]=u,Gt[c]=[g,u];break}}}}};return t&&i(r,t),n&&i(o,n),At}function Vi(e,t){let n=co(e);if(!n)return[];let r=[];for(let o of t){let i=ec(o);i&&n[i]&&r.push({type:"sourcemap",code_file:o,debug_id:n[i]})}return r}function Vc(e,t){let{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;Dd(e,t),r&&Bd(e,r),Hd(e,n),Fd(e,o),Ud(e,i)}function Yc(e,t){let{extra:n,tags:r,attributes:o,user:i,contexts:s,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:p,eventProcessors:d,attachments:m,propagationContext:l,transactionName:g,span:R}=t;rr(e,"extra",n),rr(e,"tags",r),rr(e,"attributes",o),rr(e,"user",i),rr(e,"contexts",s),e.sdkProcessingMetadata=Tt(e.sdkProcessingMetadata,c,2),a&&(e.level=a),g&&(e.transactionName=g),R&&(e.span=R),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),p.length&&(e.fingerprint=[...e.fingerprint,...p]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),m.length&&(e.attachments=[...e.attachments,...m]),e.propagationContext={...e.propagationContext,...l}}function rr(e,t,n){e[t]=Tt(e[t],n,1)}function uo(e,t){let n=at().getScopeData();return e&&Yc(n,e.getScopeData()),t&&Yc(n,t.getScopeData()),n}function Dd(e,t){let{extra:n,tags:r,user:o,contexts:i,level:s,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(i).length&&(e.contexts={...i,...e.contexts}),s&&(e.level=s),a&&e.type!=="transaction"&&(e.transaction=a)}function Fd(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Ud(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Bd(e,t){e.contexts={trace:Ci(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:X(t),...e.sdkProcessingMetadata};let n=v(t),r=I(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function Hd(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function Jc(e,t,n,r,o,i){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||k(),timestamp:t.timestamp||Ee()},u=n.integrations||e.integrations.map(U=>U.name);$d(c,e),jd(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&Gd(c,e.stackParser);let p=qd(r,n.captureContext);n.mechanism&&de(c,n.mechanism);let d=o?o.getEventProcessors():[],m=uo(i,p),l=[...n.attachments||[],...m.attachments];l.length&&(n.attachments=l),Vc(c,m);let g=[...d,...m.eventProcessors];return(n.data&&n.data.__sentry__===!0?Xe(c):jc(g,c,n)).then(U=>(U&&Wd(U),typeof s=="number"&&s>0?zd(U,s,a):U))}function $d(e,t){let{environment:n,release:r,dist:o,maxValueLength:i}=t;e.environment=e.environment||n||dt,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);let s=e.request;s?.url&&i&&(s.url=Ye(s.url,i)),i&&e.exception?.values?.forEach(a=>{a.value&&(a.value=Ye(a.value,i))})}function Gd(e,t){let n=co(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function Wd(e){let t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([r,o])=>{n.push({type:"sourcemap",code_file:r,debug_id:o})})}
22function jd(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function zd(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:le(o.data,t,n)}}))},...e.user&&{user:le(e.user,t,n)},...e.contexts&&{contexts:le(e.contexts,t,n)},...e.extra&&{extra:le(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=le(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:le(o.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=le(e.contexts.flags,3,n)),r}function qd(e,t){if(!t)return e;let n=e?e.clone():new oe;return n.update(t),n}function Kc(e){if(e)return Yd(e)?{captureContext:e}:Jd(e)?{captureContext:e}:e}function Yd(e){return e instanceof oe||typeof e=="function"}var Vd=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Jd(e){return Object.keys(e).some(t=>Vd.includes(t))}function Wt(e,t){return b().captureException(e,Kc(t))}function or(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return b().captureMessage(e,n,r)}function lt(e,t){return b().captureEvent(e,t)}function Ji(e,t){w().setContext(e,t)}function Ki(e){w().setExtras(e)}function Xi(e,t){w().setExtra(e,t)}function Zi(e){w().setTags(e)}function Qi(e,t){w().setTag(e,t)}function es(e){w().setUser(e)}function ir(){return w().lastEventId()}async function ts(e){let t=S();return t?t.flush(e):(_&&f.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function ns(e){let t=S();return t?t.close(e):(_&&f.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function rs(){return!!S()}function po(){let e=S();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function os(e){w().addEventProcessor(e)}function gn(e){let t=w(),{user:n}=uo(t,b()),{userAgent:r}=E.navigator||{},o=uc({user:n,...r&&{userAgent:r},...e}),i=t.getSession();return i?.status==="ok"&&st(i,{status:"exited"}),sr(),t.setSession(o),o}function sr(){let e=w(),n=b().getSession()||e.getSession();n&&pc(n),Xc(),e.setSession()}function Xc(){let e=w(),t=S(),n=e.getSession();n&&t&&t.captureSession(n)}function jt(e=!1){if(e){sr();return}Xc()}var Kd="7";function Zc(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Xd(e){return`${Zc(e)}${e.projectId}/envelope/`}function Zd(e,t){let n={sentry_version:Kd};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function ar(e,t,n){return t||`${Xd(e)}?${Zd(e,n)}`}function is(e,t){let n=zn(e);if(!n)return"";let r=`${Zc(n)}embed/error-page/`,o=`dsn=${Y(n)}`;for(let i in t)if(i!=="dsn"&&i!=="onClose")if(i==="user"){let s=t.user;if(!s)continue;s.name&&(o+=`&name=${encodeURIComponent(s.name)}`),s.email&&(o+=`&email=${encodeURIComponent(s.email)}`)}else o+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${r}?${o}`}var ss=[];function Qd(e){let t={};return e.forEach(n=>{let{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function as(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){let o=n(t);r=Array.isArray(o)?o:[o]}else r=t;return Qd(r)}function Qc(e,t){let n={};return t.forEach(r=>{r&&us(e,r,n)}),n}function cs(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function us(e,t,n){if(n[t.name]){_&&f.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!ss.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),ss.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,i)=>r(o,i,e))}if(typeof t.processEvent=="function"){let r=t.processEvent.bind(t),o=Object.assign((i,s)=>r(i,s,e),{id:t.name});e.addEventProcessor(o)}_&&f.log(`Integration installed: ${t.name}`)}function ps(e){let t=S();if(!t){_&&f.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function el(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function eu(e,t,n,r){let o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}
22),n&&r&&(o.dsn=Y(r)),z(o,[el(e)])}function _n(e,t){let n=t??tl(e)??[];if(n.length===0)return;let r=e.getOptions(),o=eu(n,r._metadata,r.tunnel,e.getDsn());tu().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function tl(e){return tu().get(e)}function tu(){return we("clientToLogBufferMap",()=>new WeakMap)}function nl(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function nu(e,t,n,r){let o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=Y(r)),z(o,[nl(e)])}function cr(e,t){let n=t??rl(e)??[];if(n.length===0)return;let r=e.getOptions(),o=nu(n,r._metadata,r.tunnel,e.getDsn());ru().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function rl(e){return ru().get(e)}function ru(){return we("clientToMetricBufferMap",()=>new WeakMap)}function hn(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}var Sn=Symbol.for("SentryBufferFullError");function zt(e=100){let t=new Set;function n(){return t.size<e}function r(s){t.delete(s)}function o(s){if(!n())return $t(Sn);let a=s();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function i(s){if(!t.size)return Xe(!0);
22let a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!s)return a;let c=[a,new Promise(u=>hn(setTimeout(()=>u(!1),s)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:i}}var ol=60*1e3;function fs(e,t=wt()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?ol:r-t}function il(e,t){return e[t]||e.all||0}function ou(e,t,n=wt()){return il(e,t)>n}function iu(e,{statusCode:t,headers:n},r=wt()){let o={...e},i=n?.["x-sentry-rate-limits"],s=n?.["retry-after"];if(i)for(let a of i.trim().split(",")){let[c,u,,,p]=a.split(":",5),d=parseInt(c,10),m=(isNaN(d)?60:d)*1e3;if(!u)o.all=r+m;else for(let l of u.split(";"))l==="metric_bucket"?(!p||p.split(";").includes("custom"))&&(o[l]=r+m):o[l]=r+m}else s?o.all=r+fs(s,r):t===429&&(o.all=r+60*1e3);return o}var ds=64;function ur(e,t,n=zt(e.bufferSize||ds)){let r={},o=s=>n.drain(s);function i(s){let a=[];if(Ie(s,(d,m)=>{let l=ro(m);ou(r,l)?e.recordDroppedEvent("ratelimit_backoff",l):a.push(d)}),a.length===0)return Promise.resolve({});let c=z(s[0],a),u=d=>{if(dn(c,["client_report"])){_&&f.warn(`Dropping client report. Will not send outcomes (reason: ${d}).`);return}Ie(c,(m,l)=>{e.recordDroppedEvent(d,ro(l))})},p=()=>t({body:yt(c)}).then(d=>d.statusCode===413?(_&&f.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),d):(_&&d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&f.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=iu(r,d),d),d=>{throw u("network_error"),_&&f.error("Encountered error running transport request:",d),d});return n.add(p).then(d=>d,d=>{if(d===Sn)return _&&f.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw d})}return{send:i,flush:o}}function su(e,t,n){let r=[{type:"client_report"},{timestamp:n||Ee(),discarded_events:e}];return z(t?{dsn:t}:{},[r])}function fo(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function au(e){let{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:i,data:s,op:a}=e.contexts?.trace??{};return{data:s??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:s?.[un],exclusive_time:s?.[Ne],measurements:e.measurements,is_segment:!0}}function cu(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[un]:e.profile_id},...e.exclusive_time&&{[Ne]:e.exclusive_time}}}},measurements:e.measurements}}var uu="Not capturing exception because it's already been captured.",pu="Discarded session because of missing or non-string release",_u=Symbol.for("SentryInternalError"),hu=Symbol.for("SentryDoNotSendEventError"),sl=5e3;function lo(e){return{message:e,[_u]:!0}}function ls(e){return{message:e,[hu]:!0}}function fu(e){return!!e&&typeof e=="object"&&_u in e}function du(e){return!!e&&typeof e=="object"&&hu in e}function lu(e,t,n,r,o){let i=0,s,a=!1;e.on(n,()=>{i=0,clearTimeout(s),a=!1}),e.on(t,c=>{i+=r(c),i>=8e5?o(e):a||(a=!0,s=hn(setTimeout(()=>{o(e)},sl)))}),e.on("flush",()=>{o(e)})}var pr=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=zt(t.transportOptions?.bufferSize??ds),t.dsn?this._dsn=zn(t.dsn):_&&f.warn("No DSN provided, client will not send events."),this._dsn){let r=ar(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&lu(this,"afterCaptureLog","flushLogs",pl,_n),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&lu(this,"afterCaptureMetric","flushMetrics",ul,cr)}captureException(t,n,r){let o=k();if(Gr(t))return _&&f.log(uu),o;let i={event_id:o,...n};return this._process(()=>this.eventFromException(t,i).then(s=>this._captureEvent(s,i,r)).then(s=>s),"error"),i.event_id}captureMessage(t,n,r,o){let i={event_id:k(),...r},s=Pt(t)?t:String(t),a=Me(t),c=a?this.eventFromMessage(s,n,i):this.eventFromException(t,i);return this._process(()=>c.then(u=>this._captureEvent(u,i,o)),a?"unknown":"error"),i.event_id}captureEvent(t,n,r){let o=k();if(n?.originalException&&Gr(n.originalException))return _&&f.log(uu),o;let i={event_id:o,...n},s=t.sdkProcessingMetadata||{},a=s.capturedSpanScope,c=s.capturedSpanIsolationScope,u=mu(t.type);return this._process(()=>this._captureEvent(t,i,a||r,c),u),i.event_id}captureSession(t){this.sendSession(t),st(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){let n=this._transport;if(!n)return!0;
22this.emit("flush");let r=await this._isClientDoneProcessing(t),o=await n.flush(t);return r&&o}async close(t){_n(this);let n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){let n=this._integrations[t.name];us(this,t,this._integrations),n||cs(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Lc(t,this._dsn,this._options._metadata,this._options.tunnel);for(let o of n.attachments||[])r=wi(r,Fi(o));this.sendEnvelope(r).then(o=>this.emit("afterSendEvent",t,o))}sendSession(t){let{release:n,environment:r=dt}=this._options;if("aggregates"in t){let i=t.attrs||{};if(!i.release&&!n){_&&f.warn(pu);return}i.release=i.release||n,i.environment=i.environment||r,t.attrs=i}else{if(!t.release&&!n){_&&f.warn(pu);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);let o=Oc(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){let o=`${t}:${n}`;_&&f.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(t,n){let r=this._hooks[t]=this._hooks[t]||new Set,o=(...i)=>n(...i);return r.add(o),()=>{r.delete(o)}}emit(t,...n){let r=this._hooks[t];r&&r.forEach(o=>o(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return _&&f.error("Error while sending envelope:",n),{}}return _&&f.error("Transport disabled"),{}}dispose(){}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=Qc(this,t),cs(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",o=!1,i=n.exception?.values;if(i){o=!0,r=!1;for(let c of i)if(c.mechanism?.handled===!1){r=!0;break}}let s=t.status==="ok";(s&&t.errors===0||s&&r)&&(st(t,{...r&&{status:"crashed"},errors:t.errors||Number(o||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,o){let i=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s?.length&&(n.integrations=s),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),Jc(i,t,n,r,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:Ri(r),...a.contexts};let c=Zn(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=b(),o=w()){return _&&ms(t)&&f.log(`Captured error event \`${fo(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(i=>i.event_id,i=>{_&&(du(i)?f.log(i.message):fu(i)?f.warn(i.message):f.warn(i))})}_processEvent(t,n,r,o){let i=this.getOptions(),{sampleRate:s}=i,a=Su(t),c=ms(t),p=`before send for type \`${t.type||"error"}\``,d=typeof s>"u"?void 0:ut(s);if(c&&typeof d=="number"&&fe()>d)return this.recordDroppedEvent("sample_rate","error"),$t(ls(`Discarding event because it's not included in the random sample (sampling rate = ${s})`));let m=mu(t.type);return this._prepareEvent(t,n,r,o).then(l=>{if(l===null)throw this.recordDroppedEvent("event_processor",m),ls("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return l;let R=cl(this,i,l,n);return al(R,p)}).then(l=>{if(l===null){if(this.recordDroppedEvent("before_send",m),a){let U=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",U)}throw ls(`${p} returned \`null\`, will not send event.`)}let g=r.getSession()||o.getSession();if(c&&g&&this._updateSessionFromEvent(g,l),a){let A=l.sdkProcessingMetadata?.spanCountBeforeProcessing||0,U=l.spans?l.spans.length:0,_e=A-U;_e>0&&this.recordDroppedEvent("before_send","span",_e)}let R=l.transaction_info;if(a&&R&&l.transaction!==t.transaction){let A="custom";l.transaction_info={...R,source:A}}return this.sendEvent(l,n),l}).then(null,l=>{throw du(l)||fu(l)?l:(this.captureException(l,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:l}),lo(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
23Reason: ${l}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===Sn&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{let[o,i]=n.split(":");return{reason:o,category:i,quantity:r}})}_flushOutcomes(){_&&f.log("Flushing outcomes...");let t=this._clearOutcomes();if(t.length===0){_&&f.log("No outcomes to send");return}if(!this._dsn){_&&f.log("No dsn provided, will not send outcomes");return}_&&f.log("Sending outcomes:",t);let n=su(t,this._options.tunnel&&Y(this._dsn));this.sendEnvelope(n)}};function mu(e){return e==="replay_event"?"replay":e||"error"}function al(e,t){let n=`${t} must return \`null\` or a valid event.`;if(Re(e))return e.then(r=>{if(!pe(r)&&r!==null)throw lo(n);return r},r=>{throw lo(`${t} rejected with ${r}`)});if(!pe(e)&&e!==null)throw lo(n);return e}function cl(e,t,n,r){let{beforeSend:o,beforeSendTransaction:i,beforeSendSpan:s,ignoreSpans:a}=t,c=n;
23if(ms(c)&&o)return o(c,r);if(Su(c)){if(s||a){let u=au(c);if(a?.length&&Ht(u,a))return null;if(s){let p=s(u);p?c=Tt(n,cu(p)):Kn()}if(c.spans){let p=[],d=c.spans;for(let l of d){if(a?.length&&Ht(l,a)){Cc(d,l);continue}if(s){let g=s(l);g?p.push(g):(Kn(),p.push(l))}else p.push(l)}let m=c.spans.length-p.length;m&&e.recordDroppedEvent("before_send","span",m),c.spans=p}}if(i){if(c.spans){let u=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return i(c,r)}}return c}function ms(e){return e.type===void 0}function Su(e){return e.type==="transaction"}function ul(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Eu(e.attributes)}function pl(e){let t=0;return e.message&&(t+=e.message.length*2),t+Eu(e.attributes)}function Eu(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*gu(n[0]):Me(n)?t+=gu(n):t+=100}),t}function gu(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function fl(e){return ne(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function mo(e){return fl(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function gs(e,t){t.debug===!0&&(_?f.enable():be(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),b().update(t.initialScope);let r=new e(t);return go(r),r.init(),r}function go(e){b().setClient(e)}var _s=100,hs=5e3,dl=36e5;function Ss(e){function t(...n){_&&f.log("[Offline]:",...n)}return n=>{let r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");let o=n.createStore(n),i=hs,s;function a(d,m,l){return dn(d,["client_report"])?!1:n.shouldStore?n.shouldStore(d,m,l):!0}function c(d){s&&clearTimeout(s),s=hn(setTimeout(async()=>{s=void 0;let m=await o.shift();m&&(t("Attempting to send previously queued event"),m[0].sent_at=new Date().toISOString(),p(m,!0).catch(l=>{t("Failed to retry sending",l)}))},d))}function u(){s||(c(i),i=Math.min(i*2,dl))}async function p(d,m=!1){if(!m&&dn(d,["replay_event","replay_recording"]))return await o.push(d),c(_s),{};try{if(n.shouldSend&&await n.shouldSend(d)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");let l=await r.send(d),g=_s;if(l){if(l.headers?.["retry-after"])g=fs(l.headers["retry-after"]);else if(l.headers?.["x-sentry-rate-limits"])g=6e4;else if((l.statusCode||0)>=400)return l}return c(g),i=hs,l}catch(l){if(await a(d,l,i))return m?await o.unshift(d):await o.push(d),u(),t("Error sending. Event queued.",l),{};throw l}}return n.flushAtStartup&&u(),{send:p,flush:d=>(d===void 0&&(i=hs,c(_s)),r.flush(d))}}}var fr="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function Tu(e,t){let n;return Ie(e,(r,o)=>(t.includes(o)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function ll(e,t){return n=>{let r=e(n);return{...r,send:async o=>{let i=Tu(o,["event","transaction","profile","replay_event"]);return i&&(i.release=t),r.send(o)}}}}function ml(e,t){return z(t?{...e[0],dsn:t}:e[0],e[1])}function Es(e,t){return n=>{let r=e(n),o=new Map,i=t||(u=>{let p=u.getEvent();return p?.extra?.[fr]&&Array.isArray(p.extra[fr])?p.extra[fr]:[]});function s(u,p){let d=p?`${u}:${p}`:u,m=o.get(d);if(!m){let l=Yr(u);if(!l)return;let g=ar(l,n.tunnel);m=p?ll(e,p)({...n,url:g}):e({...n,url:g}),o.set(d,m)}return[u,m]}async function a(u){function p(g){let R=g?.length?g:["event"];return Tu(u,R)}let d=i({envelope:u,getEvent:p}).map(g=>typeof g=="string"?s(g,void 0):s(g.dsn,g.release)).filter(g=>!!g),m=d.length?d:[["",r]];return(await Promise.all(m.map(([g,R])=>R.send(ml(u,g)))))[0]}async function c(u){let p=[...o.values(),r];return(await Promise.all(p.map(m=>m.flush(u)))).every(m=>m)}return{send:a,flush:c}}}var gl="thismessage:/";function En(e){return"isRelative"in e}function qt(e,t){let n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=t??(n?gl:void 0);try{if("canParse"in URL&&!URL.canParse(e,r))return;let o=new URL(e,r);return n?{isRelative:n,pathname:o.pathname,search:o.search,hash:o.hash}:o}catch{}}function Ts(e){if(En(e))return e.pathname;let t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function Be(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function dr(e){return e.split(/[?#]/,1)[0]}function xe(e,t=!0){if(e.startsWith("data:")){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",o=e.includes(";base64,"),i=e.indexOf(","),s="";if(t&&i!==-1){let a=e.slice(i+1);s=a.length>10?`${a.slice(0,10)}... [truncated]`:a}return`data:${r}${o?",base64":""}${s?`,${s}`:""}`}return e}function Is(e,t){let n=t?.getDsn(),r=t?.getOptions().tunnel;return hl(e,n)||_l(e,r)}function _l(e,t){return t?Iu(e)===Iu(t):!1}function hl(e,t){let n=qt(e);return!n||En(n)?!1:t?n.host.includes(t.host)&&/(^|&|\?)sentry_key=/.test(n.search):!1}function Iu(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function ys(e,...t){let n=new String(String.raw(e,...t));
23return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n}function bs(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function Rs(e,t,n=[t],r="npm"){let o=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};o.name||(o.name=`sentry.javascript.${t}`,o.packages=n.map(i=>({name:`${r}:@sentry/${i}`,version:ce})),o.version=ce)}function Tn(e={}){let t=e.client||S();if(!po()||!t)return{};let n=se(),r=ve(n);if(r.getTraceData)return r.getTraceData(e);let o=e.scope||b(),i=e.span||O(),s=i?Jn(i):Sl(o),a=i?X(i):Zn(t,o),c=qr(a);if(!Jr.test(s))return f.warn("Invalid sentry-trace data. Cannot generate trace data"),{};let p={"sentry-trace":s,baggage:c};return e.propagateTraceparent&&(p.traceparent=i?Ac(i):El(o)),p}function Sl(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Yn(t,r,n)}function El(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Vn(t,r,n)}var Tl=100;function He(e,t){let n=S(),r=w();if(!n)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:i=Tl}=n.getOptions();if(i<=0)return;let a={timestamp:Ee(),...e},c=o?be(()=>o(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,i))}var yu,Il="FunctionToString",bu=new WeakMap,yl=(()=>({name:Il,setupOnce(){yu=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Lt(this),n=bu.has(S())&&t!==void 0?t:this;return yu.apply(n,e)}}catch{}},setup(e){bu.set(e,!0)}})),lr=yl;var bl=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`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",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],Rl="EventFilters",As=(e={})=>{let t;return{name:Rl,setup(n){let r=n.getOptions();t=Ru(e,r)},processEvent(n,r,o){if(!t){let i=o.getOptions();t=Ru(e,i)}return Al(n,t)?null:n}}},mr=((e={})=>({...As(e),name:"InboundFilters"}));function Ru(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:bl],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Al(e,t){if(e.type){if(e.type==="transaction"&&Nl(e,t.ignoreTransactions))return _&&f.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
24Event: ${Ve(e)}`),!0}else{if(vl(e,t.ignoreErrors))return _&&f.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
25Event: ${Ve(e)}`),!0;if(Ol(e))return _&&f.warn(`Event dropped due to not having an error message, error type or stacktrace.
26Event: ${Ve(e)}`),!0;if(xl(e,t.denyUrls))return _&&f.warn(`Event dropped due to being matched by \`denyUrls\` option.
27Event: ${Ve(e)}.
28Url: ${_o(e)}`),!0;if(!Cl(e,t.allowUrls))return _&&f.warn(`Event dropped due to not being matched by \`allowUrls\` option.
29Event: ${Ve(e)}.
30Url: ${_o(e)}`),!0}return!1}function vl(e,t){return t?.length?fo(e).some(n=>Ae(n,t)):!1}function Nl(e,t){if(!t?.length)return!1;let n=e.transaction;return n?Ae(n,t):!1}function xl(e,t){if(!t?.length)return!1;let n=_o(e);return n?Ae(n,t):!1}function Cl(e,t){if(!t?.length)return!0;let n=_o(e);return n?Ae(n,t):!0}function Pl(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function _o(e){try{let n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?Pl(n):null}catch{return _&&f.error(`Cannot extract url for event ${Ve(e)}`),null}}function Ol(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}
30function Ns(e,t,n,r,o,i){if(!o.exception?.values||!i||!Se(i.originalException,Error))return;let s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;s&&(o.exception.values=vs(e,t,r,i.originalException,n,o.exception.values,s,0))}function vs(e,t,n,r,o,i,s,a){if(i.length>=n+1)return i;let c=[...i];if(Se(r[o],Error)){Au(s,a,r);let u=e(t,r[o]),p=c.length;vu(u,o,p,a),c=vs(e,t,n,r[o],o,[u,...c],u,p)}return Nu(r)&&r.errors.forEach((u,p)=>{if(Se(u,Error)){Au(s,a,r);let d=e(t,u),m=c.length;vu(d,`errors[${p}]`,m,a),c=vs(e,t,n,u,o,[d,...c],d,m)}}),c}function Nu(e){return Array.isArray(e.errors)}function Au(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Nu(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function vu(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}var Cu=new Map,xu=new Set;function Ll(e){if(E._sentryModuleMetadata)for(let t of Object.keys(E._sentryModuleMetadata)){let n=E._sentryModuleMetadata[t];if(xu.has(t))continue;xu.add(t);let r=e(t);for(let o of r.reverse())if(o.filename){Cu.set(o.filename,n);break}}}function kl(e,t){return Ll(e),Cu.get(t)}function ho(e,t){t.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(r=>{if(!r.filename||r.module_metadata)return;let o=kl(e,r.filename);o&&(r.module_metadata=o)})})}function So(e){e.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(n=>{delete n.module_metadata})})}var xs=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{Ie(t,(n,r)=>{if(r==="event"){let o=Array.isArray(n)?n[1]:void 0;o&&(So(o),n[1]=o)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;let n=e.getOptions().stackParser;ho(n,t)})}});function gr(e){let t="console";ee(t,e),te(t,wl)}function wl(){"console"in E&&Dn.forEach(function(e){e in E.console&&B(E.console,e,function(t){return en[e]=t,function(...n){$("console",{args:n,level:e}),en[e]?.apply(E.console,n)}})})}function In(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var Ml="CaptureConsole",Dl=((e={})=>{let t=e.levels||Dn,n=e.handled??!0;return{name:Ml,setup(r){"console"in E&&gr(({args:o,level:i})=>{S()!==r||!t.includes(i)||Fl(o,i,n)})}}}),Cs=Dl;function Fl(e,t,n){let r=In(t),o=new Error,i={level:In(t),extra:{arguments:e}};K(s=>{if(s.addEventProcessor(u=>(u.logger="console",de(u,{handled:n,type:"auto.core.capture_console"}),u)),t==="assert"){if(!e[0]){let u=`Assertion failed: ${Mt(e.slice(1)," ")||"console.assert"}`;s.setExtra("arguments",e.slice(1)),s.captureMessage(u,r,{captureContext:i,syntheticException:o})}return}let a=e.find(u=>u instanceof Error);if(a){Wt(a,i);return}let c=Mt(e," ");s.captureMessage(c,r,{captureContext:i,syntheticException:o})})}var Ul="Dedupe",Bl=(()=>{let e;return{name:Ul,processEvent(t){if(t.type)return t;try{if(Hl(t,e))return _&&f.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),_r=Bl;function Hl(e,t){return t?!!($l(e,t)||Gl(e,t)):!1}function $l(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Lu(e,t)||!Ou(e,t))}function Gl(e,t){let n=Pu(t),r=Pu(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Lu(e,t)||!Ou(e,t))}function Ou(e,t){let n=tn(e),r=tn(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let o=0;o<r.length;o++){let i=r[o],s=n[o];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.function)return!1}return!0}function Lu(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Pu(e){return e.exception?.values?.[0]}var Wl="ExtraErrorData",jl=((e={})=>{let{depth:t=3,captureErrorCause:n=!0}=e;return{name:Wl,processEvent(r,o,i){let{maxValueLength:s}=i.getOptions();return zl(r,o,t,n,s)}}}),Ps=jl;function zl(e,t={},n,r,o){if(!t.originalException||!ne(t.originalException))return e;let i=t.originalException.name||t.originalException.constructor.name,s=ku(t.originalException,r,o);if(s){let a={...e.contexts},c=le(s,n);return pe(c)&&(D(c,"__sentry_skip_normalization__",!0),a[i]=c),{...e,contexts:a}}return e}function ku(e,t,n){try{let r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],o={};for(let i of Object.keys(e)){if(r.indexOf(i)!==-1)continue;let s=e[i];o[i]=ne(s)||typeof s=="string"?n?Ye(`${s}`,n):`${s}`:s}if(t&&e.cause!==void 0)if(ne(e.cause)){let i=e.cause.name||e.cause.constructor.name;o.cause={[i]:ku(e.cause,!1,n)}}else o.cause=e.cause;if(typeof e.toJSON=="function"){let i=e.toJSON();for(let s of Object.keys(i)){let a=i[s];o[s]=ne(a)?a.toString():a}}return o}catch(r){_&&f.error("Unable to extract extra data from the Error object:",r)}return null}function ql(e,t){let n=0;for(let r=e.length-1;r>=0;r--){let o=e[r];o==="."?e.splice(r,1):o===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var Yl=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Vl(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=Yl.exec(t);return n?n.slice(1):[]}function wu(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let o=r>=0?e[r]:"/";o&&(t=`${o}/${t}`,n=o.charAt(0)==="/")}return t=ql(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function Mu(e){let t=0;for(;t<e.length&&e[t]==="";t++);let n=e.length-1;for(;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function Du(e,t){e=wu(e).slice(1),t=wu(t).slice(1);let n=Mu(e.split("/")),r=Mu(t.split("/")),o=Math.min(n.length,r.length),i=o;for(let a=0;a<o;a++)if(n[a]!==r[a]){i=a;break}let s=[];for(let a=i;a<n.length;a++)s.push("..");return s=s.concat(r.slice(i)),s.join("/")}function Fu(e,t){let n=Vl(e)[2]||"";return t&&n.slice(t.length*-1)===t&&(n=n.slice(0,n.length-t.length)),n}var Jl="RewriteFrames",Os=(e={})=>{let t=e.root,n=e.prefix||"app:///",r="window"in E&&!!E.window,o=e.iteratee||Kl({isBrowser:r,root:t,prefix:n});function i(a){try{return{...a,exception:{...a.exception,values:a.exception.values.map(c=>({...c,...c.stacktrace&&{stacktrace:s(c.stacktrace)}}))}}}catch{return a}}function s(a){return{...a,frames:a?.frames?.map(c=>o(c))}}return{name:Jl,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=i(c)),c}}};function Kl({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;let o=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),i=/^\//.test(r.filename);if(e){if(t){let s=r.filename;s.indexOf(t)===0&&(r.filename=s.replace(t,n))}}else if(o||i){let s=o?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,a=t?Du(t,s):
30Fu(s);r.filename=`${n}${a}`}return r}}var Xl=10,Zl="ZodErrors";function Ql(e){return ne(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function em(e){return{...e,path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0}}function tm(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function nm(e){let t=new Set;for(let r of e.issues){let o=tm(r.path);o.length>0&&t.add(o)}let n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){let o=e.issues[0];o!==void 0&&"expected"in o&&typeof o.expected=="string"&&(r=o.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${Ye(n.join(", "),100)}`}function rm(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!Ql(r.originalException)||r.originalException.issues.length===0)return n;try{let i=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(em);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:i})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:nm(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":i.slice(0,e)}}}catch(o){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:o instanceof Error?`${o.name}: ${o.message}
31${o.stack}`:"unknown"}}}}}var om=((e={})=>{let t=e.limit??Xl;return{name:Zl,processEvent(n,r){return rm(t,e.saveZodIssuesAsAttachment,n,r)}}}),Ls=om;var ks=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{Ie(n,(r,o)=>{if(o==="event"){let i=Array.isArray(r)?r[1]:void 0;i&&(So(i),r[1]=i)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;let r=t.getOptions().stackParser;ho(r,n)})},processEvent(t){let n=sm(t,e.ignoreSentryInternalFrames);if(n){let r=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(n[r](i=>!i.some(s=>e.filterKeys.includes(s)))){if(e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="drop-error-if-exclusively-contains-third-party-frames")return null;t.tags={...t.tags,third_party_code:!0}}}return t}});function im(e,t){if(t!==0||!e.context_line||!e.filename||!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(cm))return!1;if(e.pre_context){let n=e.pre_context.length;for(let r=0;r<n;r++)if(e.pre_context[r]?.includes(am))return!0}return!1}function sm(e,t){let n=tn(e);if(n)return n.filter((r,o)=>!r.filename||r.lineno==null&&r.colno==null&&r.instruction_addr==null?!1:!t||!im(r,o)).map(r=>r.module_metadata?Object.keys(r.module_metadata).filter(o=>o.startsWith(Uu)).map(o=>o.slice(Uu.length)):[])}var Uu="_sentryBundlerPluginAppKey:",am="Attempt to invoke user-land function",cm="fn.apply(this, wrappedArguments)";var Bu=100,Hu=10,Eo="flag.evaluation.";function mt(e){let n=b().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function Ze(e,t,n=Bu){let r=b().getScopeData().contexts;r.flags||(r.flags={values:[]});let o=r.flags.values;um(o,e,t,n)}function um(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){_&&f.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}let o=e.findIndex(i=>i.flag===t);o!==-1&&e.splice(o,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function Qe(e,t,n=Hu){if(typeof t!="boolean")return;let r=O();if(!r)return;let o=I(r).data;if(`${Eo}${e}`in o){r.setAttribute(`${Eo}${e}`,t);return}Object.keys(o).filter(s=>s.startsWith(Eo)).length<n&&r.setAttribute(`${Eo}${e}`,t)}var ws=()=>({name:"FeatureFlags",processEvent(e,t,n){return mt(e)},addFeatureFlag(e,t){Ze(e,t),Qe(e,t)}});var pm="ConversationId",fm=(()=>({name:pm,setup(e){e.on("spanStart",t=>{let n=b().getScopeData(),r=w().getScopeData(),o=n.conversationId||r.conversationId;o&&t.setAttribute(vi,o)})}})),Ms=fm;function Ds(e,t,n,r,o){if(!e.fetchData)return;let{method:i,url:s}=e.fetchData,a=H()&&t(s);if(e.endTimestamp){let l=e.fetchData.__span;if(!l)return;let g=r[l];g&&(a&&(mm(g,e),dm(g,e,o)),delete r[l]);return}let{spanOrigin:c="auto.http.browser",propagateTraceparent:u=!1}=typeof o=="object"?o:{spanOrigin:o},p=!!O(),d=a&&p?me(_m(s,i,c)):new ie;if(e.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(e.fetchData.url)){let l=e.args[0],g={...e.args[1]||{}},R=lm(l,g,H()&&p?d:void 0,u);R&&(e.args[1]=g,g.headers=R)}let m=S();if(m){let l={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};m.emit("beforeOutgoingRequestSpan",d,l)}return d}function dm(e,t,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function lm(e,t,n,r){let o=Tn({span:n,propagateTraceparent:r}),i=o["sentry-trace"],s=o.baggage,a=o.traceparent;if(!i)return;let c=t.headers||($n(e)?e.headers:void 0);if(c)if(gm(c)){let u=new Headers(c);if(u.get("sentry-trace")||u.set("sentry-trace",i),r&&a&&!u.get("traceparent")&&u.set("traceparent",a),s){let p=u.get("baggage");p?To(p)||u.set("baggage",`${p},${s}`):u.set("baggage",s)}return u}else if(Array.isArray(c)){let u=[...c];c.find(d=>d[0]==="sentry-trace")||u.push(["sentry-trace",i]),r&&a&&!c.find(d=>d[0]==="traceparent")&&u.push(["traceparent",a]);let p=c.find(d=>d[0]==="baggage"&&To(d[1]));return s&&!p&&u.push(["baggage",s]),u}else{let u="sentry-trace"in c?c["sentry-trace"]:void 0,p="traceparent"in c?c.traceparent:void 0,d="baggage"in c?c.baggage:void 0,m=d?Array.isArray(d)?[...d]:[d]:[],l=d&&(Array.isArray(d)?d.find(R=>To(R)):To(d));s&&!l&&m.push(s);let g={...c,"sentry-trace":u??i,baggage:m.length>0?m.join(","):void 0};return r&&a&&!p&&(g.traceparent=a),g}else return{...o}}function mm(e,t){if(t.response){Ft(e,t.response.status);let n=t.response?.headers?.get("content-length");if(n){let r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}function To(e){return e.split(",").some(t=>t.trim().startsWith(zr))}function gm(e){return typeof Headers<"u"&&Se(e,Headers)}function _m(e,t,n){if(e.startsWith("data:")){let i=xe(e);return{name:`${t} ${i}`,attributes:$u(e,void 0,t,n)}}let r=qt(e),o=r?Ts(r):e;return{name:`${t} ${o}`,attributes:$u(e,r,t,n)}}function $u(e,t,n,r){let o={url:xe(e),type:"fetch","http.method":n,[C]:r,[W]:"http.client"};return t&&(En(t)||(o["http.url"]=xe(t.href),o["server.address"]=t.host),t.search&&(o["http.query"]=t.search),t.hash&&(o["http.fragment"]=t.hash)),o}function Fs(e,t={},n=b()){let{message:r,name:o,email:i,url:s,source:a,associatedEventId:c,tags:u}=e,p={contexts:{feedback:{contact_email:i,name:o,message:r,url:s,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},d=n?.getClient()||S();return d&&d.emit("beforeSendFeedback",p,t),n.captureEvent(p,t)}function Io(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}var yn=E;function Us(){return"history"in yn&&!!yn.history}function hm(){if(!("fetch"in yn))return!1;
31try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function hr(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Sr(){if(typeof EdgeRuntime=="string")return!0;if(!hm())return!1;if(hr(yn.fetch))return!0;let e=!1,t=yn.document;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=hr(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){_&&f.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Bs(){return"ReportingObserver"in yn}function Yt(e,t){let n="fetch";ee(n,e),te(n,()=>Wu(void 0,t))}function Hs(e){let t="fetch-body-resolved";ee(t,e),te(t,()=>Wu(Em))}function Wu(e,t=!1){t&&!Sr()||B(E,"fetch",function(n){return function(...r){let o=new Error,{method:i,url:s}=Tm(r),a={args:r,fetchData:{method:i,url:s},startTimestamp:N()*1e3,virtualError:o,headers:Im(r)};return e||$("fetch",{...a}),n.apply(E,r).then(async c=>(e?e(c):$("fetch",{...a,endTimestamp:N()*1e3,response:c}),c),c=>{$("fetch",{...a,endTimestamp:N()*1e3,error:c}),ne(c)&&c.stack===void 0&&(c.stack=o.stack,D(c,"framesToPop",1));let p=S()?.getOptions().enhanceFetchErrorMessages??"always";if(p!==!1&&c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{let l=new URL(a.fetchData.url).host;p==="always"?c.message=`${c.message} (${l})`:D(c,"__sentry_fetch_url_host__",l)}catch{}throw c})}})}async function Sm(e,t){if(e?.body){let n=e.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3),i=!0;for(;i;){let s;try{s=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);let{done:a}=await r.read();clearTimeout(s),a&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(s)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}function Em(e){let t;try{t=e.clone()}catch{return}Sm(t,()=>{$("fetch-body-resolved",{endTimestamp:N()*1e3,response:e})})}function yo(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Gu(e){return typeof e=="string"?e:e?yo(e,"url")?e.url:e.toString?e.toString():"":""}function Tm(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[n,r]=e;return{url:Gu(n),method:yo(r,"method")?String(r.method).toUpperCase():$n(n)&&yo(n,"method")?String(n.method).toUpperCase():"GET"}}let t=e[0];return{url:Gu(t),method:yo(t,"method")?String(t.method).toUpperCase():"GET"}}function Im(e){let[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if($n(t))return new Headers(t.headers)}catch{}}function $s(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Gs(){return"npm"}function ju(){return!$s()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Ws(){return typeof window<"u"&&(!ju()||ym())}function ym(){return E.process?.type==="renderer"}var T=E,js=0;function zs(){return js>0}function bm(){js++,setTimeout(()=>{js--})}function Vt(e,t={}){function n(o){return typeof o=="function"}if(!n(e))return e;try{let o=e.__sentry_wrapped__;if(o)return typeof o=="function"?o:e;if(Lt(e))return e}catch{return e}let r=function(...o){try{let i=o.map(s=>Vt(s,t));return e.apply(this,i)}catch(i){throw bm(),K(s=>{s.addEventProcessor(a=>(t.mechanism&&(sn(a,void 0,void 0),de(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),Wt(i)}),i}};try{for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch{}Hr(r,e),D(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Er(){let e=De(),{referrer:t}=T.document||{},{userAgent:n}=T.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}var Rm={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",graphqlClientIntegration:"graphqlclient",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata",instrumentAnthropicAiClient:"instrumentanthropicaiclient",instrumentOpenAiClient:"instrumentopenaiclient",instrumentGoogleGenAIClient:"instrumentgooglegenaiclient",instrumentLangGraph:"instrumentlanggraph",createLangChainCallbackHandler:"createlangchaincallbackhandler"},zu=T;async function bo(e,t){let n=Rm[e],r=zu.Sentry=zu.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);let o=r[e];if(typeof o=="function"&&!("_isShim"in o))return o;let i=Am(n),s=T.document.createElement("script");
31s.src=i,s.crossOrigin="anonymous",s.referrerPolicy="strict-origin",t&&s.setAttribute("nonce",t);let a=new Promise((d,m)=>{s.addEventListener("load",()=>d()),s.addEventListener("error",m)}),c=T.document.currentScript,u=T.document.body||T.document.head||c?.parentElement;if(u)u.appendChild(s);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}let p=r[e];if(typeof p!="function")throw new Error(`Could not load integration: ${e}`);return p}function Am(e){let n=S()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${ce}/${e}.min.js`,n).toString()}var qu=(bo,void 0);var Ro=void 0;function bn(e,t){let n=Vs(e,t),r={type:Om(t),value:Lm(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Nm(e,t,n,r){let i=S()?.getOptions().normalizeDepth,s=Mm(t),a={__serialized__:to(t,i)};if(s)return{exception:{values:[bn(e,s)]},extra:a};let c={exception:{values:[{type:Ot(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:km(t,{isUnhandledRejection:r})}]},extra:a};if(n){let u=Vs(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function qs(e,t){return{exception:{values:[bn(e,t)]}}}function Vs(e,t){let n=t.stacktrace||t.stack||"",r=Cm(t),o=Pm(t);try{return e(n,r,o)}catch{}return[]}var xm=/Minified React error #\d+;/i;function Cm(e){return e&&xm.test(e.message)?1:0}function Pm(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Yu(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Om(e){let t=e?.name;return!t&&Yu(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Lm(e){let t=e?.message;return Yu(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?mo(t.error):mo(e):"No error message"}function Ao(e,t,n,r){let o=n?.syntheticException||void 0,i=No(e,t,o,r);return de(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),Xe(i)}function vo(e,t,n="info",r,o){let i=r?.syntheticException||void 0,s=Ys(e,t,i,o);return s.level=n,r?.event_id&&(s.event_id=r.event_id),Xe(s)}function No(e,t,n,r,o){let i;if(Bn(t)&&t.error)return qs(e,t.error);if(Br(t)||li(t)){let s=t;if("stack"in t)i=qs(e,t);else{let a=s.name||(Br(s)?"DOMError":"DOMException"),c=s.message?`${a}: ${s.message}`:a;i=Ys(e,c,n,r),sn(i,c)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}return ne(t)?qs(e,t):pe(t)||Ot(t)?(i=Nm(e,t,n,o),de(i,{synthetic:!0}),i):(i=Ys(e,t,n,r),sn(i,`${t}`,void 0),de(i,{synthetic:!0}),i)}function Ys(e,t,n,r){let o={};if(r&&n){let i=Vs(e,n);i.length&&(o.exception={values:[{value:t,stacktrace:{frames:i}}]}),de(o,{synthetic:!0})}if(Pt(t)){let{__sentry_template_string__:i,__sentry_template_values__:s}=t;return o.logentry={message:i,params:s},o}return o.message=t,o}function km(e,{isUnhandledRejection:t}){let n=Si(e),r=t?"promise rejection":"exception";return Bn(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Ot(e)?`Event \`${wm(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function wm(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Mm(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}var Rn=class extends pr{constructor(t){let n=Dm(t),r=T.SENTRY_SDK_SOURCE||Gs();Rs(n,"browser",["browser"],r),n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:n.sendDefaultPii?"auto":"never",...n._metadata.sdk.settings}),super(n);let{sendDefaultPii:o,sendClientReports:i,enableLogs:s,_experiments:a,enableMetrics:c}=this._options,u=c??a?.enableMetrics??!0;T.document&&(i||s||u)&&T.document.addEventListener("visibilitychange",()=>{T.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),s&&_n(this),u&&cr(this))}),o&&this.on("beforeSendSession",bs)}eventFromException(t,n){return Ao(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return vo(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,o){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,o)}};function Dm(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:T.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var et=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var y=E;var Fm=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",tt=(e,t,n,r)=>{let o,i;return s=>{t.value>=0&&(s||r)&&(i=t.value-(o??0),(i||o===void 0)&&(o=t.value,t.delta=i,t.rating=Fm(t.value,n),e(t)))}};var gt=(e=!0)=>{let t=y.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t};var Ce=()=>gt()?.activationStart??0;function Pe(e,t,n){y.document&&y.addEventListener(e,t,n)}function Jt(e,t,n){y.document&&y.removeEventListener(e,t,n)}var An=-1,Vu=new Set,Um=()=>y.document?.visibilityState==="hidden"&&!y.document?.prerendering?0:1/0,xo=e=>{if(Bm(e)&&An>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(let t of Vu)t();isFinite(An)||(An=e.type==="visibilitychange"?e.timeStamp:0,Jt("prerenderingchange",xo,!0))}},nt=()=>{if(y.document&&An<0){let e=Ce();An=(y.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??Um(),Pe("visibilitychange",xo,!0),Pe("pagehide",xo,!0),Pe("prerenderingchange",xo,!0)}return{get firstHiddenTime(){return An},onHidden(e){Vu.add(e)}}};function Bm(e){return e.type==="pagehide"||y.document?.visibilityState==="hidden"}var Ju=()=>`v5-${Date.now()}-${Math.floor(Math.random()*8999999999999)+1e12}`;var rt=(e,t=-1)=>{let n=gt(),r="navigate";return n&&(y.document?.prerendering||Ce()>0?r="prerender":y.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:Ju(),navigationType:r}};var Js=new WeakMap;function vn(e,t){try{return Js.get(e)||Js.set(e,new t),Js.get(e)}catch{return new t}}var Co=class e{constructor(){e.prototype.__init.call(this),e.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;let n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}};var Oe=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(o=>{Promise.resolve().then(()=>{t(o.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}};var Nn=e=>{let t=!1;return()=>{t||(e(),t=!0)}};var vt=e=>{y.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()};var Hm=[1800,3e3],Ku=(e,t={})=>{vt(()=>
31{let n=nt(),r=rt("FCP"),o,s=Oe("paint",a=>{for(let c of a)c.name==="first-contentful-paint"&&(s.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-Ce(),0),r.entries.push(c),o(!0)))});s&&(o=tt(e,r,Hm,t.reportAllChanges))})};var $m=[.1,.25],Xu=(e,t={})=>{Ku(Nn(()=>{let n=rt("CLS",0),r,o=nt(),i=vn(t,Co),s=c=>{for(let u of c)i._processEntry(u);i._sessionValue>n.value&&(n.value=i._sessionValue,n.entries=i._sessionEntries,r())},a=Oe("layout-shift",s);a&&(r=tt(e,n,$m,t.reportAllChanges),o.onHidden(()=>{s(a.takeRecords()),r(!0)}),y?.setTimeout?.(r))}))};var Zu=0,Ks=1/0,Po=0,Gm=e=>{e.forEach(t=>{t.interactionId&&(Ks=Math.min(Ks,t.interactionId),Po=Math.max(Po,t.interactionId),Zu=Po?(Po-Ks)/7+1:0)})},Xs,Zs=()=>Xs?Zu:performance.interactionCount||0,Qu=()=>{"interactionCount"in performance||Xs||(Xs=Oe("event",Gm,{type:"event",buffered:!0,durationThreshold:0}))};var Qs=10,ep=0,Wm=()=>Zs()-ep,Oo=class e{constructor(){e.prototype.__init.call(this),e.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){ep=Zs(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let t=Math.min(this._longestInteractionList.length-1,Math.floor(Wm()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;let n=this._longestInteractionList.at(-1),r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<Qs||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((o,i)=>i._latency-o._latency),this._longestInteractionList.length>Qs){let o=this._longestInteractionList.splice(Qs);for(let i of o)this._longestInteractionMap.delete(i.id)}this._onAfterProcessingINPCandidate?.(r)}}};var Lo=e=>{let t=y.requestIdleCallback||y.setTimeout;y.document?.visibilityState==="hidden"?e():(e=Nn(e),Pe("visibilitychange",e,{once:!0,capture:!0}),Pe("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),Jt("visibilitychange",e,{capture:!0}),Jt("pagehide",e,{capture:!0})}))};var jm=[200,500],zm=40,tp=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;let n=nt();vt(()=>{Qu();let r=rt("INP"),o,i=vn(t,Oo),s=c=>{Lo(()=>{for(let p of c)i._processEntry(p);let u=i._estimateP98LongestInteraction();u&&u._latency!==r.value&&(r.value=u._latency,r.entries=u.entries,o())})},a=Oe("event",s,{durationThreshold:t.durationThreshold??zm});o=tt(e,r,jm,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{s(a.takeRecords()),o(!0)}))})};var ko=class{_processEntry(t){this._onBeforeProcessingEntry?.(t)}};var qm=[2500,4e3],np=(e,t={})=>{vt(()=>{let n=nt(),r=rt("LCP"),o,i=vn(t,ko),s=c=>{t.reportAllChanges||(c=c.slice(-1));for(let u of c)i._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-Ce(),0),r.entries=[u],o())},a=Oe("largest-contentful-paint",s);if(a){o=tt(e,r,qm,t.reportAllChanges);let c=Nn(()=>{s(a.takeRecords()),a.disconnect(),o(!0)}),u=p=>{p.isTrusted&&(Lo(c),Jt(p.type,u,{capture:!0}))};for(let p of["keydown","click","visibilitychange"])Pe(p,u,{capture:!0})}})};var Ym=[800,1800],ea=e=>{y.document?.prerendering?vt(()=>ea(e)):y.document?.readyState!=="complete"?addEventListener("load",()=>ea(e),!0):setTimeout(e)},rp=(e,t={})=>{let n=rt("TTFB"),r=tt(e,n,Ym,t.reportAllChanges);ea(()=>{let o=gt();o&&(n.value=Math.max(o.responseStart-Ce(),0),n.entries=[o],r(!0))})};var Tr={},wo={},op,ip,sp,ap;function Ir(e,t=!1){return Mo("cls",e,Vm,op,t)}function yr(e,t=!1){return Mo("lcp",e,Jm,ip,t)}function ta(e){return Mo("ttfb",e,Km,sp)}function na(e){return Mo("inp",e,Xm,ap)}function Ge(e,t){return cp(e,t),wo[e]||(Zm(e),wo[e]=!0),up(e,t)}function br(e,t){let n=Tr[e];if(n?.length)for(let r of n)try{r(t)}catch(o){et&&f.error(`Error while triggering instrumentation handler.
32Type: ${e}
33Name: ${ue(r)}
34Error:`,o)}}function Vm(){return Xu(e=>{br("cls",{metric:e}),op=e},{reportAllChanges:!0})}function Jm(){return np(e=>{br("lcp",{metric:e}),ip=e},{reportAllChanges:!0})}function Km(){return rp(e=>{br("ttfb",{metric:e}),sp=e})}function Xm(){return tp(e=>{br("inp",{metric:e}),ap=e})}function Mo(e,t,n,r,o=!1){cp(e,t);let i;return wo[e]||(i=n(),wo[e]=!0),r&&t({metric:r}),up(e,t,o?i:void 0)}function Zm(e){let t={};e==="event"&&(t.durationThreshold=0),Oe(e,n=>{br(e,{entries:n})},t)}function cp(e,t){Tr[e]=Tr[e]||[],Tr[e].push(t)}function up(e,t,n){return()=>{n&&n();let r=Tr[e];if(!r)return;let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}function pp(e){return"duration"in e}var fp=e=>{let t=n=>{(n.type==="pagehide"||y.document?.visibilityState==="hidden")&&e(n)};Pe("visibilitychange",t,{capture:!0,once:!0}),Pe("pagehide",t,{capture:!0,once:!0})};function Do(e){return typeof e=="number"&&isFinite(e)}function _t(e,t,n,{...r}){let o=I(e).start_timestamp;return o&&o>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),Rt(e,()=>{let i=me({startTime:t,...r});return i&&i.end(n),i})}function xn(e){let t=S();if(!t)return;let{name:n,transaction:r,attributes:o,startTime:i}=e,{release:s,environment:a,sendDefaultPii:c}=t.getOptions(),p=t.getIntegrationByName("Replay")?.getReplayId(),d=b(),m=d.getUser(),l=m!==void 0?m.email||m.id||m.ip_address:void 0,g;
34try{g=d.getScopeData().contexts.profile.profile_id}catch{}let R={release:s,environment:a,user:l||void 0,profile_id:g||void 0,replay_id:p||void 0,transaction:r,"user_agent.original":y.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...o};return me({name:n,attributes:R,startTime:i,experimental:{standalone:!0}})}function ht(){return y.addEventListener&&y.performance}function M(e){return e/1e3}function dp(e){let t="unknown",n="unknown",r="";for(let o of e){if(o==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}function Fo(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Uo(e,t){let n,r=!1;function o(a){!r&&n&&t(a,n),r=!0}fp(()=>{o("pagehide")});let i=e.on("beforeStartNavigationSpan",(a,c)=>{c?.isRedirect||(o("navigation"),i(),s())}),s=e.on("afterStartPageLoadSpan",a=>{n=a.spanContext().spanId,s()})}function lp(e){let t=0,n;if(!Fo("layout-shift"))return;let r=Ir(({metric:o})=>{let i=o.entries[o.entries.length-1];i&&(t=o.value,n=i)},!0);Uo(e,(o,i)=>{Qm(t,n,i,o),r()})}function Qm(e,t,n,r){et&&f.log(`Sending CLS span (${e})`);let o=t?M((F()||0)+t.startTime):N(),i=b().getScopeData().transactionName,s=t?j(t.sources[0]?.node):"Layout shift",a={[C]:"auto.http.browser.cls",[W]:"ui.webvital.cls",[Ne]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((u,p)=>{a[`cls.source.${p+1}`]=j(u.node)});let c=xn({name:s,transaction:i,attributes:a,startTime:o});c&&(c.addEvent("cls",{[Je]:"",[Ke]:e}),c.end(o))}function mp(e){let t=0,n;if(!Fo("largest-contentful-paint"))return;let r=yr(({metric:o})=>{let i=o.entries[o.entries.length-1];i&&(t=o.value,n=i)},!0);Uo(e,(o,i)=>{eg(t,n,i,o),r()})}function eg(e,t,n,r){et&&f.log(`Sending LCP span (${e})`);let o=M((F()||0)+(t?.startTime||0)),i=b().getScopeData().transactionName,s=t?j(t.element):"Largest contentful paint",a={[C]:"auto.http.browser.lcp",[W]:"ui.webvital.lcp",[Ne]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=j(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));let c=xn({name:s,transaction:i,attributes:a,startTime:o});c&&(c.addEvent("lcp",{[Je]:"millisecond",[Ke]:e}),c.end(o))}function Le(e){return e&&((F()||performance.timeOrigin)+e)/1e3}function Rr(e){let t={};if(e.nextHopProtocol!=null){let{name:n,version:r}=dp(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return F()||ht()?.timeOrigin?tg({...t,"http.request.redirect_start":Le(e.redirectStart),"http.request.redirect_end":Le(e.redirectEnd),"http.request.worker_start":Le(e.workerStart),"http.request.fetch_start":Le(e.fetchStart),"http.request.domain_lookup_start":Le(e.domainLookupStart),"http.request.domain_lookup_end":Le(e.domainLookupEnd),"http.request.connect_start":Le(e.connectStart),"http.request.secure_connection_start":Le(e.secureConnectionStart),"http.request.connection_end":Le(e.connectEnd),"http.request.request_start":Le(e.requestStart),"http.request.response_start":Le(e.responseStart),"http.request.response_end":Le(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function tg(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}var ng=2147483647,gp=0,We={},ge,Ho;function ra({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){let r=ht();if(r&&F()){r.mark&&y.performance.mark("sentry-tracing-init");let o=t?mp(n):og(),i=ig(),s=e?lp(n):rg();return()=>{o?.(),i(),s?.()}}return()=>{}}function oa(){Ge("longtask",({entries:e})=>{let t=O();if(!t)return;let{op:n,start_timestamp:r}=I(t);for(let o of e){let i=M(F()+o.startTime),s=M(o.duration);n==="navigation"&&r&&i<r||_t(t,i,i+s,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[C]:"auto.ui.browser.metrics"}})}})}function ia(){new PerformanceObserver(t=>{let n=O();if(n)for(let r of t.getEntries()){if(!r.scripts[0])continue;let o=M(F()+r.startTime),{start_timestamp:i,op:s}=I(n);if(s==="navigation"&&i&&o<i)continue;let a=M(r.duration),c={[C]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:p,invokerType:d,sourceURL:m,sourceFunctionName:l,sourceCharPosition:g}=u;c["browser.script.invoker"]=p,c["browser.script.invoker_type"]=d,m&&(c["code.filepath"]=m),l&&(c["code.function"]=l),g!==-1&&(c["browser.script.source_char_position"]=g),_t(n,o,o+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function sa(){Ge("event",({entries:e})=>
34{let t=O();if(t){for(let n of e)if(n.name==="click"){let r=M(F()+n.startTime),o=M(n.duration),i={name:j(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[C]:"auto.ui.browser.metrics"}},s=Gn(n.target);s&&(i.attributes["ui.component_name"]=s),_t(t,r,r+o,i)}}})}function rg(){return Ir(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(We.cls={value:e.value,unit:""},Ho=t)},!0)}function og(){return yr(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(We.lcp={value:e.value,unit:"millisecond"},ge=t)},!0)}function ig(){return ta(({metric:e})=>{e.entries[e.entries.length-1]&&(We.ttfb={value:e.value,unit:"millisecond"})})}function aa(e,t){let n=ht(),r=F();if(!n?.getEntries||!r)return;let o=M(r),i=n.getEntries(),{op:s,start_timestamp:a}=I(e);i.slice(gp).forEach(c=>{let u=M(c.startTime),p=M(Math.max(0,c.duration));if(!(s==="navigation"&&a&&o+u<a))switch(c.entryType){case"navigation":{ug(e,c,o);break}case"mark":case"paint":case"measure":{ag(e,c,u,p,o,t.ignorePerformanceApiSpans);let d=nt(),m=c.startTime<d.firstHiddenTime;c.name==="first-paint"&&m&&(We.fp={value:c.startTime,unit:"millisecond"}),c.name==="first-contentful-paint"&&m&&(We.fcp={value:c.startTime,unit:"millisecond"});break}case"resource":{dg(e,c,c.name,u,p,o,t.ignoreResourceSpans);break}}}),gp=Math.max(i.length-1,0),lg(e),s==="pageload"&&(_g(We),t.recordClsOnPageloadSpan||delete We.cls,t.recordLcpOnPageloadSpan||delete We.lcp,Object.entries(We).forEach(([c,u])=>{Qn(c,u.value,u.unit)}),e.setAttribute("performance.timeOrigin",o),e.setAttribute("performance.activationStart",Ce()),mg(e,t)),ge=void 0,Ho=void 0,We={}}function sg(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components \u269B"}catch{return}}function ag(e,t,n,r,o,i){if(sg(t)||["mark","measure"].includes(t.entryType)&&Ae(t.name,i))return;let s=gt(!1),a=M(s?s.requestStart:0),c=o+Math.max(n,a),u=o+n,p=u+r,d={[C]:"auto.resource.browser.metrics"};c!==u&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=c),cg(d,t),c<=p&&_t(e,c,p,{name:t.name,op:t.entryType,attributes:d})}function cg(e,t){try{let n=t.detail;if(!n)return;if(typeof n=="object"){for(let[r,o]of Object.entries(n))if(o&&Me(o))e[`sentry.browser.measure.detail.${r}`]=o;else if(o!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(o)}catch{}return}if(Me(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function ug(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Bo(e,t,r,n)}),Bo(e,t,"secureConnection",n,"TLS/SSL"),Bo(e,t,"fetch",n,"cache"),Bo(e,t,"domainLookup",n,"DNS"),fg(e,t,n)}function Bo(e,t,n,r,o=n){let i=pg(n),s=t[i],a=t[`${n}Start`];!a||!s||_t(e,r+M(a),r+M(s),{op:`browser.${o}`,name:t.name,attributes:{[C]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function pg(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function fg(e,t,n){let r=n+M(t.requestStart),o=n+M(t.responseEnd),i=n+M(t.responseStart);t.responseEnd&&(_t(e,r,o,{op:"browser.request",name:t.name,attributes:{[C]:"auto.ui.browser.metrics"}}),_t(e,i,o,{op:"browser.response",name:t.name,attributes:{[C]:"auto.ui.browser.metrics"}}))}function dg(e,t,n,r,o,i,s){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;let a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(s?.includes(a))return;let c={[C]:"auto.resource.browser.metrics"},u=Be(n);u.protocol&&(c["url.scheme"]=u.protocol.split(":").pop()),u.host&&(c["server.address"]=u.host),c["url.same_origin"]=n.includes(y.location.origin),gg(t,c,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);let p={...c,...Rr(t)},d=i+r,m=d+o;_t(e,d,m,{name:n.replace(y.location.origin,""),op:a,attributes:p})}function lg(e){let t=y.navigator;if(!t)return;let n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Do(n.rtt)&&(We["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Do(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Do(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function mg(e,t){ge&&t.recordLcpOnPageloadSpan&&(ge.element&&e.setAttribute("lcp.element",j(ge.element)),ge.id&&e.setAttribute("lcp.id",ge.id),ge.url&&e.setAttribute("lcp.url",ge.url.trim().slice(0,200)),ge.loadTime!=null&&e.setAttribute("lcp.loadTime",ge.loadTime),ge.renderTime!=null&&e.setAttribute("lcp.renderTime",ge.renderTime),e.setAttribute("lcp.size",ge.size)),Ho?.sources&&t.recordClsOnPageloadSpan&&Ho.sources.forEac
34h((n,r)=>e.setAttribute(`cls.source.${r+1}`,j(n.node)))}function gg(e,t,n){n.forEach(([r,o])=>{let i=e[r];i!=null&&(typeof i=="number"&&i<ng||typeof i=="string")&&(t[o]=i)})}function _g(e){let t=gt(!1);if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function ca(){return ht()&&F()?Ge("element",hg):()=>{}}var hg=({entries:e})=>{let t=O(),n=t?v(t):void 0,r=n?I(n).description:b().getScopeData().transactionName;e.forEach(o=>{let i=o;if(!i.identifier)return;let s=i.name,a=i.renderTime,c=i.loadTime,[u,p]=c?[M(c),"load-time"]:a?[M(a),"render-time"]:[N(),"entry-emission"],d=s==="image-paint"?M(Math.max(0,(a??0)-(c??0))):0,m={[C]:"auto.ui.browser.elementtiming",[W]:"ui.elementtiming",[G]:"component","sentry.span_start_time_source":p,"sentry.transaction_name":r,"element.id":i.id,"element.type":i.element?.tagName?.toLowerCase()||"unknown","element.size":i.naturalWidth&&i.naturalHeight?`${i.naturalWidth}x${i.naturalHeight}`:void 0,"element.render_time":a,"element.load_time":c,"element.url":i.url||void 0,"element.identifier":i.identifier,"element.paint_type":s};er({name:`element[${i.identifier}]`,attributes:m,startTime:u,onlyIfParent:!0},l=>{l.end(u+d)})})};var Sg=1e3,_p,ua,pa;function fa(e){ee("dom",e),te("dom",Eg)}function Eg(){if(!y.document)return;let e=$.bind(null,"dom"),t=hp(e,!0);y.document.addEventListener("click",t,!1),y.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{let o=y[n]?.prototype;o?.hasOwnProperty?.("addEventListener")&&(B(o,"addEventListener",function(i){return function(s,a,c){if(s==="click"||s=="keypress")try{let u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},p=u[s]=u[s]||{refCount:0};if(!p.handler){let d=hp(e);p.handler=d,i.call(this,s,d,c)}p.refCount++}catch{}return i.call(this,s,a,c)}}),B(o,"removeEventListener",function(i){return function(s,a,c){if(s==="click"||s=="keypress")try{let u=this.__sentry_instrumentation_handlers__||{},p=u[s];p&&(p.refCount--,p.refCount<=0&&(i.call(this,s,p.handler,c),p.handler=void 0,delete u[s]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,a,c)}}))})}function Tg(e){if(e.type!==ua)return!1;try{if(!e.target||e.target._sentryId!==pa)return!1}catch{}return!0}function Ig(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function hp(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=yg(n);if(Ig(n.type,r))return;D(n,"_sentryCaptured",!0),r&&!r._sentryId&&D(r,"_sentryId",k());let o=n.type==="keypress"?"input":n.type;Tg(n)||(e({event:n,name:o,global:t}),ua=n.type,pa=r?r._sentryId:void 0),clearTimeout(_p),_p=y.setTimeout(()=>{pa=void 0,ua=void 0},Sg)}}function yg(e){try{return e.target}catch{return null}}var $o;function Kt(e){let t="history";ee(t,e),te(t,bg)}function bg(){if(y.addEventListener("popstate",()=>{let t=y.location.href,n=$o;if($o=t,n===t)return;$("history",{from:n,to:t})}),!Us())return;function e(t){return function(...n){let r=n.length>2?n[2]:void 0;if(r){let o=$o,i=Rg(String(r));if($o=i,o===i)return t.apply(this,n);$("history",{from:o,to:i})}return t.apply(this,n)}}B(y.history,"pushState",e),B(y.history,"replaceState",e)}function Rg(e){try{return new URL(e,y.location.origin).toString()}catch{return e}}var Go={};function Ar(e){let t=Go[e];if(t)return t;let n=y[e];if(hr(n))return Go[e]=n.bind(y);let r=y.document;if(r&&typeof r.createElement=="function")try{let o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);let i=o.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(o)}catch(o){et&&f.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return n&&(Go[e]=n.bind(y))}function da(e){Go[e]=void 0}var je="__sentry_xhr_v3__";function Xt(e){ee("xhr",e),te("xhr",Ag)}function Ag(){if(!y.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){let o=new Error,i=N()*1e3,s=ae(r[0])?r[0].toUpperCase():void 0,a=vg(r[1]);if(!s||!a)return t.apply(n,r);n[je]={method:s,url:a,request_headers:{}}
34,s==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);let c=()=>{let u=n[je];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}let p={endTimestamp:N()*1e3,startTimestamp:i,xhr:n,virtualError:o};$("xhr",p)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,p,d){return c(),u.apply(p,d)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,p,d){let[m,l]=d,g=p[je];return g&&ae(m)&&ae(l)&&(g.request_headers[m.toLowerCase()]=l),u.apply(p,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){let o=n[je];if(!o)return t.apply(n,r);r[0]!==void 0&&(o.body=r[0]);let i={startTimestamp:N()*1e3,xhr:n};return $("xhr",i),t.apply(n,r)}})}function vg(e){if(ae(e))return e;try{return e.toString()}catch{}}var aO=Symbol.for("sentry__originalRequestBody");function la(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return et&&f.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
35`).reduce((n,r)=>{let[o,i]=r.split(": ");return i&&(n[o.toLowerCase()]=i),n},{}):{}}var ma=[],Wo=new Map,Cn=new Map,Ng=60;function _a(){if(ht()&&F()){let t=xg();return()=>{t()}}return()=>{}}var ga={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 xg(){return na(Cg)}var Cg=({metric:e})=>{if(e.value==null)return;let t=M(e.value);if(t>Ng)return;let n=e.entries.find(g=>g.duration===e.value&&ga[g.name]);if(!n)return;let{interactionId:r}=n,o=ga[n.name],i=M(F()+n.startTime),s=O(),a=s?v(s):void 0,c=r!=null?Wo.get(r):void 0,u=c?.span||a,p=u?I(u).description:b().getScopeData().transactionName,d=c?.elementName||j(n.target),m={[C]:"auto.http.browser.inp",[W]:`ui.interaction.${o}`,[Ne]:n.duration},l=xn({name:d,transaction:p,attributes:m,startTime:i});l&&(l.addEvent("inp",{[Je]:"millisecond",[Ke]:e.value}),l.end(i+t))};function ha(){let e=Object.keys(ga);Ws()&&e.forEach(o=>{y.addEventListener(o,t,{capture:!0,passive:!0})});function t(o){let i=o.target;if(!i)return;let s=j(i),a=Math.round(o.timeStamp);if(Cn.set(a,s),Cn.size>50){let c=Cn.keys().next().value;c!==void 0&&Cn.delete(c)}}function n(o){let i=Math.round(o.startTime),s=Cn.get(i);if(!s)for(let a=-5;a<=5;a++){let c=Cn.get(i+a);if(c){s=c;break}}return s||"<unknown>"}let r=({entries:o})=>{let i=O(),s=i&&v(i);o.forEach(a=>{if(!pp(a))return;let c=a.interactionId;if(c==null||Wo.has(c))return;let u=a.target?j(a.target):n(a);if(ma.length>10){let p=ma.shift();Wo.delete(p)}ma.push(c),Wo.set(c,{span:s,elementName:u})})};Ge("event",r),Ge("first-input",r)}var Pg=40;function Pn(e,t=Ar("fetch")){let n=0,r=0;async function o(i){let s=i.body.length;n+=s,r++;let a={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let c=await t(e.url,a);return{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}}catch(c){throw da("fetch"),c}finally{n-=s,r--}}return ur(e,o,zt(e.bufferSize||Pg))}var h=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Og=10,Lg=20,kg=30,wg=40,Mg=50;function On(e,t,n,r){let o={filename:e,function:t==="<anonymous>"?"?":t,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}var Dg=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Fg=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ug=/\((\S*)(?::(\d+))(?::(\d+))\)/,Bg=/at (.+?) ?\(data:(.+?),/,Hg=e=>{let t=e.match(Bg);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=Dg.exec(e);if(n){let[,o,i,s]=n;return On(o,"?",+i,+s)}let r=Fg.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){let a=Ug.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}let[i,s]=Ip(r[1]||"?",r[2]);return On(s,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},Sa=[kg,Hg],$g=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Gg=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Wg=e=>{let t=$g.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=Gg.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],o=t[1]||"?";return[o,r]=Ip(o,r),On(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Ea=[Mg,Wg],jg=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,zg=e=>{let t=jg.exec(e);return t?On(t[2],t[1]||"?",+t[3],t[4]?+t[4]:void 0):void 0},Sp=[wg,zg],qg=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,Yg=e=>{let t=qg.exec(e);return t?On(t[2],t[3]||"?",+t[1]):void 0},Ep=[Og,Yg],Vg=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,Jg=e=>{let t=Vg.exec(e);return t?On(t[5],t[3]||t[4]||"?",+t[1],+t[2]):void 0},Tp=[Lg,Jg],Ta=[Sa,Ea],jo=Dr(...Ta),Ip=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:"?",n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function yp(e,{metadata:t,tunnel:n,dsn:r}){let o={event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Y(r)}},i=Kg(e);return z(o,[i])}function Kg(e){return[{type:"user_report"},e]}var zo=1024,Xg="Breadcrumbs",Zg=((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Xg,setup(n){t.console&&gr(t_(n)),t.dom&&fa(e_(n,t.dom)),t.xhr&&Xt(n_(n)),t.fetch&&Yt(r_(n)),t.history&&Kt(o_(n)),t.sentry&&n.on("beforeSendEvent",Qg(n))}}}),Ln=Zg;function Qg(e){return function(n){S()===e&&He({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:Ve(n)},{event:n})}}function e_(e,t){return function(r){if(S()!==e)return;let o,i,s=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>zo&&(h&&f.warn(`\`dom.maxStringLength\` cannot exceed ${zo}, but a value of ${a} was configured. Sentry will use ${zo} instead.`),a=zo),typeof s=="string"&&(s=[s]);try{let u=r.event,p=i_(u)?u.target:u;o=j(p,{keyAttrs:s,maxStringLength:a}),i=Gn(p)}catch{o="<unknown>"}if(o.length===0)return;let c={category:`ui.${r.name}`,message:o};i&&(c.data={"ui.component_name":i}),He(c,{event:r.event,name:r.name,global:r.global})}}function t_(e){return function(n){if(S()!==e)return;let r={category:"console",data:{arguments:n.args,logger:"console"},level:In(n.level),message:Mt(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Mt(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;He(r,{input:n.args,level:n.level})}}function n_(e){return function(n){if(S()!==e)return;let{startTimestamp:r,endTimestamp:o}=n,i=n.xhr[je];if(!r||!o||!i)return;let{method:s,url:a,status_code:c,body:u}=i,p={method:s,url:a,status_code:c},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:o},m={category:"xhr",data:p,type:"http",level:Io(c)};e.emit("beforeOutgoingRequestBreadcrumb",m,d),He(m,d)}}function r_(e){return function(n){if(S()!==e)return;let{startTimestamp:r,endTimestamp:o}=n;
35if(o&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){let i=n.fetchData,s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:o},a={category:"fetch",data:i,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,s),He(a,s)}else{let i=n.response,s={...n.fetchData,status_code:i?.status};n.fetchData.request_body_size,n.fetchData.response_body_size,i?.status;let a={input:n.args,response:i,startTimestamp:r,endTimestamp:o},c={category:"fetch",data:s,type:"http",level:Io(s.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),He(c,a)}}}function o_(e){return function(n){if(S()!==e)return;let r=n.from,o=n.to,i=Be(T.location.href),s=r?Be(r):void 0,a=Be(o);s?.path||(s=i),i.protocol===a.protocol&&i.host===a.host&&(o=a.relative),i.protocol===s.protocol&&i.host===s.host&&(r=s.relative),He({category:"navigation",data:{from:r,to:o}})}}function i_(e){return!!e&&!!e.target}var s_=["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"],a_="BrowserApiErrors",c_=((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:a_,setupOnce(){t.setTimeout&&B(T,"setTimeout",bp),t.setInterval&&B(T,"setInterval",bp),t.requestAnimationFrame&&B(T,"requestAnimationFrame",u_),t.XMLHttpRequest&&"XMLHttpRequest"in T&&B(XMLHttpRequest.prototype,"send",p_);let n=t.eventTarget;n&&(Array.isArray(n)?n:s_).forEach(o=>f_(o,t))}}}),qo=c_;function bp(e){return function(...t){let n=t[0];return t[0]=Vt(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${ue(e)}`}}),e.apply(this,t)}}function u_(e){return function(t){return e.apply(this,[Vt(t,{mechanism:{data:{handler:ue(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function p_(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&B(n,o,function(i){let s={mechanism:{data:{handler:ue(i)},handled:!1,type:`auto.browser.browserapierrors.xhr.${o}`}},a=Lt(i);return a&&(s.mechanism.data.handler=ue(a)),Vt(i,s)})}),e.apply(this,t)}}function f_(e,t){let r=T[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(B(r,"addEventListener",function(o){return function(i,s,a){try{d_(s)&&(s.handleEvent=Vt(s.handleEvent,{mechanism:{data:{handler:ue(s),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&l_(this,i,s),o.apply(this,[i,Vt(s,{mechanism:{data:{handler:ue(s),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),B(r,"removeEventListener",function(o){return function(i,s,a){try{let c=s.__sentry_wrapped__;c&&o.call(this,i,c,a)}catch{}return o.call(this,i,s,a)}}))}function d_(e){return typeof e.handleEvent=="function"}function l_(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}var Rp=(e={})=>{let t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof T.document>"u"){h&&f.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}gn({ignoreDuration:!0}),jt();let n=w(),r=n.getUser();n.addScopeListener(o=>{let i=o.getUser();(r?.id!==i?.id||r?.ip_address!==i?.ip_address)&&(jt(),r=i)}),t==="route"&&Kt(({from:o,to:i})=>{o!==i&&(gn({ignoreDuration:!0}),jt())})}}};var m_="CultureContext",g_=(()=>({name:m_,preprocessEvent(e){let t=__();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})}})),Ap=g_;function __(){try{let e=T.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var h_="GlobalHandlers",S_=((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:h_,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(E_(n),vp("onerror")),t.onunhandledrejection&&(T_(n),vp("onunhandledrejection"))}}}),Yo=S_;function E_(e){Fn(t=>{let{stackParser:n,attachStacktrace:r}=Np();if(S()!==e||zs())return;let{msg:o,url:i,line:s,column:a,error:c}=t,u=b_(No(n,c||o,void 0,r,!1),i,s,a);u.level="error",lt(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function T_(e){Un(t=>{let{stackParser:n,attachStacktrace:r}=Np();if(S()!==e||zs())return;let o=I_(t),i=Me(o)?y_(o):No(n,o,void 0,r,!0);i.level="error",lt(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function I_(e){if(Me(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function y_(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function b_(e,t,n,r){let o=e.exception=e.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],u=r,p=n,d=R_(t)??De();
35return c.length===0&&c.push({colno:u,filename:d,function:"?",in_app:!0,lineno:p}),e}function vp(e){h&&f.log(`Global Handler attached: ${e}`)}function Np(){return S()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function R_(e){if(!(!ae(e)||e.length===0))return e.startsWith("data:")?`<${xe(e,!1)}>`:e}var Vo=()=>({name:"HttpContext",preprocessEvent(e){if(!T.navigator&&!T.location&&!T.document)return;let t=Er(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}});var A_="cause",v_=5,N_="LinkedErrors",x_=((e={})=>{let t=e.limit||v_,n=e.key||A_;return{name:N_,preprocessEvent(r,o,i){let s=i.getOptions();Ns(bn,s.stackParser,n,t,r,o)}}}),Jo=x_;var C_="SpotlightBrowser",P_=((e={})=>{let t=e.sidecarUrl||"http://localhost:8969/stream";return{name:C_,setup:()=>{h&&f.log("Using Sidecar URL",t)},processEvent:n=>L_(n)?null:n,afterAllSetup:n=>{O_(n,t)}}});function O_(e,t){let n=Ar("fetch"),r=0;e.on("beforeEnvelope",o=>{if(r>3){f.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:yt(o),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(i=>{i.status>=200&&i.status<400&&(r=0)},i=>{r++,f.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",i)})})}var xp=P_;function L_(e){return!!(e.type==="transaction"&&e.spans&&e.contexts?.trace&&e.contexts.trace.op==="ui.action.click"&&e.spans.some(({description:t})=>t?.includes("#sentry-spotlight")))}function Cp(){return k_()?(h&&be(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function k_(){if(typeof T.window>"u")return!1;let e=T;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let n=De(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(T===T.top&&r.some(i=>n.startsWith(`${i}://`)))}function Ia(e){return[mr(),lr(),Ms(),qo(),Ln(),Yo(),Jo(),_r(),Vo(),Ap(),Rp()]}function ya(e={}){let t=!e.skipBrowserExtensionCheck&&Cp(),n=e.defaultIntegrations==null?Ia():e.defaultIntegrations,r={...e,enabled:t?!1:e.enabled,stackParser:pi(e.stackParser||jo),integrations:as({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||Pn};return gs(Rn,r)}function Pp(){}function Op(e){e()}function Lp(e={}){let t=T.document,n=t?.head||t?.body;if(!n){h&&f.error("[showReportDialog] Global document not defined");return}let r=b(),i=S()?.getDsn();if(!i){h&&f.error("[showReportDialog] DSN not configured");return}let s={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||ir()},a=T.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=is(i,s);let{onLoad:c,onClose:u}=s;if(c&&(a.onload=c),u){let p=d=>{if(d.data==="__sentry_reportdialog_closed__")try{u()}finally{T.removeEventListener("message",p)}};T.addEventListener("message",p)}n.appendChild(a)}var w_=E,M_="ReportingObserver",kp=new WeakMap,D_=((e={})=>{let t=e.types||["crash","deprecation","intervention"];function n(r){if(kp.has(S()))for(let o of r)K(i=>{i.setExtra("url",o.url);let s=`ReportingObserver [${o.type}]`,a="No details available";if(o.body){let c={};for(let u in o.body)c[u]=o.body[u];if(i.setExtra("body",c),o.type==="crash"){let u=o.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=o.body.message||a}or(`${s}: ${a}`)})}return{name:M_,setupOnce(){if(!Bs())return;new w_.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){kp.set(r,!0)}}}),wp=D_;var F_="HttpClient",U_=((e={})=>{let t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:F_,setup(n){q_(n,t),Y_(n,t)}}}),Dp=U_;function B_(e,t,n,r,o){if(Up(e,n.status,n.url)){let i=V_(t,r),s,a,c,u;Hp()&&([s,c]=Mp("Cookie",i),[a,u]=Mp("Set-Cookie",n));let p=Bp({url:i.url,method:i.method,status:n.status,requestHeaders:s,responseHeaders:a,requestCookies:c,responseCookies:u,error:o,type:"fetch"});lt(p)}}function Mp(e,t){let n=G_(t.headers),r;try{let o=n[e]||n[e.toLowerCase()]||void 0;o&&(r=Fp(o))}catch{}return[n,r]}function H_(e,t,n,r,o){if(Up(e,t.status,t.responseURL)){let i,s,a;if(Hp()){try{let u=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;u&&(s=Fp(u))}catch{}try{a=W_(t)}catch{}i=r}let c=Bp({url:t.responseURL,method:n,status:t.status,requestHeaders:i,responseHeaders:a,responseCookies:s,error:o,type:"xhr"});lt(c)}}function $_(e){if(e){let t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function Fp(e){return e.split("; ").reduce((t,n)=>{let[r,o]=n.split("=");return r&&o&&(t[r]=o),t},{})}function G_(e){let t={};return e.forEach((n,r)=>{t[r]=n}),t}function W_(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
36`).reduce((n,r)=>{let[o,i]=r.split(": ");return o&&i&&(n[o]=i),n},{}):{}}function j_(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function z_(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}
36function q_(e,t){Sr()&&Yt(n=>{if(S()!==e)return;let{response:r,args:o,error:i,virtualError:s}=n,[a,c]=o;r&&B_(t,a,r,c,i||s)},!1)}function Y_(e,t){"XMLHttpRequest"in E&&Xt(n=>{if(S()!==e)return;let{error:r,virtualError:o}=n,i=n.xhr,s=i[je];if(!s)return;let{method:a,request_headers:c}=s;try{H_(t,i,a,c,r||o)}catch(u){h&&f.warn("Error while extracting response event form XHR response",u)}})}function Up(e,t,n){return z_(e.failedRequestStatusCodes,t)&&j_(e.failedRequestTargets,n)&&!Is(n,S())}function Bp(e){let t=S(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,o=`HTTP Client Error with status code: ${e.status}`,i={message:o,exception:{values:[{type:"Error",value:o,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:$_(e.responseHeaders)}}};return de(i,{type:`auto.http.client.${e.type}`,handled:!1}),i}function V_(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function Hp(){let e=S();return e?!!e.getOptions().sendDefaultPii:!1}var ba=E,J_=7,K_="ContextLines",X_=((e={})=>{let t=e.frameContextLines!=null?e.frameContextLines:J_;return{name:K_,processEvent(n){return Z_(n,t)}}}),$p=X_;function Z_(e,t){let n=ba.document,r=ba.location&&dr(ba.location.href);if(!n||!r)return e;let o=e.exception?.values;if(!o?.length)return e;let i=n.documentElement.innerHTML;if(!i)return e;let s=["<!DOCTYPE html>","<html>",...i.split(`
37`),"</html>"];return o.forEach(a=>{let c=a.stacktrace;c?.frames&&(c.frames=c.frames.map(u=>Q_(u,s,r,t)))}),e}function Q_(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||Ti(t,e,r),e}function Gp(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function Ra(e){try{return new URL(e,T.location.origin).href}catch{return}}function Wp(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Aa(e){try{return new Headers(e)}catch{return}}var jp=new WeakMap,va=new Map,vr={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Ko(e,t){let{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:o,shouldCreateSpanForRequest:i,enableHTTPTimings:s,tracePropagationTargets:a,onRequestSpanStart:c,onRequestSpanEnd:u}={...vr,...t},p=typeof i=="function"?i:g=>!0,d=g=>eh(g,a),m={},l=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(g=>(g.type==="transaction"&&g.spans&&g.spans.forEach(R=>{if(R.op==="http.client"){let A=va.get(R.span_id);A&&(R.timestamp=A/1e3,va.delete(R.span_id))}}),g)),o&&Hs(g=>{if(g.response){let R=jp.get(g.response);R&&g.endTimestamp&&va.set(R,g.endTimestamp)}}),Yt(g=>{let R=Ds(g,p,d,m,{propagateTraceparent:l,onRequestSpanEnd:u});if(g.response&&g.fetchData.__span&&jp.set(g.response,g.fetchData.__span),R){let A=Ra(g.fetchData.url),U=A?Be(A).host:void 0;R.setAttributes({"http.url":A?xe(A):void 0,"server.address":U}),s&&zp(R),c?.(R,{headers:g.headers})}})),r&&Xt(g=>{let R=th(g,p,d,m,l,u);R&&(s&&zp(R),c?.(R,{headers:Aa(g.xhr.__sentry_xhr_v3__?.request_headers)}))})}function zp(e){let{url:t}=I(e).data;if(!t||typeof t!="string")return;let n=Ge("resource",({entries:r})=>{r.forEach(o=>{Wp(o)&&o.name.endsWith(t)&&(e.setAttributes(Rr(o)),setTimeout(n))})})}function eh(e,t){let n=De();if(n){let r,o;try{r=new URL(e,n),o=new URL(n).origin}catch{return!1}let i=r.origin===o;return t?Ae(r.toString(),t)||i&&Ae(r.pathname,t):i}else{let r=!!e.match(/^\/(?!\/)/);return t?Ae(e,t):r}}function th(e,t,n,r,o,i){let s=e.xhr,a=s?.[je];if(!s||s.__sentry_own_request__||!a)return;let{url:c,method:u}=a,p=H()&&t(c);if(e.endTimestamp){let U=s.__sentry_xhr_span_id__;if(!U)return;let _e=r[U];_e&&(p&&a.status_code!==void 0&&(Ft(_e,a.status_code),_e.end(),i?.(_e,{headers:Aa(la(s)),error:e.error})),delete r[U]);return}let d=Ra(c),m=d?Be(d):Be(c),l=xe(dr(c)),g=!!O(),R=p&&g?me({name:`${u} ${l}`,attributes:{url:xe(c),type:"xhr","http.method":u,"http.url":d?xe(d):void 0,"server.address":m?.host,[C]:"auto.http.browser",[W]:"http.client",...m?.search&&{"http.query":m?.search},...m?.hash&&{"http.fragment":m?.hash}}}):new ie;s.__sentry_xhr_span_id__=R.spanContext().spanId,r[s.__sentry_xhr_span_id__]=R,n(c)&&nh(s,H()&&g?R:void 0,o);let A=S();return A&&A.emit("beforeOutgoingRequestSpan",R,e),R}
37function nh(e,t,n){let{"sentry-trace":r,baggage:o,traceparent:i}=Tn({span:t,propagateTraceparent:n});r&&rh(e,r,o,i)}function rh(e,t,n,r){let o=e.__sentry_xhr_v3__?.request_headers;if(!(o?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!o?.traceparent&&e.setRequestHeader("traceparent",r),n){let i=o?.baggage;(!i||!Gp(i))&&e.setRequestHeader("baggage",n)}}catch{}}function qp(){T.document?T.document.addEventListener("visibilitychange",()=>{let e=O();if(!e)return;let t=v(e);if(T.document.hidden&&t){let n="cancelled",{op:r,status:o}=I(t);h&&f.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),o||t.setStatus({code:2,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):h&&f.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var oh=3600,Yp="sentry_previous_trace",ih="sentry.previous_trace";function Vp(e,{linkPreviousTrace:t,consistentTraceSampling:n}){let r=t==="session-storage",o=r?ch():void 0;e.on("spanStart",s=>{if(v(s)!==s)return;let a=b().getPropagationContext();o=sh(o,s,a),r&&ah(o)});let i=!0;n&&e.on("beforeSampling",s=>{if(!o)return;let a=b(),c=a.getPropagationContext();if(i&&c.parentSpanId){i=!1;return}a.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(o.sampleRate),sampled:String(Na(o.spanContext))},sampleRand:o.sampleRand}),s.parentSampled=Na(o.spanContext),s.parentSampleRate=o.sampleRate,s.spanAttributes={...s.spanAttributes,[jn]:o.sampleRate}})}function sh(e,t,n){let r=I(t);function o(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[ct])}catch{return 0}}let i={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:o(),sampleRand:n.sampleRand};if(!e)return i;let s=e.spanContext;return s.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=oh&&(h&&f.log(`Adding previous_trace \`${JSON.stringify(s)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:s,attributes:{[Ai]:"previous_trace"}}),t.setAttribute(ih,`${s.traceId}-${s.spanId}-${Na(s)?1:0}`)),i)}function ah(e){try{T.sessionStorage.setItem(Yp,JSON.stringify(e))}catch(t){h&&f.warn("Could not store previous trace in sessionStorage",t)}}function ch(){try{let e=T.sessionStorage?.getItem(Yp);return JSON.parse(e)}catch{return}}function Na(e){return e.traceFlags===1}var uh="BrowserTracing",ph={...mn,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...vr},Qp=((e={})=>{let t={name:void 0,source:void 0},n=T.document,{enableInp:r,enableElementTiming:o,enableLongTask:i,enableLongAnimationFrame:s,_experiments:{enableInteractions:a,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u},beforeStartSpan:p,idleTimeout:d,finalTimeout:m,childSpanTimeout:l,markBackgroundSpan:g,traceFetch:R,traceXHR:A,trackFetchStreamPerformance:U,shouldCreateSpanForRequest:_e,enableHTTPTimings:Pr,ignoreResourceSpans:ii,ignorePerformanceApiSpans:si,instrumentPageLoad:Or,instrumentNavigation:P,detectRedirects:q,linkPreviousTrace:Qt,consistentTraceSampling:Lr,enableReportPageLoaded:ze,onRequestSpanStart:wn,onRequestSpanEnd:ot}={...ph,...e},V,xt,qe;function St(L,Z,x=!0){let Q=Z.op==="pageload",he=Z.name,ke=p?p(Z):Z,Ct=ke.attributes||{};if(he!==ke.name&&(Ct[G]="custom",ke.attributes=Ct),!x){let Mn=Ee();me({...ke,startTime:Mn}).end(Mn);return}t.name=ke.name,t.source=Ct[G];let it=ao(ke,{idleTimeout:d,finalTimeout:m,childSpanTimeout:l,disableAutoFinish:Q,beforeSpanEnd:Mn=>{V?.(),aa(Mn,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:ii,ignorePerformanceApiSpans:si}),Xp(L,void 0);let Fa=b(),Ff=Fa.getPropagationContext();Fa.setPropagationContext({...Ff,traceId:it.spanContext().traceId,sampled:Te(it),dsc:X(Mn)}),Q&&(qe=void 0)},trimIdleSpanEndTimestamp:!ze});Q&&ze&&(qe=it),Xp(L,it);function Da(){n&&["interactive","complete"].includes(n.readyState)&&L.emit("idleSpanEnableAutoFinish",it)}Q&&!ze&&n&&(n.addEventListener("readystatechange",()=>{Da()}),Da())}return{name:uh,setup(L){if(Xn(),V=ra({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:u||!1,client:L}),r&&_a(),o&&ca(),s&&E.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?ia():i&&oa(),a&&sa(),q&&n){let x=()=>{xt=N()};addEventListener("click",x,{capture:!0}),addEventListener("keydown",x,{capture:!0,passive:!0})}
37function Z(){let x=Nr(L);x&&!I(x).timestamp&&(h&&f.log(`[Tracing] Finishing current active span with op: ${I(x).op}`),x.setAttribute(It,"cancelled"),x.end())}L.on("startNavigationSpan",(x,Q)=>{if(S()!==L)return;if(Q?.isRedirect){h&&f.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),St(L,{op:"navigation.redirect",...x},!1);return}xt=void 0,Z(),w().setPropagationContext({traceId:J(),sampleRand:Math.random(),propagationSpanId:H()?void 0:re()});let he=b();he.setPropagationContext({traceId:J(),sampleRand:Math.random(),propagationSpanId:H()?void 0:re()}),he.setSDKProcessingMetadata({normalizedRequest:void 0}),St(L,{op:"navigation",...x,parentSpan:null,forceTransaction:!0})}),L.on("startPageLoadSpan",(x,Q={})=>{if(S()!==L)return;Z();let he=Q.sentryTrace||Jp("sentry-trace")||Kp("sentry-trace"),ke=Q.baggage||Jp("baggage")||Kp("baggage"),Ct=qn(he,ke),it=b();it.setPropagationContext(Ct),H()||(it.getPropagationContext().propagationSpanId=re()),it.setSDKProcessingMetadata({normalizedRequest:Er()}),St(L,{op:"pageload",...x})}),L.on("endPageloadSpan",()=>{ze&&qe&&(qe.setAttribute(It,"reportPageLoaded"),qe.end())})},afterAllSetup(L){let Z=De();if(Qt!=="off"&&Vp(L,{linkPreviousTrace:Qt,consistentTraceSampling:Lr}),T.location){if(Or){let x=F();xa(L,{name:T.location.pathname,startTime:x?x/1e3:void 0,attributes:{[G]:"url",[C]:"auto.pageload.browser"}})}P&&Kt(({to:x,from:Q})=>{if(Q===void 0&&Z?.indexOf(x)!==-1){Z=void 0;return}Z=void 0;let he=qt(x),ke=Nr(L),Ct=ke&&q&&dh(ke,xt);Ca(L,{name:he?.pathname||T.location.pathname,attributes:{[G]:"url",[C]:"auto.navigation.browser"}},{url:x,isRedirect:Ct})})}g&&qp(),a&&fh(L,d,m,l,t),r&&ha(),Ko(L,{traceFetch:R,traceXHR:A,trackFetchStreamPerformance:U,tracePropagationTargets:L.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:_e,enableHTTPTimings:Pr,onRequestSpanStart:wn,onRequestSpanEnd:ot})}}});function xa(e,t,n){e.emit("startPageLoadSpan",t,n),b().setTransactionName(t.name);let r=Nr(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function Ca(e,t,n){let{url:r,isRedirect:o}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o}),e.emit("startNavigationSpan",t,{isRedirect:o});let i=b();return i.setTransactionName(t.name),r&&!o&&i.setSDKProcessingMetadata({normalizedRequest:{...Er(),url:r}}),Nr(e)}function Jp(e){return T.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function Kp(e){return T.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(r=>r.name===e)?.description}function fh(e,t,n,r,o){let i=T.document,s,a=()=>{let c="ui.action.click",u=Nr(e);if(u){let p=I(u).op;if(["navigation","pageload"].includes(p)){h&&f.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(It,"interactionInterrupted"),s.end(),s=void 0),!o.name){h&&f.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}s=ao({name:o.name,op:c,attributes:{[G]:o.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};i&&addEventListener("click",a,{capture:!0})}var ef="_sentry_idleSpan";function Nr(e){return e[ef]}function Xp(e,t){D(e,ef,t)}var Zp=1.5;function dh(e,t){let n=I(e),r=Ee(),o=n.start_timestamp;return!(r-o>Zp||t&&r-t<=Zp)}function kn(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function lh(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=kn(n);return o=>r.then(i=>o(i.transaction(t,"readwrite").objectStore(t)))}function Pa(e){return kn(e.getAllKeys())}function mh(e,t,n){return e(r=>Pa(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.max(...o,0)+1),kn(r.transaction)}))}function gh(e,t,n){return e(r=>Pa(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.min(...o,0)-1),kn(r.transaction)}))}function _h(e){return e(t=>Pa(t).then(n=>{let r=n[0];if(r!=null)return kn(t.get(r)).then(o=>(t.delete(r),kn(t.transaction).then(()=>o)))}))}function hh(e){let t;function n(){return t==null&&(t=lh(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{let o=await yt(r);await mh(n(),o,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{let o=await yt(r);await gh(n(),o,e.maxQueueSize||30)}catch{}},shift:async()=>{try{let r=await _h(n());if(r)return Mi(r)}catch{}}}}function Sh(e){return t=>{let n=e({...t,createStore:hh});return T.addEventListener("online",async r=>{await n.flush()}),n}}function tf(e=Pn){return Sh(Ss(e))}var nf=1e6,Eh="window"in E&&E.window===E&&typeof importScripts>"u",Nt=String(0),Xo=Eh?"main":"worker",Zo=T.navigator,of="",sf="",af="",Oa=Zo?.userAgent||"",cf="",Th=Zo?.language||Zo?.languages?.[0]||"";function Ih(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}var rf=Zo?.userAgentData;Ih(rf)&&rf.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(of=e.platform||"",af=e.architecture||"",cf=e.model||"",sf=e.platformVersion||"",e.fullVersionList?.length){let t=e.fullVersionList[e.fullVersionList.length-1];Oa=`${t.brand} ${t.version}`}}).catch(e=>{});function yh(e){return!("thread_metadata"in e)}function bh(e){return yh(e)?Nh(e):e}function Rh(e){let t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&h&&f.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function Ah(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);let o=Rh(r),i=bh(n),s=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:N()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:N()*1e3;return{event_id:e,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||dt,runtime:{name:"javascript",version:T.navigator.userAgent}
37,os:{name:of,version:sf,build_number:Oa},device:{locale:Th,model:cf,manufacturer:Oa,architecture:af,is_emulator:!1},debug_meta:{images:lf(n.resources)},profile:i,transactions:[{name:r.transaction||"",id:r.event_id||k(),trace_id:o,active_thread_id:Nt,relative_start_ns:"0",relative_end_ns:((a-s)*1e6).toFixed(0)}]}}function uf(e,t,n){if(e==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);let r=vh(e),o=t.getOptions(),i=t.getSdkMetadata?.()?.sdk;return{chunk_id:k(),client_sdk:{name:i?.name??"sentry.javascript.browser",version:i?.version??"0.0.0"},profiler_id:n||k(),platform:"javascript",version:"2",release:o.release??"",environment:o.environment??"production",debug_meta:{images:lf(e.resources)},profile:r}}function pf(e){try{if(!e||typeof e!="object")return{reason:"chunk is not an object"};let t=r=>typeof r=="string"&&/^[a-f0-9]{32}$/.test(r);if(!t(e.profiler_id))return{reason:"missing or invalid profiler_id"};if(!t(e.chunk_id))return{reason:"missing or invalid chunk_id"};if(!e.client_sdk)return{reason:"missing client_sdk metadata"};let n=e.profile;return n?!Array.isArray(n.frames)||!n.frames.length?{reason:"profile has no frames"}:!Array.isArray(n.stacks)||!n.stacks.length?{reason:"profile has no stacks"}:!Array.isArray(n.samples)||!n.samples.length?{reason:"profile has no samples"}:{valid:!0}:{reason:"missing profile data"}}catch(t){return{reason:`unknown validation error: ${t}`}}}function vh(e){let t=[];for(let a=0;a<e.frames.length;a++){let c=e.frames[a];c&&(t[a]={function:c.name,abs_path:typeof c.resourceId=="number"?e.resources[c.resourceId]:void 0,lineno:c.line,colno:c.column})}let n=[];for(let a=0;a<e.stacks.length;a++){let c=e.stacks[a];if(!c)continue;let u=[],p=c;for(;p;)u.push(p.frameId),p=p.parentId===void 0?void 0:e.stacks[p.parentId];n[a]=u}let r=F(),o=typeof performance.timeOrigin=="number"?performance.timeOrigin:r||0,i=o-(r||o),s=[];for(let a=0;a<e.samples.length;a++){let c=e.samples[a];if(!c)continue;let u=(o+(c.timestamp-i))/1e3;s[a]={stack_id:c.stackId??0,thread_id:Nt,timestamp:u}}return{frames:t,stacks:n,samples:s,thread_metadata:{[Nt]:{name:Xo}}}}function Qo(e){return I(e).op==="pageload"}function Nh(e){let t,n=0,r={samples:[],stacks:[],frames:[],thread_metadata:{[Nt]:{name:Xo}}},o=e.samples[0];if(!o)return r;let i=o.timestamp,s=F(),a=typeof performance.timeOrigin=="number"?performance.timeOrigin:s||0,c=a-(s||a);return e.samples.forEach((u,p)=>{if(u.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[p]={elapsed_since_start_ns:((u.timestamp+c-i)*nf).toFixed(0),stack_id:t,thread_id:Nt};return}let d=e.stacks[u.stackId],m=[];for(;d;){m.push(d.frameId);let g=e.frames[d.frameId];g&&r.frames[d.frameId]===void 0&&(r.frames[d.frameId]={function:g.name,abs_path:typeof g.resourceId=="number"?e.resources[g.resourceId]:void 0,lineno:g.line,colno:g.column}),d=d.parentId===void 0?void 0:e.stacks[d.parentId]}let l={elapsed_since_start_ns:((u.timestamp+c-i)*nf).toFixed(0),stack_id:n,thread_id:Nt};r.stacks[n]=m,r.samples[p]=l,n++}),r}function ff(e,t){if(!t.length)return e;for(let n of t)e[1].push([{type:"profile"},n]);return e}function df(e){let t=[];return Ie(e,(n,r)=>{if(r==="transaction")for(let o=1;o<n.length;o++)n[o]?.contexts?.profile?.profile_id&&t.push(n[o])}),t}function lf(e){let r=S()?.getOptions()?.stackParser;return r?Vi(r,e):[]}function mf(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(h&&f.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(h&&f.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function xh(e){return e.samples.length<2?(h&&f.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(h&&f.log("[Profiling] Discarding profile because it contains no frames"),!1)}var La=!1,ka=3e4;function Ch(e){return typeof e=="function"}function ei(){let e=T.Profiler;if(!Ch(e)){h&&f.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}let t=10,n=Math.floor(ka/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{h&&(f.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),f.log("[Profiling] Disabling profiling for current user session.")),La=!0}}function wa(e){if(La)return h&&f.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return h&&f.log("[Profiling] Discarding profile because root span was not sampled."),!1;let n=S()?.getOptions();if(!n)return h&&f.log("[Profiling] Profiling disabled, no options foun
37d."),!1;let r=n.profilesSampleRate;return mf(r)?r?(r===!0?!0:Math.random()<r)?!0:(h&&f.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(h&&f.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(h&&f.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function gf(e){if(La)return h&&f.log("[Profiling] Profiling has been disabled for the duration of the current user session as the JS Profiler could not be started."),!1;if(e.profileLifecycle!=="trace"&&e.profileLifecycle!=="manual")return h&&f.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;let t=e.profileSessionSampleRate;return mf(t)?t?Math.random()<=t:(h&&f.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):(h&&f.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1)}function xr(e){return typeof e.profilesSampleRate<"u"}function _f(e,t,n,r){return xh(n)?Ah(e,t,n,r):null}var Zt=new Map;function hf(){return Zt.size}function Sf(e){let t=Zt.get(e);return t&&Zt.delete(e),t}function Ef(e,t){if(Zt.set(e,t),Zt.size>30){let n=Zt.keys().next().value;n!==void 0&&Zt.delete(n)}}function Tf(e){return!e?.contexts?.profile||!e.contexts||(e.contexts.trace={...e.contexts?.trace??{},data:{...e.contexts?.trace?.data??{},"thread.id":Nt,"thread.name":Xo}},e.spans?.forEach(t=>{t.data={...t.data||{},"thread.id":Nt,"thread.name":Xo}})),e}function Ma(e){let t;Qo(e)&&(t=N()*1e3);let n=ei();if(!n)return;h&&f.log(`[Profiling] started profiling span: ${I(e).description}`);let r=k(),o=null;b().setContext("profile",{profile_id:r,start_timestamp:t});async function i(){if(e&&n){if(o){h&&f.log("[Profiling] profile for:",I(e).description,"already exists, returning early");return}return n.stop().then(u=>{if(s&&(T.clearTimeout(s),s=void 0),h&&f.log(`[Profiling] stopped profiling of span: ${I(e).description}`),!u){h&&f.log(`[Profiling] profiler returned null profile for: ${I(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}o=u,Ef(r,u)}).catch(u=>{h&&f.log("[Profiling] error while stopping profiler:",u)})}}let s=T.setTimeout(()=>{h&&f.log("[Profiling] max profile duration elapsed, stopping profiling for:",I(e).description),i()},ka),a=e.end.bind(e);function c(){return e?(i().then(()=>{a()},()=>{a()}),e):a()}e.end=c}var Ph=6e4,Oh=3e5,ti=class{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1,this._lifecycleMode=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map}initialize(t){let n=t.getOptions().profileLifecycle,r=gf(t.getOptions());h&&f.log(`[Profiling] Initializing profiler (lifecycle='${n}').`),r||h&&f.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),this._profilerId=k(),this._client=t,this._sessionSampled=r,this._lifecycleMode=n,n==="trace"&&this._setupTraceLifecycleListeners(t)}start(){if(this._lifecycleMode==="trace"){h&&f.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.');return}if(this._isRunning){h&&f.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.");return}if(!this._sessionSampled){h&&f.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.");return}this._beginProfiling()}stop(){if(this._lifecycleMode==="trace"){h&&f.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.');return}if(!this._isRunning){h&&f.warn("[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.");return}this._endProfiling()}notifyRootSpanActive(t){if(this._lifecycleMode!=="trace"||!this._sessionSampled)return;let n=t.spanContext().spanId;if(!n||this._activeRootSpanIds.has(n))return;this._registerTraceRootSpan(n);let r=this._activeRootSpanIds.size;r===1&&(h&&f.log("[Profiling] Detected already active root span during setup. Active root spans now:",r),this._beginProfiling())}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,h&&f.log("[Profiling] Started profiling with profiler ID:",this._profilerId),at().setContext("profile",{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler){h&&f.log("[Profiling] Failed to start JS Profiler; stopping."),this._resetProfilerInfo();return}this._startPeriodicChunking()}}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&(clearTimeout(this._chunkTimer),this._chunkTimer=void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(t=>{h&&f.error("[Profiling] Failed to collect current profile chunk on `stop()`:",t)}),this._lifecycleMode==="manual"&&at().setContext("profile",{}))}_setupTraceLifecycleListeners(t){t.on("spanStart",n=>{if(!this._sessionSampled){h&&f.log("[Profiling] Span not profiled because of negative sampling decision for user session.");return}if(n!==v(n))return;if(!n.isRecording()){h&&f.log("[Profiling] Discarding profile because root span was not sampled.");return}let r=n.spanContext().spanId;if(!r||this._activeRootSpanIds.has(r))return;this._registerTraceRootSpan(r);let o=this._activeRootSpanIds.size;o===1&&(h&&f.log(`[Profiling] Root span ${r} started. Profiling active while there are active root spans (count=${o}).`),this._beginProfiling())}),t.on("spanEnd",n=>{if(!this._sessionSampled)return;let r=n.spanContext().spanId;if(!r||!this._activeRootSpanIds.has(r))return;this._activeRootSpanIds.delete(r);let o=this._activeRootSpanIds.size;h&&f.log(`[Profiling] Root span with ID ${r} ended. Will continue profiling for as long as there are active root spans (currently: ${o}).`),o===0&&(this._collectCurrentChunk().catch(i=>{h&&f.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",i)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,at().setContext("profile",{})}
37_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(t=>clearTimeout(t)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(t){this._activeRootSpanIds.add(t);let n=setTimeout(()=>this._onRootSpanTimeout(t),Oh);this._rootSpanTimeouts.set(t,n)}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;let t=ei();if(!t){h&&f.log("[Profiling] Failed to start JS Profiler.");return}this._profiler=t}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(t=>{h&&f.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",t)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},Ph))}_onRootSpanTimeout(t){this._rootSpanTimeouts.has(t)&&(this._rootSpanTimeouts.delete(t),this._activeRootSpanIds.has(t)&&(h&&f.log(`[Profiling] Reached 5-minute timeout for root span ${t}. You likely started a manual root span that never called \`.end()\`.`),this._activeRootSpanIds.delete(t),this._activeRootSpanIds.size===0&&this._endProfiling()))}async _collectCurrentChunk(){let t=this._profiler;if(this._profiler=void 0,!!t)try{let n=await t.stop(),r=uf(n,this._client,this._profilerId),o=pf(r);if("reason"in o){h&&f.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",o.reason);return}this._sendProfileChunk(r),h&&f.log("[Profiling] Collected browser profile chunk.")}catch(n){h&&f.log("[Profiling] Error while stopping JS Profiler for chunk:",n)}}_sendProfileChunk(t){let n=this._client,r=ln(n.getSdkMetadata?.()),o=n.getDsn(),i=n.getOptions().tunnel,s=z({event_id:k(),sent_at:new Date().toISOString(),...r&&{sdk:r},...!!i&&o&&{dsn:Y(o)}},[[{type:"profile_chunk",platform:"javascript"},t]]);n.sendEnvelope(s).then(null,a=>{h&&f.error("Error while sending profile chunk envelope:",a)})}};var Lh="BrowserProfiling",kh=(()=>({name:Lh,setup(e){let t=e.getOptions(),n=new ti;if(!xr(t)&&!t.profileLifecycle&&(t.profileLifecycle="manual"),xr(t)&&!t.profilesSampleRate){h&&f.log("[Profiling] Profiling disabled, no profiling options found.");return}let r=O(),o=r&&v(r);if(xr(t)&&t.profileSessionSampleRate!==void 0&&h&&f.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),xr(t))o&&Qo(o)&&wa(o)&&Ma(o),e.on("spanStart",i=>{i===v(i)&&wa(i)&&Ma(i)}),e.on("beforeEnvelope",i=>{if(!hf())return;let s=df(i);if(!s.length)return;let a=[];for(let c of s){let u=c?.contexts,p=u?.profile?.profile_id,d=u?.profile?.start_timestamp;if(typeof p!="string"){h&&f.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!p){h&&f.log("[Profiling] cannot find profile for a span without a profile context");continue}u?.profile&&delete u.profile;let m=Sf(p);if(!m){h&&f.log(`[Profiling] Could not retrieve profile for span: ${p}`);continue}let l=_f(p,d,m,c);l&&a.push(l)}ff(i,a)});else{let i=t.profileLifecycle;if(e.on("startUIProfiler",()=>n.start()),e.on("stopUIProfiler",()=>n.stop()),i==="manual")n.initialize(e);else if(i==="trace"){if(!H(t)){h&&f.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}n.initialize(e),o&&n.notifyRootSpanActive(o),T.setTimeout(()=>{let s=O(),a=s&&v(s);a&&n.notifyRootSpanActive(a)},0)}}},processEvent(e){return Tf(e)}})),If=kh;var yf=()=>({name:"LaunchDarkly",processEvent(e,t,n){return mt(e)}});function bf(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{Ze(e,t.value),Qe(e,t.value)}}}var Rf=()=>({name:"OpenFeature",processEvent(e,t,n){return mt(e)}}),ni=class{after(t,n){Ze(n.flagKey,n.value),Qe(n.flagKey,n.value)}error(t,n,r){Ze(t.flagKey,t.defaultValue),Qe(t.flagKey,t.defaultValue)}};var Af=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){let t=e.prototype;B(t,"isEnabled",wh)},processEvent(t,n,r){return mt(t)}});function wh(e){return function(...t){let n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(Ze(n,r),Qe(n,r)):h&&f.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}function Mh(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Ha(Ua(n)?Ba(n):[n],$a(t,1))}var Nf=Mh;function Dh(e){return e!==e}var xf=Dh;function Fh(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}var Cf=Fh;
37function Uh(e,t,n){return t===t?Cf(e,t,n):za(e,xf,n)}var Pf=Uh;function Bh(e,t){var n=e==null?0:e.length;return!!n&&Pf(e,t,0)>-1}var Of=Bh;function Hh(e,t,n){for(var r=-1,o=e==null?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}var Lf=Hh;var $h=1/0,Gh=kr&&1/wr(new kr([,-0]))[1]==$h?function(e){return new kr(e)}:ja,kf=Gh;var Wh=200;function jh(e,t,n){var r=-1,o=Of,i=e.length,s=!0,a=[],c=a;if(n)s=!1,o=Lf;else if(i>=Wh){var u=t?null:kf(e);if(u)return wr(u);s=!1,o=Wa,c=new Ga}else c=t?[]:a;e:for(;++r<i;){var p=e[r],d=t?t(p):p;if(p=n||p!==0?p:0,s&&d===d){for(var m=c.length;m--;)if(c[m]===d)continue e;t&&c.push(d),a.push(p)}else o(c,d,n)||(c!==a&&c.push(d),a.push(p))}return a}var wf=jh;function zh(e){return e&&e.length?wf(e):[]}var Mf=zh;var qh=Object.defineProperty,Cr=(e,t)=>qh(e,"name",{value:t,configurable:!0}),Yh="******";function oi(e,t,n){let r=Array.isArray(e),o=pe(e);if(!r&&!o||n.has(e))return e;if(n.add(e),r&&Array.isArray(e))return e.map(i=>oi(i,t,n));if(o){let i=e;return Object.keys(i).reduce((s,a)=>(s[a]=t.test(a)?Yh:oi(i[a],t,n),s),{})}return e}Cr(oi,"sanitize");function Df(e){let t=e.map(n=>typeof n=="string"?n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):n.source);return RegExp(t.join("|"),"i")}Cr(Df,"combineRegexes");var Vh=Cr(e=>{let t;return{name:"DataScrubberIntegration",processEvent(n,r,o){return e.sanitizeKeys.length===0?n:(t||(t=Df(e.sanitizeKeys)),oi(n,t,new WeakSet))}}},"createDataScrubberIntegration"),Jh=[/password/i,/token/i,/secret/i,/passwd/i,/authorization/i,/api_key/i,/apikey/i,/sentry_dsn/i,/access_token/i],Kh=["top.GLOBALS","originalCreateNotification","canvas.contentDocument","MyApp_RemoveAllHighlights","http://tt.epicplay.com","Can't find variable: ZiteReader","jigsaw is not defined","ComboSearch is not defined","http://loading.retry.widdit.com/","atomicFindClose","fb_xd_fragment","bmi_SafeAddOnload","EBCallBackMessageReceived","conduitPage"];function Xh(e){if(e?.allowUrls===void 0)throw new Error("Sentry.init: Missing 'allowUrls' option");let t=e?.integrations;function n(r){let o=r.filter(i=>i.name!==Ln.name&&i.name!=="Breadcrumbs");return o.push(Vh({sanitizeKeys:Mf(Nf(Jh,e?.keysToSanitize??[]))})),Array.isArray(t)&&(o=o.concat(t)),t instanceof Function&&(o=t(o)),o}Cr(n,"mergeIntegrations"),ya({allowUrls:["block_all"],...e,integrations:n,ignoreErrors:Kh.concat(e?.ignoreErrors??[])})}Cr(Xh,"init");var export_getReplay=void 0;var export_replayCanvasIntegration=void 0;var export_replayIntegration=void 0;export{Rn as BrowserClient,ni as OpenFeatureIntegrationHook,ce as SDK_VERSION,W as SEMANTIC_ATTRIBUTE_SENTRY_OP,C as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,ct as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,G as SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,oe as Scope,T as WINDOW,He as addBreadcrumb,os as addEventProcessor,ps as addIntegration,Ln as breadcrumbsIntegration,qo as browserApiErrorsIntegration,If as browserProfilingIntegration,Qp as browserTracingIntegration,bf as buildLaunchDarklyFlagUsedHandler,Cs as captureConsoleIntegration,lt as captureEvent,Wt as captureException,Fs as captureFeedback,or as captureMessage,jt as captureSession,Sa as chromeStackLineParser,ns as close,$p as contextLinesIntegration,$i as continueTrace,Vh as createDataScrubberIntegration,ur as createTransport,yp as createUserFeedbackEnvelope,_r as dedupeIntegration,vr as defaultRequestInstrumentationOptions,Ta as defaultStackLineParsers,jo as defaultStackParser,sr as endSession,Ao as eventFromException,vo as eventFromMessage,bn as exceptionFromError,Ps as extraErrorDataIntegration,ws as featureFlagsIntegration,qu as feedbackAsyncIntegration,Ro as feedbackIntegration,Ro as feedbackSyncIntegration,ts as flush,Pp as forceLoad,lr as functionToStringIntegration,Ea as geckoStackLineParser,O as getActiveSpan,S as getClient,b as getCurrentScope,Ia as getDefaultIntegrations,qa as getFeedback,at as getGlobalScope,w as getIsolationScope,export_getReplay as getReplay,v as getRootSpan,pt as getSpanDescendants,jr as getSpanStatusFromHttpCode,Yo as globalHandlersIntegration,Dp as httpClientIntegration,Vo as httpContextIntegration,mr as inboundFiltersIntegration,
37Xh as init,Ko as instrumentOutgoingRequests,rs as isInitialized,ir as lastEventId,yf as launchDarklyIntegration,bo as lazyLoadIntegration,Jo as linkedErrorsIntegration,tf as makeBrowserOfflineTransport,Pn as makeFetchTransport,Es as makeMultiplexedTransport,xs as moduleMetadataIntegration,Op as onLoad,Rf as openFeatureIntegration,Ep as opera10StackLineParser,Tp as opera11StackLineParser,ys as parameterize,Xn as registerSpanErrorInstrumentation,export_replayCanvasIntegration as replayCanvasIntegration,export_replayIntegration as replayIntegration,wp as reportingObserverIntegration,Os as rewriteFramesIntegration,Ya as sendFeedback,Ji as setContext,go as setCurrentClient,Xi as setExtra,Ki as setExtras,Ft as setHttpStatus,Qn as setMeasurement,Qi as setTag,Zi as setTags,es as setUser,Lp as showReportDialog,Li as spanToBaggageHeader,I as spanToJSON,Jn as spanToTraceHeader,xp as spotlightBrowserIntegration,Ca as startBrowserTracingNavigationSpan,xa as startBrowserTracingPageLoadSpan,me as startInactiveSpan,so as startNewTrace,gn as startSession,er as startSpan,Hi as startSpanManual,Gi as suppressTracing,ks as thirdPartyErrorFilterIntegration,Af as unleashIntegration,Pi as updateSpanName,Sp as winjsStackLineParser,Rt as withActiveSpan,Wr as withIsolationScope,K as withScope,Ls as zodErrorsIntegration};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.