1import{aK as Ds,J as mn,q as Ls,u as gr,r as Wt,S as hr,ag as Ms,t as Fs,by as Hs,bU as Us,bQ as Bs,bP as js,bS as qs,bT as Gs,bR as Ws,s as Vs}from"./C9liJd2o.js";const g=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,E=globalThis,ce="9.47.1";function he(){return mt(E),E}function mt(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||ce,t[ce]=t[ce]||{}}function Be(e,t,n=E){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[ce]=r[ce]||{};return s[e]||(s[e]=t())}const Ys=["debug","info","warn","error","log","assert","trace"],zs="Sentry Logger ",at={};function re(e){if(!("console"in E))return e();const t=E.console,n={},r=Object.keys(at);r.forEach(s=>{const o=at[s];n[s]=t[s],t[s]=o});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function Ks(){Yt().enabled=!0}function Js(){Yt().enabled=!1}function _r(){return Yt().enabled}function Xs(...e){Vt("log",...e)}function Zs(...e){Vt("warn",...e)}function Qs(...e){Vt("error",...e)}function Vt(e,...t){g&&_r()&&re(()=>{E.console[e](`${zs}[${e}]:`,...t)})}function Yt(){return g?Be("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const m={enable:Ks,disable:Js,isEnabled:_r,log:Xs,warn:Zs,error:Qs},Sr=50,le="?",gn=/\(error: (.*)\)/,hn=/captureMessage|captureException/;function yr(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const o=[],i=n.split(` 2`);for(let a=r;a<i.length;a++){const c=i[a];if(c.length>1024)continue;const u=gn.test(c)?c.replace(gn,"$1"):c;if(!u.match(/\S*Error: /)){for(const f of t){const d=f(u);if(d){o.push(d);break}}if(o.length>=Sr+s)break}}return to(o.slice(s))}}function eo(e){return Array.isArray(e)?yr(...e):e}function to(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Je(t).function||"")&&t.pop(),t.reverse(),hn.test(Je(t).function||"")&&(t.pop(),hn.test(Je(t).function||"")&&t.pop()),t.slice(0,Sr).map(n=>({...n,filename:n.filename||Je(t).filename,function:n.function||le}))}function Je(e){return e[e.length-1]||{}}const Et="<anonymous>";function Z(e){try{return!e||typeof e!="function"?Et:e.name||Et}catch{return Et}}function _n(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const nt={},Sn={};function je(e,t){nt[e]=nt[e]||[],nt[e].push(t)}function qe(e,t){if(!Sn[e]){Sn[e]=!0;try{t()}catch(n){g&&m.error(`Error while instrumenting ${e}`,n)}}}function ue(e,t){const n=e&&nt[e];if(n)for(const r of n)try{r(t)}catch(s){g&&m.error(`Error while triggering instrumentation handler. 3Type: ${e} 4Name: ${Z(r)} 5Error:`,s)}}let bt=null;function Er(e){const t="error";je(t,e),qe(t,no)}function no(){bt=E.onerror,E.onerror=function(e,t,n,r,s){return ue("error",{column:r,error:s,line:n,msg:e,url:t}),bt?bt.apply(this,arguments):!1},E.onerror.__SENTRY_INSTRUMENTED__=!0}let Tt=null;function br(e){const t="unhandledrejection";je(t,e),qe(t,ro)}function ro(){Tt=E.onunhandledrejection,E.onunhandledrejection=function(e){return ue("unhandledrejection",e),Tt?Tt.apply(this,arguments):!0},E.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Tr=Object.prototype.toString;function zt(e){switch(Tr.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return W(e,Error)}}function we(e,t){return Tr.call(e)===`[object ${t}]`}function Ir(e){return we(e,"ErrorEvent")}function yn(e){return we(e,"DOMError")}function so(e){return we(e,"DOMException")}function De(e){return we(e,"String")}function Kt(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Jt(e){return e===null||Kt(e)||typeof e!="object"&&typeof e!="function"}function Le(e){return we(e,"Object")}function gt(e){return typeof Event<"u"&&W(e,Event)}function oo(e){return typeof Element<"u"&&W(e,Element)}function io(e){return we(e,"RegExp")}function Ge(e){return!!(e?.then&&typeof e.then=="function")}function ao(e){return Le(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function W(e,t){try{return e instanceof t}catch{return!1}}function Rr(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function vr(e){return typeof Request<"u"&&W(e,Request)}const Xt=E,co=80;function Ar(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,s=[];let o=0,i=0;const a=" > ",c=a.length;let u;const f=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||co;for(;n&&o++<r&&(u=uo(n,f),!(u==="html"||o>1&&i+s.length*c+u.length>=d));)s.push(u),i+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function uo(e,t){const n=e,r=[];if(!n?.tagName)return"";if(Xt.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());const s=t?.length?t.filter(i=>n.getAttribute(i)).map(i=>[i,n.getAttribute(i)]):null;if(s?.length)s.forEach(i=>
5{r.push(`[${i[0]}="${i[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const i=n.className;if(i&&De(i)){const a=i.split(/\s+/);for(const c of a)r.push(`.${c}`)}}const o=["aria-label","type","name","title","alt"];for(const i of o){const a=n.getAttribute(i);a&&r.push(`[${i}="${a}"]`)}return r.join("")}function We(){try{return Xt.document.location.href}catch{return""}}function fo(e){if(!Xt.HTMLElement)return null;let t=e;const 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 ct(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function En(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{Rr(s)?n.push("[VueViewModel]"):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function po(e,t,n=!1){return De(e)?io(t)?t.test(e):De(t)?n?e===t:e.includes(t):!1:!1}function de(e,t=[],n=!1){return t.some(r=>po(e,r,n))}function G(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const s=n(r);typeof s=="function"&&Nr(s,r);try{e[t]=s}catch{g&&m.log(`Failed to replace method "${t}" in object`,e)}}function F(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{g&&m.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Nr(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,F(e,"__sentry_original__",t)}catch{}}function Zt(e){return e.__sentry_original__}function wr(e){if(zt(e))return{message:e.message,name:e.name,stack:e.stack,...Tn(e)};if(gt(e)){const t={type:e.type,target:bn(e.target),currentTarget:bn(e.currentTarget),...Tn(e)};return typeof CustomEvent<"u"&&W(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function bn(e){try{return oo(e)?Ar(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Tn(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function lo(e,t=40){const n=Object.keys(wr(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return ct(r,t);for(let s=n.length;s>0;s--){const o=n.slice(0,s).join(", ");if(!(o.length>t))return s===n.length?o:ct(o,t)}return""}function mo(){const e=E;return e.crypto||e.msCrypto}function M(e=mo()){let t=()=>Math.random()*16;try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,"");e?.getRandomValues&&(t=()=>{const n=new Uint8Array(1);return e.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(t()&15)>>n/4).toString(16))}function kr(e){return e.exception?.values?.[0]}function ae(e){const{message:t,event_id:n}=e;if(t)return t;const r=kr(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function xt(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function Te(e,t){const n=kr(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const o={...s?.data,...t.data};n.mechanism.data=o}}function In(e){if(go(e))return!0;try{F(e,"__sentry_captured__",!0)}catch{}return!1}function go(e){try{return e.__sentry_captured__}catch{}}const Or=1e3;function _e(){return Date.now()/Or}function ho(){const{performance:e}=E;if(!e?.now||!e.timeOrigin)return _e;const t=e.timeOrigin;return()=>(t+e.now())/Or}let Rn;function P(){return(Rn??(Rn=ho()))()}let It;function _o(){const{performance:e}=E;if(!e?.now)return[void 0,"none"];const t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=s<t,i=e.timing?.navigationStart,c=typeof i=="number"?Math.abs(i+n-r):t,u=c<t;return o||u?s<=c?[e.timeOrigin,"timeOrigin"]:[i,"navigationStart"]:[r,"dateNow"]}function Qt(){return It||(It=_o()),It[0]}function So(e){const t=P(),n={sid:M(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Eo(n)};return e&&Ie(n,e),n}function Ie(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||P(),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:M()),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{const 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),t
5ypeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function yo(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),Ie(e,n)}function Eo(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 Ve(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=Ve(r[s],t[s],n-1));return r}function Q(){return M()}function Ye(){return M().substring(16)}const Ct="_sentrySpan";function Re(e,t){t?F(e,Ct,t):delete e[Ct]}function ut(e){return e[Ct]}const bo=100;class B{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Q(),sampleRand:Math.random()}}clone(){const t=new B;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},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,Re(t,ut(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&&Ie(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},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;const n=typeof t=="function"?t(this):t,r=n instanceof B?n.getScopeData():Le(n)?t:void 0,{tags:s,extra:o,user:i,contexts:a,level:c,fingerprint:u=[],propagationContext:f}=r||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...o},this._contexts={...this._contexts,...a},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),u.length&&(this._fingerprint=u),f&&(this._propagationContext=f),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,Re(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Q(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:bo;if(r<=0)return this;const s={timestamp:_e(),...t,message:t.message?ct(t.message,2048):t.message};return this._breadcrumbs.push(s),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,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:ut(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Ve(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||M();if(!this._client)return g&&m.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){const s=r?.event_id||M();if(!this._client)return g&&m.warn("No client configured on scope - will not capture message!"),s;const o=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:s},this),s}captureEvent(t,n){const r=n?.event_id||M();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(g&&m.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEac
5h(t=>{t(this)}),this._notifyingListeners=!1)}}function To(){return Be("defaultCurrentScope",()=>new B)}function Io(){return Be("defaultIsolationScope",()=>new B)}class Ro{constructor(t,n){let r;t?r=t:r=new B;let s;n?s=n:s=new B,this._stack=[{scope:r}],this._isolationScope=s}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(s){throw this._popScope(),s}return Ge(r)?r.then(s=>(this._popScope(),s),s=>{throw this._popScope(),s}):(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(){const 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 ve(){const e=he(),t=mt(e);return t.stack=t.stack||new Ro(To(),Io())}function vo(e){return ve().withScope(e)}function Ao(e,t){const n=ve();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function vn(e){return ve().withScope(()=>e(ve().getIsolationScope()))}function No(){return{withIsolationScope:vn,withScope:vo,withSetScope:Ao,withSetIsolationScope:(e,t)=>vn(t),getCurrentScope:()=>ve().getScope(),getIsolationScope:()=>ve().getIsolationScope()}}function ke(e){const t=mt(e);return t.acs?t.acs:No()}function A(){const e=he();return ke(e).getCurrentScope()}function Y(){const e=he();return ke(e).getIsolationScope()}function wo(){return Be("globalScope",()=>new B)}function ht(...e){const t=he(),n=ke(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function T(){return A().getClient()}function ko(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=t,o={trace_id:n,span_id:s||Ye()};return r&&(o.parent_span_id=r),o}const D="sentry.source",en="sentry.sample_rate",xr="sentry.previous_trace_sample_rate",Me="sentry.op",H="sentry.origin",dt="sentry.idle_span_finish_reason",Cr="sentry.measurement_unit",Pr="sentry.measurement_value",An="sentry.custom_span_name",tn="sentry.profile_id",nn="sentry.exclusive_time",Oo="sentry.link.type",xo=0,$r=1,N=2;function Co(e){if(e<400&&e>=100)return{code:$r};if(e>=400&&e<500)switch(e){case 401:return{code:N,message:"unauthenticated"};case 403:return{code:N,message:"permission_denied"};case 404:return{code:N,message:"not_found"};case 409:return{code:N,message:"already_exists"};case 413:return{code:N,message:"failed_precondition"};case 429:return{code:N,message:"resource_exhausted"};case 499:return{code:N,message:"cancelled"};default:return{code:N,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:N,message:"unimplemented"};case 503:return{code:N,message:"unavailable"};case 504:return{code:N,message:"deadline_exceeded"};default:return{code:N,message:"internal_error"}}return{code:N,message:"unknown_error"}}function Dr(e,t){e.setAttribute("http.response.status_code",t);const n=Co(t);n.message!=="unknown_error"&&e.setStatus(n)}const Lr="_sentryScope",Mr="_sentryIsolationScope";function Po(e,t,n){e&&(F(e,Mr,n),F(e,Lr,t))}function ft(e){return{scope:e[Lr],isolationScope:e[Mr]}}const rn="sentry-",$o=/^sentry-/,Do=8192;function Fr(e){const t=Mo(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,o])=>{if(s.match($o)){const i=s.slice(rn.length);r[i]=o}return r},{});if(Object.keys(n).length>0)return n}function Lo(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${rn}${r}`]=s),n),{});return Fo(t)}function Mo(e){if(!(!e||!De(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=Nn(n);return Object.entries(r).forEach(([s,o])=>{t[s]=o}),t},{}):Nn(e)}function Nn(e){return e.split(",").map(t=>t.split("=").map(n=>{try{return decodeURIComponent(n.trim())}catch{return}})).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function Fo(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],s)=>{const o=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=s===0?o:`${t},${o}`;return i.length>Do?(g&&m.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):i},"")}function Fe(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const Hr=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Ho(e){if(!e)return;const t=e.match(Hr);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 Uo(e,t){const n=Ho(e),r=Fr(t);if(!n?.traceId)return{traceId:Q(),sampleRand:Math.random()};const s=Bo(n,r);r&&(r.sample_rand=s.toString());const{traceId:o,parentSpanId:i,parentSampled:a}=n;return{traceId:o,parentSpanId:i,sampled:a,dsc:r||{},sampleRand:s}}function Ur(e=Q(),t=Ye(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function Bo(e,t){const n=Fe(t?.sample_rand);if(n!==void 0)return n;const r=Fe(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}const Br=0,sn=1;let wn=!1;function jo(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:o,status:i,origin:a,links:c}=R(e);return{parent_span_id:o,span_id:t,trace_id:n,data:r,op:s,status:i,origin:a,links:c}}function qo(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),s=r?t:R(e).parent_span_id,o=ft(e).scope,i=r?o?.getPropagationContext().propagationSpanId||Ye():t;return{parent_span_id:s,span_id:i,trace_id:n}}function Go(e){const{traceId:t,spanId:n}=e.spanContext(),r=Se(e);return Ur(t,n,r)}function jr(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...s},attributes:o})=>({span_id:t,trace_id:n,sampled:r===sn,attributes:o,...s}))}function fe(e){return typeof e=="number"?kn(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?kn(e.getTime()):P()}function kn(e){return e>9999999999?e/1e3:e}function R(e){if(Vo(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(Wo(e)){const{attributes:r,startTime:s,name:o,endTime:i,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:o,parent_span_id:u,start_timestamp:fe(s),timestamp:fe(i)||void 0,status:qr(a),op:r[Me],origin:r[H],links:jr(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Wo(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Vo(e){return typeof e.getSpanJSON=="function"}function Se(e){const{traceFlags:t}=e.spanContext();return t===sn}function qr(e){if(!(!e||e.code===xo))return e.code===$r?"ok":e.message||"unknown_error"}const pe="_sentryChildSpans",Pt="_sentryRootSpan";function Gr(e,t){const n=e[Pt]||e;F(t,Pt,n),e[pe]?e[pe].add(t):F(e,pe,new Set([t]))}function Yo(e,t){e[pe]&&e[pe].delete(t)}function rt(e){const t=new Set;function n(r){if(!t.has(r)&&Se(r)){t.add(r);const s=r[pe]?Array.from(r[pe]):[];for(const o of s)n(o)}}return n(e),Array.from(t)}function $(e){return e[Pt]||e}function z(){const e=he(),t=ke(e);return t.getActiveSpan?t.getActiveSpan():ut(A())}function $t(){wn||(re(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),wn=!0)}let On=!1;function zo(){if(On)return;function e(){const t=z(),n=t&&$(t);if(n){const r="internal_error";g&&m.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:N,message:r})}}e.tag="sentry_tracingErrorCallback",On=!0,Er(e),br(e)}function V(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||T()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}const on="production",Ko=/^o(\d+)\./,Jo=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Xo(e){return e==="http"||e==="https"}
5function ze(e,t=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function Zo(e){const t=Jo.exec(e);if(!t){re(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",o="",i="",a=""]=t.slice(1);let c="",u=a;const f=u.split("/");if(f.length>1&&(c=f.slice(0,-1).join("/"),u=f.pop()),u){const d=u.match(/^\d+/);d&&(u=d[0])}return Wr({host:o,pass:s,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function Wr(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Qo(e){if(!g)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(m.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?Xo(r)?t&&isNaN(parseInt(t,10))?(m.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(m.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(m.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function ei(e){return e.match(Ko)?.[1]}function ti(e){const t=typeof e=="string"?Zo(e):Wr(e);if(!(!t||!Qo(t)))return t}const Vr="_frozenDsc";function st(e,t){F(e,Vr,t)}function Yr(e,t){const n=t.getOptions(),{publicKey:r,host:s}=t.getDsn()||{};let o;n.orgId?o=String(n.orgId):s&&(o=ei(s));const i={environment:n.environment||on,release:n.release,public_key:r,trace_id:e,org_id:o};return t.emit("createDsc",i),i}function zr(e,t){const n=t.getPropagationContext();return n.dsc||Yr(n.traceId,e)}function ee(e){const t=T();if(!t)return{};const n=$(e),r=R(n),s=r.data,o=n.spanContext().traceState,i=o?.get("sentry.sample_rate")??s[en]??s[xr];function a(y){return(typeof i=="number"||typeof i=="string")&&(y.sample_rate=`${i}`),y}const c=n[Vr];if(c)return a(c);const u=o?.get("sentry.dsc"),f=u&&Fr(u);if(f)return a(f);const d=Yr(e.spanContext().traceId,t),p=s[D],l=r.description;return p!=="url"&&l&&(d.transaction=l),V()&&(d.sampled=String(Se(n)),d.sample_rand=o?.get("sentry.sample_rand")??ft(n).scope?.getPropagationContext().sampleRand.toString()),a(d),t.emit("createDsc",d,n),d}class te{constructor(t={}){this._traceId=t.traceId||Q(),this._spanId=t.spanId||Ye()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:Br}}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 q(e,t=100,n=1/0){try{return Dt("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Kr(e,t=3,n=100*1024){const r=q(e,t);return oi(r)>n?Kr(e,t-1,n):r}function Dt(e,t,n=1/0,r=1/0,s=ii()){const[o,i]=s;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=ni(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(o(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const l=u.toJSON();return Dt("",l,c-1,r,s)}catch{}const f=Array.isArray(t)?[]:{};let d=0;const p=wr(t);for(const l in p){if(!Object.prototype.hasOwnProperty.call(p,l))continue;if(d>=r){f[l]="[MaxProperties ~]";break}const y=p[l];f[l]=Dt(l,y,c-1,r,s),d++}return i(t),f}function ni(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(Rr(t))return"[VueViewModel]";if(ao(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Z(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=ri(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function ri(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function si(e){return~-encodeURI(e).split(/%..|./).length}function oi(e){return si(JSON.stringify(e))}function ii(){const 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 Oe(e,t=[]){return[e,t]}function ai(e,t){const[n,r]=e;return[n,[...r,t]]}function xn(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function Lt(e){const t=mt(E);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function ci(e){const[t,n]=e;let r=JSON.stringify(t);
5function s(o){typeof r=="string"?r=typeof o=="string"?r+o:[Lt(r),o]:r.push(typeof o=="string"?Lt(o):o)}for(const o of n){const[i,a]=o;if(s(` 6${JSON.stringify(i)} 7`),typeof a=="string"||a instanceof Uint8Array)s(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(q(a))}s(c)}}return typeof r=="string"?r:ui(r)}function ui(e){const t=e.reduce((s,o)=>s+o.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function di(e){return[{type:"span"},e]}function fi(e){const t=typeof e.data=="string"?Lt(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const pi={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"};function Cn(e){return pi[e]}function Jr(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function li(e,t,n,r){const s=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:ze(r)},...s&&{trace:s}}}function mi(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function gi(e,t,n,r){const s=Jr(n),o={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:ze(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Oe(o,[i])}function hi(e,t,n,r){const s=Jr(n),o=e.type&&e.type!=="replay_event"?e.type:"event";mi(e,n?.sdk);const i=li(e,s,r,t);return delete e.sdkProcessingMetadata,Oe(i,[[{type:o},e]])}function _i(e,t){function n(f){return!!f.trace_id&&!!f.public_key}const r=ee(e[0]),s=t?.getDsn(),o=t?.getOptions().tunnel,i={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!o&&s&&{dsn:ze(s)}},a=t?.getOptions().beforeSendSpan,c=a?f=>{const d=R(f),p=a(d);return p||($t(),d)}:R,u=[];for(const f of e){const d=c(f);d&&u.push(di(d))}return Oe(i,u)}function Si(e){if(!g)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=R(e),{spanId:s}=e.spanContext(),o=Se(e),i=$(e),a=i===e,c=`[Tracing] Starting ${o?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:f,description:d}=R(i);u.push(`root ID: ${i.spanContext().spanId}`),f&&u.push(`root op: ${f}`),d&&u.push(`root description: ${d}`)}m.log(`${c} 8 ${u.join(` 9 `)}`)}function yi(e){if(!g)return;const{description:t="< unknown name >",op:n="< unknown op >"}=R(e),{spanId:r}=e.spanContext(),o=$(e)===e,i=`[Tracing] Finishing "${n}" ${o?"root ":""}span "${t}" with ID ${r}`;m.log(i)}function md(e,t,n,r=z()){const s=r&&$(r);s&&(g&&m.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),s.addEvent(e,{[Pr]:t,[Cr]:n}))}function Pn(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},s=r[Cr],o=r[Pr];typeof s=="string"&&typeof o=="number"&&(t[n.name]={value:o,unit:s})}),t}const $n=1e3;class _t{constructor(t={}){this._traceId=t.traceId||Q(),this._spanId=t.spanId||Ye(),this._startTime=t.startTimestamp||P(),this._links=t.links,this._attributes={},this.setAttributes({[H]:"manual",[Me]: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(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?sn:Br}}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=fe(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(D,"custom"),this}end(t){this._endTime||(this._endTime=fe(t),yi(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Me],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[H],profile_id:this._attributes[tn],exclusive_time:this._attributes[nn],measurements:Pn(this._events),is_segment:this._isStandaloneSpan&&$(this)===this||void 0,segment_id:this._isStandaloneSpan?$(this).spanContext().spanId:void 0,links:jr(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){g&&m.log("[Tracing] Adding an event to span:",t);const s=Dn(n)?n:r||P(),o=Dn(n)?{}:n||{},i={name:t,time:fe(s),attributes:o};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=T();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===$(this)))return;if(this._isStandaloneSpan){this._sampled?bi(_i([this],t)):(g&&m.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(ft(this).scope||A()).captureEvent(r)}_convertSpanToTransaction(){if(!Ln(R(this)))return;this._name||(g&&m.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=ft(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const o=rt(this).filter(f=>f!==this&&!Ei(f)).map(f=>R(f)).filter(Ln),i=this._attributes[D];delete this._attributes[An],o.forEach(f=>{delete f.data[An]});const a={contexts:{trace:jo(this)},spans:o.length>$n?o.sort((f,d)=>f.start_timestamp-d.start_timestamp).slice(0,$n):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:ee(this)},request:r,...i&&{transaction_info:{source:i}}},c=Pn(this._events);return c&&Object.keys(c).length&&(g&&m.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),a.measurements=c),a}}function Dn(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Ln(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Ei(e){return e instanceof _t&&e.isStandaloneSpan()}function bi(e){const t=T();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function Ti(e,t,n=()=>{}){let r;try{r=e()}catch(s){throw t(s),n(),s}return Ii(r,t,n)}function Ii(e,t,n){return Ge(e)?e.then(r=>(n(),r),r=>{throw t(r),n(),r}):(n(),e)}function Ri(e,t,n){if(!V(e))return[!1];let r,s;typeof e.tracesSampler=="function"?(s=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?s=t.parentSampled:typeof e.tracesSampleRate<"u"&&(s=e.tracesSampleRate,r=!0);const o=Fe(s);if(o===void 0)return g&&m.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(s)} of type ${JSON.stringify(typeof s)}.`),[!1];if(!o)return g&&m.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,o,r];const i=n<o;return i||g&&m.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[i,o,r]}
9const Xr="__SENTRY_SUPPRESS_TRACING__";function gd(e,t){const n=an();if(n.startSpan)return n.startSpan(e,t);const r=es(e),{forceTransaction:s,parentSpan:o,scope:i}=e,a=i?.clone();return ht(a,()=>Ai(o)(()=>{const u=A(),f=ts(u,o),p=e.onlyIfParent&&!f?new te:Qr({parentSpan:f,spanArguments:r,forceTransaction:s,scope:u});return Re(u,p),Ti(()=>t(p),()=>{const{status:l}=R(p);p.isRecording()&&(!l||l==="ok")&&p.setStatus({code:N,message:"internal_error"})},()=>{p.end()})}))}function Ae(e){const t=an();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=es(e),{forceTransaction:r,parentSpan:s}=e;return(e.scope?i=>ht(e.scope,i):s!==void 0?i=>Zr(s,i):i=>i())(()=>{const i=A(),a=ts(i,s);return e.onlyIfParent&&!a?new te:Qr({parentSpan:a,spanArguments:n,forceTransaction:r,scope:i})})}function Zr(e,t){const n=an();return n.withActiveSpan?n.withActiveSpan(e,t):ht(r=>(Re(r,e||void 0),t(r)))}function Qr({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!V()){const i=new te;if(n||!e){const a={sampled:"false",sample_rate:"0",transaction:t.name,...ee(i)};st(i,a)}return i}const s=Y();let o;if(e&&!n)o=vi(e,r,t),Gr(e,o);else if(e){const i=ee(e),{traceId:a,spanId:c}=e.spanContext(),u=Se(e);o=Mn({traceId:a,parentSpanId:c,...t},r,u),st(o,i)}else{const{traceId:i,dsc:a,parentSpanId:c,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};o=Mn({traceId:i,parentSpanId:c,...t},r,u),a&&st(o,a)}return Si(o),Po(o,r,s),o}function es(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=fe(e.startTime),delete r.startTime,r}return n}function an(){const e=he();return ke(e)}function Mn(e,t,n){const r=T(),s=r?.getOptions()||{},{name:o=""}=e,i={spanAttributes:{...e.attributes},spanName:o,parentSampled:n};r?.emit("beforeSampling",i,{decision:!1});const a=i.parentSampled??n,c=i.spanAttributes,u=t.getPropagationContext(),[f,d,p]=t.getScopeData().sdkProcessingMetadata[Xr]?[!1]:Ri(s,{name:o,parentSampled:a,attributes:c,parentSampleRate:Fe(u.dsc?.sample_rate)},u.sampleRand),l=new _t({...e,attributes:{[D]:"custom",[en]:d!==void 0&&p?d:void 0,...c},sampled:f});return!f&&r&&(g&&m.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 vi(e,t,n){const{spanId:r,traceId:s}=e.spanContext(),o=t.getScopeData().sdkProcessingMetadata[Xr]?!1:Se(e),i=o?new _t({...n,parentSpanId:r,traceId:s,sampled:o}):new te({traceId:s});Gr(e,i);const a=T();return a&&(a.emit("spanStart",i),n.endTimestamp&&a.emit("spanEnd",i)),i}function ts(e,t){if(t)return t;if(t===null)return;const n=ut(e);if(!n)return;const r=T();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?$(n):n}function Ai(e){return e!==void 0?t=>Zr(e,t):t=>t()}const ot={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Ni="heartbeatFailed",wi="idleTimeout",ki="finalTimeout",Oi="externalFinish";function ns(e,t={}){const n=new Map;let r=!1,s,o=Oi,i=!t.disableAutoFinish;const a=[],{idleTimeout:c=ot.idleTimeout,finalTimeout:u=ot.finalTimeout,childSpanTimeout:f=ot.childSpanTimeout,beforeSpanEnd:d}=t,p=T();if(!p||!V()){const S=new te,x={sample_rate:"0",sampled:"false",...ee(S)};return st(S,x),S}const l=A(),y=z(),h=xi(e);h.end=new Proxy(h.end,{apply(S,x,ye){if(d&&d(h),x instanceof te)return;const[xe,...Ee]=ye,oe=xe||P(),w=fe(oe),ie=rt(h).filter(O=>O!==h);if(!ie.length)return Ke(w),Reflect.apply(S,x,[w,...Ee]);const K=ie.map(O=>R(O).timestamp).filter(O=>!!O),I=K.length?Math.max(...K):void 0,k=R(h).start_timestamp,b=Math.min(k?k+u/1e3:1/0,Math.max(k||-1/0,Math.min(w,I||1/0)));return Ke(b),Reflect.apply(S,x,[b,...Ee])}});function v(){s&&(clearTimeout(s),s=void 0)}function j(S){v(),s=setTimeout(()=>{!r&&n.size===0&&i&&(o=wi,h.end(S))},c)}function se(S){s=setTimeout(()=>{!r&&i&&(o=Ni,h.end(S))},f)}function St(S){v(),n.set(S,!0);const x=P();se(x+f/1e3)}function yt(S){if(n.has(S)&&n.delete(S),n.size===0){const x=P();j(x+c/1e3)}}function Ke(S){r=!0,n.clear(),a.forEach(w=>w()),Re(l,y);const x=R(h),{start_timestamp:ye}=x;if(!ye)return;x.data[dt]||h.setAttribute(dt,o),m.log(`[Tracing] Idle span "${x.op}" finished`);const Ee=rt(h).filter(w=>w!==h);let oe=0;Ee.forEach(w=>{w.isRecording()&&(w.setStatus({code:N,message:"cancelled"}),w.end(S),g&&m.log("[Tracing] Cancelling span since span ended early",JSON.stringify(w,void 0,2)));const ie=R(w),{timestamp:K=0,start_timestamp:I=0}=ie,k=I<=S,b=(u+c)/1e3,O=K-I<=b;if(g){const C=JSON.stringify(w,void 0,2);k?O||m.log("[Tracing] Discarding span since it finished after idle span final timeout",C):m.log("[Tracing] Discarding span since it happened after idle span was finished",C)}(!O||!k)&&(Yo(h,w),oe++)}),oe>0&&h.setAttribute("sentry.idle_span_discarded_spans",oe)}return a.push(p.on("spanStart",S=>{if(r||S===h||R(S).timestamp||S instanceof _t&&S.isStandaloneSpan())return;rt(h).includes(S)&&St(S.spanContext().spanId)})),a.push(p.on("spanEnd",S=>{r||yt(S.spanContext().spanId)})),a.push(p.on("idleSpanEnableAutoFinish",S=>{S===h&&(i=!0,j(),n.size&&se())})),t.disableAutoFinish||j(),setTimeout(()=>{r||(h.setStatus({code:N,message:"deadline_exceeded"}),o=ki,h.end())},u),h}function xi(e){const t=Ae(e);
9return Re(A(),t),g&&m.log("[Tracing] Started span is an idle span"),t}const Rt=0,Fn=1,Hn=2;function me(e){return new ne(t=>{t(e)})}function pt(e){return new ne((t,n)=>{n(e)})}class ne{constructor(t){this._state=Rt,this._handlers=[],this._runExecutor(t)}then(t,n){return new ne((r,s)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(i){s(i)}},o=>{if(!n)s(o);else try{r(n(o))}catch(i){s(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new ne((n,r)=>{let s,o;return this.then(i=>{o=!1,s=i,t&&t()},i=>{o=!0,s=i,t&&t()}).then(()=>{if(o){r(s);return}n(s)})})}_executeHandlers(){if(this._state===Rt)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Fn&&n[1](this._value),this._state===Hn&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(o,i)=>{if(this._state===Rt){if(Ge(i)){i.then(r,s);return}this._state=o,this._value=i,this._executeHandlers()}},r=o=>{n(Fn,o)},s=o=>{n(Hn,o)};try{t(r,s)}catch(o){s(o)}}}function Mt(e,t,n,r=0){return new ne((s,o)=>{const i=e[r];if(t===null||typeof i!="function")s(t);else{const a=i({...t},n);g&&i.id&&a===null&&m.log(`Event processor "${i.id}" dropped event`),Ge(a)?a.then(c=>Mt(e,c,n,r+1).then(s)).then(null,o):Mt(e,a,n,r+1).then(s).then(null,o)}})}function Ci(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=t;Pi(e,t),r&&Li(e,r),Mi(e,n),$i(e,s),Di(e,o)}function Un(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:f,attachments:d,propagationContext:p,transactionName:l,span:y}=t;Xe(e,"extra",n),Xe(e,"tags",r),Xe(e,"user",s),Xe(e,"contexts",o),e.sdkProcessingMetadata=Ve(e.sdkProcessingMetadata,a,2),i&&(e.level=i),l&&(e.transactionName=l),y&&(e.span=y),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),f.length&&(e.eventProcessors=[...e.eventProcessors,...f]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function Xe(e,t,n){e[t]=Ve(e[t],n,1)}function Pi(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(s).length&&(e.user={...s,...e.user}),Object.keys(o).length&&(e.contexts={...o,...e.contexts}),i&&(e.level=i),a&&e.type!=="transaction"&&(e.transaction=a)}function $i(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Di(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Li(e,t){e.contexts={trace:qo(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:ee(t),...e.sdkProcessingMetadata};const n=$(t),r=R(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function Mi(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}let Ze,Bn,Qe;function Fi(e){const t=E._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return Qe&&n.length===Bn||(Bn=n.length,Qe=n.reduce((r,s)=>{Ze||(Ze={});const o=Ze[s];if(o)r[o[0]]=o[1];else{const i=e(s);for(let a=i.length-1;a>=0;a--){const u=i[a]?.filename,f=t[s];if(u&&f){r[u]=f,Ze[s]=[u,f];break}}}return r},{})),Qe}function Hi(e,t,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||M(),timestamp:t.timestamp||_e()},u=n.integrations||e.integrations.map(v=>v.name);Ui(c,e),qi(c,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&Bi(c,e.stackParser);const f=Wi(r,n.captureContext);n.mechanism&&Te(c,n.mechanism);const d=s?s.getEventProcessors():[],p=wo().getScopeData();if(o){const v=o.getScopeData();Un(p,v)}if(f){const v=f.getScopeData();Un(p,v)}const l=[...n.attachments||[],...p.attachments];l.length&&(n.attachments=l),Ci(c,p);const y=[...d,...p.eventProcessors];return Mt(y,c,n).then(v=>(v&&ji(v),typeof i=="number"&&i>0?Gi(v,i,a):v))}function Ui(e,t){const{environment:n,release:r,dist:s,maxValueLength:o=250}=t;e.environment=e.environment||n||on,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s);const i=e.request;i?.url&&(i.url=ct(i.url,o))}function Bi(e,t){const n=Fi(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.filename&&(s.debug_id=n[s.filename])})})}function ji(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.debug_id&&(s.abs_path?t[s.abs_path]=s.debug_id:s.filename&&(t[s.filename]=s.debug_id),delete s.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,s])=>{n.push({type:"sourcemap",code_file:r,debug_id:s})})}function qi(e,t){t.length>0&&(e.sdk=e.sdk||{}
9,e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Gi(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:q(s.data,t,n)}}))},...e.user&&{user:q(e.user,t,n)},...e.contexts&&{contexts:q(e.contexts,t,n)},...e.extra&&{extra:q(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=q(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(s=>({...s,...s.data&&{data:q(s.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=q(e.contexts.flags,3,n)),r}function Wi(e,t){if(!t)return e;const n=e?e.clone():new B;return n.update(t),n}function Vi(e){if(e)return Yi(e)?{captureContext:e}:Ki(e)?{captureContext:e}:e}function Yi(e){return e instanceof B||typeof e=="function"}const zi=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Ki(e){return Object.keys(e).some(t=>zi.includes(t))}function cn(e,t){return A().captureException(e,Vi(t))}function hd(e,t){const n=t;return A().captureMessage(e,n,void 0)}function rs(e,t){return A().captureEvent(e,t)}function _d(e,t){Y().setContext(e,t)}function Ji(){const e=T();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function Sd(e){Y().addEventProcessor(e)}function jn(e){const t=Y(),n=A(),{userAgent:r}=E.navigator||{},s=So({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),o=t.getSession();return o?.status==="ok"&&Ie(o,{status:"exited"}),ss(),t.setSession(s),s}function ss(){const e=Y(),n=A().getSession()||e.getSession();n&&yo(n),os(),e.setSession()}function os(){const e=Y(),t=T(),n=e.getSession();n&&t&&t.captureSession(n)}function qn(e=!1){if(e){ss();return}os()}const Xi="7";function Zi(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Qi(e){return`${Zi(e)}${e.projectId}/envelope/`}function ea(e,t){const n={sentry_version:Xi};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function ta(e,t,n){return t||`${Qi(e)}?${ea(e,n)}`}const Gn=[];function na(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function ra(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const s=n(t);r=Array.isArray(s)?s:[s]}else r=t;return na(r)}function sa(e,t){const n={};return t.forEach(r=>{r&&is(e,r,n)}),n}function Wn(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function is(e,t,n){if(n[t.name]){g&&m.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,Gn.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),Gn.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,o)=>r(s,o,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((o,i)=>r(o,i,e),{id:t.name});e.addEventProcessor(s)}g&&m.log(`Integration installed: ${t.name}`)}function oa(e,t,n){const r=[{type:"client_report"},{timestamp:_e(),discarded_events:e}];return Oe(t?{dsn:t}:{},[r])}function as(e){const t=[];e.message&&t.push(e.message);try{const 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 ia(e){const{trace_id:t,parent_span_id:n,span_id:r,status:s,origin:o,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:s,timestamp:e.timestamp,trace_id:t??"",origin:o,profile_id:i?.[tn],exclusive_time:i?.[nn],measurements:e.measurements,is_segment:!0}}function aa(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&&{[tn]:e.profile_id},...e.exclusive_time&&{[nn]:e.exclusive_time}}}},measurements:e.measurements}}const Vn="Not capturing exception because it's already been captured.",Yn="Discarded session because of missing or non-string release",cs=Symbol.for("SentryInternalError"),us=Symbol.for("SentryDoNotSendEventError");function it(e){return{message:e,[cs]:!0}}function vt(e){return{message:e,[us]:!0}}function zn(e){return!!e&&typeof e=="object"&&cs in e}function Kn(e){return!!e&&typeof e=="object"&&us in e}class ca{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=ti(t.dsn):g&&m.warn("No DSN provided, client will not send events."),this._dsn){const n=ta(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:n})}}captureException(t,n,r){const s=M();if(In(t))return g&&m.log(Vn),s;const o={event_id:s,...n};return this._process(this.eventFromException(t,o).then(i=>this._captureEvent(i,o,r))),o.event_id}captureMessage(t,n,r,s){const o={event_id:M(),...r},i=Kt(t)?t:String(t),a=Jt(t)?this.eventFromMessage(i,n,o):this.eventFromException(t,o);return this._process(a.then(c=>this._captureEvent(c,o,s))),o.event_id}captureEvent(t,n,r){const s=M();if(n?.originalException&&In(n.originalException))return g&&m.log(Vn),s;const o={event_id:s,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope;return this._process(this._captureEvent(t,o,a||r,c)),o.event_id}captureSession(t){this.sendSession(t),Ie(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;
9return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s))):me(!0)}close(t){return this.flush(t).then(n=>(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){const n=this._integrations[t.name];is(this,t,this._integrations),n||Wn(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=hi(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])r=ai(r,fi(o));const s=this.sendEnvelope(r);s&&s.then(o=>this.emit("afterSendEvent",t,o),null)}sendSession(t){const{release:n,environment:r=on}=this._options;if("aggregates"in t){const o=t.attrs||{};if(!o.release&&!n){g&&m.warn(Yn);return}o.release=o.release||n,o.environment=o.environment||r,t.attrs=o}else{if(!t.release&&!n){g&&m.warn(Yn);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const s=gi(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const s=`${t}:${n}`;g&&m.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const s=r.indexOf(n);s>-1&&r.splice(s,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(g&&m.error("Error while sending envelope:",n),n)):(g&&m.error("Transport disabled"),me({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=sa(this,t),Wn(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",s=!1;const o=n.exception?.values;if(o){s=!0;for(const c of o)if(c.mechanism?.handled===!1){r=!0;break}}const i=t.status==="ok";(i&&t.errors===0||i&&r)&&(Ie(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new ne(n=>{let r=0;const s=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),n(!0)):(r+=s,t&&r>=t&&(clearInterval(o),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s){const o=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i?.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),Hi(o,t,n,r,this,s).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:ko(r),...a.contexts};const c=zr(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=A(),s=Y()){return g&&Ft(t)&&m.log(`Captured error event \`${as(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,s).then(o=>o.event_id,o=>{g&&(Kn(o)?m.log(o.message):zn(o)?m.warn(o.message):m.warn(o))})}_processEvent(t,n,r,s){const o=this.getOptions(),{sampleRate:i}=o,a=ds(t),c=Ft(t),u=t.type||"error",f=`before send for type \`${u}\``,d=typeof i>"u"?void 0:Fe(i);if(c&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error"),pt(vt(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));const p=u==="replay_event"?"replay":u;return this._prepareEvent(t,n,r,s).then(l=>{if(l===null)throw this.recordDroppedEvent("event_processor",p),vt("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return l;const h=da(this,o,l,n);return ua(h,f)}).then(l=>{if(l===null){if(this.recordDroppedEvent("before_send",p),a){const j=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",j)}throw vt(`${f} returned \`null\`, will not send event.`)}const y=r.getSession()||s.getSession();if(c&&y&&this._updateSessionFromEvent(y,l),a){const v=l.sdkProcessingMetadata?.spanCountBeforeProcessing||0,j=l.spans?l.spans.length:0,se=v-j;se>0&&this.recordDroppedEvent("before_send","span",se)}const h=l.transaction_info;if(a&&h&&l.transaction!==t.transaction){const v="custom";l.transaction_info={...h,source:v}}return this.sendEvent(l,n),l}).then(null,l=>{throw Kn(l)||zn(l)?l:(this.captureException(l,{data:{__sentry__:!0},originalException:l}),it(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. 10Reason: ${l}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[s,o]=n.split(":");return{reason:s,category:o,quantity:r}})}_flushOutcomes(){g&&m.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){g&&m.log("No outcomes to send");return}if(!this._dsn){g&&m.log("No dsn provided, will not send outcomes");return}g&&m.log("Sending outcomes:",t);const n=oa(t,this._options.tunnel&&ze(this._dsn));this.sendEnvelope(n)}}function ua(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Ge(e))return e.then(r=>{if(!Le(r)&&r!==null)throw it(n);return r},r=>{throw it(`${t} rejected with ${r}`)});if(!Le(e)&&e!==null)throw it(n);return e}function da(e,t,n,r){const{beforeSend:s,beforeSendTransaction:o,beforeSendSpan:i}=t;let a=n;if(Ft(a)&&s)return s(a,r);if(ds(a)){if(i){const c=i(ia(a));if(c?a=Ve(n,aa(c)):$t(),a.spans){const u=[];for(const f of a.spans){const d=i(f);d?u.push(d):($t(),u.push(f))}a.spans=u}}if(o){if(a.spans){const c=a.spans.length;a.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return o(a,r)}}return a}function Ft(e){return e.type===void 0}function ds(e){return e.type==="transaction"}function fa(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function pa(e,t,n,r){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=ze(r)),Oe(s,[fa(e)])}function At(e,t){const n=la(e)??[];if(n.length===0)return;const r=e.getOptions(),s=pa(n,r._metadata,r.tunnel,e.getDsn());fs().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(s)}function la(e){return fs().get(e)}function fs(){return Be("clientToLogBufferMap",()=>new WeakMap)}function ma(e,t){t.debug===!0&&(g?m.enable():re(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),A().update(t.initialScope);const r=new e(t);return ga(r),r.init(),r}function ga(e){A().setClient(e)}const ps=Symbol.for("SentryBufferFullError");function ha(e){const t=[];function n(){return e===void 0||t.length<e}function r(i){return t.splice(t.indexOf(i),1)[0]||Promise.resolve(void 0)}function s(i){if(!n())return pt(ps);const a=i();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function o(i){return new ne((a,c)=>{let u=t.length;if(!u)return a(!0);const f=setTimeout(()=>{i&&i>0&&a(!1)},i);t.forEach(d=>{me(d).then(()=>{--u||(clearTimeout(f),a(!0))},c)})})}return{$:t,add:s,drain:o}}const _a=60*1e3;function Sa(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?_a:r-t}function ya(e,t){return e[t]||e.all||0}function Ea(e,t,n=Date.now()){return ya(e,t)>n}function ba(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},o=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(o)for(const a of o.trim().split(",")){const[c,u,,,f]=a.split(":",5),d=parseInt(c,10),p=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+p;else for(const l of u.split(";"))l==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(s[l]=r+p):s[l]=r+p}else i?s.all=r+Sa(i,r):t===429&&(s.all=r+60*1e3);return s}const Ta=64;function Ia(e,t,n=ha(e.bufferSize||Ta)){let r={};const s=i=>n.drain(i);function o(i){const a=[];if(xn(i,(d,p)=>{const l=Cn(p);Ea(r,l)?e.recordDroppedEvent("ratelimit_backoff",l):a.push(d)}),a.length===0)return me({});const c=Oe(i[0],a),u=d=>{xn(c,(p,l)=>{e.recordDroppedEvent(d,Cn(l))})},f=()=>t({body:ci(c)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&g&&m.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=ba(r,d),d),d=>{throw u("network_error"),g&&m.error("Encountered error running transport request:",d),d});return n.add(f).then(d=>d,d=>{if(d===ps)return g&&m.error("Skipped sending event because buffer is full."),u("queue_overflow"),me({});throw d})}return{send:o,flush:s}}function yd(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return va(e,n)||Ra(e,r)}function Ra(e,t){return t?Jn(e)===Jn(t):!1}function va(e,t){return t?e.includes(t.host):!1}function Jn(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function Aa(e){e.user?.ip_address===void 0&&(e.user={...e.user,ip_address:"{{auto}}"})}function Na(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 ls(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:ce})),version:ce}),e._metadata=s}function ms(e={}
10){const t=e.client||T();if(!Ji()||!t)return{};const n=he(),r=ke(n);if(r.getTraceData)return r.getTraceData(e);const s=e.scope||A(),o=e.span||z(),i=o?Go(o):wa(s),a=o?ee(o):zr(t,s),c=Lo(a);return Hr.test(i)?{"sentry-trace":i,baggage:c}:(m.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function wa(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Ur(t,r,n)}function Ed(e,t,n){let r,s,o;const i=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=e(),r}function u(){s!==void 0&&clearTimeout(s),o!==void 0&&clearTimeout(o),s=o=void 0}function f(){return s!==void 0||o!==void 0?c():r}function d(){return s&&clearTimeout(s),s=a(c,t),i&&o===void 0&&(o=a(c,i)),r}return d.cancel=u,d.flush=f,d}const ka=100;function ge(e,t){const n=T(),r=Y();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=ka}=n.getOptions();if(o<=0)return;const a={timestamp:_e(),...e},c=s?re(()=>s(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,o))}let Xn;const Oa="FunctionToString",Zn=new WeakMap,xa=(()=>({name:Oa,setupOnce(){Xn=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Zt(this),n=Zn.has(T())&&t!==void 0?t:this;return Xn.apply(n,e)}}catch{}},setup(e){Zn.set(e,!0)}})),Ca=xa,Pa=[/^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$/],$a="EventFilters",Da=(e={})=>{let t;return{name:$a,setup(n){const r=n.getOptions();t=Qn(e,r)},processEvent(n,r,s){if(!t){const o=s.getOptions();t=Qn(e,o)}return Ma(n,t)?null:n}}},La=((e={})=>({...Da(e),name:"InboundFilters"}));function Qn(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Pa],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Ma(e,t){if(e.type){if(e.type==="transaction"&&Ha(e,t.ignoreTransactions))return g&&m.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. 11Event: ${ae(e)}`),!0}else{if(Fa(e,t.ignoreErrors))return g&&m.warn(`Event dropped due to being matched by \`ignoreErrors\` option. 12Event: ${ae(e)}`),!0;if(qa(e))return g&&m.warn(`Event dropped due to not having an error message, error type or stacktrace. 13Event: ${ae(e)}`),!0;if(Ua(e,t.denyUrls))return g&&m.warn(`Event dropped due to being matched by \`denyUrls\` option. 14Event: ${ae(e)}. 15Url: ${lt(e)}`),!0;if(!Ba(e,t.allowUrls))return g&&m.warn(`Event dropped due to not being matched by \`allowUrls\` option. 16Event: ${ae(e)}. 17Url: ${lt(e)}`),!0}return!1}function Fa(e,t){return t?.length?as(e).some(n=>de(n,t)):!1}function Ha(e,t){if(!t?.length)return!1;const n=e.transaction;return n?de(n,t):!1}function Ua(e,t){if(!t?.length)return!1;const n=lt(e);return n?de(n,t):!1}function Ba(e,t){if(!t?.length)return!0;const n=lt(e);return n?de(n,t):!0}function ja(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function lt(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?ja(n):null}catch{return g&&m.error(`Cannot extract url for event ${ae(e)}`),null}}function qa(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function Ga(e,t,n,r,s,o){if(!s.exception?.values||!o||!W(o.originalException,Error))return;const i=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;i&&(s.exception.values=Ht(e,t,r,o.originalException,n,s.exception.values,i,0
17))}function Ht(e,t,n,r,s,o,i,a){if(o.length>=n+1)return o;let c=[...o];if(W(r[s],Error)){er(i,a);const u=e(t,r[s]),f=c.length;tr(u,s,f,a),c=Ht(e,t,n,r[s],s,[u,...c],u,f)}return Array.isArray(r.errors)&&r.errors.forEach((u,f)=>{if(W(u,Error)){er(i,a);const d=e(t,u),p=c.length;tr(d,`errors[${f}]`,p,a),c=Ht(e,t,n,u,s,[d,...c],d,p)}}),c}function er(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function tr(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Wa(e){const t="console";je(t,e),qe(t,Va)}function Va(){"console"in E&&Ys.forEach(function(e){e in E.console&&G(E.console,e,function(t){return at[e]=t,function(...n){ue("console",{args:n,level:e}),at[e]?.apply(E.console,n)}})})}function Ya(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const za="Dedupe",Ka=(()=>{let e;return{name:za,processEvent(t){if(t.type)return t;try{if(Xa(t,e))return g&&m.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),Ja=Ka;function Xa(e,t){return t?!!(Za(e,t)||Qa(e,t)):!1}function Za(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!hs(e,t)||!gs(e,t))}function Qa(e,t){const n=nr(t),r=nr(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!hs(e,t)||!gs(e,t))}function gs(e,t){let n=_n(e),r=_n(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const o=r[s],i=n[s];if(o.filename!==i.filename||o.lineno!==i.lineno||o.colno!==i.colno||o.function!==i.function)return!1}return!0}function hs(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 nr(e){return e.exception?.values?.[0]}const ec="thismessage:/";function _s(e){return"isRelative"in e}function Ss(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?ec:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const s=new URL(e,r);return n?{isRelative:n,pathname:s.pathname,search:s.search,hash:s.hash}:s}catch{}}function tc(e){if(_s(e))return e.pathname;const 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{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const 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 nc(e){return e.split(/[?#]/,1)[0]}function rc(e,t,n,r,s="auto.http.browser"){if(!e.fetchData)return;const{method:o,url:i}=e.fetchData,a=V()&&t(i);if(e.endTimestamp&&a){const d=e.fetchData.__span;if(!d)return;const p=r[d];p&&(oc(p,e),delete r[d]);return}const c=!!z(),u=a&&c?Ae(ac(i,o,s)):new te;if(e.fetchData.__span=u.spanContext().spanId,r[u.spanContext().spanId]=u,n(e.fetchData.url)){const d=e.args[0],p=e.args[1]||{},l=sc(d,p,V()&&c?u:void 0);l&&(e.args[1]=p,p.headers=l)}const f=T();if(f){const d={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};f.emit("beforeOutgoingRequestSpan",u,d)}return u}function sc(e,t,n){const r=ms({span:n}),s=r["sentry-trace"],o=r.baggage;if(!s)return;const i=t.headers||(vr(e)?e.headers:void 0);if(i)if(ic(i)){const a=new Headers(i);if(a.get("sentry-trace")||a.set("sentry-trace",s),o){const c=a.get("baggage");c?et(c)||a.set("baggage",`${c},${o}`):a.set("baggage",o)}return a}else if(Array.isArray(i)){const a=[...i];i.find(u=>u[0]==="sentry-trace")||a.push(["sentry-trace",s]);const c=i.find(u=>u[0]==="baggage"&&et(u[1]));return o&&!c&&a.push(["baggage",o]),a}else{const a="sentry-trace"in i?i["sentry-trace"]:void 0,c="baggage"in i?i.baggage:void 0,u=c?Array.isArray(c)?[...c]:[c]:[],f=c&&(Array.isArray(c)?c.find(d=>et(d)):et(c));return o&&!f&&u.push(o),{...i,"sentry-trace":a??s,baggage:u.length>0?u.join(","):void 0}}else return{...r}}function oc(e,t){if(t.response){Dr(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:N,message:"internal_error"});e.end()}function et(e){return e.split(",").some(t=>t.trim().startsWith(rn))}function ic(e){return typeof Headers<"u"&&W(e,Headers)}function ac(e,t,n){const r=Ss(e);return{name:r?`${t} ${tc(r)}`:t,attributes:cc(e,r,t,n)}}function cc(e,t,n,r){const s={url:e,type:"fetch","http.method":n,[H]:r,[Me]:"http.client"};return t&&(_s(t)||(s["http.url"]=t.href,s["server.address"]=t.host),t.search&&(s["http.query"]=t.search),t.hash&&(s["http.fragment"]=t.hash)),s}function ys(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const He=E;function bd(){return"history"in He&&!!He.history}function uc(){if(!("fetch"in He))return!1;
17try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function rr(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function dc(){if(typeof EdgeRuntime=="string")return!0;if(!uc())return!1;if(rr(He.fetch))return!0;let e=!1;const t=He.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=rr(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){g&&m.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Es(e,t){const n="fetch";je(n,e),qe(n,()=>bs(void 0,t))}function fc(e){const t="fetch-body-resolved";je(t,e),qe(t,()=>bs(lc))}function bs(e,t=!1){t&&!dc()||G(E,"fetch",function(n){return function(...r){const s=new Error,{method:o,url:i}=mc(r),a={args:r,fetchData:{method:o,url:i},startTimestamp:P()*1e3,virtualError:s,headers:gc(r)};return e||ue("fetch",{...a}),n.apply(E,r).then(async c=>(e?e(c):ue("fetch",{...a,endTimestamp:P()*1e3,response:c}),c),c=>{if(ue("fetch",{...a,endTimestamp:P()*1e3,error:c}),zt(c)&&c.stack===void 0&&(c.stack=s.stack,F(c,"framesToPop",1)),c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const u=new URL(a.fetchData.url);c.message=`${c.message} (${u.host})`}catch{}throw c})}})}async function pc(e,t){if(e?.body){const n=e.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let o=!0;for(;o;){let i;try{i=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(i),a&&(t(),o=!1)}catch{o=!1}finally{clearTimeout(i)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function lc(e){let t;try{t=e.clone()}catch{return}pc(t,()=>{ue("fetch-body-resolved",{endTimestamp:P()*1e3,response:e})})}function Ut(e,t){return!!e&&typeof e=="object"&&!!e[t]}function sr(e){return typeof e=="string"?e:e?Ut(e,"url")?e.url:e.toString?e.toString():"":""}function mc(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:sr(n),method:Ut(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:sr(t),method:Ut(t,"method")?String(t.method).toUpperCase():"GET"}}function gc(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(vr(t))return new Headers(t.headers)}catch{}}function hc(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function _c(){return"npm"}function Sc(){return!hc()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Td(){return typeof window<"u"&&(!Sc()||yc())}function yc(){return E.process?.type==="renderer"}const _=E;let Bt=0;function Ts(){return Bt>0}function Ec(){Bt++,setTimeout(()=>{Bt--})}function Ne(e,t={}){function n(s){return typeof s=="function"}if(!n(e))return e;try{const s=e.__sentry_wrapped__;if(s)return typeof s=="function"?s:e;if(Zt(e))return e}catch{return e}const r=function(...s){try{const o=s.map(i=>Ne(i,t));return e.apply(this,o)}catch(o){throw Ec(),ht(i=>{i.addEventProcessor(a=>(t.mechanism&&(xt(a,void 0),Te(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),cn(o)}),o}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}Nr(r,e),F(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function un(){const e=We(),{referrer:t}=_.document||{},{userAgent:n}=_.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}function dn(e,t){const n=fn(e,t),r={type:vc(t),value:Ac(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function bc(e,t,n,r){const o=T()?.getOptions().normalizeDepth,i=xc(t),a={__serialized__:Kr(t,o)};if(i)return{exception:{values:[dn(e,i)]},extra:a};const c={exception:{values:[{type:gt(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:kc(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=fn(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function Nt(e,t){return{exception:{values:[dn(e,t)]}}}function fn(e,t){const n=t.stacktrace||t.stack||"",r=Ic(t),s=Rc(t);try{return e(n,r,s)}catch{}return[]}const Tc=/Minified React error #\d+;/i;function Ic(e){return e&&Tc.test(e.message)?1:0}function Rc(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Is(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function vc(e){const t=e?.name;return!t&&Is(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Ac(e){const t=e?.message;return Is(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Nc(e,t,n,r){const s=n?.syntheticException||void 0,o=pn(e,t,s,r);return Te(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),me(o)}function wc(e,t,n="info",r,s){const o=r?.syntheticException||void 0,i=jt(e,t,o,s);return i.level=n,r?.event_id&&(i.event_id=r.event_id),me(i)}
17function pn(e,t,n,r,s){let o;if(Ir(t)&&t.error)return Nt(e,t.error);if(yn(t)||so(t)){const i=t;if("stack"in t)o=Nt(e,t);else{const a=i.name||(yn(i)?"DOMError":"DOMException"),c=i.message?`${a}: ${i.message}`:a;o=jt(e,c,n,r),xt(o,c)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return zt(t)?Nt(e,t):Le(t)||gt(t)?(o=bc(e,t,n,s),Te(o,{synthetic:!0}),o):(o=jt(e,t,n,r),xt(o,`${t}`),Te(o,{synthetic:!0}),o)}function jt(e,t,n,r){const s={};if(r&&n){const o=fn(e,n);o.length&&(s.exception={values:[{value:t,stacktrace:{frames:o}}]}),Te(s,{synthetic:!0})}if(Kt(t)){const{__sentry_template_string__:o,__sentry_template_values__:i}=t;return s.logentry={message:o,params:i},s}return s.message=t,s}function kc(e,{isUnhandledRejection:t}){const n=lo(e),r=t?"promise rejection":"exception";return Ir(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:gt(e)?`Event \`${Oc(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Oc(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function xc(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}const Cc=5e3;class Pc extends ca{constructor(t){const n=$c(t),r=_.SENTRY_SDK_SOURCE||_c();ls(n,"browser",["browser"],r),super(n);const{sendDefaultPii:s,sendClientReports:o,enableLogs:i,_experiments:a}=this._options,c=i??a?.enableLogs;_.document&&(o||c)&&_.document.addEventListener("visibilitychange",()=>{_.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),c&&At(this))}),c&&(this.on("flush",()=>{At(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{At(this)},Cc)})),s&&(this.on("postprocessEvent",Aa),this.on("beforeSendSession",Na))}eventFromException(t,n){return Nc(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return wc(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,s){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,s)}}function $c(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:_.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}function Dc(e,t=Ds("fetch")){let n=0,r=0;function s(o){const i=o.body.length;n+=i,r++;const a={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return mn("fetch"),pt("No fetch implementation available");try{return t(e.url,a).then(c=>(n-=i,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return mn("fetch"),n-=i,r--,pt(c)}}return Ia(e,s)}const Lc=30,Mc=50;function qt(e,t,n,r){const s={filename:e,function:t==="<anonymous>"?le:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Fc=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Hc=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Uc=/\((\S*)(?::(\d+))(?::(\d+))\)/,Bc=e=>{const t=Fc.exec(e);if(t){const[,r,s,o]=t;return qt(r,le,+s,+o)}const n=Hc.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const i=Uc.exec(n[2]);i&&(n[2]=i[1],n[3]=i[2],n[4]=i[3])}const[s,o]=Rs(n[1]||le,n[2]);return qt(o,s,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},jc=[Lc,Bc],qc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Gc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Wc=e=>{const t=qc.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const o=Gc.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],s=t[1]||le;return[s,r]=Rs(s,r),qt(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Vc=[Mc,Wc],Yc=[jc,Vc],zc=yr(...Yc),Rs=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:le,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},L=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,tt=1024,Kc="Breadcrumbs",Jc=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Kc,setup(n){t.console&&Wa(eu(n)),t.dom&&Ls(Qc(n,t.dom)),t.xhr&&gr(tu(n)),t.fetch&&Es(nu(n)),t.history&&Wt(ru(n)),t.sentry&&n.on("beforeSendEvent",Zc(n))}}}),Xc=Jc;function Zc(e){return function(n){T()===e&&ge({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:ae(n)},{event:n})}}function Qc(e,t){return function(r){if(T()!==e)return;let s,o,i=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>tt&&(L&&m.warn(`\`dom.maxStringLength\` cannot exceed ${tt}, but a value of ${a} was configured. Sentry will use ${tt} instead.`),a=tt),typeof i=="string"&&(i=[i]);try{const u=r.event,f=su(u)?u.target:u;s=Ar(f,{keyAttrs:i,maxStringLength:a}),o=fo(f)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};o&&(c.data={"ui.component_name":o}),ge(c,{event:r.event,name:r.name,global:r.global})}}function eu(e){return function(n){if(T()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Ya(n.level),message:En(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${En(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;ge(r,{input:n.args,level:n.level})}}function tu(e){return function(n){if(T()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,o=n.xhr[hr];if(!r||!s||!o)return;const{method:i,url:a,status_code:c,body:u}=o,f={method:i,url:a,status_code:c},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},p={category:"xhr",data:f,type:"http",level:ys(c)};e.emit("beforeOutgoingRequestBreadcrumb",p,d),ge(p,d)}}function nu(e){return function(n){if(T()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;
17if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const o=n.fetchData,i={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s},a={category:"fetch",data:o,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,i),ge(a,i)}else{const o=n.response,i={...n.fetchData,status_code:o?.status};n.fetchData.request_body_size,n.fetchData.response_body_size,o?.status;const a={input:n.args,response:o,startTimestamp:r,endTimestamp:s},c={category:"fetch",data:i,type:"http",level:ys(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),ge(c,a)}}}function ru(e){return function(n){if(T()!==e)return;let r=n.from,s=n.to;const o=be(_.location.href);let i=r?be(r):void 0;const a=be(s);i?.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(s=a.relative),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),ge({category:"navigation",data:{from:r,to:s}})}}function su(e){return!!e&&!!e.target}const ou=["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"],iu="BrowserApiErrors",au=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:iu,setupOnce(){t.setTimeout&&G(_,"setTimeout",or),t.setInterval&&G(_,"setInterval",or),t.requestAnimationFrame&&G(_,"requestAnimationFrame",uu),t.XMLHttpRequest&&"XMLHttpRequest"in _&&G(XMLHttpRequest.prototype,"send",du);const n=t.eventTarget;n&&(Array.isArray(n)?n:ou).forEach(s=>fu(s,t))}}}),cu=au;function or(e){return function(...t){const n=t[0];return t[0]=Ne(n,{mechanism:{data:{function:Z(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function uu(e){return function(t){return e.apply(this,[Ne(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Z(e)},handled:!1,type:"instrument"}})])}}function du(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&G(n,s,function(o){const i={mechanism:{data:{function:s,handler:Z(o)},handled:!1,type:"instrument"}},a=Zt(o);return a&&(i.mechanism.data.handler=Z(a)),Ne(o,i)})}),e.apply(this,t)}}function fu(e,t){const r=_[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(G(r,"addEventListener",function(s){return function(o,i,a){try{pu(i)&&(i.handleEvent=Ne(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Z(i),target:e},handled:!1,type:"instrument"}}))}catch{}return t.unregisterOriginalCallbacks&&lu(this,o,i),s.apply(this,[o,Ne(i,{mechanism:{data:{function:"addEventListener",handler:Z(i),target:e},handled:!1,type:"instrument"}}),a])}}),G(r,"removeEventListener",function(s){return function(o,i,a){try{const c=i.__sentry_wrapped__;c&&s.call(this,o,c,a)}catch{}return s.call(this,o,i,a)}}))}function pu(e){return typeof e.handleEvent=="function"}function lu(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const mu=()=>({name:"BrowserSession",setupOnce(){if(typeof _.document>"u"){L&&m.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}jn({ignoreDuration:!0}),qn(),Wt(({from:e,to:t})=>{e!==void 0&&e!==t&&(jn({ignoreDuration:!0}),qn())})}}),gu="GlobalHandlers",hu=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:gu,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Su(n),ir("onerror")),t.onunhandledrejection&&(yu(n),ir("onunhandledrejection"))}}}),_u=hu;function Su(e){Er(t=>{const{stackParser:n,attachStacktrace:r}=vs();if(T()!==e||Ts())return;const{msg:s,url:o,line:i,column:a,error:c}=t,u=Tu(pn(n,c||s,void 0,r,!1),o,i,a);u.level="error",rs(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function yu(e){br(t=>{const{stackParser:n,attachStacktrace:r}=vs();if(T()!==e||Ts())return;const s=Eu(t),o=Jt(s)?bu(s):pn(n,s,void 0,r,!0);o.level="error",rs(o,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Eu(e){if(Jt(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 bu(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Tu(e,t,n,r){const s=e.exception=e.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[],u=r,f=n,d=De(t)&&t.length>0?t:We();
17return c.length===0&&c.push({colno:u,filename:d,function:le,in_app:!0,lineno:f}),e}function ir(e){L&&m.log(`Global Handler attached: ${e}`)}function vs(){return T()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Iu=()=>({name:"HttpContext",preprocessEvent(e){if(!_.navigator&&!_.location&&!_.document)return;const t=un(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),Ru="cause",vu=5,Au="LinkedErrors",Nu=((e={})=>{const t=e.limit||vu,n=e.key||Ru;return{name:Au,preprocessEvent(r,s,o){const i=o.getOptions();Ga(dn,i.stackParser,n,t,r,s)}}}),wu=Nu;function ku(){return Ou()?(L&&re(()=>{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 Ou(){if(typeof _.window>"u")return!1;const e=_;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=We(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(_===_.top&&r.some(o=>n.startsWith(`${o}://`)))}function As(e){return[La(),Ca(),cu(),Xc(),_u(),wu(),Ja(),Iu(),mu()]}function xu(e={}){const t=!e.skipBrowserExtensionCheck&&ku(),n={...e,enabled:t?!1:e.enabled,stackParser:eo(e.stackParser||zc),integrations:ra({integrations:e.integrations,defaultIntegrations:e.defaultIntegrations==null?As():e.defaultIntegrations}),transport:e.transport||Dc};return ma(Pc,n)}function U(e=0){return((Qt()||performance.timeOrigin)+e)/1e3}function Cu(e){const t=[];if(e.nextHopProtocol!=null){const{name:n,version:r}=Ms(e.nextHopProtocol);t.push(["network.protocol.version",r],["network.protocol.name",n])}return Qt()?[...t,["http.request.redirect_start",U(e.redirectStart)],["http.request.fetch_start",U(e.fetchStart)],["http.request.domain_lookup_start",U(e.domainLookupStart)],["http.request.domain_lookup_end",U(e.domainLookupEnd)],["http.request.connect_start",U(e.connectStart)],["http.request.secure_connection_start",U(e.secureConnectionStart)],["http.request.connection_end",U(e.connectEnd)],["http.request.request_start",U(e.requestStart)],["http.request.response_start",U(e.responseStart)],["http.request.response_end",U(e.responseEnd)]]:t}const ar=new WeakMap,wt=new Map,Ns={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Pu(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:o,enableHTTPTimings:i,tracePropagationTargets:a,onRequestSpanStart:c}={...Ns,...t},u=typeof o=="function"?o:p=>!0,f=p=>Du(p,a),d={};n&&(e.addEventProcessor(p=>(p.type==="transaction"&&p.spans&&p.spans.forEach(l=>{if(l.op==="http.client"){const y=wt.get(l.span_id);y&&(l.timestamp=y/1e3,wt.delete(l.span_id))}}),p)),s&&fc(p=>{if(p.response){const l=ar.get(p.response);l&&p.endTimestamp&&wt.set(l,p.endTimestamp)}}),Es(p=>{const l=rc(p,u,f,d);if(p.response&&p.fetchData.__span&&ar.set(p.response,p.fetchData.__span),l){const y=ws(p.fetchData.url),h=y?be(y).host:void 0;l.setAttributes({"http.url":y,"server.address":h}),i&&cr(l),c?.(l,{headers:p.headers})}})),r&&gr(p=>{const l=Lu(p,u,f,d);if(l){i&&cr(l);let y;try{y=new Headers(p.xhr.__sentry_xhr_v3__?.request_headers)}catch{}c?.(l,{headers:y})}})}function $u(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function cr(e){const{url:t}=R(e).data;if(!t||typeof t!="string")return;const n=Fs("resource",({entries:r})=>{r.forEach(s=>{$u(s)&&s.name.endsWith(t)&&(Cu(s).forEach(i=>e.setAttribute(...i)),setTimeout(n))})})}function Du(e,t){const n=We();if(n){let r,s;try{r=new URL(e,n),s=new URL(n).origin}catch{return!1}const o=r.origin===s;return t?de(r.toString(),t)||o&&de(r.pathname,t):o}else{const r=!!e.match(/^\/(?!\/)/);return t?de(e,t):r}}function Lu(e,t,n,r){const s=e.xhr,o=s?.[hr];if(!s||s.__sentry_own_request__||!o)return;const{url:i,method:a}=o,c=V()&&t(i);if(e.endTimestamp&&c){const h=s.__sentry_xhr_span_id__;if(!h)return;const v=r[h];v&&o.status_code!==void 0&&(Dr(v,o.status_code),v.end(),delete r[h]);return}const u=ws(i),f=be(u||i),d=nc(i),p=!!z(),l=c&&p?Ae({name:`${a} ${d}`,attributes:{url:i,type:"xhr","http.method":a,"http.url":u,"server.address":f?.host,[H]:"auto.http.browser",[Me]:"http.client",...f?.search&&{"http.query":f?.search},...f?.hash&&{"http.fragment":f?.hash}}}):new te;s.__sentry_xhr_span_id__=l.spanContext().spanId,r[s.__sentry_xhr_span_id__]=l,n(i)&&Mu(s,V()&&p?l:void 0);const y=T();return y&&y.emit("beforeOutgoingRequestSpan",l,e),l}function Mu(e,t){const{"sentry-trace":n,baggage:r}=ms({span:t});n&&Fu(e,n,r)}function Fu(e,t,n){const r=e.__sentry_xhr_v3__?.request_headers;if(!r?.["sentry-trace"])try{if(e.setRequestHeader("sentry-trace",t),n){const s=r?.baggage;(!s||!Hu(s))&&e.setRequestHeader("baggage",n)}}catch{}}function Hu(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function ws(e){try{return new URL(e,_.location.origin).href}catch{return}}function Uu(){_.document?_.document.addEventListener("visibilitychange",()=>{const e=z();if(!e)return;const t=$(e);
17if(_.document.hidden&&t){const n="cancelled",{op:r,status:s}=R(t);L&&m.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:N,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):L&&m.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const Bu=3600,ks="sentry_previous_trace",ju="sentry.previous_trace";function qu(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let s=r?Vu():void 0;e.on("spanStart",i=>{if($(i)!==i)return;const a=A().getPropagationContext();s=Gu(s,i,a),r&&Wu(s)});let o=!0;n&&e.on("beforeSampling",i=>{if(!s)return;const a=A(),c=a.getPropagationContext();if(o&&c.parentSpanId){o=!1;return}a.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(s.sampleRate),sampled:String(Gt(s.spanContext))},sampleRand:s.sampleRand}),i.parentSampled=Gt(s.spanContext),i.parentSampleRate=s.sampleRate,i.spanAttributes={...i.spanAttributes,[xr]:s.sampleRate}})}function Gu(e,t,n){const r=R(t);function s(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[en])}catch{return 0}}const o={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:s(),sampleRand:n.sampleRand};if(!e)return o;const i=e.spanContext;return i.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=Bu&&(L&&m.log(`Adding previous_trace ${i} link to span ${{op:r.op,...t.spanContext()}}`),t.addLink({context:i,attributes:{[Oo]:"previous_trace"}}),t.setAttribute(ju,`${i.traceId}-${i.spanId}-${Gt(i)?1:0}`)),o)}function Wu(e){try{_.sessionStorage.setItem(ks,JSON.stringify(e))}catch(t){L&&m.warn("Could not store previous trace in sessionStorage",t)}}function Vu(){try{const e=_.sessionStorage?.getItem(ks);return JSON.parse(e)}catch{return}}function Gt(e){return e.traceFlags===1}const Yu="BrowserTracing",zu={...ot,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{},...Ns},ur=((e={})=>{const t={name:void 0,source:void 0},n=_.document,{enableInp:r,enableElementTiming:s,enableLongTask:o,enableLongAnimationFrame:i,_experiments:{enableInteractions:a,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u},beforeStartSpan:f,idleTimeout:d,finalTimeout:p,childSpanTimeout:l,markBackgroundSpan:y,traceFetch:h,traceXHR:v,trackFetchStreamPerformance:j,shouldCreateSpanForRequest:se,enableHTTPTimings:St,ignoreResourceSpans:yt,ignorePerformanceApiSpans:Ke,instrumentPageLoad:S,instrumentNavigation:x,detectRedirects:ye,linkPreviousTrace:xe,consistentTraceSampling:Ee,onRequestSpanStart:oe}={...zu,...e};let w,ie;function K(I,k,b=!0){const O=k.op==="pageload",C=f?f(k):k,J=C.attributes||{};if(k.name!==C.name&&(J[D]="custom",C.attributes=J),!b){const Pe=_e();Ae({...C,startTime:Pe}).end(Pe);return}t.name=C.name,t.source=J[D];const X=ns(C,{idleTimeout:d,finalTimeout:p,childSpanTimeout:l,disableAutoFinish:O,beforeSpanEnd:Pe=>{w?.(),Vs(Pe,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:yt,ignorePerformanceApiSpans:Ke}),fr(I,void 0);const ln=A(),$s=ln.getPropagationContext();ln.setPropagationContext({...$s,traceId:X.spanContext().traceId,sampled:Se(X),dsc:ee(Pe)})}});fr(I,X);function Ce(){n&&["interactive","complete"].includes(n.readyState)&&I.emit("idleSpanEnableAutoFinish",X)}O&&n&&(n.addEventListener("readystatechange",()=>{Ce()}),Ce())}return{name:Yu,setup(I){if(zo(),w=Us({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:u||!1,client:I}),r&&Bs(),s&&js(),i&&E.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?qs():o&&Gs(),a&&Ws(),ye&&n){const b=()=>{ie=P()};addEventListener("click",b,{capture:!0}),addEventListener("keydown",b,{capture:!0,passive:!0})}function k(){const b=Ue(I);b&&!R(b).timestamp&&(L&&m.log(`[Tracing] Finishing current active span with op: ${R(b).op}`),b.setAttribute(dt,"cancelled"),b.end())}I.on("startNavigationSpan",(b,O)=>{if(T()!==I)return;if(O?.isRedirect){L&&m.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),K(I,{op:"navigation.redirect",...b},!1);return}k(),Y().setPropagationContext({traceId:Q(),sampleRand:Math.random()});const C=A();C.setPropagationContext({traceId:Q(),sampleRand:Math.random()}),C.setSDKProcessingMetadata({normalizedRequest:void 0}),K(I,{op:"navigation",...b})}),I.on("startPageLoadSpan",(b,O={})=>
17{if(T()!==I)return;k();const C=O.sentryTrace||dr("sentry-trace"),J=O.baggage||dr("baggage"),X=Uo(C,J),Ce=A();Ce.setPropagationContext(X),Ce.setSDKProcessingMetadata({normalizedRequest:un()}),K(I,{op:"pageload",...b})})},afterAllSetup(I){let k=We();if(xe!=="off"&&qu(I,{linkPreviousTrace:xe,consistentTraceSampling:Ee}),_.location){if(S){const b=Qt();Ku(I,{name:_.location.pathname,startTime:b?b/1e3:void 0,attributes:{[D]:"url",[H]:"auto.pageload.browser"}})}x&&Wt(({to:b,from:O})=>{if(O===void 0&&k?.indexOf(b)!==-1){k=void 0;return}k=void 0;const C=Ss(b),J=Ue(I),X=J&&ye&&Xu(J,ie);Os(I,{name:C?.pathname||_.location.pathname,attributes:{[D]:"url",[H]:"auto.navigation.browser"}},{url:b,isRedirect:X})})}y&&Uu(),a&&Ju(I,d,p,l,t),r&&Hs(),Pu(I,{traceFetch:h,traceXHR:v,trackFetchStreamPerformance:j,tracePropagationTargets:I.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:se,enableHTTPTimings:St,onRequestSpanStart:oe})}}});function Ku(e,t,n){e.emit("startPageLoadSpan",t,n),A().setTransactionName(t.name);const r=Ue(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function Os(e,t,n){const{url:r,isRedirect:s}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:s}),e.emit("startNavigationSpan",t,{isRedirect:s});const o=A();return o.setTransactionName(t.name),r&&!s&&o.setSDKProcessingMetadata({normalizedRequest:{...un(),url:r}}),Ue(e)}function dr(e){return _.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function Ju(e,t,n,r,s){const o=_.document;let i;const a=()=>{const c="ui.action.click",u=Ue(e);if(u){const f=R(u).op;if(["navigation","pageload"].includes(f)){L&&m.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(i&&(i.setAttribute(dt,"interactionInterrupted"),i.end(),i=void 0),!s.name){L&&m.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}i=ns({name:s.name,op:c,attributes:{[D]:s.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};o&&addEventListener("click",a,{capture:!0})}const xs="_sentry_idleSpan";function Ue(e){return e[xs]}function fr(e,t){F(e,xs,t)}const pr=.3;function Xu(e,t){const n=R(e),r=_e(),s=n.start_timestamp;return!(r-s>pr||t&&r-t<=pr)}const Cs=["activate","mount"],Ps=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Zu=/(?:^|[-_])(\w)/g,Qu=e=>e.replace(Zu,t=>t.toUpperCase()).replace(/[-_]/g,""),ed="<Root>",kt="<Anonymous>",td=(e,t)=>e.repeat(t),$e=(e,t)=>{if(!e)return kt;if(e.$root===e)return ed;if(!e.$options)return kt;const n=e.$options;let r=n.name||n._componentTag||n.__name;const s=n.__file;if(!r&&s){const o=s.match(/([^/\\]+)\.vue$/);o&&(r=o[1])}return(r?`<${Qu(r)}>`:kt)+(s&&t!==!1?` at ${s}`:"")},nd=e=>{if(e&&(e._isVue||e.__isVue)&&e.$parent){const t=[];let n=0;for(;e;){if(t.length>0){const s=t[t.length-1];if(s.constructor===e.constructor){n++,e=e.$parent;continue}else n>0&&(t[t.length-1]=[s,n],n=0)}t.push(e),e=e.$parent}return` 18 19found in 20 21${t.map((s,o)=>`${(o===0?"---> ":td(" ",5+o*2))+(Array.isArray(s)?`${$e(s[0])}... (${s[1]} recursive calls)`:$e(s))}`).join(` 22`)}`}return` 23 24(found in ${$e(e)})`},rd=(e,t)=>{const{errorHandler:n}=e.config;e.config.errorHandler=(r,s,o)=>{const i=$e(s,!1),a=s?nd(s):"",c={componentName:i,lifecycleHook:o,trace:a};if(t.attachProps&&s&&(s.$options?.propsData?c.propsData=s.$options.propsData:s.$props&&(c.propsData=s.$props)),setTimeout(()=>{cn(r,{captureContext:{contexts:{vue:c}},mechanism:{handled:!!n,type:"vue"}})}),typeof n=="function"&&e.config.errorHandler)n.call(e,r,s,o);else throw r}},lr="ui.vue",sd={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function Ot(e,t,n){e.$_sentryRootComponentSpanTimer&&clearTimeout(e.$_sentryRootComponentSpanTimer),e.$_sentryRootComponentSpanTimer=setTimeout(()=>{e.$root?.$_sentryRootComponentSpan&&(e.$root.$_sentryRootComponentSpan.end(t),e.$root.$_sentryRootComponentSpan=void 0)},n)}function od(e,t){function n(s){return s.replace(/^<([^\s]*)>(?: at [^\s]*)?$/,"$1")}return e.some(s=>n(t)===n(s))}const id=(e={})=>{const t=(e.hooks||[]).concat(Cs).filter((s,o,i)=>i.indexOf(s)===o),n={},r=e.timeout||2e3;for(const s of t){const o=sd[s];if(!o){Ps&&m.warn(`Unknown hook: ${s}`);continue}for(const i of o)n[i]=function(){const a=this.$root===this;a&&(this.$_sentryRootComponentSpan=this.$_sentryRootComponentSpan||Ae({name:"Application Render",op:`${lr}.render`,attributes:{[H]:"auto.ui.vue"},onlyIfParent:!0}),Ot(this,P(),r));const c=$e(this,!1);if(!(a||(Array.isArray(e.trackComponents)?od(e.trackComponents,c):e.trackComponents))){Ot(this,P(),r);return}this.$_sentryComponentSpans=this.$_sentryComponentSpans||{};const f=i===o[0],d=this.$root?.$_sentryRootComponentSpan||z();if(f){if(d){const p=this.$_sentryComponentSpans[s];p&&p.end(),this.$_sentryComponentSpans[s]=Ae({name:`Vue ${c}`,op:`${lr}.${s}`,attributes:{[H]:"auto.ui.vue"},onlyIfParent:!0})}}else{const p=this.$_sentryComponentSpans[s];if(!p)return;p.end(),Ot(this,P(),r)}}}return n},ad=E,cd={Vue:ad.Vue,attachProps:!0,attachErrorHandler:!0,tracingOptions:{hooks:Cs,timeout:2e3,trackComponents:!1}},ud="Vue",dd=(e={})=>({name:ud,setup(t){const n={...cd,...t.getOptions(),...e};if(!n.Vue&&!n.app){re(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured. Update your `Sentry.init` call with an appropriate config option: `app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).")});return}
24n.app?(Array.isArray(n.app)?n.app:[n.app]).forEach(s=>mr(s,n)):n.Vue&&mr(n.Vue,n)}}),mr=(e,t)=>{Ps&&e._instance?.isMounted===!0&&re(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.")}),t.attachErrorHandler&&rd(e,t),V(t)&&e.mixin(id(t.tracingOptions))};function Id(e={}){const t={defaultIntegrations:[...As(),dd()],...e};return ls(t,"vue"),xu(t)}function fd(e,t,n){let r=!1;e.onError(s=>cn(s,{mechanism:{handled:!1}})),e.beforeEach((s,o,i)=>{const a=r?void 0:pd(),c={};for(const d of Object.keys(s.params))c[`url.path.parameter.${d}`]=s.params[d],c[`params.${d}`]=s.params[d];for(const d of Object.keys(s.query)){const p=s.query[d];p&&(c[`query.${d}`]=p)}let u=s.path,f="url";if(s.name&&t.routeLabel!=="path")u=s.name.toString(),f="custom";else if(s.matched.length>0){const d=s.matched.length-1;u=s.matched[d].path,f="route"}A().setTransactionName(u),t.instrumentPageLoad&&a&&(R(a).data[D]!=="custom"&&(a.updateName(u),a.setAttribute(D,f)),a.setAttributes({...c,[H]:"auto.pageload.vue"}),r=!0),t.instrumentNavigation&&!a&&n({name:u,op:"navigation",attributes:{...c,[H]:"auto.navigation.vue",[D]:f}}),i&&i()})}function pd(){const e=z(),t=e&&$(e);return t&&R(t).op==="pageload"?t:void 0}function Rd(e={}){if(!e.router)return ur(e);const t=ur({...e,instrumentNavigation:!1}),{router:n,instrumentNavigation:r=!0,instrumentPageLoad:s=!0,routeLabel:o="name"}=e;return{...t,afterAllSetup(i){t.afterAllSetup(i),fd(n,{routeLabel:o,instrumentNavigation:r,instrumentPageLoad:s},c=>{Os(i,c)})}}}export{P as $,We as A,$ as B,Jr as C,Ar as D,Id as E,Td as F,E as G,rr as H,Jt as I,Ea as J,yd as K,De as L,qe as M,q as N,Fe as O,be as P,Hi as Q,me as R,nn as S,_d as T,md as U,Ya as V,R as W,Ae as X,gd as Y,de as Z,bd as _,Cr as a,ue as a0,ba as a1,M as a2,Zr as a3,Pr as b,Me as c,H as d,D as e,ge as f,Sd as g,je as h,F as i,Qt as j,Rd as k,cn as l,hd as m,re as n,Oe as o,li as p,Ed as q,m as r,G as s,z as t,T as u,fo as v,A as w,ee as x,Z as y,Y as z};
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.