@prefabs.tech/vue3-config 0.32.0 → 0.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,28 +1,28 @@
1
- (function(V,$t){typeof exports=="object"&&typeof module<"u"?$t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],$t):(V=typeof globalThis<"u"?globalThis:V||self,$t(V.PrefabsTechVue3Config={},V.Vue))})(this,(function(V,$t){"use strict";const mo=(t,e)=>{if(t===void 0)return e;if(typeof t=="boolean")return t;switch(typeof e){case"boolean":return!!JSON.parse(t);case"number":return JSON.parse(t);default:return t}},g=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,b=globalThis,ct=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,_t="9.1.0";function St(){return he(b),b}function he(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||_t,e[_t]=e[_t]||{}}function ge(t,e,n=b){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[_t]=r[_t]||{};return s[t]||(s[t]=e())}const ho="Sentry Logger ",Je=["debug","info","warn","error","log","assert","trace"],_e={};function ut(t){if(!("console"in b))return t();const e=b.console,n={},r=Object.keys(_e);r.forEach(s=>{const o=_e[s];n[s]=e[s],e[s]=o});try{return t()}finally{r.forEach(s=>{e[s]=n[s]})}}function go(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return ct?Je.forEach(n=>{e[n]=(...r)=>{t&&ut(()=>{b.console[n](`${ho}[${n}]:`,...r)})}}):Je.forEach(n=>{e[n]=()=>{}}),e}const m=ge("logger",go),Jn=50,yt="?",Zn=/\(error: (.*)\)/,Qn=/captureMessage|captureException/;function tr(...t){const e=t.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=Zn.test(c)?c.replace(Zn,"$1"):c;if(!u.match(/\S*Error: /)){for(const f of e){const d=f(u);if(d){o.push(d);break}}if(o.length>=Jn+s)break}}return So(o.slice(s))}}function _o(t){return Array.isArray(t)?tr(...t):t}function So(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(Se(e).function||"")&&e.pop(),e.reverse(),Qn.test(Se(e).function||"")&&(e.pop(),Qn.test(Se(e).function||"")&&e.pop()),e.slice(0,Jn).map(n=>({...n,filename:n.filename||Se(e).filename,function:n.function||yt}))}function Se(t){return t[t.length-1]||{}}const Ze="<anonymous>";function J(t){try{return!t||typeof t!="function"?Ze:t.name||Ze}catch{return Ze}}function er(t){const e=t.exception;if(e){const n=[];try{return e.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const ye={},nr={};function dt(t,e){ye[t]=ye[t]||[],ye[t].push(e)}function ft(t,e){if(!nr[t]){nr[t]=!0;try{e()}catch(n){ct&&m.error(`Error while instrumenting ${t}`,n)}}}function B(t,e){const n=t&&ye[t];if(n)for(const r of n)try{r(e)}catch(s){ct&&m.error(`Error while triggering instrumentation handler.
3
- Type: ${t}
4
- Name: ${J(r)}
5
- Error:`,s)}}let Qe=null;function rr(t){const e="error";dt(e,t),ft(e,yo)}function yo(){Qe=b.onerror,b.onerror=function(t,e,n,r,s){return B("error",{column:r,error:s,line:n,msg:t,url:e}),Qe?Qe.apply(this,arguments):!1},b.onerror.__SENTRY_INSTRUMENTED__=!0}let tn=null;function sr(t){const e="unhandledrejection";dt(e,t),ft(e,Eo)}function Eo(){tn=b.onunhandledrejection,b.onunhandledrejection=function(t){return B("unhandledrejection",t),tn?tn.apply(this,arguments):!0},b.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const or=Object.prototype.toString;function en(t){switch(or.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Q(t,Error)}}function Lt(t,e){return or.call(t)===`[object ${e}]`}function ir(t){return Lt(t,"ErrorEvent")}function ar(t){return Lt(t,"DOMError")}function bo(t){return Lt(t,"DOMException")}function Z(t){return Lt(t,"String")}function nn(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function rn(t){return t===null||nn(t)||typeof t!="object"&&typeof t!="function"}function Mt(t){return Lt(t,"Object")}function Ee(t){return typeof Event<"u"&&Q(t,Event)}function To(t){return typeof Element<"u"&&Q(t,Element)}function Io(t){return Lt(t,"RegExp")}function be(t){return!!(t?.then&&typeof t.then=="function")}function vo(t){return Mt(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function Q(t,e){try{return t instanceof e}catch{return!1}}function cr(t){return!!(typeof t=="object"&&t!==null&&(t.__isVue||t._isVue))}const sn=b,Ro=80;function Et(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,s=[];let o=0,i=0;const a=" > ",c=a.length;let u;const f=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||Ro;for(;n&&o++<r&&(u=wo(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 wo(t,e){const n=t,r=[];if(!n?.tagName)return"";if(sn.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=e?.length?e.filter(i=>n.getAttribute(i)).map(i=>[i,n.getAttribute(i)]):null;if(s?.length)s.forEach(i=>{r.push(`[${i[0]}="${i[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const i=n.className;if(i&&Z(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 Jt(){try{return sn.document.location.href}catch{return""}}function ur(t){if(!sn.HTMLElement)return null;let e=t;const n=5;for(let r=0;r<n;r++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}function Ft(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function dr(t,e){if(!Array.isArray(t))return"";const n=[];for(let r=0;r<t.length;r++){const s=t[r];try{cr(s)?n.push("[VueViewModel]"):n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function No(t,e,n=!1){return Z(t)?Io(e)?e.test(t):Z(e)?n?t===e:t.includes(e):!1:!1}function bt(t,e=[],n=!1){return e.some(r=>No(t,r,n))}function H(t,e,n){if(!(e in t))return;const r=t[e],s=n(r);typeof s=="function"&&fr(s,r);try{t[e]=s}catch{ct&&m.log(`Failed to replace method "${e}" in object`,t)}}function U(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{ct&&m.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function fr(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,U(t,"__sentry_original__",e)}catch{}}function on(t){return t.__sentry_original__}function lr(t){if(en(t))return{message:t.message,name:t.name,stack:t.stack,...mr(t)};if(Ee(t)){const e={type:t.type,target:pr(t.target),currentTarget:pr(t.currentTarget),...mr(t)};return typeof CustomEvent<"u"&&Q(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function pr(t){try{return To(t)?Et(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}}function mr(t){if(typeof t=="object"&&t!==null){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function ko(t,e=40){const n=Object.keys(lr(t));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return Ft(r,e);for(let s=n.length;s>0;s--){const o=n.slice(0,s).join(", ");if(!(o.length>e))return s===n.length?o:Ft(o,e)}return""}function O(t){return an(t,new Map)}function an(t,e){if(Ao(t)){const n=e.get(t);if(n!==void 0)return n;const r={};e.set(t,r);for(const s of Object.getOwnPropertyNames(t))typeof t[s]<"u"&&(r[s]=an(t[s],e));return r}if(Array.isArray(t)){const n=e.get(t);if(n!==void 0)return n;const r=[];return e.set(t,r),t.forEach(s=>{r.push(an(s,e))}),r}return t}function Ao(t){if(!Mt(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||e==="Object"}catch{return!0}}const hr=1e3;function Zt(){return Date.now()/hr}function Co(){const{performance:t}=b;if(!t?.now)return Zt;const e=Date.now()-t.now(),n=t.timeOrigin==null?e:t.timeOrigin;return()=>(n+t.now())/hr}const D=Co();let cn;function Oo(){const{performance:t}=b;if(!t?.now)return[void 0,"none"];const e=3600*1e3,n=t.now(),r=Date.now(),s=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,o=s<e,i=t.timing?.navigationStart,c=typeof i=="number"?Math.abs(i+n-r):e,u=c<e;return o||u?s<=c?[t.timeOrigin,"timeOrigin"]:[i,"navigationStart"]:[r,"dateNow"]}function j(){return cn||(cn=Oo()),cn[0]}function q(){const t=b,e=t.crypto||t.msCrypto;let n=()=>Math.random()*16;try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,"");e?.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return e.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function gr(t){return t.exception?.values?.[0]}function lt(t){const{message:e,event_id:n}=t;if(e)return e;const r=gr(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function un(t,e,n){const r=t.exception=t.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=e||""),o.type||(o.type="Error")}function Ht(t,e){const n=gr(t);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...e},e&&"data"in e){const o={...s?.data,...e.data};n.mechanism.data=o}}function _r(t){if(Po(t))return!0;try{U(t,"__sentry_captured__",!0)}catch{}return!1}function Po(t){try{return t.__sentry_captured__}catch{}}var tt;(function(t){t[t.PENDING=0]="PENDING";const n=1;t[t.RESOLVED=n]="RESOLVED";const r=2;t[t.REJECTED=r]="REJECTED"})(tt||(tt={}));function Tt(t){return new pt(e=>{e(t)})}function Te(t){return new pt((e,n)=>{n(t)})}class pt{constructor(e){this._state=tt.PENDING,this._handlers=[],this._runExecutor(e)}then(e,n){return new pt((r,s)=>{this._handlers.push([!1,o=>{if(!e)r(o);else try{r(e(o))}catch(i){s(i)}},o=>{if(!n)s(o);else try{r(n(o))}catch(i){s(i)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new pt((n,r)=>{let s,o;return this.then(i=>{o=!1,s=i,e&&e()},i=>{o=!0,s=i,e&&e()}).then(()=>{if(o){r(s);return}n(s)})})}_executeHandlers(){if(this._state===tt.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===tt.RESOLVED&&n[1](this._value),this._state===tt.REJECTED&&n[2](this._value),n[0]=!0)})}_runExecutor(e){const n=(o,i)=>{if(this._state===tt.PENDING){if(be(i)){i.then(r,s);return}this._state=o,this._value=i,this._executeHandlers()}},r=o=>{n(tt.RESOLVED,o)},s=o=>{n(tt.REJECTED,o)};try{e(r,s)}catch(o){s(o)}}}function xo(t){const e=D(),n={sid:q(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>$o(n)};return t&&Ut(n,t),n}function Ut(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||D(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:q()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{const n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function Do(t,e){let n={};t.status==="ok"&&(n={status:"exited"}),Ut(t,n)}function $o(t){return O({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}function mt(){return q()}function Qt(){return q().substring(16)}function te(t,e,n=2){if(!e||typeof e!="object"||n<=0)return e;if(t&&Object.keys(e).length===0)return t;const r={...t};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=te(r[s],e[s],n-1));return r}const dn="_sentrySpan";function ee(t,e){e?U(t,dn,e):delete t[dn]}function Ie(t){return t[dn]}const Lo=100;class z{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:mt(),sampleRand:Math.random()}}clone(){const e=new z;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,ee(e,Ie(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Ut(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this._tags={...this._tags,[e]:n},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...this._extra,[e]:n},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts[e]=n,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const n=typeof e=="function"?e(this):e,r=n instanceof z?n.getScopeData():Mt(n)?e: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,ee(this,void 0),this._attachments=[],this.setPropagationContext({traceId:mt(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(e,n){const r=typeof n=="number"?n:Lo;if(r<=0)return this;const s={timestamp:Zt(),...e};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(e){return this._attachments.push(e),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:Ie(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=te(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){const r=n?.event_id||q();if(!this._client)return m.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:s,...n,event_id:r},this),r}captureMessage(e,n,r){const s=r?.event_id||q();if(!this._client)return m.warn("No client configured on scope - will not capture message!"),s;const o=new Error(e);return this._client.captureMessage(e,n,{originalException:e,syntheticException:o,...r,event_id:s},this),s}captureEvent(e,n){const r=n?.event_id||q();return this._client?(this._client.captureEvent(e,{...n,event_id:r},this),r):(m.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}function Mo(){return ge("defaultCurrentScope",()=>new z)}function Fo(){return ge("defaultIsolationScope",()=>new z)}class Ho{constructor(e,n){let r;e?r=e:r=new z;let s;n?s=n:s=new z,this._stack=[{scope:r}],this._isolationScope=s}withScope(e){const n=this._pushScope();let r;try{r=e(n)}catch(s){throw this._popScope(),s}return be(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 e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Bt(){const t=St(),e=he(t);return e.stack=e.stack||new Ho(Mo(),Fo())}function Uo(t){return Bt().withScope(t)}function Bo(t,e){const n=Bt();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function Sr(t){return Bt().withScope(()=>t(Bt().getIsolationScope()))}function jo(){return{withIsolationScope:Sr,withScope:Uo,withSetScope:Bo,withSetIsolationScope:(t,e)=>Sr(e),getCurrentScope:()=>Bt().getScope(),getIsolationScope:()=>Bt().getIsolationScope()}}function jt(t){const e=he(t);return e.acs?e.acs:jo()}function v(){const t=St();return jt(t).getCurrentScope()}function It(){const t=St();return jt(t).getIsolationScope()}function qo(){return ge("globalScope",()=>new z)}function fn(...t){const e=St(),n=jt(e);if(t.length===2){const[r,s]=t;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(t[0])}function T(){return v().getClient()}function Go(t){const e=t.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=e;return O({trace_id:n,span_id:s||Qt(),parent_span_id:r})}const G="sentry.source",yr="sentry.sample_rate",vt="sentry.op",R="sentry.origin",ln="sentry.idle_span_finish_reason",ve="sentry.measurement_unit",Re="sentry.measurement_value",Er="sentry.custom_span_name",pn="sentry.profile_id",ne="sentry.exclusive_time",Wo=0,br=1,P=2;function Vo(t){if(t<400&&t>=100)return{code:br};if(t>=400&&t<500)switch(t){case 401:return{code:P,message:"unauthenticated"};case 403:return{code:P,message:"permission_denied"};case 404:return{code:P,message:"not_found"};case 409:return{code:P,message:"already_exists"};case 413:return{code:P,message:"failed_precondition"};case 429:return{code:P,message:"resource_exhausted"};case 499:return{code:P,message:"cancelled"};default:return{code:P,message:"invalid_argument"}}if(t>=500&&t<600)switch(t){case 501:return{code:P,message:"unimplemented"};case 503:return{code:P,message:"unavailable"};case 504:return{code:P,message:"deadline_exceeded"};default:return{code:P,message:"internal_error"}}return{code:P,message:"unknown_error"}}function Tr(t,e){t.setAttribute("http.response.status_code",e);const n=Vo(e);n.message!=="unknown_error"&&t.setStatus(n)}const Ir="_sentryScope",vr="_sentryIsolationScope";function Yo(t,e,n){t&&(U(t,vr,n),U(t,Ir,e))}function we(t){return{scope:t[Ir],isolationScope:t[vr]}}function re(t){if(typeof t=="boolean")return Number(t);const e=typeof t=="string"?parseFloat(t):t;if(!(typeof e!="number"||isNaN(e)||e<0||e>1))return e}const mn="sentry-",zo=/^sentry-/,Xo=8192;function Rr(t){const e=Jo(t);if(!e)return;const n=Object.entries(e).reduce((r,[s,o])=>{if(s.match(zo)){const i=s.slice(mn.length);r[i]=o}return r},{});if(Object.keys(n).length>0)return n}function Ko(t){if(!t)return;const e=Object.entries(t).reduce((n,[r,s])=>(s&&(n[`${mn}${r}`]=s),n),{});return Zo(e)}function Jo(t){if(!(!t||!Z(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{const r=wr(n);return Object.entries(r).forEach(([s,o])=>{e[s]=o}),e},{}):wr(t)}function wr(t){return t.split(",").map(e=>e.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((e,[n,r])=>(n&&r&&(e[n]=r),e),{})}function Zo(t){if(Object.keys(t).length!==0)return Object.entries(t).reduce((e,[n,r],s)=>{const o=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=s===0?o:`${e},${o}`;return i.length>Xo?(ct&&m.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),e):i},"")}const Nr=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Qo(t){if(!t)return;const e=t.match(Nr);if(!e)return;let n;return e[3]==="1"?n=!0:e[3]==="0"&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}function ti(t,e){const n=Qo(t),r=Rr(e);if(!n?.traceId)return{traceId:mt(),sampleRand:Math.random()};const s=ei(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 kr(t=mt(),e=Qt(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${t}-${e}${r}`}function ei(t,e){const n=re(e?.sample_rand);if(n!==void 0)return n;const r=re(e?.sample_rate);return r&&t?.parentSampled!==void 0?t.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}const Ar=0,Cr=1;let Or=!1;function ni(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:s,parent_span_id:o,status:i,origin:a}=I(t);return O({parent_span_id:o,span_id:e,trace_id:n,data:r,op:s,status:i,origin:a})}function ri(t){const{spanId:e,traceId:n,isRemote:r}=t.spanContext(),s=r?e:I(t).parent_span_id,o=we(t).scope,i=r?o?.getPropagationContext().propagationSpanId||Qt():e;return O({parent_span_id:s,span_id:i,trace_id:n})}function si(t){const{traceId:e,spanId:n}=t.spanContext(),r=wt(t);return kr(e,n,r)}function Rt(t){return typeof t=="number"?Pr(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Pr(t.getTime()):D()}function Pr(t){return t>9999999999?t/1e3:t}function I(t){if(ii(t))return t.getSpanJSON();const{spanId:e,traceId:n}=t.spanContext();if(oi(t)){const{attributes:r,startTime:s,name:o,endTime:i,parentSpanId:a,status:c}=t;return O({span_id:e,trace_id:n,data:r,description:o,parent_span_id:a,start_timestamp:Rt(s),timestamp:Rt(i)||void 0,status:xr(c),op:r[vt],origin:r[R]})}return{span_id:e,trace_id:n,start_timestamp:0,data:{}}}function oi(t){const e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function ii(t){return typeof t.getSpanJSON=="function"}function wt(t){const{traceFlags:e}=t.spanContext();return e===Cr}function xr(t){if(!(!t||t.code===Wo))return t.code===br?"ok":t.message||"unknown_error"}const Nt="_sentryChildSpans",hn="_sentryRootSpan";function Dr(t,e){const n=t[hn]||t;U(e,hn,n),t[Nt]?t[Nt].add(e):U(t,Nt,new Set([e]))}function ai(t,e){t[Nt]&&t[Nt].delete(e)}function Ne(t){const e=new Set;function n(r){if(!e.has(r)&&wt(r)){e.add(r);const s=r[Nt]?Array.from(r[Nt]):[];for(const o of s)n(o)}}return n(t),Array.from(e)}function $(t){return t[hn]||t}function L(){const t=St(),e=jt(t);return e.getActiveSpan?e.getActiveSpan():Ie(v())}function gn(){Or||(ut(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),Or=!0)}let $r=!1;function ci(){$r||($r=!0,rr(_n),sr(_n))}function _n(){const t=L(),e=t&&$(t);if(e){const n="internal_error";g&&m.log(`[Tracing] Root span: ${n} -> Global error occurred`),e.setStatus({code:P,message:n})}}_n.tag="sentry_tracingErrorCallback";function et(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const e=t||T()?.getOptions();return!!e&&(e.tracesSampleRate!=null||!!e.tracesSampler)}const Sn="production",Lr="_frozenDsc";function ke(t,e){U(t,Lr,e)}function Mr(t,e){const n=e.getOptions(),{publicKey:r}=e.getDsn()||{},s=O({environment:n.environment||Sn,release:n.release,public_key:r,trace_id:t});return e.emit("createDsc",s),s}function Fr(t,e){const n=e.getPropagationContext();return n.dsc||Mr(n.traceId,t)}function ht(t){const e=T();if(!e)return{};const n=$(t),r=I(n),s=r.data,o=n.spanContext().traceState,i=o?.get("sentry.sample_rate")??s[yr];function a(S){return(typeof i=="number"||typeof i=="string")&&(S.sample_rate=`${i}`),S}const c=n[Lr];if(c)return a(c);const u=o?.get("sentry.dsc"),f=u&&Rr(u);if(f)return a(f);const d=Mr(t.spanContext().traceId,e),l=s[G],p=r.description;return l!=="url"&&p&&(d.transaction=p),et()&&(d.sampled=String(wt(n)),d.sample_rand=o?.get("sentry.sample_rand")??we(n).scope?.getPropagationContext().sampleRand.toString()),a(d),e.emit("createDsc",d,n),d}class kt{constructor(e={}){this._traceId=e.traceId||mt(),this._spanId=e.spanId||Qt()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:Ar}}end(e){}setAttribute(e,n){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,n,r){return this}addLink(e){return this}addLinks(e){return this}recordException(e,n){}}function ui(t){if(!g)return;const{description:e="< unknown name >",op:n="< unknown op >",parent_span_id:r}=I(t),{spanId:s}=t.spanContext(),o=wt(t),i=$(t),a=i===t,c=`[Tracing] Starting ${o?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${e}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:f,description:d}=I(i);u.push(`root ID: ${i.spanContext().spanId}`),f&&u.push(`root op: ${f}`),d&&u.push(`root description: ${d}`)}m.log(`${c}
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("vue")):typeof define==`function`&&define.amd?define([`exports`,`vue`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.PrefabsTechVue3Config={},e.Vue))})(this,function(e,t){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var n=(e,t)=>{if(e===void 0)return t;if(typeof e==`boolean`)return e;switch(typeof t){case`boolean`:return!!JSON.parse(e);case`number`:return JSON.parse(e);default:return e}},r=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,i=globalThis,a=`10.66.0`;function o(){return s(i),i}function s(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||`10.66.0`,t[a]=t[`10.66.0`]||{}}function c(e,t,n=i){let r=n.__SENTRY__=n.__SENTRY__||{},o=r[a]=r[`10.66.0`]||{};return o[e]||(o[e]=t())}var l=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],u=`Sentry Logger `,d={};function f(e){if(!(`console`in i))return e();let t=i.console,n={},r=Object.keys(d);r.forEach(e=>{let r=d[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function p(){te().enabled=!0}function m(){te().enabled=!1}function h(){return te().enabled}function g(...e){ee(`log`,...e)}function _(...e){ee(`warn`,...e)}function v(...e){ee(`error`,...e)}function ee(e,...t){r&&h()&&f(()=>{i.console[e](`${u}[${e}]:`,...t)})}function te(){return r?c(`loggerSettings`,()=>({enabled:!1})):{enabled:!1}}var y={enable:p,disable:m,isEnabled:h,log:g,warn:_,error:v},ne=50,re=/\(error: (.*)\)/,ie=/captureMessage|captureException/;function ae(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let i=[],a=e.split(`
2
+ `);for(let e=n;e<a.length;e++){let n=a[e];n.length>1024&&(n=n.slice(0,1024));let o=re.test(n)?n.replace(re,`$1`):n;if(!o.includes(`Error: `)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=ne+r)break}}return se(i.slice(r))}}function oe(e){return Array.isArray(e)?ae(...e):e}function se(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(ce(t).function||``)&&t.pop(),t.reverse(),ie.test(ce(t).function||``)&&(t.pop(),ie.test(ce(t).function||``)&&t.pop()),t.slice(0,ne).map(e=>({...e,filename:e.filename||ce(t).filename,function:e.function||`?`}))}function ce(e){return e[e.length-1]||{}}var le=`<anonymous>`;function b(e){try{return!e||typeof e!=`function`?le:e.name||le}catch{return le}}function ue(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}var de={},fe={};function x(e,t){return de[e]=de[e]||[],de[e].push(t),()=>{let n=de[e];if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}function S(e,t){if(!fe[e]){fe[e]=!0;try{t()}catch(t){r&&y.error(`Error while instrumenting ${e}`,t)}}}function C(e,t){let n=e&&de[e];if(n)for(let i of n)try{i(t)}catch(t){r&&y.error(`Error while triggering instrumentation handler.
3
+ Type: ${e}
4
+ Name: ${b(i)}
5
+ Error:`,t)}}var pe=null;function me(e){let t=`error`;x(t,e),S(t,he)}function he(){pe=i.onerror,i.onerror=function(e,t,n,r,i){return C(`error`,{column:r,error:i,line:n,msg:e,url:t}),pe?pe.apply(this,arguments):!1},i.onerror.__SENTRY_INSTRUMENTED__=!0}var ge=null;function _e(e){let t=`unhandledrejection`;x(t,e),S(t,ve)}function ve(){ge=i.onunhandledrejection,i.onunhandledrejection=function(e){return C(`unhandledrejection`,e),!ge||ge.apply(this,arguments)},i.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var ye=Object.prototype.toString;function be(e){switch(ye.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return Ne(e,Error)}}function xe(e,t){return ye.call(e)===`[object ${t}]`}function Se(e){return xe(e,`ErrorEvent`)}function Ce(e){return xe(e,`DOMError`)}function we(e){return xe(e,`DOMException`)}function Te(e){return xe(e,`String`)}function Ee(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function De(e){return e===null||Ee(e)||typeof e!=`object`&&typeof e!=`function`}function Oe(e){return xe(e,`Object`)}function ke(e){return typeof e==`object`&&!!e}function Ae(e){return typeof Event<`u`&&Ne(e,Event)}function je(e){return xe(e,`RegExp`)}function Me(e){return!!(e?.then&&typeof e.then==`function`)}function Ne(e,t){try{return e instanceof t}catch{return!1}}function Pe(e){return typeof Request<`u`&&Ne(e,Request)}function w(e,t,n){if(!(t in e))return;let i=e[t];if(typeof i!=`function`)return;let a=n(i);typeof a==`function`&&Fe(a,i);try{e[t]=a}catch{r&&y.log(`Failed to replace method "${t}" in object`,e)}}function T(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{r&&y.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function Fe(e,t){try{e.prototype=t.prototype=t.prototype||{},T(e,`__sentry_original__`,t)}catch{}}function Ie(e){return e.__sentry_original__}function Le(e){if(be(e))return{message:e.message,name:e.name,stack:e.stack,...Re(e)};if(Ae(e)){let{type:t,target:n,currentTarget:r,detail:i}=e;return{type:t,target:n,currentTarget:r,...i?{detail:i}:{},...Re(e)}}return e}function Re(e){return ke(e)?Object.fromEntries(Object.entries(e)):{}}function ze(e){let t=Object.keys(Le(e));return t.sort(),t[0]?t.join(`, `):`[object has no keys]`}var Be;function Ve(e){if(Be!==void 0)return Be?Be(e):e();let t=Symbol.for(`__SENTRY_SAFE_RANDOM_ID_WRAPPER__`),n=i;return t in n&&typeof n[t]==`function`?(Be=n[t],Be(e)):(Be=null,e())}function He(){return Ve(()=>Math.random())}function Ue(){return Ve(()=>Date.now())}var We=Symbol.for(`sentry.skipNormalization`),Ge=Symbol.for(`sentry.overrideNormalizationDepth`);function Ke(e){return!!e[We]}function qe(e){let t=e[Ge];return typeof t==`number`?t:void 0}var Je;function Ye(e){Je=e}function E(e,t=100,n=1/0){try{return Ze(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Xe(e,t=3,n=100*1024){let r=E(e,t);return tt(r)>n?Xe(e,t-1,n):r}function Ze(e,t,n=1/0,r=1/0,i=nt()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=Qe(e,t);if(!s.startsWith(`[object `))return s;if(Ke(t))return t;let c=qe(t),l=c===void 0?n:c;if(l===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let u=t;if(u&&typeof u.toJSON==`function`)try{return Ze(``,u.toJSON(),l-1,r,i)}catch{}let d=Array.isArray(t)?[]:{},f=0,p=Le(t);for(let e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(f>=r){d[e]=`[MaxProperties ~]`;break}let t=p[e];d[e]=Ze(e,t,l-1,r,i),f++}return o(t),d}function Qe(e,t){try{if(Je){let e=Je(t);if(e)return e}return typeof global<`u`&&t===global?`[Global]`:typeof t==`number`&&!Number.isFinite(t)?`[${t}]`:typeof t==`function`?`[Function: ${b(t)}]`:typeof t==`symbol`?`[${String(t)}]`:typeof t==`bigint`?`[BigInt: ${String(t)}]`:`[object ${$e(t)}]`}catch(e){return`**non-serializable** (${e})`}}function $e(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function et(e){return~-encodeURI(e).split(/%..|./).length}function tt(e){return et(JSON.stringify(e))}function nt(){let e=new WeakSet;function t(t){return e.has(t)?!0:(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}function rt(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function it(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];De(r)?n.push(String(r)):r instanceof Error?n.push(r.message?`${r.name}: ${r.message}`:r.name):n.push(Qe(void 0,r))}return n.join(t)}function at(e,t,n=!1){return Te(e)?je(t)?t.test(e):Te(t)?n?e===t:e.includes(t):typeof t==`function`&&t(e):!1}function D(e,t=[],n=!1){for(let r of t)if(at(e,r,n))return!0;return!1}function ot(){let e=i;return e.crypto||e.msCrypto}var st;function ct(){return He()*16}function O(e=ot()){try{if(e?.randomUUID)return Ve(()=>e.randomUUID()).replace(/-/g,``)}catch{}return st||=`10000000100040008000100000000000`,st.replace(/[018]/g,e=>(e^(ct()&15)>>e/4).toString(16))}function lt(e){return e.exception?.values?.[0]}function ut(e){let{message:t,event_id:n}=e;if(t)return t;let r=lt(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function dt(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function ft(e,t){let n=lt(e);if(!n)return;let r={type:`generic`,handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&`data`in t){let e={...i?.data,...t.data};n.mechanism.data=e}}function pt(e){if(mt(e))return!0;try{T(e,`__sentry_captured__`,!0)}catch{}return!1}function mt(e){try{return e.__sentry_captured__}catch{}}var ht=1e3;function gt(){return Ue()/ht}function _t(){let{performance:e}=i;if(!e?.now||!e.timeOrigin)return gt;let t=e.timeOrigin;return()=>(t+Ve(()=>e.now()))/ht}var vt;function k(){return(vt??=_t())()}var yt=null;function bt(){let{performance:e}=i;if(!e?.now)return;let t=3e5,n=Ve(()=>e.now()),r=Ue(),a=e.timeOrigin;if(typeof a==`number`&&Math.abs(a+n-r)<t)return a;let o=e.timing?.navigationStart;return typeof o==`number`&&Math.abs(o+n-r)<t?o:r-n}function A(){return yt===null&&(yt=bt()),yt}function xt(e){let t=k(),n={sid:O(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>wt(n)};return e&&St(n,e),n}function St(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||k(),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:O()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Ct(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),St(e,n)}function wt(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function Tt(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=Tt(r[e],t[e],n-1));return r}function Et(){return O()}function Dt(){return O().substring(16)}function Ot(e){try{let t=i.WeakRef;if(typeof t==`function`)return new t(e)}catch{}return e}function kt(e){if(e){if(typeof e==`object`&&`deref`in e&&typeof e.deref==`function`)try{return e.deref()}catch{return}return e}}var At=`_sentrySpan`;function jt(e,t){t?T(e,At,Ot(t)):delete e[At]}function Mt(e){return kt(e[At])}var Nt=100,Pt=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Et(),sampleRand:He()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,jt(t,Mt(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&St(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t==`function`?t(this):t,{tags:r,attributes:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u,conversationId:d}=(n instanceof e?n.getScopeData():Oe(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,jt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Et(),sampleRand:He()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:Nt;if(n<=0)return this;let r={timestamp:gt(),...e,message:e.message?rt(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),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(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Mt(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Tt(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t?.event_id||O();if(!this._client)return r&&y.warn(`No client configured on scope - will not capture exception!`),n;let i=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:i,...t,event_id:n},this),n}captureMessage(e,t,n){let i=n?.event_id||O();if(!this._client)return r&&y.warn(`No client configured on scope - will not capture message!`),i;let a=n?.syntheticException??Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:a,...n,event_id:i},this),i}captureEvent(e,t){let n=e.event_id||t?.event_id||O();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(r&&y.warn(`No client configured on scope - will not capture event!`),n)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}};function Ft(){return c(`defaultCurrentScope`,()=>new Pt)}function It(){return c(`defaultIsolationScope`,()=>new Pt)}var Lt=e=>e instanceof Promise&&!e[Rt],Rt=Symbol(`chained PromiseLike`),zt=(e,t,n)=>{let r=e.then(e=>(t(e),e),e=>{throw n(e),e});return Lt(r)&&Lt(e)?r:Bt(e,r)},Bt=(e,t)=>{if(!t)return e;let n=!1;for(let r in e){if(r in t)continue;n=!0;let i=e[r];typeof i==`function`?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Rt]:!0}),t},Vt=class{constructor(e,t){let n;n=e||new Pt;let r;r=t||new Pt,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return Me(n)?zt(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function Ht(){let e=s(o());return e.stack=e.stack||new Vt(Ft(),It())}function Ut(e){return Ht().withScope(e)}function Wt(e,t){let n=Ht();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Gt(e){return Ht().withScope(()=>e(Ht().getIsolationScope()))}function Kt(){return{withIsolationScope:Gt,withScope:Ut,withSetScope:Wt,withSetIsolationScope:(e,t)=>Gt(t),getCurrentScope:()=>Ht().getScope(),getIsolationScope:()=>Ht().getIsolationScope()}}function qt(e){let t=s(e);return t.acs?t.acs:Kt()}function Jt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.keys(e).includes(`value`)}function Yt(e,t){let{value:n,unit:r}=Jt(e)?e:{value:e,unit:void 0},i=Zt(n),a=r&&typeof r==`string`?{unit:r}:{};if(i)return{...i,...a};if(!t||t===`skip-undefined`&&n===void 0)return;let o=``;try{o=JSON.stringify(n)??``}catch{}return{value:o,type:`string`,...a}}function Xt(e,t=!1){let n={};for(let[r,i]of Object.entries(e??{})){let e=Yt(i,t);e&&(n[r]=e)}return n}function Zt(e){if(Array.isArray(e))return{value:e,type:`array`};let t=typeof e==`string`?`string`:typeof e==`boolean`?`boolean`:typeof e==`number`&&!Number.isNaN(e)?Number.isInteger(e)?`integer`:`double`:null;if(t)return{value:e,type:t}}var Qt;function $t(){return Qt?.()}function en(){return Qt!==void 0}function j(){return qt(o()).getCurrentScope()}function M(){return qt(o()).getIsolationScope()}function tn(){return c(`globalScope`,()=>new Pt)}function nn(...e){let t=qt(o());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function N(){return j().getClient()}function rn(e){let t=$t();if(t)return{trace_id:t.traceId,span_id:t.spanId};let{traceId:n,parentSpanId:r,propagationSpanId:i}=e.getPropagationContext(),a={trace_id:n,span_id:i||Dt()};return r&&(a.parent_span_id=r),a}var P=`sentry.source`,an=`sentry.sample_rate`,on=`sentry.previous_trace_sample_rate`,F=`sentry.op`,I=`sentry.origin`,sn=`sentry.idle_span_finish_reason`,cn=`sentry.measurement_unit`,ln=`sentry.measurement_value`,un=`sentry.custom_span_name`,dn=`sentry.profile_id`,fn=`sentry.exclusive_time`,pn=`url.full`,mn=`sentry.link.type`,hn=`gen_ai.conversation.id`;function gn(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:`unauthenticated`};case 403:return{code:2,message:`permission_denied`};case 404:return{code:2,message:`not_found`};case 409:return{code:2,message:`already_exists`};case 413:return{code:2,message:`failed_precondition`};case 429:return{code:2,message:`resource_exhausted`};case 499:return{code:2,message:`cancelled`};default:return{code:2,message:`invalid_argument`}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:`unimplemented`};case 503:return{code:2,message:`unavailable`};case 504:return{code:2,message:`deadline_exceeded`};default:return{code:2,message:`internal_error`}}return{code:2,message:`internal_error`}}function _n(e,t){e.setAttribute(`http.response.status_code`,t);let n=gn(t);n.message!==`unknown_error`&&e.setStatus(n)}var vn=`_sentryScope`,yn=`_sentryIsolationScope`,bn=Symbol.for(`sentry.otelSourceInference`),xn=Symbol.for(`sentry.otelSourceExplicitlySet`),Sn=Symbol.for(`sentry.tracerProviderSpan`);function Cn(e,t,n){e&&(T(e,yn,Ot(n)),T(e,vn,t))}function wn(e){let t=e;return{scope:t[vn],isolationScope:kt(t[yn])}}function Tn(e){return e[bn]===!0}function En(e){T(e,xn,!0)}function Dn(e){return e[Sn]===!0}var On=`sentry-`;function kn(e){let t=jn(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(`sentry-`)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function An(e){if(e)return Nn(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${On}${t}`]=n),e),{}))}function jn(e){if(!(!e||!Te(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=Mn(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):Mn(e)}function Mn(e){return e.split(`,`).map(e=>{let t=e.indexOf(`=`);return t===-1?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}function Nn(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((e,[t,n],i)=>{let a=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,o=i===0?a:`${e},${a}`;return o.length>8192?(r&&y.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):o},``)}var Pn=/^o(\d+)\./,Fn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function In(e){return e===`http`||e===`https`}function Ln(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function Rn(e){let t=Fn.exec(e);if(!t){f(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,l=s,u=l.split(`/`);if(u.length>1&&(c=u.slice(0,-1).join(`/`),l=u.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return zn({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}function zn(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function Bn(e){if(!r)return!0;let{port:t,projectId:n,protocol:i}=e;return[`protocol`,`publicKey`,`host`,`projectId`].find(t=>e[t]?!1:(y.error(`Invalid Sentry Dsn: ${t} missing`),!0))?!1:n.match(/^\d+$/)?In(i)?t&&isNaN(parseInt(t,10))?(y.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(y.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),!1):(y.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Vn(e){return e.match(Pn)?.[1]}function Hn(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=Vn(n)),r}function Un(e){let t=typeof e==`string`?Rn(e):zn(e);if(!(!t||!Bn(t)))return t}function Wn(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}var Gn=RegExp(`^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$`);function Kn(e){if(!e)return;let t=e.match(Gn);if(!t)return;let n;return t[3]===`1`?n=!0:t[3]===`0`&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function qn(e,t){let n=Kn(e),r=kn(t);if(!n?.traceId)return{traceId:Et(),sampleRand:He()};let i=Xn(n,r);r&&(r.sample_rand=i.toString());let{traceId:a,parentSpanId:o,parentSampled:s}=n;return{traceId:a,parentSpanId:o,sampled:s,dsc:r||{},sampleRand:i}}function Jn(e=Et(),t=Dt(),n){let r=``;return n!==void 0&&(r=n?`-1`:`-0`),`${e}-${t}${r}`}function Yn(e=Et(),t=Dt(),n){return`00-${e}-${t}-${n?`01`:`00`}`}function Xn(e,t){let n=Wn(t?.sample_rand);if(n!==void 0)return n;let r=Wn(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?He()*r:r+He()*(1-r):He()}var Zn=!1;function Qn(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:a,status:o,origin:s,links:c}=R(e);return{parent_span_id:a,span_id:t,trace_id:n,data:r,op:i,status:o,origin:s,links:c}}function $n(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:R(e).parent_span_id,a=wn(e).scope;return{parent_span_id:i,span_id:r?a?.getPropagationContext().propagationSpanId||Dt():t,trace_id:n}}function er(e){let{traceId:t,spanId:n}=e.spanContext();return Jn(t,n,ur(e))}function tr(e){let{traceId:t,spanId:n}=e.spanContext();return Yn(t,n,ur(e))}function nr(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:n===1,attributes:i,...r}))}function rr(e){if(e?.length)return e.map(({context:{spanId:e,traceId:t,traceFlags:n},attributes:r})=>({span_id:e,trace_id:t,sampled:n===1,attributes:r}))}function L(e){return typeof e==`number`?ir(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?ir(e.getTime()):k()}function ir(e){return e>9999999999?e/1e3:e}function R(e){if(lr(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(cr(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:or(e),start_timestamp:L(i),timestamp:L(o)||void 0,status:dr(s),op:r[F],origin:r[I],links:nr(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function ar(e){if(lr(e))return e.getStreamedSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(cr(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{name:a,span_id:t,trace_id:n,parent_span_id:or(e),start_timestamp:L(i),end_timestamp:L(o),is_segment:e===yr(e),status:fr(s),attributes:pr(r,s),links:rr(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:``,end_timestamp:0,status:`ok`,is_segment:e===yr(e)}}function or(e){return`parentSpanId`in e?e.parentSpanId:`parentSpanContext`in e?e.parentSpanContext?.spanId:void 0}function sr(e){return{...e,attributes:Xt(e.attributes),links:e.links?.map(e=>({...e,attributes:Xt(e.attributes)}))}}function cr(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function lr(e){return typeof e.getSpanJSON==`function`}function ur(e){let{traceFlags:t}=e.spanContext();return t===1}function dr(e){if(!(!e||e.code===0))return e.code===1?`ok`:e.message||`internal_error`}function fr(e){return!e||e.code===1||e.code===0||e.message===`cancelled`?`ok`:`error`}function pr(e,t){let n=fr(t)===`error`?t?.message:void 0;return{...n&&{"sentry.status.message":n},...e}}var mr=`_sentryChildSpans`,hr=`_sentryRootSpan`;function gr(e,t){T(t,hr,e[hr]||e),e[mr]?e[mr].add(t):T(e,mr,new Set([t]))}function _r(e,t){e[mr]&&e[mr].delete(t)}function vr(e){let t=new Set;function n(e){if(!t.has(e)&&ur(e)){t.add(e);let r=e[mr]?Array.from(e[mr]):[];for(let e of r)n(e)}}return n(e),Array.from(t)}var z=yr;function yr(e){return e[hr]||e}function B(){let e=qt(o());return e.getActiveSpan?e.getActiveSpan():Mt(j())}function br(){Zn||=(f(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),!0)}var xr=!1;function Sr(){if(xr)return;function e(){let e=B(),t=e&&z(e);if(t){let e=`internal_error`;r&&y.log(`[Tracing] Root span: ${e} -> Global error occurred`),t.setStatus({code:2,message:e})}}xr=!0,me(e),_e(e)}function V(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=e||N()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Cr(e){y.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function wr(e,t){if(!t?.length)return!1;for(let n of t){if(Dr(n)){if(e.description&&at(e.description,n))return r&&Cr(e),!0;continue}let t=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!t)continue;let i=!n.name||e.description&&at(e.description,n.name),a=!n.op||e.op&&at(e.op,n.op),o=!n.attributes||Object.entries(n.attributes).every(([t,n])=>Tr(e.attributes?.[t],n));if(i&&a&&o)return r&&Cr(e),!0}return!1}function Tr(e,t){return typeof e==`string`&&(typeof t==`string`||t instanceof RegExp)?at(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function Er(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function Dr(e){return typeof e==`string`||e instanceof RegExp}var Or=Symbol.for(`sentry.nonRecordingSpan`),kr=class{constructor(e={}){this._traceId=e.traceId||Et(),this._spanId=e.spanId||Dt(),this.dropReason=e.dropReason,T(this,Or,!0)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}};function Ar(e){return!!e&&e[Or]===!0}var jr=`params.<key>`,Mr=`sentry.segment.name`,Nr=`sentry.transaction`,Pr=`url.path.parameter.<key>`,Fr=`url.template`,Ir=`production`,Lr=`_frozenDsc`;function Rr(e,t){T(e,Lr,t)}function zr(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||`production`,release:n.release,public_key:r,trace_id:e,org_id:Hn(t)};return t.emit(`createDsc`,i),i}function Br(e,t){let n=t.getPropagationContext();return n.dsc||zr(n.traceId,e)}function Vr(e){let t=N();if(!t)return{};let n=z(e),r=R(n),i=r.data,a=n.spanContext().traceState,o=a?.get(`sentry.sample_rate`)??i[`sentry.sample_rate`]??i[`sentry.previous_trace_sample_rate`];function s(e){return(typeof o==`number`||typeof o==`string`)&&(e.sample_rate=`${o}`),e}let c=n[Lr];if(c)return s(c);let l=Ar(n),u=l&&n.dropReason===`ignored`;if(l&&(!V(t.getOptions())||u)){let e=wn(n).scope;if(e){let n={...Br(t,e)};return u&&(n.sampled=`false`),s(n)}}let d=a?.get(`sentry.dsc`),f=d&&kn(d);if(f)return s(f);let p=zr(e.spanContext().traceId,t),m=i[`sentry.source`]??i[`sentry.span.source`],h=r.description;return m!==`url`&&h&&(p.transaction=h),V()&&(p.sampled=String(ur(n)),p.sample_rand=a?.get(`sentry.sample_rand`)??wn(n).scope?.getPropagationContext().sampleRand.toString()),s(p),t.emit(`createDsc`,p,n),p}function Hr(e){return!!e&&typeof e==`function`&&`_streamed`in e&&!!e._streamed}function Ur(e,t=[]){return[e,t]}function Wr(e,t){let[n,r]=e;return[n,[...r,t]]}function Gr(e,t){let n=e[1];for(let e of n){let n=e[0].type;if(t(e,n))return!0}return!1}function Kr(e,t){return Gr(e,(e,n)=>t.includes(n))}function qr(e){let t=s(i);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Jr(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[qr(r),e]:r.push(typeof e==`string`?qr(e):e)}for(let e of n){let[t,n]=e;if(i(`
6
+ ${JSON.stringify(t)}
7
+ `),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(E(n))}i(e)}}return typeof r==`string`?r:Yr(r)}function Yr(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function Xr(e){return[{type:`span`},e]}function Zr(e){let t=typeof e.data==`string`?qr(e.data):e.data;return[{type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Qr={sessions:`session`,event:`error`,client_report:`internal`,user_report:`default`,profile_chunk:`profile`,replay_event:`replay`,replay_recording:`replay`,check_in:`monitor`,raw_security:`security`,log:`log_item`,trace_metric:`metric`};function $r(e){return e in Qr}function ei(e){return $r(e)?Qr[e]:e}function ti(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function ni(e,t,n,r){let i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(Ue()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Ln(r)},...i&&{trace:i}}}function ri(e,t){if(!t)return e;let n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function ii(e,t,n,r){let i=ti(n);return Ur({sent_at:new Date(Ue()).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Ln(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}function ai(e,t,n,r){let i=ti(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;ri(e,n?.sdk);let o=ni(e,i,r,t);return delete e.sdkProcessingMetadata,Ur(o,[[{type:a},e]])}function oi(e,t){function n(e){return!!e.trace_id&&!!e.public_key}let r=Vr(e[0]),i=t?.getDsn(),a=t?.getOptions().tunnel,o={sent_at:new Date(Ue()).toISOString(),...n(r)&&{trace:r},...!!a&&i&&{dsn:Ln(i)}},{beforeSendSpan:s,ignoreSpans:c}=t?.getOptions()||{},l=c?.length?e.filter(e=>{let t=R(e);return!wr({description:t.description,op:t.op,attributes:t.data},c)}):e,u=e.length-l.length;u&&t?.recordDroppedEvent(`before_send`,`span`,u);let d=s?e=>{let t=R(e);return(Hr(s)?t:s(t))||(br(),t)}:R,f=[];for(let e of l){let t=d(e);t&&f.push(Xr(t))}return Ur(o,f)}function si(e){if(!r)return;let{description:t=`< unknown name >`,op:n=`< unknown op >`,parent_span_id:i}=R(e),{spanId:a}=e.spanContext(),o=ur(e),s=z(e),c=s===e,l=`[Tracing] Starting ${o?`sampled`:`unsampled`} ${c?`root `:``}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${a}`];if(i&&u.push(`parent ID: ${i}`),!c){let{op:e,description:t}=R(s);u.push(`root ID: ${s.spanContext().spanId}`),e&&u.push(`root op: ${e}`),t&&u.push(`root description: ${t}`)}y.log(`${l}
6
8
  ${u.join(`
7
- `)}`)}function di(t){if(!g)return;const{description:e="< unknown name >",op:n="< unknown op >"}=I(t),{spanId:r}=t.spanContext(),o=$(t)===t,i=`[Tracing] Finishing "${n}" ${o?"root ":""}span "${e}" with ID ${r}`;m.log(i)}function fi(t,e,n){if(!et(t))return[!1];let r,s;typeof t.tracesSampler=="function"?(s=t.tracesSampler({...e,inheritOrSampleWith:a=>typeof e.parentSampleRate=="number"?e.parentSampleRate:typeof e.parentSampled=="boolean"?Number(e.parentSampled):a}),r=!0):e.parentSampled!==void 0?s=e.parentSampled:typeof t.tracesSampleRate<"u"&&(s=t.tracesSampleRate,r=!0);const o=re(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 t.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]}const li=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function pi(t){return t==="http"||t==="https"}function Ae(t,e=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:a,publicKey:c}=t;return`${a}://${c}${e&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function mi(t){const e=li.exec(t);if(!e){ut(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});return}const[n,r,s="",o="",i="",a=""]=e.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 Hr({host:o,pass:s,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function Hr(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function hi(t){if(!ct)return!0;const{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(i=>t[i]?!1:(m.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?pi(r)?e&&isNaN(parseInt(e,10))?(m.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(m.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(m.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function gi(t){const e=typeof t=="string"?mi(t):Hr(t);if(!(!e||!hi(e)))return e}function nt(t,e=100,n=1/0){try{return yn("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Ur(t,e=3,n=100*1024){const r=nt(t,e);return Ei(r)>n?Ur(t,e-1,n):r}function yn(t,e,n=1/0,r=1/0,s=bi()){const[o,i]=s;if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;const a=_i(t,e);if(!a.startsWith("[object "))return a;if(e.__sentry_skip_normalization__)return e;const c=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(o(e))return"[Circular ~]";const u=e;if(u&&typeof u.toJSON=="function")try{const p=u.toJSON();return yn("",p,c-1,r,s)}catch{}const f=Array.isArray(e)?[]:{};let d=0;const l=lr(e);for(const p in l){if(!Object.prototype.hasOwnProperty.call(l,p))continue;if(d>=r){f[p]="[MaxProperties ~]";break}const S=l[p];f[p]=yn(p,S,c-1,r,s),d++}return i(e),f}function _i(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(cr(e))return"[VueViewModel]";if(vo(e))return"[SyntheticEvent]";if(typeof e=="number"&&!Number.isFinite(e))return`[${e}]`;if(typeof e=="function")return`[Function: ${J(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;const n=Si(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Si(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}function yi(t){return~-encodeURI(t).split(/%..|./).length}function Ei(t){return yi(JSON.stringify(t))}function bi(){const t=new WeakSet;function e(r){return t.has(r)?!0:(t.add(r),!1)}function n(r){t.delete(r)}return[e,n]}function se(t,e=[]){return[t,e]}function Ti(t,e){const[n,r]=t;return[n,[...r,e]]}function Br(t,e){const n=t[1];for(const r of n){const s=r[0].type;if(e(r,s))return!0}return!1}function En(t){const e=he(b);return e.encodePolyfill?e.encodePolyfill(t):new TextEncoder().encode(t)}function Ii(t){const[e,n]=t;let r=JSON.stringify(e);function s(o){typeof r=="string"?r=typeof o=="string"?r+o:[En(r),o]:r.push(typeof o=="string"?En(o):o)}for(const o of n){const[i,a]=o;if(s(`
8
- ${JSON.stringify(i)}
9
- `),typeof a=="string"||a instanceof Uint8Array)s(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(nt(a))}s(c)}}return typeof r=="string"?r:vi(r)}function vi(t){const e=t.reduce((s,o)=>s+o.length,0),n=new Uint8Array(e);let r=0;for(const s of t)n.set(s,r),r+=s.length;return n}function Ri(t){return[{type:"span"},t]}function wi(t){const e=typeof t.data=="string"?En(t.data):t.data;return[O({type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),e]}const Ni={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"};function jr(t){return Ni[t]}function qr(t){if(!t?.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function ki(t,e,n,r){const s=t.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:Ae(r)},...s&&{trace:O({...s})}}}function Ai(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function Ci(t,e,n,r){const s=qr(n),o={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:Ae(e)}},i="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return se(o,[i])}function Oi(t,e,n,r){const s=qr(n),o=t.type&&t.type!=="replay_event"?t.type:"event";Ai(t,n?.sdk);const i=ki(t,s,r,e);return delete t.sdkProcessingMetadata,se(i,[[{type:o},t]])}function Pi(t,e){function n(f){return!!f.trace_id&&!!f.public_key}const r=ht(t[0]),s=e?.getDsn(),o=e?.getOptions().tunnel,i={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!o&&s&&{dsn:Ae(s)}},a=e?.getOptions().beforeSendSpan,c=a?f=>{const d=I(f),l=a(d);return l||(gn(),d)}:I,u=[];for(const f of t){const d=c(f);d&&u.push(Ri(d))}return se(i,u)}function xi(t,e,n,r=L()){const s=r&&$(r);s&&(g&&m.log(`[Measurement] Setting measurement on root span: ${t} = ${e} ${n}`),s.addEvent(t,{[Re]:e,[ve]:n}))}function Gr(t){if(!t||t.length===0)return;const e={};return t.forEach(n=>{const r=n.attributes||{},s=r[ve],o=r[Re];typeof s=="string"&&typeof o=="number"&&(e[n.name]={value:o,unit:s})}),e}const Wr=1e3;class bn{constructor(e={}){this._traceId=e.traceId||mt(),this._spanId=e.spanId||Qt(),this._startTime=e.startTimestamp||D(),this._attributes={},this.setAttributes({[R]:"manual",[vt]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this}addLinks(e){return this}recordException(e,n){}spanContext(){const{_spanId:e,_traceId:n,_sampled:r}=this;return{spanId:e,traceId:n,traceFlags:r?Cr:Ar}}setAttribute(e,n){return n===void 0?delete this._attributes[e]:this._attributes[e]=n,this}setAttributes(e){return Object.keys(e).forEach(n=>this.setAttribute(n,e[n])),this}updateStartTime(e){this._startTime=Rt(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(G,"custom"),this}end(e){this._endTime||(this._endTime=Rt(e),di(this),this._onSpanEnded())}getSpanJSON(){return O({data:this._attributes,description:this._name,op:this._attributes[vt],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:xr(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[R],profile_id:this._attributes[pn],exclusive_time:this._attributes[ne],measurements:Gr(this._events),is_segment:this._isStandaloneSpan&&$(this)===this||void 0,segment_id:this._isStandaloneSpan?$(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,n,r){g&&m.log("[Tracing] Adding an event to span:",e);const s=Vr(n)?n:r||D(),o=Vr(n)?{}:n||{},i={name:e,time:Rt(s),attributes:o};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=T();if(e&&e.emit("spanEnd",this),!(this._isStandaloneSpan||this===$(this)))return;if(this._isStandaloneSpan){this._sampled?$i(Pi([this],e)):(g&&m.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(we(this).scope||v()).captureEvent(r)}_convertSpanToTransaction(){if(!Yr(I(this)))return;this._name||(g&&m.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:e,isolationScope:n}=we(this);if(this._sampled!==!0)return;const s=Ne(this).filter(u=>u!==this&&!Di(u)).map(u=>I(u)).filter(Yr),o=this._attributes[G];delete this._attributes[Er],s.forEach(u=>{delete u.data[Er]});const i={contexts:{trace:ni(this)},spans:s.length>Wr?s.sort((u,f)=>u.start_timestamp-f.start_timestamp).slice(0,Wr):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:n,...O({dynamicSamplingContext:ht(this)})},...o&&{transaction_info:{source:o}}},a=Gr(this._events);return a&&Object.keys(a).length&&(g&&m.log("[Measurements] Adding measurements to transaction event",JSON.stringify(a,void 0,2)),i.measurements=a),i}}function Vr(t){return t&&typeof t=="number"||t instanceof Date||Array.isArray(t)}function Yr(t){return!!t.start_timestamp&&!!t.timestamp&&!!t.span_id&&!!t.trace_id}function Di(t){return t instanceof bn&&t.isStandaloneSpan()}function $i(t){const e=T();if(!e)return;const n=t[1];if(!n||n.length===0){e.recordDroppedEvent("before_send","span");return}e.sendEnvelope(t)}const zr="__SENTRY_SUPPRESS_TRACING__";function At(t){const e=Kr();if(e.startInactiveSpan)return e.startInactiveSpan(t);const n=Mi(t),{forceTransaction:r,parentSpan:s}=t;return(t.scope?i=>fn(t.scope,i):s!==void 0?i=>Xr(s,i):i=>i())(()=>{const i=v(),a=Hi(i);return t.onlyIfParent&&!a?new kt:Li({parentSpan:a,spanArguments:n,forceTransaction:r,scope:i})})}function Xr(t,e){const n=Kr();return n.withActiveSpan?n.withActiveSpan(t,e):fn(r=>(ee(r,t||void 0),e(r)))}function Li({parentSpan:t,spanArguments:e,forceTransaction:n,scope:r}){if(!et()){const i=new kt;if(n||!t){const a={sampled:"false",sample_rate:"0",transaction:e.name,...ht(i)};ke(i,a)}return i}const s=It();let o;if(t&&!n)o=Fi(t,r,e),Dr(t,o);else if(t){const i=ht(t),{traceId:a,spanId:c}=t.spanContext(),u=wt(t);o=Jr({traceId:a,parentSpanId:c,...e},r,u),ke(o,i)}else{const{traceId:i,dsc:a,parentSpanId:c,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};o=Jr({traceId:i,parentSpanId:c,...e},r,u),a&&ke(o,a)}return ui(o),Yo(o,r,s),o}function Mi(t){const n={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const r={...n};return r.startTimestamp=Rt(t.startTime),delete r.startTime,r}return n}function Kr(){const t=St();return jt(t)}function Jr(t,e,n){const r=T(),s=r?.getOptions()||{},{name:o="",attributes:i}=t,a=e.getPropagationContext(),[c,u,f]=e.getScopeData().sdkProcessingMetadata[zr]?[!1]:fi(s,{name:o,parentSampled:n,attributes:i,parentSampleRate:re(a.dsc?.sample_rate)},a.sampleRand),d=new bn({...t,attributes:{[G]:"custom",[yr]:u!==void 0&&f?u:void 0,...t.attributes},sampled:c});return!c&&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",d),d}function Fi(t,e,n){const{spanId:r,traceId:s}=t.spanContext(),o=e.getScopeData().sdkProcessingMetadata[zr]?!1:wt(t),i=o?new bn({...n,parentSpanId:r,traceId:s,sampled:o}):new kt({traceId:s});Dr(t,i);const a=T();return a&&(a.emit("spanStart",i),n.endTimestamp&&a.emit("spanEnd",i)),i}function Hi(t){const e=Ie(t);if(!e)return;const n=T();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?$(e):e}const Ce={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Ui="heartbeatFailed",Bi="idleTimeout",ji="finalTimeout",qi="externalFinish";function Zr(t,e={}){const n=new Map;let r=!1,s,o=qi,i=!e.disableAutoFinish;const a=[],{idleTimeout:c=Ce.idleTimeout,finalTimeout:u=Ce.finalTimeout,childSpanTimeout:f=Ce.childSpanTimeout,beforeSpanEnd:d}=e,l=T();if(!l||!et()){const h=new kt,w={sample_rate:"0",sampled:"false",...ht(h)};return ke(h,w),h}const p=v(),S=L(),y=Gi(t);y.end=new Proxy(y.end,{apply(h,w,it){if(d&&d(y),w instanceof kt)return;const[N,...F]=it,W=N||D(),C=Rt(W),at=Ne(y).filter(gt=>gt!==y);if(!at.length)return me(C),Reflect.apply(h,w,[C,...F]);const Dt=at.map(gt=>I(gt).timestamp).filter(gt=>!!gt),Xt=Dt.length?Math.max(...Dt):void 0,Kt=I(y).start_timestamp,Ke=Math.min(Kt?Kt+u/1e3:1/0,Math.max(Kt||-1/0,Math.min(C,Xt||1/0)));return me(Ke),Reflect.apply(h,w,[Ke,...F])}});function A(){s&&(clearTimeout(s),s=void 0)}function ot(h){A(),s=setTimeout(()=>{!r&&n.size===0&&i&&(o=Bi,y.end(h))},c)}function xt(h){s=setTimeout(()=>{!r&&i&&(o=Ui,y.end(h))},f)}function Kn(h){A(),n.set(h,!0);const w=D();xt(w+f/1e3)}function pe(h){if(n.has(h)&&n.delete(h),n.size===0){const w=D();ot(w+c/1e3)}}function me(h){r=!0,n.clear(),a.forEach(C=>C()),ee(p,S);const w=I(y),{start_timestamp:it}=w;if(!it)return;w.data[ln]||y.setAttribute(ln,o),m.log(`[Tracing] Idle span "${w.op}" finished`);const F=Ne(y).filter(C=>C!==y);let W=0;F.forEach(C=>{C.isRecording()&&(C.setStatus({code:P,message:"cancelled"}),C.end(h),g&&m.log("[Tracing] Cancelling span since span ended early",JSON.stringify(C,void 0,2)));const at=I(C),{timestamp:Dt=0,start_timestamp:Xt=0}=at,Kt=Xt<=h,Ke=(u+c)/1e3,gt=Dt-Xt<=Ke;if(g){const po=JSON.stringify(C,void 0,2);Kt?gt||m.log("[Tracing] Discarding span since it finished after idle span final timeout",po):m.log("[Tracing] Discarding span since it happened after idle span was finished",po)}(!gt||!Kt)&&(ai(y,C),W++)}),W>0&&y.setAttribute("sentry.idle_span_discarded_spans",W)}return a.push(l.on("spanStart",h=>{if(r||h===y||I(h).timestamp)return;Ne(y).includes(h)&&Kn(h.spanContext().spanId)})),a.push(l.on("spanEnd",h=>{r||pe(h.spanContext().spanId)})),a.push(l.on("idleSpanEnableAutoFinish",h=>{h===y&&(i=!0,ot(),n.size&&xt())})),e.disableAutoFinish||ot(),setTimeout(()=>{r||(y.setStatus({code:P,message:"deadline_exceeded"}),o=ji,y.end())},u),y}function Gi(t){const e=At(t);return ee(v(),e),g&&m.log("[Tracing] Started span is an idle span"),e}function Tn(t,e,n,r=0){return new pt((s,o)=>{const i=t[r];if(e===null||typeof i!="function")s(e);else{const a=i({...e},n);g&&i.id&&a===null&&m.log(`Event processor "${i.id}" dropped event`),be(a)?a.then(c=>Tn(t,c,n,r+1).then(s)).then(null,o):Tn(t,a,n,r+1).then(s).then(null,o)}})}let Oe,Qr,Pe;function Wi(t){const e=b._sentryDebugIds;if(!e)return{};const n=Object.keys(e);return Pe&&n.length===Qr||(Qr=n.length,Pe=n.reduce((r,s)=>{Oe||(Oe={});const o=Oe[s];if(o)r[o[0]]=o[1];else{const i=t(s);for(let a=i.length-1;a>=0;a--){const u=i[a]?.filename,f=e[s];if(u&&f){r[u]=f,Oe[s]=[u,f];break}}}return r},{})),Pe}function Vi(t,e){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=e;Yi(t,e),r&&Ki(t,r),Ji(t,n),zi(t,s),Xi(t,o)}function ts(t,e){const{extra:n,tags:r,user:s,contexts:o,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:f,attachments:d,propagationContext:l,transactionName:p,span:S}=e;xe(t,"extra",n),xe(t,"tags",r),xe(t,"user",s),xe(t,"contexts",o),t.sdkProcessingMetadata=te(t.sdkProcessingMetadata,a,2),i&&(t.level=i),p&&(t.transactionName=p),S&&(t.span=S),c.length&&(t.breadcrumbs=[...t.breadcrumbs,...c]),u.length&&(t.fingerprint=[...t.fingerprint,...u]),f.length&&(t.eventProcessors=[...t.eventProcessors,...f]),d.length&&(t.attachments=[...t.attachments,...d]),t.propagationContext={...t.propagationContext,...l}}function xe(t,e,n){t[e]=te(t[e],n,1)}function Yi(t,e){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:a}=e,c=O(n);Object.keys(c).length&&(t.extra={...c,...t.extra});const u=O(r);Object.keys(u).length&&(t.tags={...u,...t.tags});const f=O(s);Object.keys(f).length&&(t.user={...f,...t.user});const d=O(o);Object.keys(d).length&&(t.contexts={...d,...t.contexts}),i&&(t.level=i),a&&t.type!=="transaction"&&(t.transaction=a)}function zi(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function Xi(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}function Ki(t,e){t.contexts={trace:ri(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:ht(e),...t.sdkProcessingMetadata};const n=$(e),r=I(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function Ji(t,e){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint.length||delete t.fingerprint}function Zi(t,e,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=t,c={...e,event_id:e.event_id||n.event_id||q(),timestamp:e.timestamp||Zt()},u=n.integrations||t.integrations.map(A=>A.name);Qi(c,t),na(c,u),s&&s.emit("applyFrameMetadata",e),e.type===void 0&&ta(c,t.stackParser);const f=sa(r,n.captureContext);n.mechanism&&Ht(c,n.mechanism);const d=s?s.getEventProcessors():[],l=qo().getScopeData();if(o){const A=o.getScopeData();ts(l,A)}if(f){const A=f.getScopeData();ts(l,A)}const p=[...n.attachments||[],...l.attachments];p.length&&(n.attachments=p),Vi(c,l);const S=[...d,...l.eventProcessors];return Tn(S,c,n).then(A=>(A&&ea(A),typeof i=="number"&&i>0?ra(A,i,a):A))}function Qi(t,e){const{environment:n,release:r,dist:s,maxValueLength:o=250}=e;t.environment=t.environment||n||Sn,!t.release&&r&&(t.release=r),!t.dist&&s&&(t.dist=s),t.message&&(t.message=Ft(t.message,o));const i=t.exception?.values?.[0];i?.value&&(i.value=Ft(i.value,o));const a=t.request;a?.url&&(a.url=Ft(a.url,o))}function ta(t,e){const n=Wi(e);t.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.filename&&(s.debug_id=n[s.filename])})})}function ea(t){const e={};if(t.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.debug_id&&(s.abs_path?e[s.abs_path]=s.debug_id:s.filename&&(e[s.filename]=s.debug_id),delete s.debug_id)})}),Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.entries(e).forEach(([r,s])=>{n.push({type:"sourcemap",code_file:r,debug_id:s})})}function na(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function ra(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(s=>({...s,...s.data&&{data:nt(s.data,e,n)}}))},...t.user&&{user:nt(t.user,e,n)},...t.contexts&&{contexts:nt(t.contexts,e,n)},...t.extra&&{extra:nt(t.extra,e,n)}};return t.contexts?.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=nt(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(s=>({...s,...s.data&&{data:nt(s.data,e,n)}}))),t.contexts?.flags&&r.contexts&&(r.contexts.flags=nt(t.contexts.flags,3,n)),r}function sa(t,e){if(!e)return t;const n=t?t.clone():new z;return n.update(e),n}function oa(t){if(t)return ia(t)?{captureContext:t}:ca(t)?{captureContext:t}:t}function ia(t){return t instanceof z||typeof t=="function"}const aa=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function ca(t){return Object.keys(t).some(e=>aa.includes(e))}function In(t,e){return v().captureException(t,oa(e))}function es(t,e){return v().captureEvent(t,e)}function ua(){const t=T();return t?.getOptions().enabled!==!1&&!!t?.getTransport()}function ns(t){const e=It(),n=v(),{userAgent:r}=b.navigator||{},s=xo({user:n.getUser()||e.getUser(),...r&&{userAgent:r},...t}),o=e.getSession();return o?.status==="ok"&&Ut(o,{status:"exited"}),rs(),e.setSession(s),s}function rs(){const t=It(),n=v().getSession()||t.getSession();n&&Do(n),ss(),t.setSession()}function ss(){const t=It(),e=T(),n=t.getSession();n&&e&&e.captureSession(n)}function os(t=!1){if(t){rs();return}ss()}const da="7";function fa(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function la(t){return`${fa(t)}${t.projectId}/envelope/`}function pa(t,e){const n={sentry_version:da};return t.publicKey&&(n.sentry_key=t.publicKey),e&&(n.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(n).toString()}function ma(t,e,n){return e||`${la(t)}?${pa(t,n)}`}const is=[];function ha(t){const e={};return t.forEach(n=>{const{name:r}=n,s=e[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(e[r]=n)}),Object.values(e)}function ga(t){const e=t.defaultIntegrations||[],n=t.integrations;e.forEach(s=>{s.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...e,...n];else if(typeof n=="function"){const s=n(e);r=Array.isArray(s)?s:[s]}else r=e;return ha(r)}function _a(t,e){const n={};return e.forEach(r=>{r&&cs(t,r,n)}),n}function as(t,e){for(const n of e)n?.afterAllSetup&&n.afterAllSetup(t)}function cs(t,e,n){if(n[e.name]){g&&m.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,is.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),is.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){const r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(s,o)=>r(s,o,t))}if(typeof e.processEvent=="function"){const r=e.processEvent.bind(e),s=Object.assign((o,i)=>r(o,i,t),{id:e.name});t.addEventProcessor(s)}g&&m.log(`Integration installed: ${e.name}`)}function Ef(t){return t}function Sa(t,e,n){const r=[{type:"client_report"},{timestamp:Zt(),discarded_events:t}];return se(e?{dsn:e}:{},[r])}class Y extends Error{constructor(e,n="warn"){super(e),this.message=e,this.logLevel=n}}function us(t){const e=[];t.message&&e.push(t.message);try{const n=t.exception.values[t.exception.values.length-1];n?.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`))}catch{}return e}function ya(t){const{trace_id:e,parent_span_id:n,span_id:r,status:s,origin:o,data:i,op:a}=t.contexts?.trace??{};return O({data:i??{},description:t.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:t.start_timestamp??0,status:s,timestamp:t.timestamp,trace_id:e??"",origin:o,profile_id:i?.[pn],exclusive_time:i?.[ne],measurements:t.measurements,is_segment:!0})}function Ea(t){const e={type:"transaction",timestamp:t.timestamp,start_timestamp:t.start_timestamp,transaction:t.description,contexts:{trace:{trace_id:t.trace_id,span_id:t.span_id,parent_span_id:t.parent_span_id,op:t.op,status:t.status,origin:t.origin,data:{...t.data,...t.profile_id&&{[pn]:t.profile_id},...t.exclusive_time&&{[ne]:t.exclusive_time}}}},measurements:t.measurements};return O(e)}const ds="Not capturing exception because it's already been captured.",fs="Discarded session because of missing or non-string release";class ba{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=gi(e.dsn):g&&m.warn("No DSN provided, client will not send events."),this._dsn){const n=ma(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}}captureException(e,n,r){const s=q();if(_r(e))return g&&m.log(ds),s;const o={event_id:s,...n};return this._process(this.eventFromException(e,o).then(i=>this._captureEvent(i,o,r))),o.event_id}captureMessage(e,n,r,s){const o={event_id:q(),...r},i=nn(e)?e:String(e),a=rn(e)?this.eventFromMessage(i,n,o):this.eventFromException(e,o);return this._process(a.then(c=>this._captureEvent(c,o,s))),o.event_id}captureEvent(e,n,r){const s=q();if(n?.originalException&&_r(n.originalException))return g&&m.log(ds),s;const o={event_id:s,...n},i=e.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope;return this._process(this._captureEvent(e,o,a||r,c)),o.event_id}captureSession(e){this.sendSession(e),Ut(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(e).then(r=>n.flush(e).then(s=>r&&s))):Tt(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const n=this._integrations[e.name];cs(this,e,this._integrations),n||as(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=Oi(e,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])r=Ti(r,wi(o));const s=this.sendEnvelope(r);s&&s.then(o=>this.emit("afterSendEvent",e,o),null)}sendSession(e){const{release:n,environment:r=Sn}=this._options;if("aggregates"in e){const o=e.attrs||{};if(!o.release&&!n){g&&m.warn(fs);return}o.release=o.release||n,o.environment=o.environment||r,e.attrs=o}else{if(!e.release&&!n){g&&m.warn(fs);return}e.release=e.release||n,e.environment=e.environment||r}this.emit("beforeSendSession",e);const s=Ci(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(e,n,r=1){if(this._options.sendClientReports){const s=`${e}:${n}`;g&&m.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(e,n){const r=this._hooks[e]=this._hooks[e]||[];return r.push(n),()=>{const s=r.indexOf(n);s>-1&&r.splice(s,1)}}emit(e,...n){const r=this._hooks[e];r&&r.forEach(s=>s(...n))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,n=>(g&&m.error("Error while sending envelope:",n),n)):(g&&m.error("Transport disabled"),Tt({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=_a(this,e),as(this,e)}_updateSessionFromEvent(e,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=e.status==="ok";(i&&e.errors===0||i&&r)&&(Ut(e,{...r&&{status:"crashed"},errors:e.errors||Number(s||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new pt(n=>{let r=0;const s=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),n(!0)):(r+=s,e&&r>=e&&(clearInterval(o),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,n,r,s){const o=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i?.length&&(n.integrations=i),this.emit("preprocessEvent",e,n),e.type||s.setLastEventId(e.event_id||n.event_id),Zi(o,e,n,r,this,s).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:Go(r),...a.contexts};const c=Fr(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(e,n={},r=v(),s=It()){return g&&vn(e)&&m.log(`Captured error event \`${us(e)[0]||"<unknown>"}\``),this._processEvent(e,n,r,s).then(o=>o.event_id,o=>{g&&(o instanceof Y&&o.logLevel==="log"?m.log(o.message):m.warn(o))})}_processEvent(e,n,r,s){const o=this.getOptions(),{sampleRate:i}=o,a=ls(e),c=vn(e),u=e.type||"error",f=`before send for type \`${u}\``,d=typeof i>"u"?void 0:re(i);if(c&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error"),Te(new Y(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const l=u==="replay_event"?"replay":u;return this._prepareEvent(e,n,r,s).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",l),new Y("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return p;const y=Ia(this,o,p,n);return Ta(y,f)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",l),a){const ot=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",ot)}throw new Y(`${f} returned \`null\`, will not send event.`,"log")}const S=r.getSession()||s.getSession();if(c&&S&&this._updateSessionFromEvent(S,p),a){const A=p.sdkProcessingMetadata?.spanCountBeforeProcessing||0,ot=p.spans?p.spans.length:0,xt=A-ot;xt>0&&this.recordDroppedEvent("before_send","span",xt)}const y=p.transaction_info;if(a&&y&&p.transaction!==e.transaction){const A="custom";p.transaction_info={...y,source:A}}return this.sendEvent(p,n),p}).then(null,p=>{throw p instanceof Y?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),new Y(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
10
- Reason: ${p}`))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([n,r])=>{const[s,o]=n.split(":");return{reason:s,category:o,quantity:r}})}_flushOutcomes(){g&&m.log("Flushing outcomes...");const e=this._clearOutcomes();if(e.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:",e);const n=Sa(e,this._options.tunnel&&Ae(this._dsn));this.sendEnvelope(n)}}function Ta(t,e){const n=`${e} must return \`null\` or a valid event.`;if(be(t))return t.then(r=>{if(!Mt(r)&&r!==null)throw new Y(n);return r},r=>{throw new Y(`${e} rejected with ${r}`)});if(!Mt(t)&&t!==null)throw new Y(n);return t}function Ia(t,e,n,r){const{beforeSend:s,beforeSendTransaction:o,beforeSendSpan:i}=e;let a=n;if(vn(a)&&s)return s(a,r);if(ls(a)){if(i){const c=i(ya(a));if(c?a=te(n,Ea(c)):gn(),a.spans){const u=[];for(const f of a.spans){const d=i(f);d?u.push(d):(gn(),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 vn(t){return t.type===void 0}function ls(t){return t.type==="transaction"}function va(t,e){e.debug===!0&&(g?m.enable():ut(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),v().update(e.initialScope);const r=new t(e);return Ra(r),r.init(),r}function Ra(t){v().setClient(t)}function wa(t){const e=[];function n(){return t===void 0||e.length<t}function r(i){return e.splice(e.indexOf(i),1)[0]||Promise.resolve(void 0)}function s(i){if(!n())return Te(new Y("Not adding Promise because buffer limit was reached."));const a=i();return e.indexOf(a)===-1&&e.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function o(i){return new pt((a,c)=>{let u=e.length;if(!u)return a(!0);const f=setTimeout(()=>{i&&i>0&&a(!1)},i);e.forEach(d=>{Tt(d).then(()=>{--u||(clearTimeout(f),a(!0))},c)})})}return{$:e,add:s,drain:o}}const Na=60*1e3;function ka(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${t}`);return isNaN(r)?Na:r-e}function Aa(t,e){return t[e]||t.all||0}function Ca(t,e,n=Date.now()){return Aa(t,e)>n}function Oa(t,{statusCode:e,headers:n},r=Date.now()){const s={...t},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),l=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+l;else for(const p of u.split(";"))p==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(s[p]=r+l):s[p]=r+l}else i?s.all=r+ka(i,r):e===429&&(s.all=r+60*1e3);return s}const Pa=64;function xa(t,e,n=wa(t.bufferSize||Pa)){let r={};const s=i=>n.drain(i);function o(i){const a=[];if(Br(i,(d,l)=>{const p=jr(l);Ca(r,p)?t.recordDroppedEvent("ratelimit_backoff",p):a.push(d)}),a.length===0)return Tt({});const c=se(i[0],a),u=d=>{Br(c,(l,p)=>{t.recordDroppedEvent(d,jr(p))})},f=()=>e({body:Ii(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=Oa(r,d),d),d=>{throw u("network_error"),d});return n.add(f).then(d=>d,d=>{if(d instanceof Y)return g&&m.error("Skipped sending event because buffer is full."),u("queue_overflow"),Tt({});throw d})}return{send:o,flush:s}}function Da(t){t.user?.ip_address===void 0&&(t.user={...t.user,ip_address:"{{auto}}"})}function $a(t){"aggregates"in t?t.attrs?.ip_address===void 0&&(t.attrs={...t.attrs,ip_address:"{{auto}}"}):t.ipAddress===void 0&&(t.ipAddress="{{auto}}")}function ps(t,e,n=[e],r="npm"){const s=t._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${e}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:_t})),version:_t}),t._metadata=s}function ms(t={}){const e=T();if(!ua()||!e)return{};const n=St(),r=jt(n);if(r.getTraceData)return r.getTraceData(t);const s=v(),o=t.span||L(),i=o?si(o):La(s),a=o?ht(o):Fr(e,s),c=Ko(a);return Nr.test(i)?{"sentry-trace":i,baggage:c}:(m.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function La(t){const{traceId:e,sampled:n,propagationSpanId:r}=t.getPropagationContext();return kr(e,r,n)}const Ma=100;function Ct(t,e){const n=T(),r=It();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=Ma}=n.getOptions();if(o<=0)return;const a={timestamp:Zt(),...t},c=s?ut(()=>s(a,e)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,e),r.addBreadcrumb(c,o))}let hs;const Fa="FunctionToString",gs=new WeakMap,Ha=(()=>({name:Fa,setupOnce(){hs=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=on(this),n=gs.has(T())&&e!==void 0?e:this;return hs.apply(n,t)}}catch{}},setup(t){gs.set(t,!0)}})),Ua=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/],Ba="InboundFilters",ja=((t={})=>({name:Ba,processEvent(e,n,r){const s=r.getOptions(),o=qa(t,s);return Ga(e,o)?null:e}}));function qa(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:Ua],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function Ga(t,e){return e.ignoreInternal&&Xa(t)?(g&&m.warn(`Event dropped due to being internal Sentry Error.
11
- Event: ${lt(t)}`),!0):Wa(t,e.ignoreErrors)?(g&&m.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
12
- Event: ${lt(t)}`),!0):Ja(t)?(g&&m.warn(`Event dropped due to not having an error message, error type or stacktrace.
13
- Event: ${lt(t)}`),!0):Va(t,e.ignoreTransactions)?(g&&m.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
14
- Event: ${lt(t)}`),!0):Ya(t,e.denyUrls)?(g&&m.warn(`Event dropped due to being matched by \`denyUrls\` option.
15
- Event: ${lt(t)}.
16
- Url: ${De(t)}`),!0):za(t,e.allowUrls)?!1:(g&&m.warn(`Event dropped due to not being matched by \`allowUrls\` option.
17
- Event: ${lt(t)}.
18
- Url: ${De(t)}`),!0)}function Wa(t,e){return t.type||!e||!e.length?!1:us(t).some(n=>bt(n,e))}function Va(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;const n=t.transaction;return n?bt(n,e):!1}function Ya(t,e){if(!e?.length)return!1;const n=De(t);return n?bt(n,e):!1}function za(t,e){if(!e?.length)return!0;const n=De(t);return n?bt(n,e):!0}function Xa(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function Ka(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function De(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?Ka(e):null}catch{return g&&m.error(`Cannot extract url for event ${lt(t)}`),null}}function Ja(t){return t.type||!t.exception?.values?.length?!1:!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value)}function Za(t,e,n=250,r,s,o,i){if(!o.exception?.values||!i||!Q(i.originalException,Error))return;const a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=Qa(Rn(t,e,s,i.originalException,r,o.exception.values,a,0),n))}function Rn(t,e,n,r,s,o,i,a){if(o.length>=n+1)return o;let c=[...o];if(Q(r[s],Error)){_s(i,a);const u=t(e,r[s]),f=c.length;Ss(u,s,f,a),c=Rn(t,e,n,r[s],s,[u,...c],u,f)}return Array.isArray(r.errors)&&r.errors.forEach((u,f)=>{if(Q(u,Error)){_s(i,a);const d=t(e,u),l=c.length;Ss(d,`errors[${f}]`,l,a),c=Rn(t,e,n,u,s,[d,...c],d,l)}}),c}function _s(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function Ss(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function Qa(t,e){return t.map(n=>(n.value&&(n.value=Ft(n.value,e)),n))}function tc(t){const e="console";dt(e,t),ft(e,ec)}function ec(){"console"in b&&Je.forEach(function(t){t in b.console&&H(b.console,t,function(e){return _e[t]=e,function(...n){B("console",{args:n,level:t}),_e[t]?.apply(b.console,n)}})})}function nc(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}const rc="Dedupe",sc=(()=>{let t;return{name:rc,processEvent(e){if(e.type)return e;try{if(oc(e,t))return g&&m.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}});function oc(t,e){return e?!!(ic(t,e)||ac(t,e)):!1}function ic(t,e){const n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Es(t,e)||!ys(t,e))}function ac(t,e){const n=bs(e),r=bs(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Es(t,e)||!ys(t,e))}function ys(t,e){let n=er(t),r=er(e);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 Es(t,e){let n=t.fingerprint,r=e.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 bs(t){return t.exception?.values&&t.exception.values[0]}function Ot(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function cc(t,e,n,r,s="auto.http.browser"){if(!t.fetchData)return;const o=et()&&e(t.fetchData.url);if(t.endTimestamp&&o){const p=t.fetchData.__span;if(!p)return;const S=r[p];S&&(fc(S,t),delete r[p]);return}const{method:i,url:a}=t.fetchData,c=dc(a),u=c?Ot(c).host:void 0,f=!!L(),d=o&&f?At({name:`${i} ${a}`,attributes:{url:a,type:"fetch","http.method":i,"http.url":c,"server.address":u,[R]:s,[vt]:"http.client"}}):new kt;if(t.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d,n(t.fetchData.url)){const p=t.args[0],S=t.args[1]||{},y=uc(p,S,et()&&f?d:void 0);y&&(t.args[1]=S,S.headers=y)}const l=T();if(l){const p={input:t.args,response:t.response,startTimestamp:t.startTimestamp,endTimestamp:t.endTimestamp};l.emit("beforeOutgoingRequestSpan",d,p)}return d}function uc(t,e,n){const r=ms({span:n}),s=r["sentry-trace"],o=r.baggage;if(!s)return;const i=e.headers||(lc(t)?t.headers:void 0);if(i)if(pc(i)){const a=new Headers(i);if(a.set("sentry-trace",s),o){const c=a.get("baggage");if(c){const u=$e(c);a.set("baggage",u?`${u},${o}`:o)}else a.set("baggage",o)}return a}else if(Array.isArray(i)){const a=[...i.filter(c=>!(Array.isArray(c)&&c[0]==="sentry-trace")).map(c=>{if(Array.isArray(c)&&c[0]==="baggage"&&typeof c[1]=="string"){const[u,f,...d]=c;return[u,$e(f),...d]}else return c}),["sentry-trace",s]];return o&&a.push(["baggage",o]),a}else{const a="baggage"in i?i.baggage:void 0;let c=[];return Array.isArray(a)?c=a.map(u=>typeof u=="string"?$e(u):u).filter(u=>u===""):a&&c.push($e(a)),o&&c.push(o),{...i,"sentry-trace":s,baggage:c.length>0?c.join(","):void 0}}else return{...r}}function dc(t){try{return new URL(t).href}catch{return}}function fc(t,e){if(e.response){Tr(t,e.response.status);const n=e.response?.headers&&e.response.headers.get("content-length");if(n){const r=parseInt(n);r>0&&t.setAttribute("http.response_content_length",r)}}else e.error&&t.setStatus({code:P,message:"internal_error"});t.end()}function $e(t){return t.split(",").filter(e=>!e.split("=")[0].startsWith(mn)).join(",")}function lc(t){return typeof Request<"u"&&Q(t,Request)}function pc(t){return typeof Headers<"u"&&Q(t,Headers)}function Ts(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}const Le=b;function mc(){return"history"in Le}function Is(){if(!("fetch"in Le))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function wn(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function hc(){if(typeof EdgeRuntime=="string")return!0;if(!Is())return!1;if(wn(Le.fetch))return!0;let t=!1;const e=Le.document;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow?.fetch&&(t=wn(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){ct&&m.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function vs(t,e){const n="fetch";dt(n,t),ft(n,()=>Rs(void 0,e))}function gc(t){const e="fetch-body-resolved";dt(e,t),ft(e,()=>Rs(Sc))}function Rs(t,e=!1){e&&!hc()||H(b,"fetch",function(n){return function(...r){const s=new Error,{method:o,url:i}=yc(r),a={args:r,fetchData:{method:o,url:i},startTimestamp:D()*1e3,virtualError:s};return t||B("fetch",{...a}),n.apply(b,r).then(async c=>(t?t(c):B("fetch",{...a,endTimestamp:D()*1e3,response:c}),c),c=>{throw B("fetch",{...a,endTimestamp:D()*1e3,error:c}),en(c)&&c.stack===void 0&&(c.stack=s.stack,U(c,"framesToPop",1)),c})}})}async function _c(t,e){if(t?.body){const n=t.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&&(e(),o=!1)}catch{o=!1}finally{clearTimeout(i)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function Sc(t){let e;try{e=t.clone()}catch{return}_c(e,()=>{B("fetch-body-resolved",{endTimestamp:D()*1e3,response:t})})}function Nn(t,e){return!!t&&typeof t=="object"&&!!t[e]}function ws(t){return typeof t=="string"?t:t?Nn(t,"url")?t.url:t.toString?t.toString():"":""}function yc(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){const[n,r]=t;return{url:ws(n),method:Nn(r,"method")?String(r.method).toUpperCase():"GET"}}const e=t[0];return{url:ws(e),method:Nn(e,"method")?String(e.method).toUpperCase():"GET"}}function Ec(){return"npm"}const E=b;let kn=0;function Ns(){return kn>0}function bc(){kn++,setTimeout(()=>{kn--})}function qt(t,e={}){function n(s){return typeof s=="function"}if(!n(t))return t;try{const s=t.__sentry_wrapped__;if(s)return typeof s=="function"?s:t;if(on(t))return t}catch{return t}const r=function(...s){try{const o=s.map(i=>qt(i,e));return t.apply(this,o)}catch(o){throw bc(),fn(i=>{i.addEventProcessor(a=>(e.mechanism&&(un(a,void 0),Ht(a,e.mechanism)),a.extra={...a.extra,arguments:s},a)),In(o)}),o}};try{for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}catch{}fr(r,t),U(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}function An(t,e){const n=On(t,e),r={type:wc(e),value:Nc(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Tc(t,e,n,r){const o=T()?.getOptions().normalizeDepth,i=Pc(e),a={__serialized__:Ur(e,o)};if(i)return{exception:{values:[An(t,i)]},extra:a};const c={exception:{values:[{type:Ee(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Cc(e,{isUnhandledRejection:r})}]},extra:a};if(n){const u=On(t,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function Cn(t,e){return{exception:{values:[An(t,e)]}}}function On(t,e){const n=e.stacktrace||e.stack||"",r=vc(e),s=Rc(e);try{return t(n,r,s)}catch{}return[]}const Ic=/Minified React error #\d+;/i;function vc(t){return t&&Ic.test(t.message)?1:0}function Rc(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function ks(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function wc(t){const e=t?.name;return!e&&ks(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function Nc(t){const e=t?.message;return ks(t)?Array.isArray(t.message)&&t.message.length==2?t.message[1]:"wasm exception":e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function kc(t,e,n,r){const s=n?.syntheticException||void 0,o=Pn(t,e,s,r);return Ht(o),o.level="error",n?.event_id&&(o.event_id=n.event_id),Tt(o)}function Ac(t,e,n="info",r,s){const o=r?.syntheticException||void 0,i=xn(t,e,o,s);return i.level=n,r?.event_id&&(i.event_id=r.event_id),Tt(i)}function Pn(t,e,n,r,s){let o;if(ir(e)&&e.error)return Cn(t,e.error);if(ar(e)||bo(e)){const i=e;if("stack"in e)o=Cn(t,e);else{const a=i.name||(ar(i)?"DOMError":"DOMException"),c=i.message?`${a}: ${i.message}`:a;o=xn(t,c,n,r),un(o,c)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return en(e)?Cn(t,e):Mt(e)||Ee(e)?(o=Tc(t,e,n,s),Ht(o,{synthetic:!0}),o):(o=xn(t,e,n,r),un(o,`${e}`),Ht(o,{synthetic:!0}),o)}function xn(t,e,n,r){const s={};if(r&&n){const o=On(t,n);o.length&&(s.exception={values:[{value:e,stacktrace:{frames:o}}]}),Ht(s,{synthetic:!0})}if(nn(e)){const{__sentry_template_string__:o,__sentry_template_values__:i}=e;return s.logentry={message:o,params:i},s}return s.message=e,s}function Cc(t,{isUnhandledRejection:e}){const n=ko(t),r=e?"promise rejection":"exception";return ir(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:Ee(t)?`Event \`${Oc(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Oc(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function Pc(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];if(n instanceof Error)return n}}class xc extends ba{constructor(e){const n={parentSpanIsAlwaysRootSpan:!0,...e},r=E.SENTRY_SDK_SOURCE||Ec();ps(n,"browser",["browser"],r),super(n),n.sendClientReports&&E.document&&E.document.addEventListener("visibilitychange",()=>{E.document.visibilityState==="hidden"&&this._flushOutcomes()}),this._options.sendDefaultPii&&(this.on("postprocessEvent",Da),this.on("beforeSendSession",$a))}eventFromException(e,n){return kc(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Ac(this._options.stackParser,e,n,r,this._options.attachStacktrace)}_prepareEvent(e,n,r,s){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r,s)}}const Dn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Dc=(t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good",Gt=(t,e,n,r)=>{let s,o;return i=>{e.value>=0&&(i||r)&&(o=e.value-(s||0),(o||s===void 0)&&(s=e.value,e.delta=o,e.rating=Dc(e.value,n),t(e)))}},_=b,$c=()=>`v4-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,oe=(t=!0)=>{const e=_.performance?.getEntriesByType?.("navigation")[0];if(!t||e&&e.responseStart>0&&e.responseStart<performance.now())return e},ie=()=>oe()?.activationStart||0,Wt=(t,e)=>{const n=oe();let r="navigate";return n&&(_.document?.prerendering||ie()>0?r="prerender":_.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:typeof e>"u"?-1:e,rating:"good",delta:0,entries:[],id:$c(),navigationType:r}},Pt=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{e(s.getEntries())})});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch{}},Vt=t=>{const e=n=>{(n.type==="pagehide"||_.document?.visibilityState==="hidden")&&t(n)};_.document&&(addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0))},Me=t=>{let e=!1;return()=>{e||(t(),e=!0)}};let ae=-1;const Lc=()=>_.document.visibilityState==="hidden"&&!_.document.prerendering?0:1/0,Fe=t=>{_.document.visibilityState==="hidden"&&ae>-1&&(ae=t.type==="visibilitychange"?t.timeStamp:0,Fc())},Mc=()=>{addEventListener("visibilitychange",Fe,!0),addEventListener("prerenderingchange",Fe,!0)},Fc=()=>{removeEventListener("visibilitychange",Fe,!0),removeEventListener("prerenderingchange",Fe,!0)},He=()=>(_.document&&ae<0&&(ae=Lc(),Mc()),{get firstHiddenTime(){return ae}}),ce=t=>{_.document?.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},Hc=[1800,3e3],Uc=(t,e={})=>{ce(()=>{const n=He(),r=Wt("FCP");let s;const i=Pt("paint",a=>{a.forEach(c=>{c.name==="first-contentful-paint"&&(i.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-ie(),0),r.entries.push(c),s(!0)))})});i&&(s=Gt(t,r,Hc,e.reportAllChanges))})},Bc=[.1,.25],jc=(t,e={})=>{Uc(Me(()=>{const n=Wt("CLS",0);let r,s=0,o=[];const i=c=>{c.forEach(u=>{if(!u.hadRecentInput){const f=o[0],d=o[o.length-1];s&&f&&d&&u.startTime-d.startTime<1e3&&u.startTime-f.startTime<5e3?(s+=u.value,o.push(u)):(s=u.value,o=[u])}}),s>n.value&&(n.value=s,n.entries=o,r())},a=Pt("layout-shift",i);a&&(r=Gt(t,n,Bc,e.reportAllChanges),Vt(()=>{i(a.takeRecords()),r(!0)}),setTimeout(r,0))}))},qc=[100,300],Gc=(t,e={})=>{ce(()=>{const n=He(),r=Wt("FID");let s;const o=c=>{c.startTime<n.firstHiddenTime&&(r.value=c.processingStart-c.startTime,r.entries.push(c),s(!0))},i=c=>{c.forEach(o)},a=Pt("first-input",i);s=Gt(t,r,qc,e.reportAllChanges),a&&Vt(Me(()=>{i(a.takeRecords()),a.disconnect()}))})};let As=0,$n=1/0,Ue=0;const Wc=t=>{t.forEach(e=>{e.interactionId&&($n=Math.min($n,e.interactionId),Ue=Math.max(Ue,e.interactionId),As=Ue?(Ue-$n)/7+1:0)})};let Ln;const Vc=()=>Ln?As:performance.interactionCount||0,Yc=()=>{"interactionCount"in performance||Ln||(Ln=Pt("event",Wc,{type:"event",buffered:!0,durationThreshold:0}))},rt=[],Mn=new Map,zc=40;let Xc=0;const Kc=()=>Vc()-Xc,Jc=()=>{const t=Math.min(rt.length-1,Math.floor(Kc()/50));return rt[t]},Fn=10,Zc=[],Qc=t=>{if(Zc.forEach(r=>r(t)),!(t.interactionId||t.entryType==="first-input"))return;const e=rt[rt.length-1],n=Mn.get(t.interactionId);if(n||rt.length<Fn||e&&t.duration>e.latency){if(n)t.duration>n.latency?(n.entries=[t],n.latency=t.duration):t.duration===n.latency&&t.startTime===n.entries[0]?.startTime&&n.entries.push(t);else{const r={id:t.interactionId,latency:t.duration,entries:[t]};Mn.set(r.id,r),rt.push(r)}rt.sort((r,s)=>s.latency-r.latency),rt.length>Fn&&rt.splice(Fn).forEach(r=>Mn.delete(r.id))}},Cs=t=>{const e=_.requestIdleCallback||_.setTimeout;let n=-1;return t=Me(t),_.document?.visibilityState==="hidden"?t():(n=e(t),Vt(t)),n},tu=[200,500],eu=(t,e={})=>{"PerformanceEventTiming"in _&&"interactionId"in PerformanceEventTiming.prototype&&ce(()=>{Yc();const n=Wt("INP");let r;const s=i=>{Cs(()=>{i.forEach(Qc);const a=Jc();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())})},o=Pt("event",s,{durationThreshold:e.durationThreshold!=null?e.durationThreshold:zc});r=Gt(t,n,tu,e.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),Vt(()=>{s(o.takeRecords()),r(!0)}))})},nu=[2500,4e3],Os={},ru=(t,e={})=>{ce(()=>{const n=He(),r=Wt("LCP");let s;const o=a=>{e.reportAllChanges||(a=a.slice(-1)),a.forEach(c=>{c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-ie(),0),r.entries=[c],s())})},i=Pt("largest-contentful-paint",o);if(i){s=Gt(t,r,nu,e.reportAllChanges);const a=Me(()=>{Os[r.id]||(o(i.takeRecords()),i.disconnect(),Os[r.id]=!0,s(!0))});["keydown","click"].forEach(c=>{_.document&&addEventListener(c,()=>Cs(a),{once:!0,capture:!0})}),Vt(a)}})},su=[800,1800],Hn=t=>{_.document?.prerendering?ce(()=>Hn(t)):_.document?.readyState!=="complete"?addEventListener("load",()=>Hn(t),!0):setTimeout(t,0)},ou=(t,e={})=>{const n=Wt("TTFB"),r=Gt(t,n,su,e.reportAllChanges);Hn(()=>{const s=oe();s&&(n.value=Math.max(s.responseStart-ie(),0),n.entries=[s],r(!0))})},ue={},Be={};let Ps,xs,Ds,$s,Ls;function Ms(t,e=!1){return fe("cls",t,du,Ps,e)}function iu(t,e=!1){return fe("lcp",t,lu,Ds,e)}function au(t){return fe("fid",t,fu,xs)}function cu(t){return fe("ttfb",t,pu,$s)}function uu(t){return fe("inp",t,mu,Ls)}function de(t,e){return Fs(t,e),Be[t]||(hu(t),Be[t]=!0),Hs(t,e)}function Yt(t,e){const n=ue[t];if(n?.length)for(const r of n)try{r(e)}catch(s){Dn&&m.error(`Error while triggering instrumentation handler.
19
- Type: ${t}
20
- Name: ${J(r)}
21
- Error:`,s)}}function du(){return jc(t=>{Yt("cls",{metric:t}),Ps=t},{reportAllChanges:!0})}function fu(){return Gc(t=>{Yt("fid",{metric:t}),xs=t})}function lu(){return ru(t=>{Yt("lcp",{metric:t}),Ds=t},{reportAllChanges:!0})}function pu(){return ou(t=>{Yt("ttfb",{metric:t}),$s=t})}function mu(){return eu(t=>{Yt("inp",{metric:t}),Ls=t})}function fe(t,e,n,r,s=!1){Fs(t,e);let o;return Be[t]||(o=n(),Be[t]=!0),r&&e({metric:r}),Hs(t,e,s?o:void 0)}function hu(t){const e={};t==="event"&&(e.durationThreshold=0),Pt(t,n=>{Yt(t,{entries:n})},e)}function Fs(t,e){ue[t]=ue[t]||[],ue[t].push(e)}function Hs(t,e,n){return()=>{n&&n();const r=ue[t];if(!r)return;const s=r.indexOf(e);s!==-1&&r.splice(s,1)}}function gu(t){return"duration"in t}function Un(t){return typeof t=="number"&&isFinite(t)}function st(t,e,n,{...r}){const s=I(t).start_timestamp;return s&&s>e&&typeof t.updateStartTime=="function"&&t.updateStartTime(e),Xr(t,()=>{const o=At({startTime:e,...r});return o&&o.end(n),o})}function Us(t){const e=T();if(!e)return;const{name:n,transaction:r,attributes:s,startTime:o}=t,{release:i,environment:a,sendDefaultPii:c}=e.getOptions(),f=e.getIntegrationByName("Replay")?.getReplayId(),d=v(),l=d.getUser(),p=l!==void 0?l.email||l.id||l.ip_address:void 0;let S;try{S=d.getScopeData().contexts.profile.profile_id}catch{}const y={release:i,environment:a,user:p||void 0,profile_id:S||void 0,replay_id:f||void 0,transaction:r,"user_agent.original":_.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...s};return At({name:n,attributes:y,startTime:o,experimental:{standalone:!0}})}function Bn(){return _.addEventListener&&_.performance}function k(t){return t/1e3}function Bs(t){let e="unknown",n="unknown",r="";for(const s of t){if(s==="/"){[e,n]=t.split("/");break}if(!isNaN(Number(s))){e=r==="h"?"http":r,n=t.split(r)[1];break}r+=s}return r===t&&(e=r),{name:e,version:n}}function _u(){let t=0,e,n;if(!yu())return;let r=!1;function s(){r||(r=!0,n&&Su(t,e,n),o())}const o=Ms(({metric:i})=>{const a=i.entries[i.entries.length-1];a&&(t=i.value,e=a)},!0);Vt(()=>{s()}),setTimeout(()=>{const i=T();if(!i)return;const a=i.on("startNavigationSpan",()=>{s(),a?.()}),c=L();if(c){const u=$(c);I(u).op==="pageload"&&(n=u.spanContext().spanId)}},0)}function Su(t,e,n){Dn&&m.log(`Sending CLS span (${t})`);const r=k((j()||0)+(e?.startTime||0)),s=v().getScopeData().transactionName,o=e?Et(e.sources[0]?.node):"Layout shift",i=O({[R]:"auto.http.browser.cls",[vt]:"ui.webvital.cls",[ne]:e?.duration||0,"sentry.pageload.span_id":n}),a=Us({name:o,transaction:s,attributes:i,startTime:r});a&&(a.addEvent("cls",{[ve]:"",[Re]:t}),a.end(r))}function yu(){try{return PerformanceObserver.supportedEntryTypes.includes("layout-shift")}catch{return!1}}const Eu=2147483647;let js=0,x={},M,je;function bu({recordClsStandaloneSpans:t}){const e=Bn();if(e&&j()){e.mark&&_.performance.mark("sentry-tracing-init");const n=Nu(),r=wu(),s=ku(),o=t?_u():Ru();return()=>{n(),r(),s(),o?.()}}return()=>{}}function Tu(){de("longtask",({entries:t})=>{const e=L();if(!e)return;const{op:n,start_timestamp:r}=I(e);for(const s of t){const o=k(j()+s.startTime),i=k(s.duration);n==="navigation"&&r&&o<r||st(e,o,o+i,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[R]:"auto.ui.browser.metrics"}})}})}function Iu(){new PerformanceObserver(e=>{const n=L();if(n)for(const r of e.getEntries()){if(!r.scripts[0])continue;const s=k(j()+r.startTime),{start_timestamp:o,op:i}=I(n);if(i==="navigation"&&o&&s<o)continue;const a=k(r.duration),c={[R]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:f,invokerType:d,sourceURL:l,sourceFunctionName:p,sourceCharPosition:S}=u;c["browser.script.invoker"]=f,c["browser.script.invoker_type"]=d,l&&(c["code.filepath"]=l),p&&(c["code.function"]=p),S!==-1&&(c["browser.script.source_char_position"]=S),st(n,s,s+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function vu(){de("event",({entries:t})=>{const e=L();if(e){for(const n of t)if(n.name==="click"){const r=k(j()+n.startTime),s=k(n.duration),o={name:Et(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[R]:"auto.ui.browser.metrics"}},i=ur(n.target);i&&(o.attributes["ui.component_name"]=i),st(e,r,r+s,o)}}})}function Ru(){return Ms(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(x.cls={value:t.value,unit:""},je=e)},!0)}function wu(){return iu(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(x.lcp={value:t.value,unit:"millisecond"},M=e)},!0)}function Nu(){return au(({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e)return;const n=k(j()),r=k(e.startTime);x.fid={value:t.value,unit:"millisecond"},x["mark.fid"]={value:n+r,unit:"second"}})}function ku(){return cu(({metric:t})=>{t.entries[t.entries.length-1]&&(x.ttfb={value:t.value,unit:"millisecond"})})}function Au(t,e){const n=Bn(),r=j();if(!n?.getEntries||!r)return;const s=k(r),o=n.getEntries(),{op:i,start_timestamp:a}=I(t);if(o.slice(js).forEach(c=>{const u=k(c.startTime),f=k(Math.max(0,c.duration));if(!(i==="navigation"&&a&&s+u<a))switch(c.entryType){case"navigation":{Ou(t,c,s);break}case"mark":case"paint":case"measure":{Cu(t,c,u,f,s);const d=He(),l=c.startTime<d.firstHiddenTime;c.name==="first-paint"&&l&&(x.fp={value:c.startTime,unit:"millisecond"}),c.name==="first-contentful-paint"&&l&&(x.fcp={value:c.startTime,unit:"millisecond"});break}case"resource":{Du(t,c,c.name,u,f,s);break}}}),js=Math.max(o.length-1,0),$u(t),i==="pageload"){Mu(x);const c=x["mark.fid"];c&&x.fid&&(st(t,c.value,c.value+k(x.fid.value),{name:"first input delay",op:"ui.action",attributes:{[R]:"auto.ui.browser.metrics"}}),delete x["mark.fid"]),(!("fcp"in x)||!e.recordClsOnPageloadSpan)&&delete x.cls,Object.entries(x).forEach(([u,f])=>{xi(u,f.value,f.unit)}),t.setAttribute("performance.timeOrigin",s),t.setAttribute("performance.activationStart",ie()),Lu(t)}M=void 0,je=void 0,x={}}function Cu(t,e,n,r,s){const o=oe(!1),i=k(o?o.requestStart:0),a=s+Math.max(n,i),c=s+n,u=c+r,f={[R]:"auto.resource.browser.metrics"};return a!==c&&(f["sentry.browser.measure_happened_before_request"]=!0,f["sentry.browser.measure_start_time"]=a),st(t,a,u,{name:e.name,op:e.entryType,attributes:f}),a}function Ou(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{qe(t,e,r,n)}),qe(t,e,"secureConnection",n,"TLS/SSL"),qe(t,e,"fetch",n,"cache"),qe(t,e,"domainLookup",n,"DNS"),xu(t,e,n)}function qe(t,e,n,r,s=n){const o=Pu(n),i=e[o],a=e[`${n}Start`];!a||!i||st(t,r+k(a),r+k(i),{op:`browser.${s}`,name:e.name,attributes:{[R]:"auto.ui.browser.metrics"}})}function Pu(t){return t==="secureConnection"?"connectEnd":t==="fetch"?"domainLookupStart":`${t}End`}function xu(t,e,n){const r=n+k(e.requestStart),s=n+k(e.responseEnd),o=n+k(e.responseStart);e.responseEnd&&(st(t,r,s,{op:"browser.request",name:e.name,attributes:{[R]:"auto.ui.browser.metrics"}}),st(t,o,s,{op:"browser.response",name:e.name,attributes:{[R]:"auto.ui.browser.metrics"}}))}function Du(t,e,n,r,s,o){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")return;const i=Ot(n),a={[R]:"auto.resource.browser.metrics"};jn(a,e,"transferSize","http.response_transfer_size"),jn(a,e,"encodedBodySize","http.response_content_length"),jn(a,e,"decodedBodySize","http.decoded_response_content_length");const c=e.deliveryType;c!=null&&(a["http.response_delivery_type"]=c);const u=e.renderBlockingStatus;u&&(a["resource.render_blocking_status"]=u),i.protocol&&(a["url.scheme"]=i.protocol.split(":").pop()),i.host&&(a["server.address"]=i.host),a["url.same_origin"]=n.includes(_.location.origin);const{name:f,version:d}=Bs(e.nextHopProtocol);a["network.protocol.name"]=f,a["network.protocol.version"]=d;const l=o+r,p=l+s;st(t,l,p,{name:n.replace(_.location.origin,""),op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",attributes:a})}function $u(t){const e=_.navigator;if(!e)return;const n=e.connection;n&&(n.effectiveType&&t.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&t.setAttribute("connectionType",n.type),Un(n.rtt)&&(x["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Un(e.deviceMemory)&&t.setAttribute("deviceMemory",`${e.deviceMemory} GB`),Un(e.hardwareConcurrency)&&t.setAttribute("hardwareConcurrency",String(e.hardwareConcurrency))}function Lu(t){M&&(M.element&&t.setAttribute("lcp.element",Et(M.element)),M.id&&t.setAttribute("lcp.id",M.id),M.url&&t.setAttribute("lcp.url",M.url.trim().slice(0,200)),M.loadTime!=null&&t.setAttribute("lcp.loadTime",M.loadTime),M.renderTime!=null&&t.setAttribute("lcp.renderTime",M.renderTime),t.setAttribute("lcp.size",M.size)),je?.sources&&je.sources.forEach((e,n)=>t.setAttribute(`cls.source.${n+1}`,Et(e.node)))}function jn(t,e,n,r){const s=e[n];s!=null&&s<Eu&&(t[r]=s)}function Mu(t){const e=oe(!1);if(!e)return;const{responseStart:n,requestStart:r}=e;r<=n&&(t["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const Fu=1e3;let qs,qn,Gn;function Hu(t){dt("dom",t),ft("dom",Uu)}function Uu(){if(!_.document)return;const t=B.bind(null,"dom"),e=Gs(t,!0);_.document.addEventListener("click",e,!1),_.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{const s=_[n]?.prototype;s?.hasOwnProperty?.("addEventListener")&&(H(s,"addEventListener",function(o){return function(i,a,c){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},f=u[i]=u[i]||{refCount:0};if(!f.handler){const d=Gs(t);f.handler=d,o.call(this,i,d,c)}f.refCount++}catch{}return o.call(this,i,a,c)}}),H(s,"removeEventListener",function(o){return function(i,a,c){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},f=u[i];f&&(f.refCount--,f.refCount<=0&&(o.call(this,i,f.handler,c),f.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,i,a,c)}}))})}function Bu(t){if(t.type!==qn)return!1;try{if(!t.target||t.target._sentryId!==Gn)return!1}catch{}return!0}function ju(t,e){return t!=="keypress"?!1:e?.tagName?!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable):!0}function Gs(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=qu(n);if(ju(n.type,r))return;U(n,"_sentryCaptured",!0),r&&!r._sentryId&&U(r,"_sentryId",q());const s=n.type==="keypress"?"input":n.type;Bu(n)||(t({event:n,name:s,global:e}),qn=n.type,Gn=r?r._sentryId:void 0),clearTimeout(qs),qs=_.setTimeout(()=>{Gn=void 0,qn=void 0},Fu)}}function qu(t){try{return t.target}catch{return null}}let Ge;function Wn(t){const e="history";dt(e,t),ft(e,Gu)}function Gu(){if(_.addEventListener("popstate",()=>{const e=_.location.href,n=Ge;if(Ge=e,n===e)return;B("history",{from:n,to:e})}),!mc())return;function t(e){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=Ge,o=String(r);if(Ge=o,s===o)return;B("history",{from:s,to:o})}return e.apply(this,n)}}H(_.history,"pushState",t),H(_.history,"replaceState",t)}const We={};function Wu(t){const e=We[t];if(e)return e;let n=_[t];if(wn(n))return We[t]=n.bind(_);const r=_.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const o=s.contentWindow;o?.[t]&&(n=o[t]),r.head.removeChild(s)}catch(s){Dn&&m.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,s)}return n&&(We[t]=n.bind(_))}function Ws(t){We[t]=void 0}const zt="__sentry_xhr_v3__";function Vs(t){dt("xhr",t),ft("xhr",Vu)}function Vu(){if(!_.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,n,r){const s=new Error,o=D()*1e3,i=Z(r[0])?r[0].toUpperCase():void 0,a=Yu(r[1]);if(!i||!a)return e.apply(n,r);n[zt]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[zt];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const f={endTimestamp:D()*1e3,startTimestamp:o,xhr:n,virtualError:s};B("xhr",f)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,f,d){return c(),u.apply(f,d)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,f,d){const[l,p]=d,S=f[zt];return S&&Z(l)&&Z(p)&&(S.request_headers[l.toLowerCase()]=p),u.apply(f,d)}}),e.apply(n,r)}}),t.send=new Proxy(t.send,{apply(e,n,r){const s=n[zt];if(!s)return e.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const o={startTimestamp:D()*1e3,xhr:n};return B("xhr",o),e.apply(n,r)}})}function Yu(t){if(Z(t))return t;try{return t.toString()}catch{}}const Vn=[],Ve=new Map;function zu(){if(Bn()&&j()){const e=Xu();return()=>{e()}}return()=>{}}const Ys={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function Xu(){return uu(({metric:t})=>{if(t.value==null)return;const e=t.entries.find(S=>S.duration===t.value&&Ys[S.name]);if(!e)return;const{interactionId:n}=e,r=Ys[e.name],s=k(j()+e.startTime),o=k(t.value),i=L(),a=i?$(i):void 0,u=(n!=null?Ve.get(n):void 0)||a,f=u?I(u).description:v().getScopeData().transactionName,d=Et(e.target),l=O({[R]:"auto.http.browser.inp",[vt]:`ui.interaction.${r}`,[ne]:e.duration}),p=Us({name:d,transaction:f,attributes:l,startTime:s});p&&(p.addEvent("inp",{[ve]:"millisecond",[Re]:t.value}),p.end(s+o))})}function Ku(){const t=({entries:e})=>{const n=L(),r=n&&$(n);e.forEach(s=>{if(!gu(s)||!r)return;const o=s.interactionId;if(o!=null&&!Ve.has(o)){if(Vn.length>10){const i=Vn.shift();Ve.delete(i)}Vn.push(o),Ve.set(o,r)}})};de("event",t),de("first-input",t)}function Ju(t,e=Wu("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:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};if(!e)return Ws("fetch"),Te("No fetch implementation available");try{return e(t.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 Ws("fetch"),n-=i,r--,Te(c)}}return xa(t,s)}const Zu=30,Qu=50;function Yn(t,e,n,r){const s={filename:t,function:e==="<anonymous>"?yt:e,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const td=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,ed=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,nd=/\((\S*)(?::(\d+))(?::(\d+))\)/,rd=[Zu,t=>{const e=td.exec(t);if(e){const[,r,s,o]=e;return Yn(r,yt,+s,+o)}const n=ed.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){const i=nd.exec(n[2]);i&&(n[2]=i[1],n[3]=i[2],n[4]=i[3])}const[s,o]=zs(n[1]||yt,n[2]);return Yn(o,s,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],sd=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,od=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,id=tr(...[rd,[Qu,t=>{const e=sd.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const o=od.exec(e[3]);o&&(e[1]=e[1]||"eval",e[3]=o[1],e[4]=o[2],e[5]="")}let r=e[3],s=e[1]||yt;return[s,r]=zs(s,r),Yn(r,s,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}]]),zs=(t,e)=>{const n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:yt,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},X=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ye=1024,ad="Breadcrumbs",cd=((t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:ad,setup(n){e.console&&tc(fd(n)),e.dom&&Hu(dd(n,e.dom)),e.xhr&&Vs(ld(n)),e.fetch&&vs(pd(n)),e.history&&Wn(md(n)),e.sentry&&n.on("beforeSendEvent",ud(n))}}});function ud(t){return function(n){T()===t&&Ct({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:lt(n)},{event:n})}}function dd(t,e){return function(r){if(T()!==t)return;let s,o,i=typeof e=="object"?e.serializeAttribute:void 0,a=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;a&&a>Ye&&(X&&m.warn(`\`dom.maxStringLength\` cannot exceed ${Ye}, but a value of ${a} was configured. Sentry will use ${Ye} instead.`),a=Ye),typeof i=="string"&&(i=[i]);try{const u=r.event,f=hd(u)?u.target:u;s=Et(f,{keyAttrs:i,maxStringLength:a}),o=ur(f)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};o&&(c.data={"ui.component_name":o}),Ct(c,{event:r.event,name:r.name,global:r.global})}}function fd(t){return function(n){if(T()!==t)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:nc(n.level),message:dr(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${dr(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Ct(r,{input:n.args,level:n.level})}}function ld(t){return function(n){if(T()!==t)return;const{startTimestamp:r,endTimestamp:s}=n,o=n.xhr[zt];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},l={category:"xhr",data:f,type:"http",level:Ts(c)};t.emit("beforeOutgoingRequestBreadcrumb",l,d),Ct(l,d)}}function pd(t){return function(n){if(T()!==t)return;const{startTimestamp:r,endTimestamp:s}=n;if(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"};t.emit("beforeOutgoingRequestBreadcrumb",a,i),Ct(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:Ts(i.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",c,a),Ct(c,a)}}}function md(t){return function(n){if(T()!==t)return;let r=n.from,s=n.to;const o=Ot(E.location.href);let i=r?Ot(r):void 0;const a=Ot(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),Ct({category:"navigation",data:{from:r,to:s}})}}function hd(t){return!!t&&!!t.target}const gd=["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"],_d="BrowserApiErrors",Sd=((t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:_d,setupOnce(){e.setTimeout&&H(E,"setTimeout",Xs),e.setInterval&&H(E,"setInterval",Xs),e.requestAnimationFrame&&H(E,"requestAnimationFrame",yd),e.XMLHttpRequest&&"XMLHttpRequest"in E&&H(XMLHttpRequest.prototype,"send",Ed);const n=e.eventTarget;n&&(Array.isArray(n)?n:gd).forEach(bd)}}});function Xs(t){return function(...e){const n=e[0];return e[0]=qt(n,{mechanism:{data:{function:J(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function yd(t){return function(e){return t.apply(this,[qt(e,{mechanism:{data:{function:"requestAnimationFrame",handler:J(t)},handled:!1,type:"instrument"}})])}}function Ed(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&H(n,s,function(o){const i={mechanism:{data:{function:s,handler:J(o)},handled:!1,type:"instrument"}},a=on(o);return a&&(i.mechanism.data.handler=J(a)),qt(o,i)})}),t.apply(this,e)}}function bd(t){const n=E[t]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(H(n,"addEventListener",function(r){return function(s,o,i){try{Td(o)&&(o.handleEvent=qt(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:J(o),target:t},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,qt(o,{mechanism:{data:{function:"addEventListener",handler:J(o),target:t},handled:!1,type:"instrument"}}),i])}}),H(n,"removeEventListener",function(r){return function(s,o,i){try{const a=o.__sentry_wrapped__;a&&r.call(this,s,a,i)}catch{}return r.call(this,s,o,i)}}))}function Td(t){return typeof t.handleEvent=="function"}const Id=()=>({name:"BrowserSession",setupOnce(){if(typeof E.document>"u"){X&&m.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}ns({ignoreDuration:!0}),os(),Wn(({from:t,to:e})=>{t!==void 0&&t!==e&&(ns({ignoreDuration:!0}),os())})}}),vd="GlobalHandlers",Rd=((t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:vd,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(wd(n),Ks("onerror")),e.onunhandledrejection&&(Nd(n),Ks("onunhandledrejection"))}}});function wd(t){rr(e=>{const{stackParser:n,attachStacktrace:r}=Js();if(T()!==t||Ns())return;const{msg:s,url:o,line:i,column:a,error:c}=e,u=Cd(Pn(n,c||s,void 0,r,!1),o,i,a);u.level="error",es(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function Nd(t){sr(e=>{const{stackParser:n,attachStacktrace:r}=Js();if(T()!==t||Ns())return;const s=kd(e),o=rn(s)?Ad(s):Pn(n,s,void 0,r,!0);o.level="error",es(o,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function kd(t){if(rn(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}function Ad(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function Cd(t,e,n,r){const s=t.exception=t.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=Z(e)&&e.length>0?e:Jt();return c.length===0&&c.push({colno:u,filename:d,function:yt,in_app:!0,lineno:f}),t}function Ks(t){X&&m.log(`Global Handler attached: ${t}`)}function Js(){return T()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Od=()=>({name:"HttpContext",preprocessEvent(t){if(!E.navigator&&!E.location&&!E.document)return;const e=t.request?.url||Jt(),{referrer:n}=E.document||{},{userAgent:r}=E.navigator||{},s={...t.request?.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...t.request,...e&&{url:e},headers:s};t.request=o}}),Pd="cause",xd=5,Dd="LinkedErrors",$d=((t={})=>{const e=t.limit||xd,n=t.key||Pd;return{name:Dd,preprocessEvent(r,s,o){const i=o.getOptions();Za(An,i.stackParser,i.maxValueLength,n,e,r,s)}}});function Zs(t){return[ja(),Ha(),Sd(),cd(),Rd(),$d(),sc(),Od(),Id()]}function Ld(t={}){return{...{defaultIntegrations:Zs(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:E.SENTRY_RELEASE?.id,sendClientReports:!0},...Md(t)}}function Md(t){const e={};for(const n of Object.getOwnPropertyNames(t)){const r=n;t[r]!==void 0&&(e[r]=t[r])}return e}function Fd(){const t=typeof E.window<"u"&&E;if(!t)return!1;const e=t.chrome?"chrome":"browser",r=t[e]?.runtime?.id,s=Jt()||"",o=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],i=!!r&&E===E.top&&o.some(c=>s.startsWith(`${c}//`)),a=typeof t.nw<"u";return!!r&&!i&&!a}function Hd(t={}){const e=Ld(t);if(!e.skipBrowserExtensionCheck&&Fd()){X&&ut(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}X&&!Is()&&m.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill.");const n={...e,stackParser:_o(e.stackParser||id),integrations:ga(e),transport:e.transport||Ju};return va(xc,n)}const Qs=new WeakMap,zn=new Map,ze={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Ud(t,e){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:o,enableHTTPTimings:i,tracePropagationTargets:a}={traceFetch:ze.traceFetch,traceXHR:ze.traceXHR,trackFetchStreamPerformance:ze.trackFetchStreamPerformance,...e},c=typeof o=="function"?o:d=>!0,u=d=>qd(d,a),f={};n&&(t.addEventProcessor(d=>(d.type==="transaction"&&d.spans&&d.spans.forEach(l=>{if(l.op==="http.client"){const p=zn.get(l.span_id);p&&(l.timestamp=p/1e3,zn.delete(l.span_id))}}),d)),s&&gc(d=>{if(d.response){const l=Qs.get(d.response);l&&d.endTimestamp&&zn.set(l,d.endTimestamp)}}),vs(d=>{const l=cc(d,c,u,f);if(d.response&&d.fetchData.__span&&Qs.set(d.response,d.fetchData.__span),l){const p=eo(d.fetchData.url),S=p?Ot(p).host:void 0;l.setAttributes({"http.url":p,"server.address":S})}i&&l&&to(l)})),r&&Vs(d=>{const l=Gd(d,c,u,f);i&&l&&to(l)})}function Bd(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol=="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function to(t){const{url:e}=I(t).data;if(!e||typeof e!="string")return;const n=de("resource",({entries:r})=>{r.forEach(s=>{Bd(s)&&s.name.endsWith(e)&&(jd(s).forEach(i=>t.setAttribute(...i)),setTimeout(n))})})}function K(t=0){return((j()||performance.timeOrigin)+t)/1e3}function jd(t){const{name:e,version:n}=Bs(t.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",e]),j()?[...r,["http.request.redirect_start",K(t.redirectStart)],["http.request.fetch_start",K(t.fetchStart)],["http.request.domain_lookup_start",K(t.domainLookupStart)],["http.request.domain_lookup_end",K(t.domainLookupEnd)],["http.request.connect_start",K(t.connectStart)],["http.request.secure_connection_start",K(t.secureConnectionStart)],["http.request.connection_end",K(t.connectEnd)],["http.request.request_start",K(t.requestStart)],["http.request.response_start",K(t.responseStart)],["http.request.response_end",K(t.responseEnd)]]:r}function qd(t,e){const n=Jt();if(n){let r,s;try{r=new URL(t,n),s=new URL(n).origin}catch{return!1}const o=r.origin===s;return e?bt(r.toString(),e)||o&&bt(r.pathname,e):o}else{const r=!!t.match(/^\/(?!\/)/);return e?bt(t,e):r}}function Gd(t,e,n,r){const s=t.xhr,o=s?.[zt];if(!s||s.__sentry_own_request__||!o)return;const i=et()&&e(o.url);if(t.endTimestamp&&i){const l=s.__sentry_xhr_span_id__;if(!l)return;const p=r[l];p&&o.status_code!==void 0&&(Tr(p,o.status_code),p.end(),delete r[l]);return}const a=eo(o.url),c=a?Ot(a).host:void 0,u=!!L(),f=i&&u?At({name:`${o.method} ${o.url}`,attributes:{type:"xhr","http.method":o.method,"http.url":a,url:o.url,"server.address":c,[R]:"auto.http.browser",[vt]:"http.client"}}):new kt;s.__sentry_xhr_span_id__=f.spanContext().spanId,r[s.__sentry_xhr_span_id__]=f,n(o.url)&&Wd(s,et()&&u?f:void 0);const d=T();return d&&d.emit("beforeOutgoingRequestSpan",f,t),f}function Wd(t,e){const{"sentry-trace":n,baggage:r}=ms({span:e});n&&Vd(t,n,r)}function Vd(t,e,n){try{t.setRequestHeader("sentry-trace",e),n&&t.setRequestHeader("baggage",n)}catch{}}function eo(t){try{return new URL(t,E.location.origin).href}catch{return}}function Yd(){E.document?E.document.addEventListener("visibilitychange",()=>{const t=L();if(!t)return;const e=$(t);if(E.document.hidden&&e){const n="cancelled",{op:r,status:s}=I(e);X&&m.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||e.setStatus({code:P,message:n}),e.setAttribute("sentry.cancellation_reason","document.hidden"),e.end()}}):X&&m.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const zd="BrowserTracing",Xd={...Ce,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...ze},no=((t={})=>{const e=E.document;ci();const{enableInp:n,enableLongTask:r,enableLongAnimationFrame:s,_experiments:{enableInteractions:o,enableStandaloneClsSpans:i},beforeStartSpan:a,idleTimeout:c,finalTimeout:u,childSpanTimeout:f,markBackgroundSpan:d,traceFetch:l,traceXHR:p,trackFetchStreamPerformance:S,shouldCreateSpanForRequest:y,enableHTTPTimings:A,instrumentPageLoad:ot,instrumentNavigation:xt}={...Xd,...t},Kn=bu({recordClsStandaloneSpans:i||!1});n&&zu(),s&&b.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?Iu():r&&Tu(),o&&vu();const pe={name:void 0,source:void 0};function me(h,w){const it=w.op==="pageload",N=a?a(w):w,F=N.attributes||{};w.name!==N.name&&(F[G]="custom",N.attributes=F),pe.name=N.name,pe.source=F[G];const W=Zr(N,{idleTimeout:c,finalTimeout:u,childSpanTimeout:f,disableAutoFinish:it,beforeSpanEnd:at=>{Kn(),Au(at,{recordClsOnPageloadSpan:!i}),io(h,void 0);const Dt=v(),Xt=Dt.getPropagationContext();Dt.setPropagationContext({...Xt,traceId:W.spanContext().traceId,sampled:wt(W),dsc:ht(at)})}});io(h,W);function C(){e&&["interactive","complete"].includes(e.readyState)&&h.emit("idleSpanEnableAutoFinish",W)}it&&e&&(e.addEventListener("readystatechange",()=>{C()}),C())}return{name:zd,afterAllSetup(h){let w=Jt();function it(){const N=Xe(h);N&&!I(N).timestamp&&(X&&m.log(`[Tracing] Finishing current active span with op: ${I(N).op}`),N.end())}if(h.on("startNavigationSpan",N=>{T()===h&&(it(),It().setPropagationContext({traceId:mt(),sampleRand:Math.random()}),v().setPropagationContext({traceId:mt(),sampleRand:Math.random()}),me(h,{op:"navigation",...N}))}),h.on("startPageLoadSpan",(N,F={})=>{if(T()!==h)return;it();const W=F.sentryTrace||so("sentry-trace"),C=F.baggage||so("baggage"),at=ti(W,C);v().setPropagationContext(at),me(h,{op:"pageload",...N})}),E.location){if(ot){const N=j();Kd(h,{name:E.location.pathname,startTime:N?N/1e3:void 0,attributes:{[G]:"url",[R]:"auto.pageload.browser"}})}xt&&Wn(({to:N,from:F})=>{if(F===void 0&&w?.indexOf(N)!==-1){w=void 0;return}F!==N&&(w=void 0,ro(h,{name:E.location.pathname,attributes:{[G]:"url",[R]:"auto.navigation.browser"}}))})}d&&Yd(),o&&Jd(h,c,u,f,pe),n&&Ku(),Ud(h,{traceFetch:l,traceXHR:p,trackFetchStreamPerformance:S,tracePropagationTargets:h.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:y,enableHTTPTimings:A})}}});function Kd(t,e,n){return t.emit("startPageLoadSpan",e,n),v().setTransactionName(e.name),Xe(t)}function ro(t,e){return t.emit("startNavigationSpan",e),v().setTransactionName(e.name),Xe(t)}function so(t){return E.document?.querySelector(`meta[name=${t}]`)?.getAttribute("content")||void 0}function Jd(t,e,n,r,s){const o=E.document;let i;const a=()=>{const c="ui.action.click",u=Xe(t);if(u){const f=I(u).op;if(["navigation","pageload"].includes(f)){X&&m.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(i&&(i.setAttribute(ln,"interactionInterrupted"),i.end(),i=void 0),!s.name){X&&m.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}i=Zr({name:s.name,op:c,attributes:{[G]:s.source||"url"}},{idleTimeout:e,finalTimeout:n,childSpanTimeout:r})};o&&addEventListener("click",a,{once:!1,capture:!0})}const oo="_sentry_idleSpan";function Xe(t){return t[oo]}function io(t,e){U(t,oo,e)}const ao=["activate","mount"],co=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Zd=/(?:^|[-_])(\w)/g,Qd=t=>t.replace(Zd,e=>e.toUpperCase()).replace(/[-_]/g,""),tf="<Root>",Xn="<Anonymous>",ef=(t,e)=>t.repeat(e),le=(t,e)=>{if(!t)return Xn;if(t.$root===t)return tf;if(!t.$options)return Xn;const n=t.$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?`<${Qd(r)}>`:Xn)+(s&&e!==!1?` at ${s}`:"")},nf=t=>{if(t&&(t._isVue||t.__isVue)&&t.$parent){const e=[];let n=0;for(;t;){if(e.length>0){const s=e[e.length-1];if(s.constructor===t.constructor){n++,t=t.$parent;continue}else n>0&&(e[e.length-1]=[s,n],n=0)}e.push(t),t=t.$parent}return`
9
+ `)}`)}function ci(e){if(!r)return;let{description:t=`< unknown name >`,op:n=`< unknown op >`}=R(e),{spanId:i}=e.spanContext(),a=`[Tracing] Finishing "${n}" ${z(e)===e?`root `:``}span "${t}" with ID ${i}`;y.log(a)}function li(e,t,n,i=B()){let a=i&&z(i);a&&(r&&y.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),a.addEvent(e,{[ln]:t,[cn]:n}))}function ui(e){if(!e||e.length===0)return;let t={};return e.forEach(e=>{let n=e.attributes||{},r=n[cn],i=n[ln];typeof r==`string`&&typeof i==`number`&&(t[e.name]={value:i,unit:r})}),t}function di(){return s(o()).segmentSpanCaptureStrategy}function H(e){return e.getOptions().traceLifecycle===`stream`}var fi=1e3,pi=class{constructor(e={}){this._traceId=e.traceId||Et(),this._spanId=e.spanId||Dt(),this._startTime=e.startTimestamp||k(),this._links=e.links,this._attributes={},this.setAttributes({[I]:`manual`,[F]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),`sampled`in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._frozen||(this._links?this._links.push(e):this._links=[e]),this}addLinks(e){return this._frozen||(this._links?this._links.push(...e):this._links=e),this}recordException(e,t){}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:+!!n}}setAttribute(e,t){return this._frozen?this:(t===void 0?delete this._attributes[e]:this._attributes[e]=t,e===`sentry.source`&&t!==void 0&&Tn(this)&&En(this),this)}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._frozen||(this._startTime=L(e))}setStatus(e){return this._frozen||(this._status=e),this}updateName(e){return this._frozen?this:(this._name=e,Tn(this)||this.setAttribute(P,`custom`),this)}end(e){if(this._endTime){this._frozen=Dn(this);return}this._endTime=L(e),ci(this),this._onSpanEnded(),this._frozen=Dn(this)}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[F],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:dr(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[I],profile_id:this._attributes[dn],exclusive_time:this._attributes[fn],measurements:ui(this._events),is_segment:this._isStandaloneSpan&&z(this)===this||void 0,segment_id:this._isStandaloneSpan?z(this).spanContext().spanId:void 0,links:nr(this._links)}}getStreamedSpanJSON(){return{name:this._name??``,span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===z(this),status:fr(this._status),attributes:pr(this._attributes,this._status),links:rr(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){if(this._frozen)return this;r&&y.log(`[Tracing] Adding an event to span:`,e);let i=mi(t)?t:n||k(),a=mi(t)?{}:t||{},o={name:e,time:L(i),attributes:a};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let e=N();e&&(e.emit(`spanEnd`,this),this._isStandaloneSpan||e.emit(`afterSpanEnd`,this));let t=z(this),n=this._isStandaloneSpan||this===t;if(this._isStandaloneSpan){this._sampled?_i(oi([this],e)):(r&&y.log(`[Tracing] Discarding standalone span because its trace was not chosen to be sampled.`),e&&e.recordDroppedEvent(`sample_rate`,`span`));return}if(!n){let e=di();if(e){let n=wn(this).scope||j();e.onChildSpanEnded(this,t,e=>this._convertSpanToTransaction(e),n)}return}if(e&&H(e)){e.emit(`afterSegmentSpanEnd`,this);return}let i=wn(this).scope||j(),a=di();if(a)a.onSegmentSpanEnded(e=>this._convertSpanToTransaction(e),i);else{let e=this._convertSpanToTransaction();e&&i.captureEvent(e)}}_convertSpanToTransaction(e={}){if(!hi(R(this)))return;this._name||=(r&&y.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),`<unlabeled transaction>`);let{scope:t,isolationScope:n}=wn(this),i=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;e.onSpanCaptured?.(this);let a=[];for(let t of vr(this)){if(t===this||gi(t)||e.isSpanAlreadyCaptured?.(t))continue;let n=R(t);hi(n)&&(e.onSpanCaptured?.(t),a.push(n))}let o=this._attributes[P];delete this._attributes[un];let s=!1;a.forEach(e=>{delete e.data[un],e.op?.startsWith(`gen_ai.`)&&(s=!0)});let c={contexts:{trace:Qn(this)},spans:a.length>fi?a.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,fi):a,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:`transaction`,sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:Vr(this),hasGenAiSpans:s},request:i,...o&&{transaction_info:{source:o}}},l=ui(this._events);return l&&Object.keys(l).length&&(r&&y.log(`[Measurements] Adding measurements to transaction event`,JSON.stringify(l,void 0,2)),c.measurements=l),c}};function mi(e){return e&&typeof e==`number`||e instanceof Date||Array.isArray(e)}function hi(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function gi(e){return e instanceof pi&&e.isStandaloneSpan()}function _i(e){let t=N();if(!t)return;let n=e[1];if(!n||n.length===0){t.recordDroppedEvent(`before_send`,`span`);return}t.sendEnvelope(e)}function vi(e,t,n){if(!V(e))return[!1];let i,a;typeof e.tracesSampler==`function`?(a=e.tracesSampler({...t,inheritOrSampleWith:e=>typeof t.parentSampleRate==`number`?t.parentSampleRate:typeof t.parentSampled==`boolean`?Number(t.parentSampled):e}),i=!0):t.parentSampled===void 0?e.tracesSampleRate!==void 0&&(a=e.tracesSampleRate,i=!0):a=t.parentSampled;let o=Wn(a);if(o===void 0)return r&&y.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(a)} of type ${JSON.stringify(typeof a)}.`),[!1];if(!o)return r&&y.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,i];let s=n<o;return s||r&&y.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(a)})`),[s,o,i]}var yi=`__SENTRY_SUPPRESS_TRACING__`;function U(e){let t=Ei();return t.startInactiveSpan?t.startInactiveSpan(e):bi(e)}function bi(e){let t=Ti(e),{forceTransaction:n,parentSpan:r}=e;return(e.scope?t=>nn(e.scope,t):r===void 0?e=>e():e=>xi(r,e))(()=>{let i=j(),a=ki(i,r),o=N();return e.onlyIfParent&&!a?Ci(i,o):wi({parentSpan:a,spanArguments:t,forceTransaction:n,scope:i})})}function xi(e,t){let n=Ei();return n.withActiveSpan?n.withActiveSpan(e,t):nn(n=>(jt(n,e||void 0),t(n)))}function Si(e=j()){let t=Ei();return t.isTracingSuppressed?t.isTracingSuppressed(e):e.getScopeData().sdkProcessingMetadata[yi]===!0}function Ci(e,t){t?.recordDroppedEvent(`no_parent_span`,`span`);let n=new kr({traceId:e.getPropagationContext().traceId});return Cn(n,e,M()),n}function wi({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){let i=M();if(!V()){let t={...i.getPropagationContext(),...r.getPropagationContext()},a=new kr({traceId:e?e.spanContext().traceId:t.traceId});return e&&!n&&gr(e,a),Cn(a,r,i),a}let a=N();if(Ai(a,t)){Si(r)||a?.recordDroppedEvent(`ignored`,`span`);let t=new kr({dropReason:`ignored`,traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});return e&&!n&&gr(e,t),Cn(t,r,i),t}let o;if(e&&!n)o=Oi(e,r,t,i),gr(e,o);else if(e){let n=Vr(e),{traceId:a,spanId:s}=e.spanContext(),c=ur(e);o=Di({traceId:a,parentSpanId:s,...t},r,i,c),Rr(o,n)}else{let{traceId:e,dsc:n,parentSpanId:a,sampled:s}={...i.getPropagationContext(),...r.getPropagationContext()};o=Di({traceId:e,parentSpanId:a,...t},r,i,s),n&&Rr(o,n)}return si(o),o}function Ti(e){let t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...t};return n.startTimestamp=L(e.startTime),delete n.startTime,n}return t}function Ei(){return qt(o())}function Di(e,t,n,i){let a=N(),o=a?.getOptions()||{},{name:s=``}=e,c={spanAttributes:{...e.attributes},spanName:s,parentSampled:i};a?.emit(`beforeSampling`,c,{decision:!1});let l=c.parentSampled??i,u=c.spanAttributes,d=t.getPropagationContext(),f=Si(t),[p,m,h]=f?[!1]:vi(o,{name:s,parentSampled:l,attributes:u,normalizedRequest:n.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:Wn(d.dsc?.sample_rate)},d.sampleRand),g=new pi({...e,attributes:{[P]:`custom`,[an]:m!==void 0&&h?m:void 0,...u},sampled:p});return!p&&a&&!f&&(r&&y.log(`[Tracing] Discarding root span because its trace was not chosen to be sampled.`),a.recordDroppedEvent(`sample_rate`,H(a)?`span`:`transaction`)),Cn(g,t,n),a&&a.emit(`spanStart`,g),g}function Oi(e,t,n,r){let{spanId:i,traceId:a}=e.spanContext(),o=Si(t),s=!o&&ur(e),c=s?new pi({...n,parentSpanId:i,traceId:a,sampled:s}):new kr({traceId:a});gr(e,c),Cn(c,t,r);let l=N();return l?(H(l)&&Ar(c)&&(Ar(e)&&e.dropReason?(c.dropReason=e.dropReason,l.recordDroppedEvent(e.dropReason,`span`)):o||(c.dropReason=`sample_rate`,l.recordDroppedEvent(`sample_rate`,`span`))),l.emit(`spanStart`,c),n.endTimestamp&&(l.emit(`spanEnd`,c),l.emit(`afterSpanEnd`,c)),c):c}function ki(e,t){if(t)return t;if(t===null)return;let n=Mt(e);if(!n)return;let r=N();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?z(n):n}function Ai(e,t){let n=e?.getOptions().ignoreSpans;return!e||!H(e)||!n?.length?!1:wr({description:t.name||``,op:t.attributes?.[`sentry.op`]||t.op,attributes:t.attributes},n)}function ji(e){return Ar(e)&&e.dropReason===`ignored`}var Mi={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Ni=`heartbeatFailed`,Pi=`idleTimeout`,Fi=`finalTimeout`,Ii=`externalFinish`;function Li(e,t={}){let n=new Map,i=!1,a,o=Ii,s=!t.disableAutoFinish,c=[],{idleTimeout:l=Mi.idleTimeout,finalTimeout:u=Mi.finalTimeout,childSpanTimeout:d=Mi.childSpanTimeout,beforeSpanEnd:f,trimIdleSpanEndTimestamp:p=!0}=t,m=N(),h=j();if(!m||!V()){let e=new kr({traceId:h.getPropagationContext().traceId});return Cn(e,h,M()),e}let g=B(),_=Ri(e);_.end=new Proxy(_.end,{apply(e,t,n){if(f&&f(_),Ar(t))return;let[r,...i]=n,a=L(r||k()),o=vr(_).filter(e=>e!==_),s=R(_);if(!o.length||!p)return ie(a),Reflect.apply(e,t,[a,...i]);let c=m.getOptions().ignoreSpans,l=o?.reduce((e,t)=>{let n=R(t);return!n.timestamp||c&&wr({description:n.description,op:n.op,attributes:n.data},c)?e:e?Math.max(e,n.timestamp):n.timestamp},void 0),d=s.start_timestamp,h=Math.min(d?d+u/1e3:1/0,Math.max(d||-1/0,Math.min(a,l||1/0)));return ie(h),Reflect.apply(e,t,[h,...i])}});function v(){a&&=(clearTimeout(a),void 0)}function ee(e){v(),a=setTimeout(()=>{!i&&n.size===0&&s&&(o=Pi,_.end(e))},l)}function te(e){a=setTimeout(()=>{!i&&s&&(o=Ni,_.end(e))},d)}function ne(e){v(),n.set(e,!0),te(k()+d/1e3)}function re(e){n.has(e)&&n.delete(e),n.size===0&&ee(k()+l/1e3)}function ie(e){i=!0,n.clear(),c.forEach(e=>e()),jt(h,g);let t=R(_),{start_timestamp:a}=t;if(!a)return;t.data[`sentry.idle_span_finish_reason`]||_.setAttribute(sn,o);let s=t.status;(!s||s===`unknown`)&&_.setStatus({code:1}),y.log(`[Tracing] Idle span "${t.op}" finished`);let d=vr(_).filter(e=>e!==_),f=0;d.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:`cancelled`}),t.end(e),r&&y.log(`[Tracing] Cancelling span since span ended early`,JSON.stringify(t,void 0,2)));let{timestamp:n=0,start_timestamp:i=0}=R(t),a=i<=e,o=(u+l)/1e3,s=n-i<=o;if(r){let e=JSON.stringify(t,void 0,2);a?s||y.log(`[Tracing] Discarding span since it finished after idle span final timeout`,e):y.log(`[Tracing] Discarding span since it happened after idle span was finished`,e)}(!s||!a)&&(_r(_,t),f++)}),f>0&&_.setAttribute(`sentry.idle_span_discarded_spans`,f)}return c.push(m.on(`spanStart`,e=>{i||e===_||R(e).timestamp||e instanceof pi&&e.isStandaloneSpan()||vr(_).includes(e)&&ne(e.spanContext().spanId)})),c.push(m.on(`spanEnd`,e=>{i||re(e.spanContext().spanId)})),c.push(m.on(`idleSpanEnableAutoFinish`,e=>{e===_&&(s=!0,ee(),n.size&&te())})),t.disableAutoFinish||ee(),setTimeout(()=>{i||(_.setStatus({code:2,message:`deadline_exceeded`}),o=Fi,_.end())},u),_}function Ri(e){let t=U(e);return jt(j(),t),r&&y.log(`[Tracing] Started span is an idle span`),t}function zi(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;Ui(e,t),r&&Ki(e,r),qi(e,n),Wi(e,i),Gi(e,a)}function Bi(e,t){let{extra:n,tags:r,attributes:i,user:a,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:m,span:h}=t;Vi(e,`extra`,n),Vi(e,`tags`,r),Vi(e,`attributes`,i),Vi(e,`user`,a),Vi(e,`contexts`,o),e.sdkProcessingMetadata=Tt(e.sdkProcessingMetadata,c,2),s&&(e.level=s),m&&(e.transactionName=m),h&&(e.span=h),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function Vi(e,t,n){e[t]=Tt(e[t],n,1)}function Hi(e,t){let n=tn().getScopeData();return e&&Bi(n,e.getScopeData()),t&&Bi(n,t.getScopeData()),n}function Ui(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(a).length&&(e.contexts={...a,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)}function Wi(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Gi(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Ki(e,t){e.contexts={trace:$n(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Vr(t),...e.sdkProcessingMetadata};let n=R(z(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}function qi(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function Ji(e,t){let n=e.attributes??={};Object.entries(t).forEach(([e,t])=>{t!=null&&!(e in n)&&(n[e]=t)})}var Yi=0,Xi=1,Zi=2;function Qi(e){return new ea(t=>{t(e)})}function $i(e){return new ea((t,n)=>{n(e)})}var ea=class e{constructor(e){this._state=Yi,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{if(i){n(r);return}e(r)})})}_executeHandlers(){if(this._state===Yi)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===Xi&&e[1](this._value),this._state===Zi&&e[2](this._value),!0)})}_runExecutor(e){let t=(e,t)=>{if(this._state===Yi){if(Me(t)){t.then(n,r);return}this._state=e,this._value=t,this._executeHandlers()}},n=e=>{t(Xi,e)},r=e=>{t(Zi,e)};try{e(n,r)}catch(e){r(e)}}};function ta(e,t,n,r=0){try{let i=na(t,n,e,r);return Me(i)?i:Qi(i)}catch(e){return $i(e)}}function na(e,t,n,i){let a=n[i];if(!e||!a)return e;let o=a({...e},t);return r&&o===null&&y.log(`Event processor "${a.id||`?`}" dropped event`),Me(o)?o.then(e=>na(e,t,n,i+1)):na(o,t,n,i+1)}var ra,ia,aa,oa;function sa(e){let t=i._sentryDebugIds,n=i._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],a=n?Object.keys(n):[];if(oa&&r.length===ia&&a.length===aa)return oa;ia=r.length,aa=a.length,oa={},ra||={};let o=(t,n)=>{for(let r of t){let t=n[r],i=ra?.[r];if(i&&oa&&t)oa[i[0]]=t,ra&&(ra[r]=[i[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let i=n[e]?.filename;if(i&&oa&&ra){oa[i]=t,ra[r]=[i,t];break}}}}};return t&&o(r,t),n&&o(a,n),oa}function ca(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||O(),timestamp:t.timestamp||gt()},l=n.integrations||e.integrations.map(e=>e.name);la(c,e),fa(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&ua(c,e.stackParser);let u=ma(r,n.captureContext);n.mechanism&&ft(c,n.mechanism);let d=i?i.getEventProcessors():[],f=Hi(a,u),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),zi(c,f);let m=[...d,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?Qi(c):ta(m,c,n)).then(e=>(e&&da(e),typeof o==`number`&&o>0?pa(e,o,s):e))}function la(e,t){let{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||`production`,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);let o=e.request;o?.url&&a&&(o.url=rt(o.url,a)),a&&e.exception?.values?.forEach(e=>{e.value&&=rt(e.value,a)})}function ua(e,t){let n=sa(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}function da(e){let t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})})}function fa(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function pa(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:E(e.data,t,n)}}))},...e.user&&{user:E(e.user,t,n)},...e.contexts&&{contexts:E(e.contexts,t,n)},...e.extra&&{extra:E(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=E(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:E(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=E(e.contexts.flags,3,n)),r}function ma(e,t){if(!t)return e;let n=e?e.clone():new Pt;return n.update(t),n}function ha(e){if(e)return ga(e)||va(e)?{captureContext:e}:e}function ga(e){return e instanceof Pt||typeof e==`function`}var _a=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`propagationContext`];function va(e){return Object.keys(e).some(e=>_a.includes(e))}function ya(e,t){return j().captureException(e,ha(t))}function ba(e,t){return j().captureEvent(e,t)}function xa(){let e=N();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function Sa(e){let t=M(),{user:n}=Hi(t,j()),{userAgent:r}=i.navigator||{},a=xt({user:n,...r&&{userAgent:r},...e}),o=t.getSession();return o?.status===`ok`&&St(o,{status:`exited`}),Ca(),t.setSession(a),a}function Ca(){let e=M(),t=j().getSession()||e.getSession();t&&Ct(t),wa(),e.setSession()}function wa(){let e=M(),t=N(),n=e.getSession();n&&t&&t.captureSession(n)}function Ta(e=!1){if(e){Ca();return}wa()}function Ea(e){return typeof e==`object`&&typeof e.unref==`function`&&e.unref(),e}function Da(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function Oa(e){return`${Da(e)}${e.projectId}/envelope/`}function ka(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Aa(e,t,n){return t||`${Oa(e)}?${ka(e,n)}`}var ja=[];function Ma(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}function Na(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n==`function`){let e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return Ma(r)}function Pa(e,t){let n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&Ia(e,t,n)}),n}function Fa(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Ia(e,t,n){if(n[t.name]){r&&y.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!ja.includes(t.name)&&typeof t.setupOnce==`function`&&(t.setupOnce(),ja.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,(t,r)=>n(t,r,e))}if(typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}[`processSpan`,`processSegmentSpan`].forEach(n=>{let r=t[n];typeof r==`function`&&e.on(n,n=>r.call(t,n,e))}),r&&y.log(`Integration installed: ${t.name}`)}function W(e){return e}function La(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function Ra(){return`npm`}function za(){return!La()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function Ba(){return typeof window<`u`&&(!za()||Va())}function Va(){return i.process?.type===`renderer`}function Ha(e,t){let n=t?`auto`:`never`;return[{type:`log`,item_count:e.length,content_type:`application/vnd.sentry.items.log+json`},{version:2,...Ba()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Ua(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=Ln(r)),Ur(a,[Ha(e,i)])}function Wa(e,t){let n=t??Ga(e)??[];if(n.length===0)return;let r=e.getOptions(),i=Ua(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Ka().set(e,[]),e.emit(`flushLogs`),e.sendEnvelope(i)}function Ga(e){return Ka().get(e)}function Ka(){return c(`clientToLogBufferMap`,()=>new WeakMap)}function qa(e,t){let n=t?`auto`:`never`;return[{type:`trace_metric`,item_count:e.length,content_type:`application/vnd.sentry.items.trace-metric+json`},{version:2,...Ba()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Ja(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=Ln(r)),Ur(a,[qa(e,i)])}function Ya(e,t){let n=t??Xa(e)??[];if(n.length===0)return;let r=e.getOptions(),i=Ja(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Za().set(e,[]),e.emit(`flushMetrics`),e.sendEnvelope(i)}function Xa(e){return Za().get(e)}function Za(){return c(`clientToMetricBufferMap`,()=>new WeakMap)}function Qa(e){return sr({trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||``,start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:!e.status||e.status===`ok`||e.status===`cancelled`?`ok`:`error`,is_segment:!1,attributes:{...e.data},links:e.links})}function $a(e,t){if(e.type!==`transaction`||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||t.getOptions().streamGenAiSpans===!1||H(t))return;let n=[],r=[];for(let t of e.spans)t.op?.startsWith(`gen_ai.`)?n.push(Qa(t)):r.push(t);if(n.length===0)return;e.spans=r;let i=t.getDataCollectionOptions().userInfo?`auto`:`never`;return[{type:`span`,item_count:n.length,content_type:`application/vnd.sentry.items.span.v2+json`},{version:2,...Ba()&&{ingest_settings:{infer_ip:i,infer_user_agent:i}},items:n}]}var eo=Symbol.for(`SentryBufferFullError`);function to(e=100){let t=new Set;function n(){return t.size<e}function r(e){t.delete(e)}function i(e){if(!n())return $i(eo);let i=e();return t.add(i),i.then(()=>r(i),()=>r(i)),i}function a(e){if(!t.size)return Qi(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;let r=[n,new Promise(t=>Ea(setTimeout(()=>t(!1),e)))];return Promise.race(r)}return{get $(){return Array.from(t)},add:i,drain:a}}var no=60*1e3;function ro(e,t=Ue()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?no:r-t}function io(e,t){return e[t]||e.all||0}function ao(e,t,n=Ue()){return io(e,t)>n}function oo(e,{statusCode:t,headers:n},r=Ue()){let i={...e},a=n?.[`x-sentry-rate-limits`],o=n?.[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=(isNaN(o)?60:o)*1e3;if(!n)i.all=r+s;else for(let e of n.split(`;`))e===`metric_bucket`?(!a||a.split(`;`).includes(`custom`))&&(i[e]=r+s):i[e]=r+s}else o?i.all=r+ro(o,r):t===429&&(i.all=r+60*1e3);return i}function so(e,t,n=to(e.bufferSize||64)){let i={},a=e=>n.drain(e);function o(a){let o=[];if(Gr(a,(t,n)=>{let r=ei(n);ao(i,r)?e.recordDroppedEvent(`ratelimit_backoff`,r):o.push(t)}),o.length===0)return Promise.resolve({});let s=Ur(a[0],o),c=t=>{if(Kr(s,[`client_report`])){r&&y.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`);return}Gr(s,(n,r)=>{e.recordDroppedEvent(t,ei(r))})};return n.add(()=>t({body:Jr(s)}).then(e=>e.statusCode===413?(r&&y.error(`Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.`),c(`send_error`),e):(r&&e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&y.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),i=oo(i,e),e),e=>{throw c(`network_error`),r&&y.error(`Encountered error running transport request:`,e),e})).then(e=>e,e=>{if(e===eo)return r&&y.error(`Skipped sending event because buffer is full.`),c(`queue_overflow`),Promise.resolve({});throw e})}return{send:o,flush:a}}function co(e,t,n){let r=[{type:`client_report`},{timestamp:n||gt(),discarded_events:e}];return Ur(t?{dsn:t}:{},[r])}function lo(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function uo(e){let{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:a,data:o,op:s}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:s,parent_span_id:n,span_id:r??``,start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??``,origin:a,profile_id:o?.[dn],exclusive_time:o?.[fn],measurements:e.measurements,is_segment:!0}}function fo(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&&{"sentry.profile_id":e.profile_id},...e.exclusive_time&&{"sentry.exclusive_time":e.exclusive_time}}}},measurements:e.measurements}}var po=[`forwarded`,`-ip`,`remote-`,`via`,`-user`];function mo(e){return e===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],queryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:po},httpHeaders:{request:{deny:po},response:{deny:po}},httpBodies:[],queryParams:{deny:po},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7}}var ho={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],queryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:5};function go(e){let t=e.dataCollection==null?mo(e.sendDefaultPii):ho,n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:n.httpHeaders?.request??t.httpHeaders.request,response:n.httpHeaders?.response??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,queryParams:n.queryParams??t.queryParams,graphQL:{document:n.graphQL?.document??t.graphQL.document,variables:n.graphQL?.variables??t.graphQL.variables},genAI:{inputs:n.genAI?.inputs??t.genAI.inputs,outputs:n.genAI?.outputs??t.genAI.outputs},databaseQueryData:n.databaseQueryData??t.databaseQueryData,stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}var _o=`Not capturing exception because it's already been captured.`,vo=`Discarded session because of missing or non-string release`,yo=Symbol.for(`SentryInternalError`),bo=Symbol.for(`SentryDoNotSendEventError`),xo=5e3;function So(e){return{message:e,[yo]:!0}}function Co(e){return{message:e,[bo]:!0}}function wo(e){return ke(e)&&yo in e}function To(e){return ke(e)&&bo in e}function Eo(e,t,n,r,i){let a=0,o,s=!1;e.on(n,()=>{a=0,clearTimeout(o),s=!1}),e.on(t,t=>{if(a+=r(t),a>=8e5)i(e);else if(!s){let t=e.getOptions()._flushInterval??xo;t>0&&(s=!0,o=Ea(setTimeout(()=>{i(e)},t)))}}),e.on(`flush`,()=>{i(e)})}var Do=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=to(e.transportOptions?.bufferSize??64),this._dataCollection=go(e),e.dsn?this._dsn=Un(e.dsn):r&&y.warn(`No DSN provided, client will not send events.`),this._dsn){let t=Aa(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&Eo(this,`afterCaptureLog`,`flushLogs`,Po,Wa),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Eo(this,`afterCaptureMetric`,`flushMetrics`,No,Ya)}captureException(e,t,n){let i=O();if(pt(e))return r&&y.log(_o),i;let a={event_id:i,...t};return this._process(()=>this.eventFromException(e,a).then(e=>this._captureEvent(e,a,n)).then(e=>e),`error`),a.event_id}captureMessage(e,t,n,r){let i={event_id:O(),...n},a=Ee(e)?e:String(e),o=De(e),s=o?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>s.then(e=>this._captureEvent(e,i,r)),o?`unknown`:`error`),i.event_id}captureEvent(e,t,n){let i=O();if(t?.originalException&&pt(t.originalException))return r&&y.log(_o),i;let a={event_id:i,...t},o=e.sdkProcessingMetadata||{},s=o.capturedSpanScope,c=o.capturedSpanIsolationScope,l=Oo(e.type);return this._process(()=>this._captureEvent(e,a,s||n,c),l),a.event_id}captureSession(e){this.sendSession(e),St(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){let t=this._transport;if(this.emit(`flush`),!t)return!0;let n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){let t=await this.flush(e);return this.getOptions().enabled=!1,this.emit(`close`),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith(`Spotlight`)))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){let t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),Ia(this,e,this._integrations),t||Fa(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=$a(e,this),r=ai(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])r=Wr(r,Zr(e));n&&(r=Wr(r,n)),this.sendEnvelope(r).then(t=>this.emit(`afterSendEvent`,e,t))}sendSession(e){let{release:t,environment:n=Ir}=this._options;if(`aggregates`in e){let i=e.attrs||{};if(!i.release&&!t){r&&y.warn(vo);return}i.release=i.release||t,i.environment=i.environment||n,e.attrs=i}else{if(!e.release&&!t){r&&y.warn(vo);return}e.release=e.release||t,e.environment=e.environment||n}this.emit(`beforeSendSession`,e);let i=ii(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){let i=`${e}:${t}`;r&&y.log(`Recording outcome: "${i}"${n>1?` (${n} times)`:``}`),this._outcomes[i]=(this._outcomes[i]||0)+n}}on(e,t){let n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(e){return r&&y.error(`Error while sending envelope:`,e),{}}return r&&y.error(`Transport disabled`),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=Pa(this,e),Fa(this,e)}_updateSessionFromEvent(e,t){let n=t.level===`fatal`,r=!1,i=t.exception?.values;if(i){r=!0,n=!1;for(let e of i)if(e.mechanism?.handled===!1){n=!0;break}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(St(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r){let i=this.getOptions(),a=this.getIntegrationNames();return!t.integrations&&a.length&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),ca(i,e,t,n,this,r).then(e=>e===null?e:(this.emit(`postprocessEvent`,e,t),e.contexts={trace:{...e.contexts?.trace,...rn(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Br(this,n),...e.sdkProcessingMetadata},e))}_captureEvent(e,t={},n=j(),i=M()){return r&&jo(e)&&y.log(`Captured error event \`${lo(e)[0]||`<unknown>`}\``),this._processEvent(e,t,n,i).then(e=>e.event_id,e=>{r&&(To(e)?y.log(e.message):wo(e)?y.warn(e.message):y.warn(e))})}_processEvent(e,t,n,r){let i=this.getOptions(),{sampleRate:a}=i,o=Mo(e),s=jo(e),c=`before send for type \`${e.type||`error`}\``,l=a===void 0?void 0:Wn(a);if(s&&typeof l==`number`&&He()>l)return this.recordDroppedEvent(`sample_rate`,`error`),$i(Co(`Discarding event because it's not included in the random sample (sampling rate = ${a})`));let u=Oo(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(e===null)throw this.recordDroppedEvent(`event_processor`,u),Co("An event processor returned `null`, will not send event.");return t.data?.__sentry__===!0?e:ko(Ao(this,i,e,t),c)}).then(i=>{if(i===null){if(this.recordDroppedEvent(`before_send`,u),o){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw Co(`${c} returned \`null\`, will not send event.`)}let a=n.getSession()||r.getSession();if(s&&a&&this._updateSessionFromEvent(a,i),o){let e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let l=i.transaction_info;return o&&l&&i.transaction!==e.transaction&&(i.transaction_info={...l,source:`custom`}),this.sendEvent(i,t),i}).then(null,e=>{throw To(e)||wo(e)?e:(this.captureException(e,{mechanism:{handled:!1,type:`internal`},data:{__sentry__:!0},originalException:e}),So(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
10
+ Reason: ${e}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===eo&&this.recordDroppedEvent(`queue_overflow`,t),e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){r&&y.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0){r&&y.log(`No outcomes to send`);return}if(!this._dsn){r&&y.log(`No dsn provided, will not send outcomes`);return}r&&y.log(`Sending outcomes:`,e);let t=co(e,this._options.tunnel&&Ln(this._dsn));this.sendEnvelope(t)}};function Oo(e){return e===`replay_event`?`replay`:e||`error`}function ko(e,t){let n=`${t} must return \`null\` or a valid event.`;if(Me(e))return e.then(e=>{if(!Oe(e)&&e!==null)throw So(n);return e},e=>{throw So(`${t} rejected with ${e}`)});if(!Oe(e)&&e!==null)throw So(n);return e}function Ao(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,ignoreSpans:o}=t,s=!Hr(t.beforeSendSpan)&&t.beforeSendSpan,c=n;if(jo(c)&&i)return i(c,r);if(Mo(c)){if(s||o){let t=uo(c);if(o?.length&&wr({description:t.description,op:t.op,attributes:t.data},o))return null;if(s){let e=s(t);e?c=Tt(n,fo(e)):br()}if(c.spans){let t=[],n=c.spans;for(let e of n){if(o?.length&&wr({description:e.description,op:e.op,attributes:e.data},o)){Er(n,e);continue}if(s){let n=s(e);n?t.push(n):(br(),t.push(e))}else t.push(e)}let r=c.spans.length-t.length;r&&e.recordDroppedEvent(`before_send`,`span`,r),c.spans=t}}if(a){if(c.spans){let e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(c,r)}}return c}function jo(e){return e.type===void 0}function Mo(e){return e.type===`transaction`}function No(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Fo(e.attributes)}function Po(e){let t=0;return e.message&&(t+=e.message.length*2),t+Fo(e.attributes)}function Fo(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*Io(e[0]):De(e)?t+=Io(e):t+=100}),t}function Io(e){return typeof e==`string`?e.length*2:typeof e==`number`?8:typeof e==`boolean`?4:0}function Lo(e,t){t.debug===!0&&(r?y.enable():f(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),j().update(t.initialScope);let n=new e(t);return Ro(n),n.init(),n}function Ro(e){j().setClient(e)}var zo=`thismessage:/`;function Bo(e){return`isRelative`in e}function Vo(e,t){let n=e.indexOf(`://`)<=0&&e.indexOf(`//`)!==0,r=t??(n?zo:void 0);try{if(`canParse`in URL&&!URL.canParse(e,r))return;let t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function Ho(e){if(Bo(e))return e.pathname;let t=new URL(e);return t.search=``,t.hash=``,[`80`,`443`].includes(t.port)&&(t.port=``),t.password&&=`%filtered%`,t.username&&=`%filtered%`,t.toString()}function Uo(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Wo(e){return e.split(/[?#]/,1)[0]}function G(e,t=!0){if(e.startsWith(`data:`)){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:`text/plain`,i=e.includes(`;base64,`),a=e.indexOf(`,`),o=``;if(t&&a!==-1){let t=e.slice(a+1);o=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?`,base64`:``}${o?`,${o}`:``}`}return e}function Go(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 Ko(e,t,n=[t],r=`npm`){let i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:a})),i.version=a)}function qo(e={}){let t=e.client||N();if(!xa()||!t)return{};let n=qt(o());if(n.getTraceData)return n.getTraceData(e);let r=e.scope||j(),i=e.span||B(),a=Ar(i)&&!V(t.getOptions());if(!i&&en())return{};let s=i&&!a?er(i):Jo(r),c=An(i?Vr(i):Br(t,r));if(!Gn.test(s))return y.warn(`Invalid sentry-trace data. Cannot generate trace data`),{};let l={"sentry-trace":s,baggage:c};return e.propagateTraceparent&&(l.traceparent=i&&!a?tr(i):Yo(r)),l}function Jo(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Jn(t,r,n)}function Yo(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Yn(t,r,n)}function Xo(e){return Array.from(new Set(e))}var Zo=100;function Qo(e,t){let n=N(),r=M();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=Zo}=n.getOptions();if(a<=0)return;let o={timestamp:gt(),...e},s=i?f(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var $o,es=`FunctionToString`,ts=new WeakMap,ns=W((()=>({name:es,setupOnce(){$o=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Ie(this),n=ts.has(N())&&t!==void 0?t:this;return $o.apply(n,e)}}catch{}},setup(e){ts.set(e,!0)}}))),rs=[/^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/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],is=`EventFilters`,as=W((e={})=>{let t;return{name:is,setup(n){t=ss(e,n.getOptions())},processEvent(n,r,i){return t||=ss(e,i.getOptions()),cs(n,t)?null:n}}}),os=W(((e={})=>({...as(e),name:`InboundFilters`})));function ss(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:rs],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function cs(e,t){if(!e.type){if(ls(e,t.ignoreErrors))return r&&y.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
11
+ Event: ${ut(e)}`),!0;if(hs(e))return r&&y.warn(`Event dropped due to not having an error message, error type or stacktrace.
12
+ Event: ${ut(e)}`),!0;if(ds(e,t.denyUrls))return r&&y.warn(`Event dropped due to being matched by \`denyUrls\` option.
13
+ Event: ${ut(e)}.
14
+ Url: ${ms(e)}`),!0;if(!fs(e,t.allowUrls))return r&&y.warn(`Event dropped due to not being matched by \`allowUrls\` option.
15
+ Event: ${ut(e)}.
16
+ Url: ${ms(e)}`),!0}else if(e.type===`transaction`&&us(e,t.ignoreTransactions))return r&&y.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
17
+ Event: ${ut(e)}`),!0;return!1}function ls(e,t){return t?.length?lo(e).some(e=>D(e,t)):!1}function us(e,t){if(!t?.length)return!1;let n=e.transaction;return n?D(n,t):!1}function ds(e,t){if(!t?.length)return!1;let n=ms(e);return n?D(n,t):!1}function fs(e,t){if(!t?.length)return!0;let n=ms(e);return!n||D(n,t)}function ps(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}function ms(e){try{let t=[...e.exception?.values??[]].reverse().find(e=>e.mechanism?.parent_id===void 0&&e.stacktrace?.frames?.length)?.stacktrace?.frames;return t?ps(t):null}catch{return r&&y.error(`Cannot extract url for event ${ut(e)}`),null}}function hs(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value):!1}function gs(e,t,n,r,i,a){if(!i.exception?.values||!a||!Ne(a.originalException,Error))return;let o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=_s(e,t,r,a.originalException,n,i.exception.values,o,0))}function _s(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(Ne(r[i],Error)){ys(o,s,r);let a=e(t,r[i]),l=c.length;bs(a,i,l,s),c=_s(e,t,n,r[i],i,[a,...c],a,l)}return vs(r)&&r.errors.forEach((a,l)=>{if(Ne(a,Error)){ys(o,s,r);let u=e(t,a),d=c.length;bs(u,`errors[${l}]`,d,s),c=_s(e,t,n,a,i,[u,...c],u,d)}}),c}function vs(e){return Array.isArray(e.errors)}function ys(e,t,n){e.mechanism={handled:!0,type:`auto.core.linked_errors`,...vs(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function bs(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function xs(e){return be(e)&&`__sentry_fetch_url_host__`in e&&typeof e.__sentry_fetch_url_host__==`string`}function Ss(e){return xs(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var Cs=new Set([]);function ws(e){let t=`console`,n=x(t,e);return S(t,Ts),n}function Ts(){`console`in i&&l.forEach(function(e){e in i.console&&w(i.console,e,function(t){return d[e]=t,function(...t){let n=t[0],a=d[e],o=Cs.size&&typeof n==`string`&&D(n,Cs);o||C(`console`,{args:t,level:e}),(!o||r&&y.isEnabled())&&a?.apply(i.console,t)}})})}function Es(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var Ds=`Dedupe`,Os=W((()=>{let e;return{name:Ds,processEvent(t){if(t.type)return t;try{if(ks(t,e))return r&&y.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}}));function ks(e,t){return t?!!(As(e,t)||js(e,t)):!1}function As(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Ns(e,t)||!Ms(e,t))}function js(e,t){let n=Ps(t),r=Ps(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Ns(e,t)||!Ms(e,t))}function Ms(e,t){let n=ue(e),r=ue(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function Ns(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 Ps(e){return e.exception?.values?.[0]}var Fs=`ConversationId`,Is=W((()=>({name:Fs,setup(e){e.on(`spanStart`,e=>{let t=j().getScopeData(),n=M().getScopeData(),r=t.conversationId||n.conversationId;if(r){let{op:t,data:n,description:i}=R(e);if(!t?.startsWith(`gen_ai.`)&&!n[`ai.operationId`]&&!i?.startsWith(`ai.`))return;e.setAttribute(hn,r)}})}})));function Ls(e,t,n,r,i){if(!e.fetchData)return;let{method:a,url:o}=e.fetchData,s=V()&&t(o);if(e.endTimestamp){let t=e.fetchData.__span;if(!t)return;let n=r[t];n&&(s&&(Bs(n,e),Rs(n,e,i)),delete r[t]);return}let{spanOrigin:c=`auto.http.browser`,propagateTraceparent:l=!1}=typeof i==`object`?i:{spanOrigin:i},u=N(),d=!!B(),f=d||!!u&&H(u),p=s&&f?U(Ws(o,a,c)):new kr,m=ji(p)&&d?void 0:p;if(s&&!f&&u?.recordDroppedEvent(`no_parent_span`,`span`),e.fetchData.__span=p.spanContext().spanId,r[p.spanContext().spanId]=p,n(e.fetchData.url)){let t=e.args[0],n={...e.args[1]||{}},r=zs(t,n,V()&&f?m:void 0,l);r&&(e.args[1]=n,n.headers=r)}if(u){let t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};u.emit(`beforeOutgoingRequestSpan`,p,t)}return p}function Rs(e,t,n){(typeof n==`object`&&n?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function zs(e,t,n,r){let i=qo({span:n,propagateTraceparent:r}),a=i[`sentry-trace`],o=i.baggage,s=i.traceparent;if(!a)return;let c=t.headers||(Pe(e)?e.headers:void 0);if(!c)return{...i};if(Hs(c)){let e=new Headers(c);if(e.get(`sentry-trace`)||e.set(`sentry-trace`,a),r&&s&&!e.get(`traceparent`)&&e.set(`traceparent`,s),o){let t=e.get(`baggage`);t?Vs(t)||e.set(`baggage`,`${t},${o}`):e.set(`baggage`,o)}return e}else if(Us(c)){let e=[...c];e.find(e=>e[0]===`sentry-trace`)||e.push([`sentry-trace`,a]),r&&s&&!e.find(e=>e[0]===`traceparent`)&&e.push([`traceparent`,s]);let t=c.find(e=>e[0]===`baggage`&&typeof e[1]==`string`&&Vs(e[1]));return o&&!t&&e.push([`baggage`,o]),e}else{let e=`sentry-trace`in c?c[`sentry-trace`]:void 0,t=`traceparent`in c?c.traceparent:void 0,n=`baggage`in c?c.baggage:void 0,i=n?Array.isArray(n)?[...n]:[n]:[],l=n&&(Array.isArray(n)?n.find(e=>Vs(e)):Vs(n));o&&!l&&i.push(o);let u=Object.assign({},c,{"sentry-trace":e??a,baggage:i.length>0?i.join(`,`):void 0});return r&&s&&!t&&(u.traceparent=s),u}}function Bs(e,t){if(t.response){_n(e,t.response.status);let n=t.response?.headers?.get(`content-length`);if(n){let t=parseInt(n);t>0&&e.setAttribute(`http.response_content_length`,t)}}else t.error&&e.setStatus({code:2,message:`internal_error`});e.end()}function Vs(e){return typeof e==`string`&&e.split(`,`).some(e=>e.trim().startsWith(On))}function Hs(e){return typeof Headers<`u`&&Ne(e,Headers)}function Us(e){return Array.isArray(e)?e.every(e=>Array.isArray(e)&&e.length===2&&typeof e[0]==`string`):!1}function Ws(e,t,n){if(e.startsWith(`data:`))return{name:`${t} ${G(e)}`,attributes:Gs(e,void 0,t,n)};let r=Vo(e);return{name:`${t} ${r?Ho(r):e}`,attributes:Gs(e,r,t,n)}}function Gs(e,t,n,r){let i={url:G(e),type:`fetch`,"http.method":n,[I]:r,[F]:`http.client`};return t&&(Bo(t)||(i[`http.url`]=G(t.href),i[`server.address`]=t.host),t.search&&(i[`http.query`]=t.search),t.hash&&(i[`http.fragment`]=t.hash)),i}function Ks(e){if(e!==void 0){if(e>=400&&e<500)return`warning`;if(e>=500)return`error`}}var qs=i;function Js(){return`history`in qs&&!!qs.history}function Ys(){if(!(`fetch`in qs))return!1;try{return new Headers,new Request(`data:,`),new Response,!0}catch{return!1}}function Xs(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Zs(){if(typeof EdgeRuntime==`string`)return!0;if(!Ys())return!1;if(Xs(qs.fetch))return!0;let e=!1,t=qs.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Xs(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){r&&y.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function Qs(e,t){let n=`fetch`,r=x(n,e);return S(n,()=>ec(void 0,t)),r}function $s(e){let t=`fetch-body-resolved`,n=x(t,e);return S(t,()=>ec(nc)),n}function ec(e,t=!1){t&&!Zs()||w(i,`fetch`,function(t){return function(...n){let r=Error(),{method:a,url:o}=ac(n),s={args:n,fetchData:{method:a,url:o},startTimestamp:k()*1e3,virtualError:r,headers:oc(n)};return e||C(`fetch`,{...s}),t.apply(i,n).then(async t=>(e?e(t):C(`fetch`,{...s,endTimestamp:k()*1e3,response:t}),t),e=>{C(`fetch`,{...s,endTimestamp:k()*1e3,error:e}),be(e)&&e.stack===void 0&&(e.stack=r.stack,T(e,`framesToPop`,1));let t=N()?.getOptions().enhanceFetchErrorMessages??`always`;if(t!==!1&&e instanceof TypeError&&(e.message===`Failed to fetch`||e.message===`Load failed`||e.message===`NetworkError when attempting to fetch resource.`))try{let n=new URL(s.fetchData.url).host;t===`always`?e.message=`${e.message} (${n})`:T(e,`__sentry_fetch_url_host__`,n)}catch{}throw e})}})}async function tc(e,t){if(e?.body){let n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3),a=!0;for(;a;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);let{done:i}=await r.read();clearTimeout(e),i&&(t(),a=!1)}catch{a=!1}finally{clearTimeout(e)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function nc(e){let t;try{t=e.clone()}catch{return}tc(t,()=>{C(`fetch-body-resolved`,{endTimestamp:k()*1e3,response:e})})}function rc(e,t){return ke(e)&&!!e[t]}function ic(e){return typeof e==`string`?e:e?rc(e,`url`)?e.url:e.toString?e.toString():``:``}function ac(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:ic(t),method:rc(n,`method`)?String(n.method).toUpperCase():Pe(t)&&rc(t,`method`)?String(t.method).toUpperCase():`GET`}}let t=e[0];return{url:ic(t),method:rc(t,`method`)?String(t.method).toUpperCase():`GET`}}function oc(e){let[t,n]=e;try{if(typeof n==`object`&&n&&`headers`in n&&n.headers)return new Headers(n.headers);if(Pe(t))return new Headers(t.headers)}catch{}}var sc=i;function cc(){try{return sc.document.location.href}catch{return``}}function lc(e,t=5){if(!sc.HTMLElement)return null;let n=e;for(let e=0;e<t;e++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}var K=i,uc=0;function dc(){return uc>0}function fc(){uc++,setTimeout(()=>{uc--})}function pc(e,t={}){function n(e){return typeof e==`function`}if(!n(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,`__sentry_wrapped__`)){let t=e.__sentry_wrapped__;return typeof t==`function`?t:e}if(Ie(e))return e}catch{return e}let r=function(...n){i._sentryWrappedDepth=(i._sentryWrappedDepth||0)+1;try{let r=n.map(e=>pc(e,t));return e.apply(this,r)}catch(e){throw fc(),nn(r=>{r.addEventProcessor(e=>(t.mechanism&&(dt(e,void 0,void 0),ft(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),ya(e)}),e}finally{i._sentryWrappedDepth=(i._sentryWrappedDepth||0)-1}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch{}Fe(r,e),T(e,`__sentry_wrapped__`,r);try{Object.getOwnPropertyDescriptor(r,`name`).configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function mc(){let e=cc(),{referrer:t}=K.document||{},{userAgent:n}=K.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function hc(e,t){let n=vc(e,t),r={type:Cc(t),value:wc(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function gc(e,t,n,r){let i=N()?.getOptions().normalizeDepth,a=jc(t),o={__serialized__:Xe(t,i)};if(a)return{exception:{values:[hc(e,a)]},extra:o};let s={exception:{values:[{type:Ae(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:kc(t,{isUnhandledRejection:r})}]},extra:o};if(n){let t=vc(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}function _c(e,t){return{exception:{values:[hc(e,t)]}}}function vc(e,t){let n=t.stacktrace||t.stack||``,r=bc(t),i=xc(t);try{return e(n,r,i)}catch{}return[]}var yc=/Minified React error #\d+;/i;function bc(e){return e&&yc.test(e.message)?1:0}function xc(e){return typeof e.framesToPop==`number`?e.framesToPop:0}function Sc(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function Cc(e){let t=e?.name;return!t&&Sc(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function wc(e){let t=e?.message;return Sc(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:`wasm exception`:t?t.error&&typeof t.error.message==`string`?Ss(t.error):Ss(e):`No error message`}function Tc(e,t,n,r){let i=Dc(e,t,n?.syntheticException||void 0,r);return ft(i),i.level=`error`,n?.event_id&&(i.event_id=n.event_id),Qi(i)}function Ec(e,t,n=`info`,r,i){let a=Oc(e,t,r?.syntheticException||void 0,i);return a.level=n,r?.event_id&&(a.event_id=r.event_id),Qi(a)}function Dc(e,t,n,r,i){let a;if(Se(t)&&t.error)return _c(e,t.error);if(Ce(t)||we(t)){let i=t;if(`stack`in t){a=_c(e,t);let i=a.exception?.values?.[0];if(r&&n&&i&&!i.stacktrace){let t=vc(e,n);t.length&&(i.stacktrace={frames:t},ft(a,{synthetic:!0}))}}else{let t=i.name||(Ce(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=Oc(e,o,n,r),dt(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return be(t)?_c(e,t):Oe(t)||Ae(t)?(a=gc(e,t,n,i),ft(a,{synthetic:!0}),a):(a=Oc(e,t,n,r),dt(a,`${t}`,void 0),ft(a,{synthetic:!0}),a)}function Oc(e,t,n,r){let i={};if(r&&n){let r=vc(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),ft(i,{synthetic:!0})}if(Ee(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function kc(e,{isUnhandledRejection:t}){let n=ze(e),r=t?`promise rejection`:`exception`;return Se(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Ae(e)?`Event \`${Ac(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Ac(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function jc(e){return Object.values(e).find(e=>e instanceof Error)}var Mc=class extends Do{constructor(e){let t=Nc(e);Ko(t,`browser`,[`browser`],K.SENTRY_SDK_SOURCE||Ra()),super(t);let{userInfo:n}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:n?`auto`:`never`,...t._metadata.sdk.settings});let{sendClientReports:r}=this._options;K.document&&K.document.addEventListener(`visibilitychange`,()=>{K.document.visibilityState===`hidden`&&(r&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),n&&this.on(`beforeSendSession`,Go)}eventFromException(e,t){return Tc(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return Ec(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n,r)}};function Nc(e){return{release:typeof __SENTRY_RELEASE__==`string`?__SENTRY_RELEASE__:K.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var Pc=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,q=i,Fc=(e,t)=>e>t[1]?`poor`:e>t[0]?`needs-improvement`:`good`,Ic=(e,t,n,r)=>{let i,a;return o=>{t.value>=0&&(o||r)&&(a=t.value-(i??0),(a||i===void 0)&&(i=t.value,t.delta=a,t.rating=Fc(t.value,n),e(t)))}},Lc=(e=!0)=>{let t=q.performance?.getEntriesByType?.(`navigation`)[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Rc=()=>Lc()?.activationStart??0;function zc(e,t,n){q.document&&q.addEventListener(e,t,n)}function Bc(e,t,n){q.document&&q.removeEventListener(e,t,n)}var Vc=-1,Hc=new Set,Uc=()=>q.document?.visibilityState===`hidden`&&!q.document?.prerendering?0:1/0,Wc=e=>{if(Kc(e)&&Vc>-1){if(e.type===`visibilitychange`||e.type===`pagehide`)for(let e of Hc)e();isFinite(Vc)||(Vc=e.type===`visibilitychange`?e.timeStamp:0,Bc(`prerenderingchange`,Wc,!0))}},Gc=()=>{if(q.document&&Vc<0){let e=Rc();Vc=(q.document.prerendering?void 0:globalThis.performance.getEntriesByType(`visibility-state`).filter(t=>t.name===`hidden`&&t.startTime>e)[0]?.startTime)??Uc(),zc(`visibilitychange`,Wc,!0),zc(`pagehide`,Wc,!0),zc(`prerenderingchange`,Wc,!0)}return{get firstHiddenTime(){return Vc},onHidden(e){Hc.add(e)}}};function Kc(e){return e.type===`pagehide`||q.document?.visibilityState===`hidden`}var qc=()=>`v5-${Date.now()}-${Math.floor(Math.random()*8999999999999)+0xe8d4a51000}`,Jc=(e,t=-1)=>{let n=Lc(),r=`navigate`;return n&&(q.document?.prerendering||Rc()>0?r=`prerender`:q.document?.wasDiscarded?r=`restore`:n.type&&(r=n.type.replace(/_/g,`-`))),{name:e,value:t,rating:`good`,delta:0,entries:[],id:qc(),navigationType:r}},Yc=new WeakMap;function Xc(e,t){try{return Yc.get(e)||Yc.set(e,new t),Yc.get(e)}catch{return new t}}var Zc=class{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;let t=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),this._onAfterProcessingUnexpectedShift?.(e)}},Qc=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},$c=e=>{let t=!1;return()=>{t||=(e(),!0)}},el=e=>{q.document?.prerendering?addEventListener(`prerenderingchange`,()=>e(),!0):e()},tl=[1800,3e3],nl=(e,t={})=>{el(()=>{let n=Gc(),r=Jc(`FCP`),i,a=Qc(`paint`,e=>{for(let t of e)t.name===`first-contentful-paint`&&(a.disconnect(),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-Rc(),0),r.entries.push(t),i(!0)))});a&&(i=Ic(e,r,tl,t.reportAllChanges))})},rl=[.1,.25],il=(e,t={})=>{nl($c(()=>{let n=Jc(`CLS`,0),r,i=Gc(),a=Xc(t,Zc),o=e=>{for(let t of e)a._processEntry(t);a._sessionValue>n.value&&(n.value=a._sessionValue,n.entries=a._sessionEntries,r())},s=Qc(`layout-shift`,o);s&&(r=Ic(e,n,rl,t.reportAllChanges),i.onHidden(()=>{o(s.takeRecords()),r(!0)}),q?.setTimeout?.(r))}))},al=0,ol=1/0,sl=0,cl=e=>{e.forEach(e=>{e.interactionId&&(ol=Math.min(ol,e.interactionId),sl=Math.max(sl,e.interactionId),al=sl?(sl-ol)/7+1:0)})},ll,ul=()=>ll?al:performance.interactionCount||0,dl=()=>{`interactionCount`in performance||ll||(ll=Qc(`event`,cl,{type:`event`,buffered:!0,durationThreshold:0}))},fl=10,pl=0,ml=()=>ul()-pl,hl=class{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){pl=ul(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let e=Math.min(this._longestInteractionList.length-1,Math.floor(ml()/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!(e.interactionId||e.entryType===`first-input`))return;let t=this._longestInteractionList.at(-1),n=this._longestInteractionMap.get(e.interactionId);if(n||this._longestInteractionList.length<fl||e.duration>t._latency){if(n?e.duration>n._latency?(n.entries=[e],n._latency=e.duration):e.duration===n._latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort((e,t)=>t._latency-e._latency),this._longestInteractionList.length>fl){let e=this._longestInteractionList.splice(fl);for(let t of e)this._longestInteractionMap.delete(t.id)}this._onAfterProcessingINPCandidate?.(n)}}},gl=e=>{let t=q.requestIdleCallback||q.setTimeout;q.document?.visibilityState===`hidden`?e():(e=$c(e),zc(`visibilitychange`,e,{once:!0,capture:!0}),zc(`pagehide`,e,{once:!0,capture:!0}),t(()=>{e(),Bc(`visibilitychange`,e,{capture:!0}),Bc(`pagehide`,e,{capture:!0})}))},_l=[200,500],vl=40,yl=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&`interactionId`in PerformanceEventTiming.prototype))return;let n=Gc();el(()=>{dl();let r=Jc(`INP`),i,a=Xc(t,hl),o=e=>{gl(()=>{for(let t of e)a._processEntry(t);let t=a._estimateP98LongestInteraction();t&&t._latency!==r.value&&(r.value=t._latency,r.entries=t.entries,i())})},s=Qc(`event`,o,{durationThreshold:t.durationThreshold??vl});i=Ic(e,r,_l,t.reportAllChanges),s&&(s.observe({type:`first-input`,buffered:!0}),n.onHidden(()=>{o(s.takeRecords()),i(!0)}))})},bl=class{_processEntry(e){this._onBeforeProcessingEntry?.(e)}},xl=[2500,4e3],Sl=(e,t={})=>{el(()=>{let n=Gc(),r=Jc(`LCP`),i,a=Xc(t,bl),o=e=>{t.reportAllChanges||(e=e.slice(-1));for(let t of e)a._processEntry(t),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-Rc(),0),r.entries=[t],i())},s=Qc(`largest-contentful-paint`,o);if(s){i=Ic(e,r,xl,t.reportAllChanges);let n=$c(()=>{o(s.takeRecords()),s.disconnect(),i(!0)}),a=e=>{e.isTrusted&&(gl(n),Bc(e.type,a,{capture:!0}))};for(let e of[`keydown`,`click`,`visibilitychange`])zc(e,a,{capture:!0})}})},Cl=[800,1800],wl=e=>{q.document?.prerendering?el(()=>wl(e)):q.document?.readyState===`complete`?setTimeout(e):addEventListener(`load`,()=>wl(e),!0)},Tl=(e,t={})=>{let n=Jc(`TTFB`),r=Ic(e,n,Cl,t.reportAllChanges);wl(()=>{let e=Lc();e&&(n.value=Math.max(e.responseStart-Rc(),0),n.entries=[e],r(!0))})},El={},Dl={},Ol,kl,Al,jl;function Ml(e,t=!1){return Hl(`cls`,e,Rl,Ol,t)}function Nl(e,t=!1){return Hl(`lcp`,e,zl,kl,t)}function Pl(e){return Hl(`ttfb`,e,Bl,Al)}function Fl(e){return Hl(`inp`,e,Vl,jl)}function Il(e,t){return Wl(e,t),Dl[e]||(Ul(e),Dl[e]=!0),Gl(e,t)}function Ll(e,t){let n=El[e];if(n?.length)for(let r of n)try{r(t)}catch(t){Pc&&y.error(`Error while triggering instrumentation handler.
18
+ Type: ${e}
19
+ Name: ${b(r)}
20
+ Error:`,t)}}function Rl(){return il(e=>{Ll(`cls`,{metric:e}),Ol=e},{reportAllChanges:!0})}function zl(){return Sl(e=>{Ll(`lcp`,{metric:e}),kl=e},{reportAllChanges:!0})}function Bl(){return Tl(e=>{Ll(`ttfb`,{metric:e}),Al=e})}function Vl(){return yl(e=>{Ll(`inp`,{metric:e}),jl=e})}function Hl(e,t,n,r,i=!1){Wl(e,t);let a;return Dl[e]||(a=n(),Dl[e]=!0),r&&t({metric:r}),Gl(e,t,i?a:void 0)}function Ul(e){let t={};e===`event`&&(t.durationThreshold=0),Qc(e,t=>{Ll(e,{entries:t})},t)}function Wl(e,t){El[e]=El[e]||[],El[e].push(t)}function Gl(e,t,n){return()=>{n&&n();let r=El[e];if(!r)return;let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function Kl(e){return`duration`in e}var ql=80,Jl={};try{typeof Node<`u`&&(Jl.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,`parentNode`).get),typeof Element<`u`&&(Jl.tagName=Object.getOwnPropertyDescriptor(Element.prototype,`tagName`).get,Jl.id=Object.getOwnPropertyDescriptor(Element.prototype,`id`).get,Jl.className=Object.getOwnPropertyDescriptor(Element.prototype,`className`).get,Jl.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<`u`&&(Jl.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,`dataset`).get)}catch{}function Yl(e,t,n){let r=Jl[t];if(r)try{return r.call(e,n)}catch{}let i=e[t];return typeof i==`function`?i.call(e,n):i}function J(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||ql;for(;n&&i++<5&&(o=Xl(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=Yl(n,`parentNode`);return r.reverse().join(` > `)}catch{return`<unknown>`}}function Xl(e,t){let n=[],r=Yl(e,`tagName`);if(!r)return``;if(typeof HTMLElement<`u`&&e instanceof HTMLElement){let t=Yl(e,`dataset`);if(t){if(t.sentryComponent)return t.sentryComponent;if(t.sentryElement)return t.sentryElement}}n.push(r.toLowerCase());let i=t?.length?t.filter(t=>Yl(e,`getAttribute`,t)).map(t=>[t,Yl(e,`getAttribute`,t)]):null;if(i?.length)i.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{let t=Yl(e,`id`);t&&n.push(`#${t}`);let r=Yl(e,`className`);if(r&&Te(r)){let e=r.split(/\s+/);for(let t of e)n.push(`.${t}`)}}for(let t of[`aria-label`,`type`,`name`,`title`,`alt`]){let r=Yl(e,`getAttribute`,t);r&&n.push(`[${t}="${r}"]`)}return n.join(``)}var Zl=e=>{let t=t=>{(t.type===`pagehide`||q.document?.visibilityState===`hidden`)&&e(t)};zc(`visibilitychange`,t,{capture:!0,once:!0}),zc(`pagehide`,t,{capture:!0,once:!0})};function Ql(e){return typeof e==`number`&&isFinite(e)}function $l(e,t,n,{...r}){let i=R(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime==`function`&&e.updateStartTime(t),xi(e,()=>{let e=U({startTime:t,...r});return e&&e.end(n),e})}function eu(e){let t=N();if(!t)return;let{name:n,transaction:r,attributes:i,startTime:a}=e,{release:o,environment:s}=t.getOptions(),{userInfo:c}=t.getDataCollectionOptions(),l=t.getIntegrationByName(`Replay`)?.getReplayId(),u=j(),d=u.getUser(),f=d===void 0?void 0:d.email||d.id||d.ip_address,p;try{p=u.getScopeData().contexts.profile.profile_id}catch{}return U({name:n,attributes:{release:o,environment:s,user:f||void 0,profile_id:p||void 0,replay_id:l||void 0,transaction:r,"user_agent.original":q.navigator?.userAgent,"client.address":c?`{{auto}}`:void 0,...i},startTime:a,experimental:{standalone:!0}})}function tu(){return q.addEventListener&&q.performance}function Y(e){return e/1e3}function nu(e){let t=`unknown`,n=`unknown`,r=``;for(let i of e){if(i===`/`){[t,n]=e.split(`/`);break}if(!isNaN(Number(i))){t=r===`h`?`http`:r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function ru(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function iu(e,t){let n,r=!1;function i(e){!r&&n&&t(e,n.spanContext().spanId,n),r=!0}Zl(()=>{i(`pagehide`)});let a=e.on(`beforeStartNavigationSpan`,(e,t)=>{t?.isRedirect||(i(`navigation`),a(),o())}),o=e.on(`afterStartPageLoadSpan`,e=>{n=e,o()})}function au(e){let t=0,n;if(!ru(`layout-shift`))return;let r=Ml(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);iu(e,(e,i)=>{ou(t,n,i,e),r()})}function ou(e,t,n,r){Pc&&y.log(`Sending CLS span (${e})`);let i=t?Y((A()||0)+t.startTime):k(),a=j().getScopeData().transactionName,o=t?J(t.sources[0]?.node):`Layout shift`,s={[I]:`auto.http.browser.cls`,[F]:`ui.webvital.cls`,[fn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((e,t)=>{s[`cls.source.${t+1}`]=J(e.node)});let c=eu({name:o,transaction:a,attributes:s,startTime:i});c&&(c.addEvent(`cls`,{[cn]:``,[ln]:e}),c.end(i))}function su(e){return e!=null&&e>0&&e<=6e4}function cu(e){let t=0,n;if(!ru(`largest-contentful-paint`))return;let r=Nl(({metric:e})=>{let r=e.entries[e.entries.length-1];!r||!su(e.value)||(t=e.value,n=r)},!0);iu(e,(e,i)=>{lu(t,n,i,e),r()})}function lu(e,t,n,r){if(!su(e))return;Pc&&y.log(`Sending LCP span (${e})`);let i=Y((A()||0)+(t?.startTime||0)),a=j().getScopeData().transactionName,o=t?J(t.element):`Largest contentful paint`,s={[I]:`auto.http.browser.lcp`,[F]:`ui.webvital.lcp`,[fn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(s[`lcp.element`]=J(t.element)),t.id&&(s[`lcp.id`]=t.id),t.url&&(s[`lcp.url`]=t.url),t.loadTime!=null&&(s[`lcp.loadTime`]=t.loadTime),t.renderTime!=null&&(s[`lcp.renderTime`]=t.renderTime),t.size!=null&&(s[`lcp.size`]=t.size));let c=eu({name:o,transaction:a,attributes:s,startTime:i});c&&(c.addEvent(`lcp`,{[cn]:`millisecond`,[ln]:e}),c.end(i))}function X(e){return e&&((A()||performance.timeOrigin)+e)/1e3}function uu(e){let t={};if(e.nextHopProtocol!=null){let{name:n,version:r}=nu(e.nextHopProtocol);t[`network.protocol.version`]=r,t[`network.protocol.name`]=n}return A()||tu()?.timeOrigin?du({...t,"http.request.redirect_start":X(e.redirectStart),"http.request.redirect_end":X(e.redirectEnd),"http.request.worker_start":X(e.workerStart),"http.request.fetch_start":X(e.fetchStart),"http.request.domain_lookup_start":X(e.domainLookupStart),"http.request.domain_lookup_end":X(e.domainLookupEnd),"http.request.connect_start":X(e.connectStart),"http.request.secure_connection_start":X(e.secureConnectionStart),"http.request.connection_end":X(e.connectEnd),"http.request.request_start":X(e.requestStart),"http.request.response_start":X(e.responseStart),"http.request.response_end":X(e.responseEnd),"http.request.time_to_first_byte":e.responseStart==null?void 0:e.responseStart/1e3}):t}function du(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!=null))}var fu=2147483647,pu=0,Z={},Q,mu;function hu({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){let r=tu();if(r&&A()){r.mark&&q.performance.mark(`sentry-tracing-init`);let i=t?cu(n):t===!1?bu():void 0,a=e?au(n):e===!1?yu():void 0,o=xu(),s=Su();return()=>{o(),s(),i?.(),a?.()}}return()=>void 0}function gu(){Il(`longtask`,({entries:e})=>{let t=B();if(!t)return;let{op:n,start_timestamp:r}=R(t);for(let i of e){let e=Y(A()+i.startTime),a=Y(i.duration);n===`navigation`&&r&&e<r||$l(t,e,e+a,{name:`Main UI thread blocked`,op:`ui.long-task`,attributes:{[I]:`auto.ui.browser.metrics`}})}})}function _u(){new PerformanceObserver(e=>{let t=B();if(t)for(let n of e.getEntries()){if(!n.scripts[0])continue;let e=Y(A()+n.startTime),{start_timestamp:r,op:i}=R(t);if(i===`navigation`&&r&&e<r)continue;let a=Y(n.duration),o={[I]:`auto.ui.browser.metrics`},{invoker:s,invokerType:c,sourceURL:l,sourceFunctionName:u,sourceCharPosition:d}=n.scripts[0];o[`browser.script.invoker`]=s,o[`browser.script.invoker_type`]=c,l&&(o[`code.filepath`]=l),u&&(o[`code.function`]=u),d!==-1&&(o[`browser.script.source_char_position`]=d),$l(t,e,e+a,{name:`Main UI thread blocked`,op:`ui.long-animation-frame`,attributes:o})}}).observe({type:`long-animation-frame`,buffered:!0})}function vu(){Il(`event`,({entries:e})=>{let t=B();if(t){for(let n of e)if(n.name===`click`){let e=Y(A()+n.startTime),r=Y(n.duration),i={name:J(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[I]:`auto.ui.browser.metrics`}},a=lc(n.target);a&&(i.attributes[`ui.component_name`]=a),$l(t,e,e+r,i)}}})}function yu(){return Ml(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(Z.cls={value:e.value,unit:``},mu=t)},!0)}function bu(){return Nl(({metric:e})=>{let t=e.entries[e.entries.length-1];!t||!su(e.value)||(Z.lcp={value:e.value,unit:`millisecond`},Q=t)},!0)}function xu(){return Pl(({metric:e})=>{e.entries[e.entries.length-1]&&(Z.ttfb={value:e.value,unit:`millisecond`})})}function Su(){return Il(`paint`,({entries:e})=>{let t=Gc();for(let n of e){let e=n.startTime<t.firstHiddenTime;n.name===`first-paint`&&e&&(Z.fp={value:n.startTime,unit:`millisecond`}),n.name===`first-contentful-paint`&&e&&(Z.fcp={value:n.startTime,unit:`millisecond`})}})}function Cu(e,t){let n=tu(),r=A();if(!n?.getEntries||!r)return;let{spanStreamingEnabled:i,ignorePerformanceApiSpans:a,ignoreResourceSpans:o}=t,s=Y(r),c=n.getEntries(),{op:l,start_timestamp:u}=R(e);c.slice(pu).forEach(t=>{let n=Y(t.startTime),r=Y(Math.max(0,t.duration));if(!(l===`navigation`&&u&&s+n<u))switch(t.entryType){case`navigation`:ku(e,t,s);break;case`mark`:case`paint`:case`measure`:Du(e,t,n,r,s,a);break;case`resource`:Nu(e,t,t.name,n,r,s,o);break}}),pu=Math.max(c.length-1,0),Pu(e,i)}function wu(e,t){let n=A();if(!tu()?.getEntries||!n){Tu();return}let{spanStreamingEnabled:r,recordClsOnPageloadSpan:i,recordLcpOnPageloadSpan:a}=t,o=Y(n);if(R(e).op===`pageload`){if(Lu(Z),r){let t=(t,n,r)=>{let i=r??`browser.web_vital.${t}.value`;e.setAttribute(i,n),Pc&&y.log(`Setting web vital attribute`,{[i]:n},`on pageload span`)};[`ttfb`,`fp`,`fcp`].forEach(e=>{Z[e]&&t(e,Z[e].value)}),Z[`ttfb.requestTime`]&&t(`ttfb.requestTime`,Z[`ttfb.requestTime`].value,`browser.web_vital.ttfb.request_time`)}else i||delete Z.cls,a||delete Z.lcp,Object.entries(Z).forEach(([t,n])=>{li(t,n.value,n.unit,e)}),Fu(e,t);e.setAttribute(r?`browser.performance.time_origin`:`performance.timeOrigin`,o),e.setAttribute(r?`browser.performance.navigation.activation_start`:`performance.activationStart`,Rc())}Tu()}function Tu(){Q=void 0,mu=void 0,Z={}}function Eu(e){if(e?.entryType===`measure`)try{return e.detail.devtools.track===`Components ⚛`}catch{return}}function Du(e,t,n,r,i,a){if(Eu(t)||[`mark`,`measure`].includes(t.entryType)&&D(t.name,a))return;let o=Lc(!1),s=Y(o?o.requestStart:0),c=i+Math.max(n,s),l=i+n,u=l+r,d={[I]:`auto.resource.browser.metrics`};c!==l&&(d[`sentry.browser.measure_happened_before_request`]=!0,d[`sentry.browser.measure_start_time`]=c),Ou(d,t),c<=u&&$l(e,c,u,{name:t.name,op:t.entryType,attributes:d})}function Ou(e,t){try{let n=t.detail;if(!n)return;if(typeof n==`object`){for(let[t,r]of Object.entries(n))if(r&&De(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(r!==void 0)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(De(n)){e[`sentry.browser.measure.detail`]=n;return}try{e[`sentry.browser.measure.detail`]=JSON.stringify(n)}catch{}}catch{}}function ku(e,t,n){[`unloadEvent`,`redirect`,`domContentLoadedEvent`,`loadEvent`,`connect`].forEach(r=>{Au(e,t,r,n)}),Au(e,t,`secureConnection`,n,`TLS/SSL`),Au(e,t,`fetch`,n,`cache`),Au(e,t,`domainLookup`,n,`DNS`),Mu(e,t,n)}function Au(e,t,n,r,i=n){let a=t[ju(n)],o=t[`${n}Start`];!o||!a||$l(e,r+Y(o),r+Y(a),{op:`browser.${i}`,name:t.name,attributes:{[I]:`auto.ui.browser.metrics`,...n===`redirect`&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function ju(e){return e===`secureConnection`?`connectEnd`:e===`fetch`?`domainLookupStart`:`${e}End`}function Mu(e,t,n){let r=n+Y(t.requestStart),i=n+Y(t.responseEnd),a=n+Y(t.responseStart);t.responseEnd&&($l(e,r,i,{op:`browser.request`,name:t.name,attributes:{[I]:`auto.ui.browser.metrics`}}),$l(e,a,i,{op:`browser.response`,name:t.name,attributes:{[I]:`auto.ui.browser.metrics`}}))}function Nu(e,t,n,r,i,a,o){if(t.initiatorType===`xmlhttprequest`||t.initiatorType===`fetch`)return;let s=t.initiatorType?`resource.${t.initiatorType}`:`resource.other`;if(o?.includes(s))return;let c={[I]:`auto.resource.browser.metrics`},l=Uo(n);l.protocol&&(c[`url.scheme`]=l.protocol.split(`:`).pop()),l.host&&(c[`server.address`]=l.host),c[`url.same_origin`]=n.includes(q.location.origin),c[pn]=n,Iu(t,c,[[`responseStatus`,`http.response.status_code`],[`transferSize`,`http.response_transfer_size`],[`encodedBodySize`,`http.response_content_length`],[`decodedBodySize`,`http.decoded_response_content_length`],[`renderBlockingStatus`,`resource.render_blocking_status`],[`deliveryType`,`http.response_delivery_type`]]);let u={...c,...uu(t)},d=a+r;$l(e,d,d+i,{name:n.replace(q.location.origin,``),op:s,attributes:u})}function Pu(e,t){let n=q.navigator;if(!n)return;let r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?`network.connection.effective_type`:`effectiveConnectionType`,r.effectiveType),r.type&&e.setAttribute(t?`network.connection.type`:`connectionType`,r.type),Ql(r.rtt)&&(t?e.setAttribute(`network.connection.rtt`,r.rtt):R(e).op===`pageload`&&li(`connection.rtt`,r.rtt,`millisecond`))),Ql(n.deviceMemory)&&(t?e.setAttribute(`device.memory.estimated_capacity`,n.deviceMemory):e.setAttribute(`deviceMemory`,`${n.deviceMemory} GB`)),Ql(n.hardwareConcurrency)&&(t?e.setAttribute(`device.processor_count`,n.hardwareConcurrency):e.setAttribute(`hardwareConcurrency`,String(n.hardwareConcurrency)))}function Fu(e,t){Q&&t.recordLcpOnPageloadSpan&&(Q.element&&e.setAttribute(`lcp.element`,J(Q.element)),Q.id&&e.setAttribute(`lcp.id`,Q.id),Q.url&&e.setAttribute(`lcp.url`,Q.url.trim().slice(0,200)),Q.loadTime!=null&&e.setAttribute(`lcp.loadTime`,Q.loadTime),Q.renderTime!=null&&e.setAttribute(`lcp.renderTime`,Q.renderTime),e.setAttribute(`lcp.size`,Q.size)),mu?.sources&&t.recordClsOnPageloadSpan&&mu.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,J(t.node)))}function Iu(e,t,n){n.forEach(([n,r])=>{let i=e[n];i!=null&&(typeof i==`number`&&i<fu||typeof i==`string`)&&(t[r]=i)})}function Lu(e){let t=Lc(!1);if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(e[`ttfb.requestTime`]={value:n-r,unit:`millisecond`})}var Ru=[],zu=new Map,Bu=new Map;function Vu(){if(tu()&&A()){let e=Uu();return()=>{e()}}return()=>void 0}var Hu={click:`click`,pointerdown:`click`,pointerup:`click`,mousedown:`click`,mouseup:`click`,touchstart:`click`,touchend:`click`,mouseover:`hover`,mouseout:`hover`,mouseenter:`hover`,mouseleave:`hover`,pointerover:`hover`,pointerout:`hover`,pointerenter:`hover`,pointerleave:`hover`,dragstart:`drag`,dragend:`drag`,drag:`drag`,dragenter:`drag`,dragleave:`drag`,dragover:`drag`,drop:`drag`,keydown:`press`,keyup:`press`,keypress:`press`,input:`press`};function Uu(){return Fl(Wu)}var Wu=({metric:e})=>{if(e.value==null)return;let t=Y(e.value);if(t>60)return;let n=e.entries.find(t=>t.duration===e.value&&Hu[t.name]);if(!n)return;let{interactionId:r}=n,i=Hu[n.name],a=Y(A()+n.startTime),o=B(),s=o?z(o):void 0,c=r==null?void 0:zu.get(r),l=c?.span||s,u=l?R(l).description:j().getScopeData().transactionName,d=eu({name:c?.elementName||J(n.target),transaction:u,attributes:{[I]:`auto.http.browser.inp`,[F]:`ui.interaction.${i}`,[fn]:n.duration},startTime:a});d&&(d.addEvent(`inp`,{[cn]:`millisecond`,[ln]:e.value}),d.end(a+t))};function Gu(e){return e==null?void 0:zu.get(e)}function Ku(){let e=Object.keys(Hu);Ba()&&e.forEach(e=>{q.addEventListener(e,t,{capture:!0,passive:!0})});function t(e){let t=e.target;if(!t)return;let n=J(t),r=Math.round(e.timeStamp);if(Bu.set(r,n),Bu.size>50){let e=Bu.keys().next().value;e!==void 0&&Bu.delete(e)}}function n(e){let t=Math.round(e.startTime),n=Bu.get(t);if(!n)for(let e=-5;e<=5;e++){let r=Bu.get(t+e);if(r){n=r;break}}return n||`<unknown>`}let r=({entries:e})=>{let t=B(),r=t&&z(t);e.forEach(e=>{if(!Kl(e))return;let t=e.interactionId;if(t==null||zu.has(t))return;let i=e.target?J(e.target):n(e);if(Ru.length>10){let e=Ru.shift();zu.delete(e)}Ru.push(t),zu.set(t,{span:r,elementName:i})})};Il(`event`,r),Il(`first-input`,r)}function qu(e){let{name:t,op:n,origin:r,metricName:i,value:a,attributes:o,parentSpan:s,reportEvent:c,startTime:l,endTime:u}=e,d=j().getScopeData().transactionName,f={[I]:r,[F]:n,[fn]:0,[`browser.web_vital.${i}.value`]:a,[Nr]:d,[Mr]:d,"user_agent.original":q.navigator?.userAgent,...o};s&&ar(s).attributes?.[`sentry.op`]===`pageload`&&(f[`sentry.pageload.span_id`]=s.spanContext().spanId),c&&(f[`browser.web_vital.${i}.report_event`]=c);let p=U({name:t,attributes:f,startTime:l,parentSpan:s});p&&p.end(u??l)}function Ju(e){let t=0,n;if(!ru(`largest-contentful-paint`))return;let r=Nl(({metric:e})=>{let r=e.entries[e.entries.length-1];!r||!su(e.value)||(t=e.value,n=r)},!0);iu(e,(e,i,a)=>{Yu(t,n,a,e),r()})}function Yu(e,t,n,r){if(!su(e))return;Pc&&y.log(`Sending LCP span (${e})`);let i=A()||0,a=Y(i),o=Y(i+(t?.startTime||0)),s=t?J(t.element):`Largest contentful paint`,c={};t?.element&&(c[`browser.web_vital.lcp.element`]=J(t.element)),t?.id&&(c[`browser.web_vital.lcp.id`]=t.id),t?.url&&(c[`browser.web_vital.lcp.url`]=t.url),t?.loadTime!=null&&(c[`browser.web_vital.lcp.load_time`]=t.loadTime),t?.renderTime!=null&&(c[`browser.web_vital.lcp.render_time`]=t.renderTime),t?.size!=null&&(c[`browser.web_vital.lcp.size`]=t.size),qu({name:s,op:`ui.webvital.lcp`,origin:`auto.http.browser.lcp`,metricName:`lcp`,value:e,attributes:c,parentSpan:n,reportEvent:r,startTime:a,endTime:o})}function Xu(e){let t=0,n;if(!ru(`layout-shift`))return;let r=Ml(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);iu(e,(e,i,a)=>{Zu(t,n,a,e),r()})}function Zu(e,t,n,r){Pc&&y.log(`Sending CLS span (${e})`);let i=t?Y((A()||0)+t.startTime):k(),a=t?J(t.sources[0]?.node):`Layout shift`,o={};t?.sources&&t.sources.forEach((e,t)=>{o[`browser.web_vital.cls.source.${t+1}`]=J(e.node)}),qu({name:a,op:`ui.webvital.cls`,origin:`auto.http.browser.cls`,metricName:`cls`,value:e,attributes:o,parentSpan:n,reportEvent:r,startTime:i})}function Qu(){!tu()||!A()||Fl(({metric:e})=>{if(e.value==null||Y(e.value)>60)return;let t=e.entries.find(t=>t.duration===e.value&&Hu[t.name]);t&&$u(e.value,t)})}function $u(e,t){Pc&&y.log(`Sending INP span (${e})`);let n=Y(A()+t.startTime),r=Y(e),i=Hu[t.name],a=Gu(t.interactionId),o=B(),s=o?z(o):void 0,c=a?.span||s,l=c?ar(c).name:j().getScopeData().transactionName;qu({name:a?.elementName||J(t.target),op:`ui.interaction.${i}`,origin:`auto.http.browser.inp`,metricName:`inp`,value:e,attributes:{[fn]:t.duration,[Nr]:l,[Mr]:l},startTime:n,endTime:n+r,parentSpan:c})}var ed=1e3,td,nd,rd;function id(e){x(`dom`,e),S(`dom`,ad)}function ad(){if(!q.document)return;let e=C.bind(null,`dom`),t=cd(e,!0);q.document.addEventListener(`click`,t,!1),q.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=q[t]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(w(n,`addEventListener`,function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=cd(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),w(n,`removeEventListener`,function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),Object.keys(n).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function od(e){if(e.type!==nd)return!1;try{if(!e.target||e.target._sentryId!==rd)return!1}catch{}return!0}function sd(e,t){return e===`keypress`?!t?.tagName||!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!1}function cd(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=ld(n);if(sd(n.type,r))return;T(n,`_sentryCaptured`,!0),r&&!r._sentryId&&T(r,`_sentryId`,O());let i=n.type===`keypress`?`input`:n.type;od(n)||(e({event:n,name:i,global:t}),nd=n.type,rd=r?r._sentryId:void 0),clearTimeout(td),td=q.setTimeout(()=>{rd=void 0,nd=void 0},ed)}}function ld(e){try{return e.target}catch{return null}}var ud;function dd(e){let t=`history`;x(t,e),S(t,fd)}function fd(){if(q.addEventListener(`popstate`,()=>{let e=q.location.href,t=ud;ud=e,t!==e&&C(`history`,{from:t,to:e})}),!Js())return;function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=ud,i=pd(String(n));if(ud=i,r===i)return e.apply(this,t);C(`history`,{from:r,to:i})}return e.apply(this,t)}}w(q.history,`pushState`,e),w(q.history,`replaceState`,e)}function pd(e){try{return new URL(e,q.location.origin).toString()}catch{return e}}var md={};function hd(e){let t=md[e];if(t)return t;let n=q[e];if(Xs(n))return md[e]=n.bind(q);let r=q.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){Pc&&y.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(md[e]=n.bind(q))}function gd(e){md[e]=void 0}var _d=`__sentry_xhr_v3__`;function vd(e){x(`xhr`,e),S(`xhr`,yd)}function yd(){if(!q.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=k()*1e3,a=Te(n[0])?n[0].toUpperCase():void 0,o=bd(n[1]);if(!a||!o)return e.apply(t,n);t[_d]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[_d];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}C(`xhr`,{endTimestamp:k()*1e3,startTimestamp:i,xhr:t,virtualError:r}),t.removeEventListener(`readystatechange`,s)}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return s(),e.apply(t,n)}}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[_d];return a&&Te(r)&&Te(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[_d];return r?(n[0]!==void 0&&(r.body=n[0]),C(`xhr`,{startTimestamp:k()*1e3,xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function bd(e){if(Te(e))return e;try{return e.toString()}catch{}}function xd(e){let t;try{t=e.getAllResponseHeaders()}catch(t){return Pc&&y.error(t,`Failed to get xhr response headers`,e),{}}return t?t.split(`\r
21
+ `).reduce((e,t)=>{let[n,r]=t.split(`: `);return r&&(e[n.toLowerCase()]=r),e},{}):{}}function Sd(e){if(typeof Element>`u`)return!1;try{return e instanceof Element}catch{return!1}}function Cd(e){try{return new URL(e,q.location.origin).toString()}catch{return e}}var wd=40;function Td(e,t=hd(`fetch`)){let n=0,r=0;async function i(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`strict-origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,o);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get(`X-Sentry-Rate-Limits`),"retry-after":n.headers.get(`Retry-After`)}}}catch(e){throw gd(`fetch`),e}finally{n-=a,r--}}return so(e,i,to(e.bufferSize||wd))}var $=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,Ed=30,Dd=50;function Od(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?`?`:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var kd=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ad=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,jd=/\((\S*)(?::(\d+))(?::(\d+))\)/,Md=/at (.+?) ?\(data:(.+?),/,Nd=[Ed,e=>{let t=e.match(Md);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=kd.exec(e);if(n){let[,e,t,r]=n;return Od(e,`?`,+t,+r)}let r=Ad.exec(e);if(r){if(r[2]?.indexOf(`eval`)===0){let e=jd.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=Ld(r[1]||`?`,r[2]);return Od(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],Pd=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Fd=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Id=ae(Nd,[Dd,e=>{let t=Pd.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=Fd.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||`?`;return[n,e]=Ld(n,e),Od(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),Ld=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?`?`:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Rd=1024,zd=`Breadcrumbs`,Bd=W(((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:zd,setup(e){t.console&&ws(Ud(e)),t.dom&&id(Hd(e,t.dom)),t.xhr&&vd(Wd(e)),t.fetch&&Qs(Gd(e)),t.history&&dd(Kd(e)),t.sentry&&e.on(`beforeSendEvent`,Vd(e))}}}));function Vd(e){return function(t){N()===e&&Qo({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:ut(t)},{event:t})}}function Hd(e,t){return function(n){if(N()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>Rd&&($&&y.warn(`\`dom.maxStringLength\` cannot exceed ${Rd}, but a value of ${o} was configured. Sentry will use ${Rd} instead.`),o=Rd),typeof a==`string`&&(a=[a]);try{let e=n.event,t=qd(e)?e.target:e;r=J(t,{keyAttrs:a,maxStringLength:o}),i=lc(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),Qo(s,{event:n.event,name:n.name,global:n.global})}}function Ud(e){return function(t){if(N()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:Es(t.level),message:it(t.args,` `)};if(t.level===`assert`)if(t.args[0]===!1)n.message=`Assertion failed: ${it(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1);else return;Qo(n,{input:t.args,level:t.level})}}function Wd(e){return function(t){if(N()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[_d];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:`xhr`,data:l,type:`http`,level:Ks(s)};e.emit(`beforeOutgoingRequestBreadcrumb`,d,u),Qo(d,u)}}function Gd(e){return function(t){if(N()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`))if(t.error){let i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:`fetch`,data:t.fetchData,level:`error`,type:`http`};e.emit(`beforeOutgoingRequestBreadcrumb`,a,i),Qo(a,i)}else{let i=t.response,a={...t.fetchData,status_code:i?.status},o={input:t.args,response:i,startTimestamp:n,endTimestamp:r},s={category:`fetch`,data:a,type:`http`,level:Ks(a.status_code)};e.emit(`beforeOutgoingRequestBreadcrumb`,s,o),Qo(s,o)}}}function Kd(e){return function(t){if(N()!==e)return;let n=t.from,r=t.to,i=Uo(K.location.href),a=n?Uo(n):void 0,o=Uo(r);a?.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),Qo({category:`navigation`,data:{from:n,to:r}})}}function qd(e){return!!e&&!!e.target}var Jd=`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`.split(`,`),Yd=`BrowserApiErrors`,Xd=W(((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:Yd,setupOnce(){t.setTimeout&&w(K,`setTimeout`,Zd),t.setInterval&&w(K,`setInterval`,Zd),t.requestAnimationFrame&&w(K,`requestAnimationFrame`,Qd),t.XMLHttpRequest&&`XMLHttpRequest`in K&&w(XMLHttpRequest.prototype,`send`,$d);let e=t.eventTarget;e&&(Array.isArray(e)?e:Jd).forEach(e=>ef(e,t))}}}));function Zd(e){return function(...t){let n=t[0];return t[0]=pc(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${b(e)}`}}),e.apply(this,t)}}function Qd(e){return function(t){return e.apply(this,[pc(t,{mechanism:{data:{handler:b(e)},handled:!1,type:`auto.browser.browserapierrors.requestAnimationFrame`}})])}}function $d(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&w(n,e,function(t){let n={mechanism:{data:{handler:b(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=Ie(t);return r&&(n.mechanism.data.handler=b(r)),pc(t,n)})}),e.apply(this,t)}}function ef(e,t){let n=K[e]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(w(n,`addEventListener`,function(n){return function(r,i,a){try{tf(i)&&(i.handleEvent=pc(i.handleEvent,{mechanism:{data:{handler:b(i),target:e},handled:!1,type:`auto.browser.browserapierrors.handleEvent`}}))}catch{}return t.unregisterOriginalCallbacks&&nf(this,r,i),n.apply(this,[r,pc(i,{mechanism:{data:{handler:b(i),target:e},handled:!1,type:`auto.browser.browserapierrors.addEventListener`}}),a])}}),w(n,`removeEventListener`,function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,`__sentry_wrapped__`)){let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}}catch{}return e.call(this,t,n,r)}}))}function tf(e){return typeof e.handleEvent==`function`}function nf(e,t,n){e&&typeof e==`object`&&`removeEventListener`in e&&typeof e.removeEventListener==`function`&&e.removeEventListener(t,n)}var rf=W((e={})=>{let t=e.lifecycle??`route`;return{name:`BrowserSession`,setupOnce(){if(K.document===void 0){$&&y.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Sa({ignoreDuration:!0});let e=!1;gl(()=>{e||=(Ta(),!0)});let n=M(),r=n.getUser();n.addScopeListener(t=>{let n=t.getUser();(r?.id!==n?.id||r?.ip_address!==n?.ip_address)&&(r=n,e&&Ta())}),t===`route`&&dd(({from:t,to:n})=>{t!==n&&(Sa({ignoreDuration:!0}),Ta(),e=!0)})}}}),af=`CultureContext`,of=W((()=>({name:af,preprocessEvent(e){let t=sf();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){let t=sf();t&&Ji(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})));function sf(){try{let e=K.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var cf=`GlobalHandlers`,lf=W(((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:cf,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(uf(e),hf(`onerror`)),t.onunhandledrejection&&(df(e),hf(`onunhandledrejection`))}}}));function uf(e){me(t=>{let{stackParser:n,attachStacktrace:r}=gf();if(N()!==e||dc())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=mf(Dc(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,ba(l,{originalException:c,mechanism:{handled:!1,type:`auto.browser.global_handlers.onerror`}})})}function df(e){_e(t=>{let{stackParser:n,attachStacktrace:r}=gf();if(N()!==e||dc())return;let i=ff(t),a=De(i)?pf(i):Dc(n,i,void 0,r,!0);a.level=`error`,ba(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.global_handlers.onunhandledrejection`}})})}function ff(e){if(De(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 pf(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function mf(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:_f(t)??cc(),function:`?`,in_app:!0}),e}function hf(e){$&&y.log(`Global Handler attached: ${e}`)}function gf(){return N()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function _f(e){if(!(!Te(e)||e.length===0))return e.startsWith(`data:`)?`<${G(e,!1)}>`:e}var vf=W(()=>({name:`HttpContext`,preprocessEvent(e){if(!K.navigator&&!K.location&&!K.document)return;let t=mc(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){let t=e.attributes?.[F];if(!K.navigator&&!K.location&&!K.document)return;let n=mc();Ji(e,{"url.full":t===`http.client`?void 0:n.url,"http.request.header.user_agent":n.headers[`User-Agent`],"http.request.header.referer":n.headers.Referer})}})),yf=`cause`,bf=5,xf=`LinkedErrors`,Sf=W(((e={})=>{let t=e.limit||bf,n=e.key||yf;return{name:xf,preprocessEvent(e,r,i){gs(hc,i.getOptions().stackParser,n,t,e,r)}}})),Cf=/^HTML(\w*)Element$/;function wf(e){if(typeof window<`u`&&e===window)return`[Window]`;if(typeof document<`u`&&e===document)return`[Document]`;if(Sd(e)){let t=Tf(e);if(Cf.test(t))return`[HTMLElement: ${J(e)}]`}}function Tf(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function Ef(){return Df()?($&&f(()=>{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 Df(){if(K.window===void 0)return!1;let e=K;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let t=cc();return!(K===K.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}function Of(e){return[os(),ns(),Is(),Xd(),Bd(),lf(),Sf(),Os(),vf(),of(),rf()]}function kf(e={}){let t=!e.skipBrowserExtensionCheck&&Ef(),n=e.defaultIntegrations==null?Of():e.defaultIntegrations,r={...e,enabled:!t&&e.enabled,stackParser:oe(e.stackParser||Id),integrations:Na({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||Td};return Ye(wf),Lo(Mc,r)}function Af(e){return e.split(`,`).some(e=>e.trim().startsWith(`sentry-`))}function jf(e){try{return new URL(e,K.location.origin).href}catch{return}}function Mf(e){return e.entryType===`resource`&&`initiatorType`in e&&typeof e.nextHopProtocol==`string`&&(e.initiatorType===`fetch`||e.initiatorType===`xmlhttprequest`)}function Nf(e){try{return new Headers(e)}catch{return}}var Pf={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Ff(e,t){let{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:i,enableHTTPTimings:a,tracePropagationTargets:o,onRequestSpanStart:s,onRequestSpanEnd:c}={...Pf,...t},l=typeof i==`function`?i:e=>!0,u=e=>Rf(e,o),d={},f=e.getOptions().propagateTraceparent;n&&Qs(t=>{let n=Ls(t,l,u,d,{propagateTraceparent:f,onRequestSpanEnd:c});if(n){let r=jf(t.fetchData.url),i=r?Uo(r).host:void 0,o=r?G(r):void 0;n.setAttributes({"http.url":o,"url.full":o,"server.address":i}),a&&Lf(n,e),s?.(n,{headers:t.headers})}}),r&&vd(t=>{let n=zf(t,l,u,d,f,c);n&&(a&&Lf(n,e),s?.(n,{headers:Nf(t.xhr.__sentry_xhr_v3__?.request_headers)}))})}var If=300;function Lf(e,t){let{url:n}=R(e).data;if(!n||typeof n!=`string`)return;let r=()=>void setTimeout(i);if(H(t)){let t=e.end.bind(e);e.end=e=>{let n=e??k(),a=!1,o=()=>{a||(a=!0,setTimeout(i),t(n),clearTimeout(s))};r=o;let s=setTimeout(o,If)}}let i=Il(`resource`,({entries:t})=>{t.forEach(t=>{Mf(t)&&t.name.endsWith(n)&&(e.setAttributes(uu(t)),r())})})}function Rf(e,t){let n=cc();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}let a=r.origin===i;return t?D(r.toString(),t)||a&&D(r.pathname,t):a}else{let n=!!e.match(/^\/(?!\/)/);return t?D(e,t):n}}function zf(e,t,n,r,i,a){let o=e.xhr,s=o?.[_d];if(!o||o.__sentry_own_request__||!s)return;let{url:c,method:l}=s,u=V()&&t(c);if(e.endTimestamp){let t=o.__sentry_xhr_span_id__;if(!t)return;let n=r[t];n&&(u&&s.status_code!==void 0&&(_n(n,s.status_code),n.end(),a?.(n,{headers:Nf(xd(o)),error:e.error})),delete r[t]);return}let d=jf(c),f=Uo(d||c),p=d?G(d):void 0,m=G(Wo(c)),h=N(),g=!!B(),_=g||!!h&&H(h),v=u&&_?U({name:`${l} ${m}`,attributes:{url:G(c),type:`xhr`,"http.method":l,"http.url":p,"url.full":p,"server.address":f?.host,[I]:`auto.http.browser`,[F]:`http.client`,...f?.search&&{"http.query":f?.search},...f?.hash&&{"http.fragment":f?.hash}}}):new kr,ee=ji(v)&&g?void 0:v;return u&&!_&&h?.recordDroppedEvent(`no_parent_span`,`span`),o.__sentry_xhr_span_id__=v.spanContext().spanId,r[o.__sentry_xhr_span_id__]=v,n(c)&&Bf(o,V()&&_?ee:void 0,i),h&&h.emit(`beforeOutgoingRequestSpan`,v,e),v}function Bf(e,t,n){let{"sentry-trace":r,baggage:i,traceparent:a}=qo({span:t,propagateTraceparent:n});r&&Vf(e,r,i,a)}function Vf(e,t,n,r){let i=e.__sentry_xhr_v3__?.request_headers;if(!(i?.[`sentry-trace`]||!e.setRequestHeader))try{if(e.setRequestHeader(`sentry-trace`,t),r&&!i?.traceparent&&e.setRequestHeader(`traceparent`,r),n){let t=i?.baggage;(!t||!Af(t))&&e.setRequestHeader(`baggage`,n)}}catch{}}var Hf=new WeakMap,Uf=new WeakMap,Wf=9e4,Gf=[`text/event-stream`,`application/x-ndjson`,`application/stream+json`],Kf=W(()=>({name:`FetchStreamPerformance`,setup(){$s(e=>{if(e.response){let t=Hf.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);let n=Uf.get(e.response);n&&clearTimeout(n)}}}),Qs(e=>{if(e.endTimestamp&&e.response){let t=e.response.headers?.get(`content-type`)||``;if(e.response.headers?.get(`content-length`)||!Gf.some(e=>t.startsWith(e)))return;let n=e.fetchData?.url||``,r=e.fetchData?.method||`GET`,i=Vo(n),a=U({name:`${r} ${n.startsWith(`data:`)?G(n):i?Ho(i):n}`,startTime:e.endTimestamp,attributes:{url:G(n),"http.method":r,type:`fetch`,[F]:`http.client.stream`,[I]:`auto.http.browser.stream`}});Hf.set(e.response,a);let o=setTimeout(()=>{a.isRecording()&&a.end()},Wf);Uf.set(e.response,o)}})}})),qf=`WebVitals`,Jf=W((e={})=>{let t=new Set(e.ignore??[]);return{name:qf,setup(n){let r=H(n),{enableStandaloneClsSpans:i,enableStandaloneLcpSpans:a}=e._experiments??{},o=r||t.has(`cls`)?void 0:i||!1,s=r||t.has(`lcp`)?void 0:a||!1,c=hu({recordClsStandaloneSpans:o,recordLcpStandaloneSpans:s,client:n}),l=new WeakSet;n.on(`afterStartPageLoadSpan`,e=>{l.add(e)}),n.on(`spanEnd`,e=>{l.delete(e)&&(c(),wu(e,{recordClsOnPageloadSpan:o===!1,recordLcpOnPageloadSpan:s===!1,spanStreamingEnabled:r}))}),r?(t.has(`lcp`)||Ju(n),t.has(`cls`)||Xu(n),t.has(`inp`)||Qu()):t.has(`inp`)||Vu()},afterAllSetup(){t.has(`inp`)||Ku()}}});function Yf(){K.document?K.document.addEventListener(`visibilitychange`,()=>{let e=B();if(!e)return;let t=z(e);if(K.document.hidden&&t){let e=`cancelled`,{op:n,status:r}=R(t);$&&y.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus({code:2,message:e}),t.setAttribute(`sentry.cancellation_reason`,`document.hidden`),t.end()}}):$&&y.warn(`[Tracing] Could not set up background tab detection due to lack of global document`)}var Xf=`sentry_previous_trace`,Zf=`sentry.previous_trace`;function Qf(e,{linkPreviousTrace:t,consistentTraceSampling:n}){let r=t===`session-storage`,i=r?tp():void 0;e.on(`spanStart`,e=>{if(z(e)!==e)return;let t=j().getPropagationContext();i=$f(i,e,t),r&&ep(i)});let a=!0;n&&e.on(`beforeSampling`,e=>{if(!i)return;let t=j(),n=t.getPropagationContext();if(a&&n.parentSpanId){a=!1;return}t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(i.sampleRate),sampled:String(np(i.spanContext))},sampleRand:i.sampleRand}),e.parentSampled=np(i.spanContext),e.parentSampleRate=i.sampleRate,e.spanAttributes={...e.spanAttributes,[on]:i.sampleRate}})}function $f(e,t,n){let r=R(t);function i(){try{let e=Number(r.data?.[`sentry.sample_rate`]??n.dsc?.sample_rate);return Number.isNaN(e)?0:e}catch{return 0}}let a={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return a;let o=e.spanContext;return o.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=3600&&($&&y.log(`Adding previous_trace \`${JSON.stringify(o)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:o,attributes:{[mn]:`previous_trace`}}),t.setAttribute(Zf,`${o.traceId}-${o.spanId}-${+!!np(o)}`)),a)}function ep(e){try{K.sessionStorage.setItem(Xf,JSON.stringify(e))}catch(e){$&&y.warn(`Could not store previous trace in sessionStorage`,e)}}function tp(){try{let e=K.sessionStorage?.getItem(Xf);return JSON.parse(e)}catch{return}}function np(e){return e.traceFlags===1}var rp=`BrowserTracing`,ip=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function ap(){let e=K.navigator;return e?.userAgent?ip.test(e.userAgent):!1}var op={...Mi,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:`in-memory`,consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...Pf},sp=((e={})=>{`enableElementTiming`in e&&f(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});let t={name:void 0,source:void 0},n=K.document,{enableInp:r,enableLongTask:a,enableLongAnimationFrame:o,_experiments:{enableInteractions:s,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:l},beforeStartSpan:u,idleTimeout:d,finalTimeout:p,childSpanTimeout:m,markBackgroundSpan:h,traceFetch:g,traceXHR:_,trackFetchStreamPerformance:v,shouldCreateSpanForRequest:ee,enableHTTPTimings:te,ignoreResourceSpans:ne,ignorePerformanceApiSpans:re,instrumentPageLoad:ie,instrumentNavigation:ae,detectRedirects:oe,linkPreviousTrace:se,consistentTraceSampling:ce,enableReportPageLoaded:le,onRequestSpanStart:b,onRequestSpanEnd:ue}={...op,...e},de=ap(),fe,x;function S(e,r,i=!0,a){let o=r.op===`pageload`,s=r.name,c=u?u(r):r,l=Vo(a||cc()),f={...l?.pathname&&{"url.path":l.pathname},...l&&!Bo(l)&&{"url.full":l.href},...c.attributes};if(s!==c.name&&(f[P]=`custom`),c.attributes=f,!i){let e=gt();U({...c,startTime:e}).end(e);return}t.name=c.name,t.source=f[P];let h=Li(c,{idleTimeout:d,finalTimeout:p,childSpanTimeout:m,disableAutoFinish:o,beforeSpanEnd:t=>{Cu(t,{ignoreResourceSpans:ne,ignorePerformanceApiSpans:re,spanStreamingEnabled:H(e)}),hp(e,void 0);let n=j(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:h.spanContext().traceId,sampled:ur(h),dsc:Vr(t)}),o&&(x=void 0)},trimIdleSpanEndTimestamp:!le});o&&le&&(x=h),hp(e,h);function g(){n&&[`interactive`,`complete`].includes(n.readyState)&&(e.emit(`idleSpanEnableAutoFinish`,h),n.removeEventListener(`readystatechange`,g))}o&&!le&&n&&(n.addEventListener(`readystatechange`,g),g())}return{name:rp,setup(e){if(de){$&&y.log(`[Tracing] Skipping browserTracingIntegration setup for bot user agent.`);return}if(Sr(),o&&i.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes(`long-animation-frame`)?_u():a&&gu(),s&&vu(),oe&&n){let e=()=>{fe=k()};addEventListener(`click`,e,{capture:!0}),addEventListener(`keydown`,e,{capture:!0,passive:!0})}function t(){let t=mp(e);t&&!R(t).timestamp&&($&&y.log(`[Tracing] Finishing current active span with op: ${R(t).op}`),t.setAttribute(sn,`cancelled`),t.end())}e.on(`startNavigationSpan`,(n,r)=>{if(N()!==e)return;if(r?.isRedirect){$&&y.warn(`[Tracing] Detected redirect, navigation span will not be the root span, but a child span.`),S(e,{op:`navigation.redirect`,...n},!1,r.url);return}fe=void 0,t(),M().setPropagationContext({traceId:Et(),sampleRand:Math.random(),propagationSpanId:V()?void 0:Dt()});let i=j();i.setPropagationContext({traceId:Et(),sampleRand:Math.random(),propagationSpanId:V()?void 0:Dt()}),i.setSDKProcessingMetadata({normalizedRequest:void 0}),S(e,{op:`navigation`,...n,parentSpan:null,forceTransaction:!0},!0,r?.url)}),e.on(`startPageLoadSpan`,(n,r={})=>{if(N()!==e)return;t();let i=qn(r.sentryTrace||up(`sentry-trace`)||dp(`sentry-trace`),r.baggage||up(`baggage`)||dp(`baggage`)),a=j();a.setPropagationContext(i),V()||(a.getPropagationContext().propagationSpanId=Dt()),a.setSDKProcessingMetadata({normalizedRequest:mc()}),S(e,{op:`pageload`,...n})}),e.on(`endPageloadSpan`,()=>{le&&x&&(x.setAttribute(sn,`reportPageLoaded`),x.end())})},afterAllSetup(e){if(de)return;e.addIntegration&&!e.getIntegrationByName?.(`WebVitals`)&&e.addIntegration(Jf({ignore:r?[]:[`inp`],_experiments:{enableStandaloneClsSpans:c,enableStandaloneLcpSpans:l}}));let n=cc();if(se!==`off`&&Qf(e,{linkPreviousTrace:se,consistentTraceSampling:ce}),K.location){if(ie){let t=A();cp(e,{name:K.location.pathname,startTime:t?t/1e3:void 0,attributes:{[P]:`url`,[I]:`auto.pageload.browser`}})}ae&&dd(({to:t,from:r})=>{if(r===void 0&&n?.indexOf(t)!==-1){n=void 0;return}n=void 0;let i=Vo(t),a=mp(e),o=a&&oe&&_p(a,fe);lp(e,{name:i?.pathname||K.location.pathname,attributes:{[P]:`url`,[I]:`auto.navigation.browser`}},{url:t,isRedirect:o})})}h&&Yf(),s&&fp(e,d,p,m,t),Ff(e,{traceFetch:g,traceXHR:_,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:ee,enableHTTPTimings:te,onRequestSpanStart:b,onRequestSpanEnd:ue}),v&&e.addIntegration(Kf())}}});function cp(e,t,n){e.emit(`startPageLoadSpan`,t,n),j().setTransactionName(t.name);let r=mp(e);return r&&e.emit(`afterStartPageLoadSpan`,r),r}function lp(e,t,n){let{url:r,isRedirect:i}=n||{};e.emit(`beforeStartNavigationSpan`,t,{isRedirect:i,url:r}),e.emit(`startNavigationSpan`,t,{isRedirect:i,url:r});let a=j();return a.setTransactionName(t.name),r&&!i&&a.setSDKProcessingMetadata({normalizedRequest:{...mc(),url:r}}),mp(e)}function up(e){return(K.document?.querySelector(`meta[name=${e}]`))?.getAttribute(`content`)||void 0}function dp(e){return(K.performance?.getEntriesByType?.(`navigation`)[0])?.serverTiming?.find(t=>t.name===e)?.description}function fp(e,t,n,r,i){let a=K.document,o;a&&addEventListener(`click`,()=>{let a=`ui.action.click`,s=mp(e);if(s){let e=R(s).op;if([`navigation`,`pageload`].includes(e)){$&&y.warn(`[Tracing] Did not create ${a} span because a pageload or navigation span is in progress.`);return}}if(o&&=(o.setAttribute(sn,`interactionInterrupted`),o.end(),void 0),!i.name){$&&y.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}o=Li({name:i.name,op:a,attributes:{[P]:i.source||`url`}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})},{capture:!0})}var pp=`_sentry_idleSpan`;function mp(e){return e[pp]}function hp(e,t){T(e,pp,t)}var gp=1.5;function _p(e,t){let n=R(e),r=gt();return!(r-n.start_timestamp>gp||t&&r-t<=gp)}var vp=[`activate`,`mount`],yp=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,bp=/(?:^|[-_])(\w)/g,xp=e=>e.replace(bp,e=>e.toUpperCase()).replace(/[-_]/g,``),Sp=`<Root>`,Cp=`<Anonymous>`,wp=(e,t)=>e.repeat(t),Tp=(e,t)=>{if(!e)return Cp;if(e.$root===e)return Sp;if(!e.$options)return Cp;let n=e.$options,r=n.name||n._componentTag||n.__name,i=n.__file;if(!r&&i){let e=i.match(/([^/\\]+)\.vue$/);e&&(r=e[1])}return(r?`<${xp(r)}>`:Cp)+(i&&t!==!1?` at ${i}`:``)},Ep=e=>{if(e&&(e._isVue||e.__isVue)&&e.$parent){let t=[],n=0;for(;e;){if(t.length>0){let r=t[t.length-1];if(r.constructor===e.constructor){n++,e=e.$parent;continue}else n>0&&(t[t.length-1]=[r,n],n=0)}t.push(e),e=e.$parent}return`
22
22
 
23
23
  found in
24
24
 
25
- ${e.map((s,o)=>`${(o===0?"---> ":ef(" ",5+o*2))+(Array.isArray(s)?`${le(s[0])}... (${s[1]} recursive calls)`:le(s))}`).join(`
25
+ ${t.map((e,t)=>`${(t===0?`---> `:wp(` `,5+t*2))+(Array.isArray(e)?`${Tp(e[0])}... (${e[1]} recursive calls)`:Tp(e))}`).join(`
26
26
  `)}`}return`
27
27
 
28
- (found in ${le(t)})`},rf=(t,e)=>{const{errorHandler:n}=t.config;t.config.errorHandler=(r,s,o)=>{const i=le(s,!1),a=s?nf(s):"",c={componentName:i,lifecycleHook:o,trace:a};if(e.attachProps&&s&&(s.$options?.propsData?c.propsData=s.$options.propsData:s.$props&&(c.propsData=s.$props)),setTimeout(()=>{In(r,{captureContext:{contexts:{vue:c}},mechanism:{handled:!!n,type:"vue"}})}),typeof n=="function"&&t.config.errorHandler)n.call(t,r,s,o);else throw r}},uo="ui.vue",sf={activate:["activated","deactivated"],create:["beforeCreate","created"],unmount:["beforeUnmount","unmounted"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function of(t,e,n){t.$_sentryRootSpanTimer&&clearTimeout(t.$_sentryRootSpanTimer),t.$_sentryRootSpanTimer=setTimeout(()=>{t.$root?.$_sentryRootSpan&&(t.$root.$_sentryRootSpan.end(e),t.$root.$_sentryRootSpan=void 0)},n)}function af(t,e){function n(s){return s.replace(/^<([^\s]*)>(?: at [^\s]*)?$/,"$1")}return t.some(s=>n(e)===n(s))}const cf=(t={})=>{const e=(t.hooks||[]).concat(ao).filter((r,s,o)=>o.indexOf(r)===s),n={};for(const r of e){const s=sf[r];if(!s){co&&m.warn(`Unknown hook: ${r}`);continue}for(const o of s)n[o]=function(){const i=this.$root===this;i&&(this.$_sentryRootSpan=this.$_sentryRootSpan||At({name:"Application Render",op:`${uo}.render`,attributes:{[R]:"auto.ui.vue"},onlyIfParent:!0}));const a=le(this,!1),c=Array.isArray(t.trackComponents)?af(t.trackComponents,a):t.trackComponents;if(!(!i&&!c))if(this.$_sentrySpans=this.$_sentrySpans||{},o==s[0]){if(this.$root?.$_sentryRootSpan||L()){const f=this.$_sentrySpans[r];f&&f.end(),this.$_sentrySpans[r]=At({name:`Vue ${a}`,op:`${uo}.${r}`,attributes:{[R]:"auto.ui.vue"},onlyIfParent:!0})}}else{const u=this.$_sentrySpans[r];if(!u)return;u.end(),of(this,D(),t.timeout||2e3)}}}return n},uf={Vue:b.Vue,attachProps:!0,attachErrorHandler:!0,tracingOptions:{hooks:ao,timeout:2e3,trackComponents:!1}},df="Vue",ff=(t={})=>({name:df,setup(e){const n={...uf,...e.getOptions(),...t};if(!n.Vue&&!n.app){ut(()=>{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}n.app?(Array.isArray(n.app)?n.app:[n.app]).forEach(s=>fo(s,n)):n.Vue&&fo(n.Vue,n)}}),fo=(t,e)=>{co&&t._instance?.isMounted===!0&&ut(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.")}),e.attachErrorHandler&&rf(t,e),et(e)&&t.mixin(cf(e.tracingOptions))};function lf(t={}){const e={defaultIntegrations:[...Zs(),ff()],...t};return ps(e,"vue"),Hd(e)}function pf(t,e,n){let r=!0;t.onError(s=>In(s,{mechanism:{handled:!1}})),t.beforeEach((s,o,i)=>{const a=o.name==null&&o.matched.length===0||o.name===void 0&&r;r&&(r=!1);const c={[R]:"auto.navigation.vue"};for(const d of Object.keys(s.params))c[`params.${d}`]=s.params[d];for(const d of Object.keys(s.query)){const l=s.query[d];l&&(c[`query.${d}`]=l)}let u=s.path,f="url";if(s.name&&e.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"}if(v().setTransactionName(u),e.instrumentPageLoad&&a){const d=mf();d&&(I(d).data[G]!=="custom"&&(d.updateName(u),d.setAttribute(G,f)),d.setAttributes({...c,[R]:"auto.pageload.vue"}))}e.instrumentNavigation&&!a&&(c[G]=f,c[R]="auto.navigation.vue",n({name:u,op:"navigation",attributes:c})),i&&i()})}function mf(){const t=L(),e=t&&$(t);if(!e)return;const n=I(e).op;return n==="navigation"||n==="pageload"?e:void 0}function hf(t={}){if(!t.router)return no(t);const e=no({...t,instrumentNavigation:!1}),{router:n,instrumentNavigation:r=!0,instrumentPageLoad:s=!0,routeLabel:o="name"}=t;return{...e,afterAllSetup(i){e.afterAllSetup(i),pf(n,{routeLabel:o,instrumentNavigation:r,instrumentPageLoad:s},c=>{ro(i,c)})}}}const gf={install:(t,e)=>{const{config:n}=e,r=n.sentry;r?.enabled&&r?.dsn&&lf({...r,app:t,integrations:[hf({router:e.router})],tracePropagationTargets:["localhost",n.websiteDomain,/^\//],release:e.config.appVersion})}},_f=t=>{const e=lo();return!e||!e?.features?!1:e?.features[t]},Sf={install:(t,e)=>{const n=Symbol.for("dzangolab.vue-config.config");t.provide(n,e.config);const r=Symbol.for("dzangolab.vue-config.feature");t.provide(r,_f)}},lo=()=>$t.inject(Symbol.for("dzangolab.vue-config.config")),yf=()=>$t.inject(Symbol.for("dzangolab.vue-config.feature"));V.default=Sf,V.parse=mo,V.sentry=gf,V.useConfig=lo,V.useFeature=yf,Object.defineProperties(V,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
28
+ (found in ${Tp(e)})`},Dp=(e,t)=>{let{errorHandler:n}=e.config;e.config.errorHandler=(r,i,a)=>{let o={componentName:Tp(i,!1),lifecycleHook:a,trace:i?Ep(i):``};if(t?.attachProps!==!1&&i&&(i.$options?.propsData?o.propsData=i.$options.propsData:i.$props&&(o.propsData=i.$props)),setTimeout(()=>{ya(r,{captureContext:{contexts:{vue:o}},mechanism:{handled:!!n,type:`auto.function.vue.error_handler`}})}),typeof n==`function`&&e.config.errorHandler)n.call(e,r,i,a);else throw r}},Op=`ui.vue`,kp={activate:[`activated`,`deactivated`],create:[`beforeCreate`,`created`],unmount:[`beforeUnmount`,`unmounted`],destroy:[`beforeDestroy`,`destroyed`],mount:[`beforeMount`,`mounted`],update:[`beforeUpdate`,`updated`]};function Ap(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 jp(e,t){function n(e){return e.replace(/^<([^\s]*)>(?: at [^\s]*)?$/,`$1`)}return e.some(e=>n(t)===n(e))}var Mp=(e={})=>{let t=Xo((e.hooks||[]).concat(vp)),n={},r=e.timeout||2e3;for(let i of t){let t=kp[i];if(!t){yp&&y.warn(`Unknown hook: ${i}`);continue}for(let a of t)n[a]=function(){let n=this.$root===this;n&&(this.$_sentryRootComponentSpan=this.$_sentryRootComponentSpan||U({name:`Application Render`,op:`${Op}.render`,attributes:{"sentry.origin":`auto.ui.vue`},onlyIfParent:!0}),Ap(this,k(),r));let o=Tp(this,!1);if(!(n||(Array.isArray(e.trackComponents)?jp(e.trackComponents,o):e.trackComponents))){Ap(this,k(),r);return}this.$_sentryComponentSpans=this.$_sentryComponentSpans||{};let s=a===t[0],c=this.$root?.$_sentryRootComponentSpan||B();if(s){if(c){let e=this.$_sentryComponentSpans[i];e&&e.end(),this.$_sentryComponentSpans[i]=U({name:`Vue ${o}`,op:`${Op}.${i}`,attributes:{[I]:`auto.ui.vue`},onlyIfParent:!0})}}else{let e=this.$_sentryComponentSpans[i];if(!e)return;e.end(),Ap(this,k(),r)}}}return n},Np={Vue:i.Vue,attachProps:!0,attachErrorHandler:!0,tracingOptions:{hooks:vp,timeout:2e3,trackComponents:!1}},Pp=`Vue`,Fp=W((e={})=>({name:Pp,setup(t){let n={...Np,...t.getOptions(),...e};if(!n.Vue&&!n.app){f(()=>{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}n.app?(Array.isArray(n.app)?n.app:[n.app]).forEach(e=>Ip(e,n)):n.Vue&&Ip(n.Vue,n)}})),Ip=(e,t)=>{yp&&e._instance?.isMounted===!0&&f(()=>{console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`.")}),t.attachErrorHandler&&Dp(e,t),V(t)&&e.mixin(Mp(t.tracingOptions))};function Lp(e){return!!(typeof e==`object`&&e&&(e.__isVue||e._isVue))}function Rp(e){return!!(typeof e==`object`&&e?.__v_isVNode)}function zp(e){return Lp(e)?`[VueViewModel]`:Rp(e)?`[VueVNode]`:wf(e)}function Bp(e={}){let t={defaultIntegrations:[...Of(e),Fp()],...e};Ko(t,`vue`);let n=kf(t);return Ye(zp),n}function Vp(e,t,n){let r=!1,i=`mode`in e;e.onError(e=>ya(e,{mechanism:{handled:!1}})),e.beforeEach((e,a,...o)=>{let s=r?void 0:Hp(),c={};for(let t of Object.keys(e.params))c[Pr.replace(`<key>`,t)]=e.params[t],c[jr.replace(`<key>`,t)]=e.params[t];for(let t of Object.keys(e.query)){let n=e.query[t];n&&(c[`query.${t}`]=n)}let l=e.path,u=`url`;if(e.name&&t.routeLabel!==`path`)l=e.name.toString(),u=`custom`;else if(e.matched.length>0){let t=e.matched.length-1;l=e.matched[t].path,u=`route`}if(u===`route`&&(c[Fr]=l),j().setTransactionName(l),t.instrumentPageLoad&&s&&(R(s).data[`sentry.source`]!==`custom`&&(s.updateName(l),s.setAttribute(P,u)),s.setAttributes({...c,[I]:`auto.pageload.vue`}),r=!0),t.instrumentNavigation&&!s&&n({name:l,op:`navigation`,attributes:{...c,[I]:`auto.navigation.vue`,[P]:u}},Cd(e.fullPath??e.path)),i){let e=o[0];typeof e==`function`&&e()}})}function Hp(){let e=B(),t=e&&z(e);if(t)return R(t).op===`pageload`?t:void 0}function Up(e={}){if(!e.router)return sp(e);let t=sp({...e,instrumentNavigation:!1}),{router:n,instrumentNavigation:r=!0,instrumentPageLoad:i=!0,routeLabel:a=`name`}=e;return{...t,afterAllSetup(e){t.afterAllSetup(e),Vp(n,{routeLabel:a,instrumentNavigation:r,instrumentPageLoad:i},(t,n)=>{lp(e,t,{url:n})})}}}var Wp={install:(e,t)=>{let{config:n}=t,r=n.sentry;r?.enabled&&r.dsn&&Bp({...r,app:e,integrations:[Up({router:t.router})],release:t.config.appVersion,tracePropagationTargets:[`localhost`,n.websiteDomain,/^\//]})}},Gp=e=>{let t=qp();return!t||!t?.features?!1:t?.features[e]},Kp={install:(e,t)=>{let n=Symbol.for(`dzangolab.vue-config.config`);e.provide(n,t.config);let r=Symbol.for(`dzangolab.vue-config.feature`);e.provide(r,Gp)}},qp=()=>(0,t.inject)(Symbol.for(`dzangolab.vue-config.config`));e.default=Kp,e.parse=n,e.sentry=Wp,e.useConfig=qp,e.useFeature=()=>(0,t.inject)(Symbol.for(`dzangolab.vue-config.feature`))});