4 lines
116 KiB
JavaScript
4 lines
116 KiB
JavaScript
/*! @sentry/browser (Performance Monitoring) 10.6.0 (059aab3) | https://github.com/getsentry/sentry-javascript */
|
|
var Sentry=function(t){t=window.Sentry||{};const n=globalThis,e="10.6.0";function r(){return o(n),n}function o(t){const n=t.__SENTRY__=t.__SENTRY__||{};return n.version=n.version||e,n[e]=n[e]||{}}function i(t,r,o=n){const i=o.__SENTRY__=o.__SENTRY__||{},s=i[e]=i[e]||{};return s[t]||(s[t]=r())}const s=["debug","info","warn","error","log","assert","trace"],c={};function a(t){if(!("console"in n))return t();const e=n.console,r={},o=Object.keys(c);o.forEach(t=>{const n=c[t];r[t]=e[t],e[t]=n});try{return t()}finally{o.forEach(t=>{e[t]=r[t]})}}const u="?",f=/\(error: (.*)\)/,d=/captureMessage|captureException/;function l(...t){const n=t.sort((t,n)=>t[0]-n[0]).map(t=>t[1]);return(t,e=0,r=0)=>{const o=[],i=t.split("\n");for(let t=e;t<i.length;t++){let e=i[t];e.length>1024&&(e=e.slice(0,1024));const s=f.test(e)?e.replace(f,"$1"):e;if(!s.match(/\S*Error: /)){for(const t of n){const n=t(s);if(n){o.push(n);break}}if(o.length>=50+r)break}}return function(t){if(!t.length)return[];const n=Array.from(t);/sentryWrapped/.test(p(n).function||"")&&n.pop();n.reverse(),d.test(p(n).function||"")&&(n.pop(),d.test(p(n).function||"")&&n.pop());return n.slice(0,50).map(t=>({...t,filename:t.filename||p(n).filename,function:t.function||u}))}(o.slice(r))}}function p(t){return t[t.length-1]||{}}const h="<anonymous>";function m(t){try{return t&&"function"==typeof t&&t.name||h}catch{return h}}function g(t){const n=t.exception;if(n){const t=[];try{return n.values.forEach(n=>{n.stacktrace.frames&&t.push(...n.stacktrace.frames)}),t}catch{return}}}const y={},v={};function b(t,n){y[t]=y[t]||[],y[t].push(n)}function _(t,n){if(!v[t]){v[t]=!0;try{n()}catch(t){}}}function S(t,n){const e=t&&y[t];if(e)for(const t of e)try{t(n)}catch(t){}}let w=null;function E(t){const n="error";b(n,t),_(n,T)}function T(){w=n.onerror,n.onerror=function(t,n,e,r,o){return S("error",{column:r,error:o,line:e,msg:t,url:n}),!!w&&w.apply(this,arguments)},n.onerror.__SENTRY_INSTRUMENTED__=!0}let k=null;function $(t){const n="unhandledrejection";b(n,t),_(n,x)}function x(){k=n.onunhandledrejection,n.onunhandledrejection=function(t){return S("unhandledrejection",t),!k||k.apply(this,arguments)},n.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const I=Object.prototype.toString;function R(t){switch(I.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return q(t,Error)}}function L(t,n){return I.call(t)===`[object ${n}]`}function O(t){return L(t,"ErrorEvent")}function j(t){return L(t,"DOMError")}function C(t){return L(t,"String")}function M(t){return"object"==typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function P(t){return null===t||M(t)||"object"!=typeof t&&"function"!=typeof t}function A(t){return L(t,"Object")}function N(t){return"undefined"!=typeof Event&&q(t,Event)}function D(t){return Boolean(t?.then&&"function"==typeof t.then)}function q(t,n){try{return t instanceof n}catch{return!1}}function F(t){return!("object"!=typeof t||null===t||!t.__isVue&&!t.t)}function U(t){return"undefined"!=typeof Request&&q(t,Request)}const H=n;function B(t,n={}){if(!t)return"<unknown>";try{let e=t;const r=5,o=[];let i=0,s=0;const c=" > ",a=c.length;let u;const f=Array.isArray(n)?n:n.keyAttrs,d=!Array.isArray(n)&&n.maxStringLength||80;for(;e&&i++<r&&(u=z(e,f),!("html"===u||i>1&&s+o.length*a+u.length>=d));)o.push(u),s+=u.length,e=e.parentNode;return o.reverse().join(c)}catch{return"<unknown>"}}function z(t,n){const e=t,r=[];if(!e?.tagName)return"";if(H.HTMLElement&&e instanceof HTMLElement&&e.dataset){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}r.push(e.tagName.toLowerCase());const o=n?.length?n.filter(t=>e.getAttribute(t)).map(t=>[t,e.getAttribute(t)]):null;if(o?.length)o.forEach(t=>{r.push(`[${t[0]}="${t[1]}"]`)});else{e.id&&r.push(`#${e.id}`);const t=e.className;if(t&&C(t)){const n=t.split(/\s+/);for(const t of n)r.push(`.${t}`)}}const i=["aria-label","type","name","title","alt"];for(const t of i){const n=e.getAttribute(t);n&&r.push(`[${t}="${n}"]`)}return r.join("")}function W(){try{return H.document.location.href}catch{return""}}function J(t){if(!H.HTMLElement)return null;let n=t;for(let t=0;t<5;t++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}function X(t,n=0){return"string"!=typeof t||0===n||t.length<=n?t:`${t.slice(0,n)}...`}function G(t,n){if(!Array.isArray(t))return"";const e=[];for(let n=0;n<t.length;n++){const r=t[n];try{F(r)?e.push("[VueViewModel]"):e.push(String(r))}catch{e.push("[value cannot be serialized]")}}return e.join(n)}function K(t,n,e=!1){return!!C(t)&&(L(n,"RegExp")?n.test(t):!!C(n)&&(e?t===n:t.includes(n)))}function Y(t,n=[],e=!1){return n.some(n=>K(t,n,e))}function V(t,n,e){if(!(n in t))return;const r=t[n];if("function"!=typeof r)return;const o=e(r);"function"==typeof o&&Q(o,r);try{t[n]=o}catch{}}function Z(t,n,e){try{Object.defineProperty(t,n,{value:e,writable:!0,configurable:!0})}catch{}}function Q(t,n){try{const e=n.prototype||{};t.prototype=n.prototype=e,Z(t,"__sentry_original__",n)}catch{}}function tt(t){return t.__sentry_original__}function nt(t){if(R(t))return{message:t.message,name:t.name,stack:t.stack,...rt(t)};if(N(t)){const n={type:t.type,target:et(t.target),currentTarget:et(t.currentTarget),...rt(t)};return"undefined"!=typeof CustomEvent&&q(t,CustomEvent)&&(n.detail=t.detail),n}return t}function et(t){try{return n=t,"undefined"!=typeof Element&&q(n,Element)?B(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}var n}function rt(t){if("object"==typeof t&&null!==t){const n={};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}return{}}function ot(t=function(){const t=n;return t.crypto||t.msCrypto}()){let e=()=>16*Math.random();try{if(t?.randomUUID)return t.randomUUID().replace(/-/g,"");t?.getRandomValues&&(e=()=>{const n=new Uint8Array(1);return t.getRandomValues(n),n[0]})}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,t=>(t^(15&e())>>t/4).toString(16))}function it(t){return t.exception?.values?.[0]}function st(t){const{message:n,event_id:e}=t;if(n)return n;const r=it(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||e||"<unknown>":e||"<unknown>"}function ct(t,n,e){const r=t.exception=t.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=n||""),i.type||(i.type="Error")}function at(t,n){const e=it(t);if(!e)return;const r=e.mechanism;if(e.mechanism={type:"generic",handled:!0,...r,...n},n&&"data"in n){const t={...r?.data,...n.data};e.mechanism.data=t}}function ut(t){if(function(t){try{return t.__sentry_captured__}catch{}}(t))return!0;try{Z(t,"__sentry_captured__",!0)}catch{}return!1}function ft(){return Date.now()/1e3}let dt,lt;function pt(){return(dt??(dt=function(){const{performance:t}=n;if(!t?.now||!t.timeOrigin)return ft;const e=t.timeOrigin;return()=>(e+t.now())/1e3}()))()}function ht(){return lt||(lt=function(){const{performance:t}=n;if(!t?.now)return[void 0,"none"];const e=36e5,r=t.now(),o=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+r-o):e,s=i<e,c=t.timing?.navigationStart,a="number"==typeof c?Math.abs(c+r-o):e;return s||a<e?i<=a?[t.timeOrigin,"timeOrigin"]:[c,"navigationStart"]:[o,"dateNow"]}()),lt[0]}function mt(t){const n=pt(),e={sid:ot(),init:!0,timestamp:n,started:n,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return{sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}}}(e)};return t&>(e,t),e}function gt(t,n={}){if(n.user&&(!t.ipAddress&&n.user.ip_address&&(t.ipAddress=n.user.ip_address),t.did||n.did||(t.did=n.user.id||n.user.email||n.user.username)),t.timestamp=n.timestamp||pt(),n.abnormal_mechanism&&(t.abnormal_mechanism=n.abnormal_mechanism),n.ignoreDuration&&(t.ignoreDuration=n.ignoreDuration),n.sid&&(t.sid=32===n.sid.length?n.sid:ot()),void 0!==n.init&&(t.init=n.init),!t.did&&n.did&&(t.did=`${n.did}`),"number"==typeof n.started&&(t.started=n.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof n.duration)t.duration=n.duration;else{const n=t.timestamp-t.started;t.duration=n>=0?n:0}n.release&&(t.release=n.release),n.environment&&(t.environment=n.environment),!t.ipAddress&&n.ipAddress&&(t.ipAddress=n.ipAddress),!t.userAgent&&n.userAgent&&(t.userAgent=n.userAgent),"number"==typeof n.errors&&(t.errors=n.errors),n.status&&(t.status=n.status)}function yt(t,n,e=2){if(!n||"object"!=typeof n||e<=0)return n;if(t&&0===Object.keys(n).length)return t;const r={...t};for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=yt(r[t],n[t],e-1));return r}function vt(){return ot()}function bt(){return ot().substring(16)}const _t="_sentrySpan";function St(t,n){n?Z(t,_t,n):delete t[_t]}function wt(t){return t[_t]}class Et{constructor(){this.o=!1,this.i=[],this.u=[],this.l=[],this.p=[],this.h={},this.m={},this.v={},this._={},this.S={},this.T={traceId:vt(),sampleRand:Math.random()}}clone(){const t=new Et;return t.l=[...this.l],t.m={...this.m},t.v={...this.v},t._={...this._},this._.flags&&(t._.flags={values:[...this._.flags.values]}),t.h=this.h,t.k=this.k,t.I=this.I,t.R=this.R,t.L=this.L,t.u=[...this.u],t.p=[...this.p],t.S={...this.S},t.T={...this.T},t.O=this.O,t.j=this.j,St(t,wt(this)),t}setClient(t){this.O=t}setLastEventId(t){this.j=t}getClient(){return this.O}lastEventId(){return this.j}addScopeListener(t){this.i.push(t)}addEventProcessor(t){return this.u.push(t),this}setUser(t){return this.h=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this.I&>(this.I,{user:t}),this.C(),this}getUser(){return this.h}setTags(t){return this.m={...this.m,...t},this.C(),this}setTag(t,n){return this.m={...this.m,[t]:n},this.C(),this}setExtras(t){return this.v={...this.v,...t},this.C(),this}setExtra(t,n){return this.v={...this.v,[t]:n},this.C(),this}setFingerprint(t){return this.L=t,this.C(),this}setLevel(t){return this.k=t,this.C(),this}setTransactionName(t){return this.R=t,this.C(),this}setContext(t,n){return null===n?delete this._[t]:this._[t]=n,this.C(),this}setSession(t){return t?this.I=t:delete this.I,this.C(),this}getSession(){return this.I}update(t){if(!t)return this;const n="function"==typeof t?t(this):t,e=n instanceof Et?n.getScopeData():A(n)?t:void 0,{tags:r,extra:o,user:i,contexts:s,level:c,fingerprint:a=[],propagationContext:u}=e||{};return this.m={...this.m,...r},this.v={...this.v,...o},this._={...this._,...s},i&&Object.keys(i).length&&(this.h=i),c&&(this.k=c),a.length&&(this.L=a),u&&(this.T=u),this}clear(){return this.l=[],this.m={},this.v={},this.h={},this._={},this.k=void 0,this.R=void 0,this.L=void 0,this.I=void 0,St(this,void 0),this.p=[],this.setPropagationContext({traceId:vt(),sampleRand:Math.random()}),this.C(),this}addBreadcrumb(t,n){const e="number"==typeof n?n:100;if(e<=0)return this;const r={timestamp:ft(),...t,message:t.message?X(t.message,2048):t.message};return this.l.push(r),this.l.length>e&&(this.l=this.l.slice(-e),this.O?.recordDroppedEvent("buffer_overflow","log_item")),this.C(),this}getLastBreadcrumb(){return this.l[this.l.length-1]}clearBreadcrumbs(){return this.l=[],this.C(),this}addAttachment(t){return this.p.push(t),this}clearAttachments(){return this.p=[],this}getScopeData(){return{breadcrumbs:this.l,attachments:this.p,contexts:this._,tags:this.m,extra:this.v,user:this.h,level:this.k,fingerprint:this.L||[],eventProcessors:this.u,propagationContext:this.T,sdkProcessingMetadata:this.S,transactionName:this.R,span:wt(this)}}setSDKProcessingMetadata(t){return this.S=yt(this.S,t,2),this}setPropagationContext(t){return this.T=t,this}getPropagationContext(){return this.T}captureException(t,n){const e=n?.event_id||ot();if(!this.O)return e;const r=new Error("Sentry syntheticException");return this.O.captureException(t,{originalException:t,syntheticException:r,...n,event_id:e},this),e}captureMessage(t,n,e){const r=e?.event_id||ot();if(!this.O)return r;const o=new Error(t);return this.O.captureMessage(t,n,{originalException:t,syntheticException:o,...e,event_id:r},this),r}captureEvent(t,n){const e=n?.event_id||ot();return this.O?(this.O.captureEvent(t,{...n,event_id:e},this),e):e}C(){this.o||(this.o=!0,this.i.forEach(t=>{t(this)}),this.o=!1)}}class Tt{constructor(t,n){let e,r;e=t||new Et,r=n||new Et,this.M=[{scope:e}],this.P=r}withScope(t){const n=this.A();let e;try{e=t(n)}catch(t){throw this.N(),t}return D(e)?e.then(t=>(this.N(),t),t=>{throw this.N(),t}):(this.N(),e)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.P}getStackTop(){return this.M[this.M.length-1]}A(){const t=this.getScope().clone();return this.M.push({client:this.getClient(),scope:t}),t}N(){return!(this.M.length<=1)&&!!this.M.pop()}}function kt(){const t=o(r());return t.stack=t.stack||new Tt(i("defaultCurrentScope",()=>new Et),i("defaultIsolationScope",()=>new Et))}function $t(t){return kt().withScope(t)}function xt(t,n){const e=kt();return e.withScope(()=>(e.getStackTop().scope=t,n(t)))}function It(t){return kt().withScope(()=>t(kt().getIsolationScope()))}function Rt(t){const n=o(t);return n.acs?n.acs:{withIsolationScope:It,withScope:$t,withSetScope:xt,withSetIsolationScope:(t,n)=>It(n),getCurrentScope:()=>kt().getScope(),getIsolationScope:()=>kt().getIsolationScope()}}function Lt(){return Rt(r()).getCurrentScope()}function Ot(){return Rt(r()).getIsolationScope()}function jt(){return i("globalScope",()=>new Et)}function Ct(...t){const n=Rt(r());if(2===t.length){const[e,r]=t;return e?n.withSetScope(e,r):n.withScope(r)}return n.withScope(t[0])}function Mt(){return Lt().getClient()}function Pt(t){const n=t.getPropagationContext(),{traceId:e,parentSpanId:r,propagationSpanId:o}=n,i={trace_id:e,span_id:o||bt()};return r&&(i.parent_span_id=r),i}const At="sentry.source",Nt="sentry.sample_rate",Dt="sentry.previous_trace_sample_rate",qt="sentry.op",Ft="sentry.origin",Ut="sentry.idle_span_finish_reason",Ht="sentry.measurement_unit",Bt="sentry.measurement_value",zt="sentry.custom_span_name",Wt="sentry.profile_id",Jt="sentry.exclusive_time",Xt="sentry.link.type";function Gt(t,n){t.setAttribute("http.response.status_code",n);const e=function(t){if(t<400&&t>=100)return{code:1};if(t>=400&&t<500)switch(t){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(t>=500&&t<600)switch(t){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:"unknown_error"}}(n);"unknown_error"!==e.message&&t.setStatus(e)}const Kt="_sentryScope",Yt="_sentryIsolationScope";function Vt(t){return{scope:t[Kt],isolationScope:t[Yt]}}const Zt="sentry-",Qt=/^sentry-/;function tn(t){const n=function(t){if(!t||!C(t)&&!Array.isArray(t))return;if(Array.isArray(t))return t.reduce((t,n)=>{const e=en(n);return Object.entries(e).forEach(([n,e])=>{t[n]=e}),t},{});return en(t)}(t);if(!n)return;const e=Object.entries(n).reduce((t,[n,e])=>{if(n.match(Qt)){t[n.slice(7)]=e}return t},{});return Object.keys(e).length>0?e:void 0}function nn(t){if(!t)return;return function(t){if(0===Object.keys(t).length)return;return Object.entries(t).reduce((t,[n,e],r)=>{const o=`${encodeURIComponent(n)}=${encodeURIComponent(e)}`,i=0===r?o:`${t},${o}`;return i.length>8192?t:i},"")}(Object.entries(t).reduce((t,[n,e])=>(e&&(t[`${Zt}${n}`]=e),t),{}))}function en(t){return t.split(",").map(t=>t.split("=").map(t=>{try{return decodeURIComponent(t.trim())}catch{return}})).reduce((t,[n,e])=>(n&&e&&(t[n]=e),t),{})}const rn=/^o(\d+)\./,on=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function sn(t,n=!1){const{host:e,path:r,pass:o,port:i,projectId:s,protocol:c,publicKey:a}=t;return`${c}://${a}${n&&o?`:${o}`:""}@${e}${i?`:${i}`:""}/${r?`${r}/`:r}${s}`}function cn(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function an(t){const n=t.getOptions(),{host:e}=t.getDsn()||{};let r;return n.orgId?r=String(n.orgId):e&&(r=function(t){const n=t.match(rn);return n?.[1]}(e)),r}function un(t){const n="string"==typeof t?function(t){const n=on.exec(t);if(!n)return void a(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});const[e,r,o="",i="",s="",c=""]=n.slice(1);let u="",f=c;const d=f.split("/");if(d.length>1&&(u=d.slice(0,-1).join("/"),f=d.pop()),f){const t=f.match(/^\d+/);t&&(f=t[0])}return cn({host:i,pass:o,path:u,projectId:f,port:s,protocol:e,publicKey:r})}(t):cn(t);if(n)return n}function fn(t){if("boolean"==typeof t)return Number(t);const n="string"==typeof t?parseFloat(t):t;return"number"!=typeof n||isNaN(n)||n<0||n>1?void 0:n}const dn=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function ln(t,n){const e=function(t){if(!t)return;const n=t.match(dn);if(!n)return;let e;return"1"===n[3]?e=!0:"0"===n[3]&&(e=!1),{traceId:n[1],parentSampled:e,parentSpanId:n[2]}}(t),r=tn(n);if(!e?.traceId)return{traceId:vt(),sampleRand:Math.random()};const o=function(t,n){const e=fn(n?.sample_rand);if(void 0!==e)return e;const r=fn(n?.sample_rate);return r&&void 0!==t?.parentSampled?t.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}(e,r);r&&(r.sample_rand=o.toString());const{traceId:i,parentSpanId:s,parentSampled:c}=e;return{traceId:i,parentSpanId:s,sampled:c,dsc:r||{},sampleRand:o}}function pn(t=vt(),n=bt(),e){let r="";return void 0!==e&&(r=e?"-1":"-0"),`${t}-${n}${r}`}let hn=!1;function mn(t){const{spanId:n,traceId:e}=t.spanContext(),{data:r,op:o,parent_span_id:i,status:s,origin:c,links:a}=Sn(t);return{parent_span_id:i,span_id:n,trace_id:e,data:r,op:o,status:s,origin:c,links:a}}function gn(t){const{spanId:n,traceId:e,isRemote:r}=t.spanContext(),o=r?n:Sn(t).parent_span_id,i=Vt(t).scope;return{parent_span_id:o,span_id:r?i?.getPropagationContext().propagationSpanId||bt():n,trace_id:e}}function yn(t){const{traceId:n,spanId:e}=t.spanContext();return pn(n,e,wn(t))}function vn(t){return t&&t.length>0?t.map(({context:{spanId:t,traceId:n,traceFlags:e,...r},attributes:o})=>({span_id:t,trace_id:n,sampled:1===e,attributes:o,...r})):void 0}function bn(t){return"number"==typeof t?_n(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?_n(t.getTime()):pt()}function _n(t){return t>9999999999?t/1e3:t}function Sn(t){if(function(t){return"function"==typeof t.getSpanJSON}(t))return t.getSpanJSON();const{spanId:n,traceId:e}=t.spanContext();if(function(t){const n=t;return!!(n.attributes&&n.startTime&&n.name&&n.endTime&&n.status)}(t)){const{attributes:r,startTime:o,name:i,endTime:s,status:c,links:a}=t;return{span_id:n,trace_id:e,data:r,description:i,parent_span_id:"parentSpanId"in t?t.parentSpanId:"parentSpanContext"in t?t.parentSpanContext?.spanId:void 0,start_timestamp:bn(o),timestamp:bn(s)||void 0,status:En(c),op:r[qt],origin:r[Ft],links:vn(a)}}return{span_id:n,trace_id:e,start_timestamp:0,data:{}}}function wn(t){const{traceFlags:n}=t.spanContext();return 1===n}function En(t){if(t&&0!==t.code)return 1===t.code?"ok":t.message||"unknown_error"}const Tn="_sentryChildSpans",kn="_sentryRootSpan";function $n(t,n){const e=t[kn]||t;Z(n,kn,e),t[Tn]?t[Tn].add(n):Z(t,Tn,new Set([n]))}function xn(t){const n=new Set;return function t(e){if(!n.has(e)&&wn(e)){n.add(e);const r=e[Tn]?Array.from(e[Tn]):[];for(const n of r)t(n)}}(t),Array.from(n)}function In(t){return t[kn]||t}function Rn(){const t=Rt(r());return t.getActiveSpan?t.getActiveSpan():wt(Lt())}function Ln(){hn||(a(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),hn=!0)}let On=!1;function jn(){function t(){const t=Rn(),n=t&&In(t);if(n){const t="internal_error";n.setStatus({code:2,message:t})}}On||(t.tag="sentry_tracingErrorCallback",On=!0,E(t),$(t))}function Cn(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const n=t||Mt()?.getOptions();return!(!n||null==n.tracesSampleRate&&!n.tracesSampler)}const Mn="production",Pn="_frozenDsc";function An(t,n){Z(t,Pn,n)}function Nn(t,n){const e=n.getOptions(),{publicKey:r}=n.getDsn()||{},o={environment:e.environment||Mn,release:e.release,public_key:r,trace_id:t,org_id:an(n)};return n.emit("createDsc",o),o}function Dn(t,n){const e=n.getPropagationContext();return e.dsc||Nn(e.traceId,t)}function qn(t){const n=Mt();if(!n)return{};const e=In(t),r=Sn(e),o=r.data,i=e.spanContext().traceState,s=i?.get("sentry.sample_rate")??o[Nt]??o[Dt];function c(t){return"number"!=typeof s&&"string"!=typeof s||(t.sample_rate=`${s}`),t}const a=e[Pn];if(a)return c(a);const u=i?.get("sentry.dsc"),f=u&&tn(u);if(f)return c(f);const d=Nn(t.spanContext().traceId,n),l=o[At],p=r.description;return"url"!==l&&p&&(d.transaction=p),Cn()&&(d.sampled=String(wn(e)),d.sample_rand=i?.get("sentry.sample_rand")??Vt(e).scope?.getPropagationContext().sampleRand.toString()),c(d),n.emit("createDsc",d,e),d}class Fn{constructor(t={}){this.D=t.traceId||vt(),this.q=t.spanId||bt()}spanContext(){return{spanId:this.q,traceId:this.D,traceFlags:0}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,e){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function Un(t,n=100,e=1/0){try{return Bn("",t,n,e)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function Hn(t,n=3,e=102400){const r=Un(t,n);return o=r,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(o))>e?Hn(t,n-1,e):r;var o}function Bn(t,n,e=1/0,r=1/0,o=function(){const t=new WeakSet;function n(n){return!!t.has(n)||(t.add(n),!1)}function e(n){t.delete(n)}return[n,e]}()){const[i,s]=o;if(null==n||["boolean","string"].includes(typeof n)||"number"==typeof n&&Number.isFinite(n))return n;const c=function(t,n){try{if("domain"===t&&n&&"object"==typeof n&&n.F)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&n===global)return"[Global]";if("undefined"!=typeof window&&n===window)return"[Window]";if("undefined"!=typeof document&&n===document)return"[Document]";if(F(n))return"[VueViewModel]";if(A(e=n)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e)return"[SyntheticEvent]";if("number"==typeof n&&!Number.isFinite(n))return`[${n}]`;if("function"==typeof n)return`[Function: ${m(n)}]`;if("symbol"==typeof n)return`[${String(n)}]`;if("bigint"==typeof n)return`[BigInt: ${String(n)}]`;const r=function(t){const n=Object.getPrototypeOf(t);return n?.constructor?n.constructor.name:"null prototype"}(n);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(t){return`**non-serializable** (${t})`}var e}(t,n);if(!c.startsWith("[object "))return c;if(n.__sentry_skip_normalization__)return n;const a="number"==typeof n.__sentry_override_normalization_depth__?n.__sentry_override_normalization_depth__:e;if(0===a)return c.replace("object ","");if(i(n))return"[Circular ~]";const u=n;if(u&&"function"==typeof u.toJSON)try{return Bn("",u.toJSON(),a-1,r,o)}catch{}const f=Array.isArray(n)?[]:{};let d=0;const l=nt(n);for(const t in l){if(!Object.prototype.hasOwnProperty.call(l,t))continue;if(d>=r){f[t]="[MaxProperties ~]";break}const n=l[t];f[t]=Bn(t,n,a-1,r,o),d++}return s(n),f}function zn(t,n=[]){return[t,n]}function Wn(t,n){const[e,r]=t;return[e,[...r,n]]}function Jn(t,n){const e=t[1];for(const t of e){if(n(t,t[0].type))return!0}return!1}function Xn(t){const e=o(n);return e.encodePolyfill?e.encodePolyfill(t):(new TextEncoder).encode(t)}function Gn(t){const[n,e]=t;let r=JSON.stringify(n);function o(t){"string"==typeof r?r="string"==typeof t?r+t:[Xn(r),t]:r.push("string"==typeof t?Xn(t):t)}for(const t of e){const[n,e]=t;if(o(`\n${JSON.stringify(n)}\n`),"string"==typeof e||e instanceof Uint8Array)o(e);else{let t;try{t=JSON.stringify(e)}catch{t=JSON.stringify(Un(e))}o(t)}}return"string"==typeof r?r:function(t){const n=t.reduce((t,n)=>t+n.length,0),e=new Uint8Array(n);let r=0;for(const n of t)e.set(n,r),r+=n.length;return e}(r)}function Kn(t){return[{type:"span"},t]}function Yn(t){const n="string"==typeof t.data?Xn(t.data):t.data;return[{type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},n]}const Vn={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function Zn(t){return Vn[t]}function Qn(t){if(!t?.sdk)return;const{name:n,version:e}=t.sdk;return{name:n,version:e}}function te(t,n){if(!n?.length||!t.description)return!1;for(const e of n){if(ee(e)){if(K(t.description,e))return!0;continue}if(!e.name&&!e.op)continue;const n=!e.name||K(t.description,e.name),r=!e.op||t.op&&K(t.op,e.op);if(n&&r)return!0}return!1}function ne(t,n){const e=n.parent_span_id,r=n.span_id;if(e)for(const n of t)n.parent_span_id===r&&(n.parent_span_id=e)}function ee(t){return"string"==typeof t||t instanceof RegExp}function re(t,n,e,r){const o=Qn(e),i=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,n){if(!n)return t;const e=t.sdk||{};t.sdk={...e,name:e.name||n.name,version:e.version||n.version,integrations:[...t.sdk?.integrations||[],...n.integrations||[]],packages:[...t.sdk?.packages||[],...n.packages||[]],settings:t.sdk?.settings||n.settings?{...t.sdk?.settings,...n.settings}:void 0}}(t,e?.sdk);const s=function(t,n,e,r){const o=t.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...n&&{sdk:n},...!!e&&r&&{dsn:sn(r)},...o&&{trace:o}}}(t,o,r,n);delete t.sdkProcessingMetadata;return zn(s,[[{type:i},t]])}function oe(t,n,e,r=Rn()){const o=r&&In(r);o&&o.addEvent(t,{[Bt]:n,[Ht]:e})}function ie(t){if(!t||0===t.length)return;const n={};return t.forEach(t=>{const e=t.attributes||{},r=e[Ht],o=e[Bt];"string"==typeof r&&"number"==typeof o&&(n[t.name]={value:o,unit:r})}),n}class se{constructor(t={}){this.D=t.traceId||vt(),this.q=t.spanId||bt(),this.U=t.startTimestamp||pt(),this.H=t.links,this.B={},this.setAttributes({[Ft]:"manual",[qt]:t.op,...t.attributes}),this.W=t.name,t.parentSpanId&&(this.J=t.parentSpanId),"sampled"in t&&(this.X=t.sampled),t.endTimestamp&&(this.G=t.endTimestamp),this.F=[],this.K=t.isStandalone,this.G&&this.Y()}addLink(t){return this.H?this.H.push(t):this.H=[t],this}addLinks(t){return this.H?this.H.push(...t):this.H=t,this}recordException(t,n){}spanContext(){const{q:t,D:n,X:e}=this;return{spanId:t,traceId:n,traceFlags:e?1:0}}setAttribute(t,n){return void 0===n?delete this.B[t]:this.B[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this.U=bn(t)}setStatus(t){return this.V=t,this}updateName(t){return this.W=t,this.setAttribute(At,"custom"),this}end(t){this.G||(this.G=bn(t),this.Y())}getSpanJSON(){return{data:this.B,description:this.W,op:this.B[qt],parent_span_id:this.J,span_id:this.q,start_timestamp:this.U,status:En(this.V),timestamp:this.G,trace_id:this.D,origin:this.B[Ft],profile_id:this.B[Wt],exclusive_time:this.B[Jt],measurements:ie(this.F),is_segment:this.K&&In(this)===this||void 0,segment_id:this.K?In(this).spanContext().spanId:void 0,links:vn(this.H)}}isRecording(){return!this.G&&!!this.X}addEvent(t,n,e){const r=ce(n)?n:e||pt(),o=ce(n)?{}:n||{},i={name:t,time:bn(r),attributes:o};return this.F.push(i),this}isStandaloneSpan(){return!!this.K}Y(){const t=Mt();t&&t.emit("spanEnd",this);if(!(this.K||this===In(this)))return;if(this.K)return void(this.X?function(t){const n=Mt();if(!n)return;const e=t[1];if(!e||0===e.length)return void n.recordDroppedEvent("before_send","span");n.sendEnvelope(t)}(function(t,n){const e=qn(t[0]),r=n?.getDsn(),o=n?.getOptions().tunnel,i={sent_at:(new Date).toISOString(),...function(t){return!!t.trace_id&&!!t.public_key}(e)&&{trace:e},...!!o&&r&&{dsn:sn(r)}},{beforeSendSpan:s,ignoreSpans:c}=n?.getOptions()||{},a=c?.length?t.filter(t=>!te(Sn(t),c)):t,u=t.length-a.length;u&&n?.recordDroppedEvent("before_send","span",u);const f=s?t=>{const n=Sn(t);return s(n)||(Ln(),n)}:Sn,d=[];for(const t of a){const n=f(t);n&&d.push(Kn(n))}return zn(i,d)}([this],t)):t&&t.recordDroppedEvent("sample_rate","span"));const n=this.Z();if(n){(Vt(this).scope||Lt()).captureEvent(n)}}Z(){if(!ae(Sn(this)))return;this.W||(this.W="<unlabeled transaction>");const{scope:t,isolationScope:n}=Vt(this),e=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(!0!==this.X)return;const r=xn(this).filter(t=>t!==this&&!function(t){return t instanceof se&&t.isStandaloneSpan()}(t)).map(t=>Sn(t)).filter(ae),o=this.B[At];delete this.B[zt],r.forEach(t=>{delete t.data[zt]});const i={contexts:{trace:mn(this)},spans:r.length>1e3?r.sort((t,n)=>t.start_timestamp-n.start_timestamp).slice(0,1e3):r,start_timestamp:this.U,timestamp:this.G,transaction:this.W,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:qn(this)},request:e,...o&&{transaction_info:{source:o}}},s=ie(this.F);return s&&Object.keys(s).length&&(i.measurements=s),i}}function ce(t){return t&&"number"==typeof t||t instanceof Date||Array.isArray(t)}function ae(t){return!!(t.start_timestamp&&t.timestamp&&t.span_id&&t.trace_id)}function ue(t,n,e=()=>{}){let r;try{r=t()}catch(t){throw n(t),e(),t}return function(t,n,e){if(D(t))return t.then(t=>(e(),t),t=>{throw n(t),e(),t});return e(),t}(r,n,e)}const fe="__SENTRY_SUPPRESS_TRACING__";function de(t,n){const e=ye();if(e.startSpan)return e.startSpan(t,n);const r=ge(t),{forceTransaction:o,parentSpan:i,scope:s}=t,c=s?.clone();return Ct(c,()=>_e(i)(()=>{const e=Lt(),s=be(e,i),c=t.onlyIfParent&&!s?new Fn:me({parentSpan:s,spanArguments:r,forceTransaction:o,scope:e});return St(e,c),ue(()=>n(c),()=>{const{status:t}=Sn(c);!c.isRecording()||t&&"ok"!==t||c.setStatus({code:2,message:"internal_error"})},()=>{c.end()})}))}function le(t){const n=ye();if(n.startInactiveSpan)return n.startInactiveSpan(t);const e=ge(t),{forceTransaction:r,parentSpan:o}=t;return(t.scope?n=>Ct(t.scope,n):void 0!==o?t=>pe(o,t):t=>t())(()=>{const n=Lt(),i=be(n,o);return t.onlyIfParent&&!i?new Fn:me({parentSpan:i,spanArguments:e,forceTransaction:r,scope:n})})}function pe(t,n){const e=ye();return e.withActiveSpan?e.withActiveSpan(t,n):Ct(e=>(St(e,t||void 0),n(e)))}function he(t){return Ct(n=>(n.setPropagationContext({traceId:vt(),sampleRand:Math.random()}),pe(null,t)))}function me({parentSpan:t,spanArguments:n,forceTransaction:e,scope:r}){if(!Cn()){const r=new Fn;if(e||!t){An(r,{sampled:"false",sample_rate:"0",transaction:n.name,...qn(r)})}return r}const o=Ot();let i;if(t&&!e)i=function(t,n,e){const{spanId:r,traceId:o}=t.spanContext(),i=!n.getScopeData().sdkProcessingMetadata[fe]&&wn(t),s=i?new se({...e,parentSpanId:r,traceId:o,sampled:i}):new Fn({traceId:o});$n(t,s);const c=Mt();c&&(c.emit("spanStart",s),e.endTimestamp&&c.emit("spanEnd",s));return s}(t,r,n),$n(t,i);else if(t){const e=qn(t),{traceId:o,spanId:s}=t.spanContext(),c=wn(t);i=ve({traceId:o,parentSpanId:s,...n},r,c),An(i,e)}else{const{traceId:t,dsc:e,parentSpanId:s,sampled:c}={...o.getPropagationContext(),...r.getPropagationContext()};i=ve({traceId:t,parentSpanId:s,...n},r,c),e&&An(i,e)}return function(t,n,e){t&&(Z(t,Yt,e),Z(t,Kt,n))}(i,r,o),i}function ge(t){const n={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const e={...n};return e.startTimestamp=bn(t.startTime),delete e.startTime,e}return n}function ye(){return Rt(r())}function ve(t,n,e){const r=Mt(),o=r?.getOptions()||{},{name:i=""}=t,s={spanAttributes:{...t.attributes},spanName:i,parentSampled:e};r?.emit("beforeSampling",s,{decision:!1});const c=s.parentSampled??e,a=s.spanAttributes,u=n.getPropagationContext(),[f,d,l]=n.getScopeData().sdkProcessingMetadata[fe]?[!1]:function(t,n,e){if(!Cn(t))return[!1];let r,o;"function"==typeof t.tracesSampler?(o=t.tracesSampler({...n,inheritOrSampleWith:t=>"number"==typeof n.parentSampleRate?n.parentSampleRate:"boolean"==typeof n.parentSampled?Number(n.parentSampled):t}),r=!0):void 0!==n.parentSampled?o=n.parentSampled:void 0!==t.tracesSampleRate&&(o=t.tracesSampleRate,r=!0);const i=fn(o);return void 0===i?[!1]:i?[e<i,i,r]:[!1,i,r]}(o,{name:i,parentSampled:c,attributes:a,parentSampleRate:fn(u.dsc?.sample_rate)},u.sampleRand),p=new se({...t,attributes:{[At]:"custom",[Nt]:void 0!==d&&l?d:void 0,...a},sampled:f});return!f&&r&&r.recordDroppedEvent("sample_rate","transaction"),r&&r.emit("spanStart",p),p}function be(t,n){if(n)return n;if(null===n)return;const e=wt(t);if(!e)return;const r=Mt();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?In(e):e}function _e(t){return void 0!==t?n=>pe(t,n):t=>t()}const Se={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function we(t,n={}){const e=new Map;let r,o=!1,i="externalFinish",s=!n.disableAutoFinish;const c=[],{idleTimeout:a=Se.idleTimeout,finalTimeout:u=Se.finalTimeout,childSpanTimeout:f=Se.childSpanTimeout,beforeSpanEnd:d}=n,l=Mt();if(!l||!Cn()){const t=new Fn;return An(t,{sample_rate:"0",sampled:"false",...qn(t)}),t}const p=Lt(),h=Rn(),m=function(t){const n=le(t);return St(Lt(),n),n}(t);function g(){r&&(clearTimeout(r),r=void 0)}function y(t){g(),r=setTimeout(()=>{!o&&0===e.size&&s&&(i="idleTimeout",m.end(t))},a)}function v(t){r=setTimeout(()=>{!o&&s&&(i="heartbeatFailed",m.end(t))},f)}function b(t){o=!0,e.clear(),c.forEach(t=>t()),St(p,h);const n=Sn(m),{start_timestamp:r}=n;if(!r)return;n.data[Ut]||m.setAttribute(Ut,i);const s=xn(m).filter(t=>t!==m);let f=0;s.forEach(n=>{n.isRecording()&&(n.setStatus({code:2,message:"cancelled"}),n.end(t));const e=Sn(n),{timestamp:r=0,start_timestamp:o=0}=e;r-o<=(u+a)/1e3&&o<=t||(!function(t,n){t[Tn]&&t[Tn].delete(n)}(m,n),f++)}),f>0&&m.setAttribute("sentry.idle_span_discarded_spans",f)}return m.end=new Proxy(m.end,{apply(t,n,e){if(d&&d(m),n instanceof Fn)return;const[r,...o]=e,i=bn(r||pt()),s=xn(m).filter(t=>t!==m);if(!s.length)return b(i),Reflect.apply(t,n,[i,...o]);const c=s.map(t=>Sn(t).timestamp).filter(t=>!!t),a=c.length?Math.max(...c):void 0,f=Sn(m).start_timestamp,l=Math.min(f?f+u/1e3:1/0,Math.max(f||-1/0,Math.min(i,a||1/0)));return b(l),Reflect.apply(t,n,[l,...o])}}),c.push(l.on("spanStart",t=>{if(o||t===m||Sn(t).timestamp||t instanceof se&&t.isStandaloneSpan())return;var n;xn(m).includes(t)&&(n=t.spanContext().spanId,g(),e.set(n,!0),v(pt()+f/1e3))})),c.push(l.on("spanEnd",t=>{var n;o||(n=t.spanContext().spanId,e.has(n)&&e.delete(n),0===e.size&&y(pt()+a/1e3))})),c.push(l.on("idleSpanEnableAutoFinish",t=>{t===m&&(s=!0,y(),e.size&&v())})),n.disableAutoFinish||y(),setTimeout(()=>{o||(m.setStatus({code:2,message:"deadline_exceeded"}),i="finalTimeout",m.end())},u),m}function Ee(t){return new ke(n=>{n(t)})}function Te(t){return new ke((n,e)=>{e(t)})}class ke{constructor(t){this.tt=0,this.nt=[],this.et(t)}then(t,n){return new ke((e,r)=>{this.nt.push([!1,n=>{if(t)try{e(t(n))}catch(t){r(t)}else e(n)},t=>{if(n)try{e(n(t))}catch(t){r(t)}else r(t)}]),this.rt()})}catch(t){return this.then(t=>t,t)}finally(t){return new ke((n,e)=>{let r,o;return this.then(n=>{o=!1,r=n,t&&t()},n=>{o=!0,r=n,t&&t()}).then(()=>{o?e(r):n(r)})})}rt(){if(0===this.tt)return;const t=this.nt.slice();this.nt=[],t.forEach(t=>{t[0]||(1===this.tt&&t[1](this.ot),2===this.tt&&t[2](this.ot),t[0]=!0)})}et(t){const n=(t,n)=>{0===this.tt&&(D(n)?n.then(e,r):(this.tt=t,this.ot=n,this.rt()))},e=t=>{n(1,t)},r=t=>{n(2,t)};try{t(e,r)}catch(t){r(t)}}}function $e(t,n,e,r=0){return new ke((o,i)=>{const s=t[r];if(null===n||"function"!=typeof s)o(n);else{const c=s({...n},e);D(c)?c.then(n=>$e(t,n,e,r+1).then(o)).then(null,i):$e(t,c,e,r+1).then(o).then(null,i)}})}function xe(t,n){const{fingerprint:e,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=n;!function(t,n){const{extra:e,tags:r,user:o,contexts:i,level:s,transactionName:c}=n;Object.keys(e).length&&(t.extra={...e,...t.extra});Object.keys(r).length&&(t.tags={...r,...t.tags});Object.keys(o).length&&(t.user={...o,...t.user});Object.keys(i).length&&(t.contexts={...i,...t.contexts});s&&(t.level=s);c&&"transaction"!==t.type&&(t.transaction=c)}(t,n),r&&function(t,n){t.contexts={trace:gn(n),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:qn(n),...t.sdkProcessingMetadata};const e=In(n),r=Sn(e).description;r&&!t.transaction&&"transaction"===t.type&&(t.transaction=r)}(t,r),function(t,n){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],n&&(t.fingerprint=t.fingerprint.concat(n));t.fingerprint.length||delete t.fingerprint}(t,e),function(t,n){const e=[...t.breadcrumbs||[],...n];t.breadcrumbs=e.length?e:void 0}(t,o),function(t,n){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...n}}(t,i)}function Ie(t,n){const{extra:e,tags:r,user:o,contexts:i,level:s,sdkProcessingMetadata:c,breadcrumbs:a,fingerprint:u,eventProcessors:f,attachments:d,propagationContext:l,transactionName:p,span:h}=n;Re(t,"extra",e),Re(t,"tags",r),Re(t,"user",o),Re(t,"contexts",i),t.sdkProcessingMetadata=yt(t.sdkProcessingMetadata,c,2),s&&(t.level=s),p&&(t.transactionName=p),h&&(t.span=h),a.length&&(t.breadcrumbs=[...t.breadcrumbs,...a]),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 Re(t,n,e){t[n]=yt(t[n],e,1)}let Le,Oe,je;function Ce(t,e,r,o,i,s){const{normalizeDepth:c=3,normalizeMaxBreadth:a=1e3}=t,u={...e,event_id:e.event_id||r.event_id||ot(),timestamp:e.timestamp||ft()},f=r.integrations||t.integrations.map(t=>t.name);!function(t,n){const{environment:e,release:r,dist:o,maxValueLength:i=250}=n;t.environment=t.environment||e||Mn,!t.release&&r&&(t.release=r);!t.dist&&o&&(t.dist=o);const s=t.request;s?.url&&(s.url=X(s.url,i))}(u,t),function(t,n){n.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...n])}(u,f),i&&i.emit("applyFrameMetadata",e),void 0===e.type&&function(t,e){const r=function(t){const e=n._sentryDebugIds;if(!e)return{};const r=Object.keys(e);return je&&r.length===Oe||(Oe=r.length,je=r.reduce((n,r)=>{Le||(Le={});const o=Le[r];if(o)n[o[0]]=o[1];else{const o=t(r);for(let t=o.length-1;t>=0;t--){const i=o[t],s=i?.filename,c=e[r];if(s&&c){n[s]=c,Le[r]=[s,c];break}}}return n},{})),je}(e);t.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(t=>{t.filename&&(t.debug_id=r[t.filename])})})}(u,t.stackParser);const d=function(t,n){if(!n)return t;const e=t?t.clone():new Et;return e.update(n),e}(o,r.captureContext);r.mechanism&&at(u,r.mechanism);const l=i?i.getEventProcessors():[],p=jt().getScopeData();if(s){Ie(p,s.getScopeData())}if(d){Ie(p,d.getScopeData())}const h=[...r.attachments||[],...p.attachments];h.length&&(r.attachments=h),xe(u,p);return $e([...l,...p.eventProcessors],u,r).then(t=>(t&&function(t){const n={};if(t.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(t=>{t.debug_id&&(t.abs_path?n[t.abs_path]=t.debug_id:t.filename&&(n[t.filename]=t.debug_id),delete t.debug_id)})}),0===Object.keys(n).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const e=t.debug_meta.images;Object.entries(n).forEach(([t,n])=>{e.push({type:"sourcemap",code_file:t,debug_id:n})})}(t),"number"==typeof c&&c>0?function(t,n,e){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(t=>({...t,...t.data&&{data:Un(t.data,n,e)}}))},...t.user&&{user:Un(t.user,n,e)},...t.contexts&&{contexts:Un(t.contexts,n,e)},...t.extra&&{extra:Un(t.extra,n,e)}};t.contexts?.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=Un(t.contexts.trace.data,n,e)));t.spans&&(r.spans=t.spans.map(t=>({...t,...t.data&&{data:Un(t.data,n,e)}})));t.contexts?.flags&&r.contexts&&(r.contexts.flags=Un(t.contexts.flags,3,e));return r}(t,c,a):t))}function Me(t){if(t)return function(t){return t instanceof Et||"function"==typeof t}(t)||function(t){return Object.keys(t).some(t=>Pe.includes(t))}(t)?{captureContext:t}:t}const Pe=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function captureException(t,n){return Lt().captureException(t,Me(n))}function Ae(t,n){return Lt().captureEvent(t,n)}function Ne(){return Ot().lastEventId()}function De(){const t=Mt();return!1!==t?.getOptions().enabled&&!!t?.getTransport()}function qe(t){const e=Ot(),r=Lt(),{userAgent:o}=n.navigator||{},i=mt({user:r.getUser()||e.getUser(),...o&&{userAgent:o},...t}),s=e.getSession();return"ok"===s?.status&>(s,{status:"exited"}),Fe(),e.setSession(i),i}function Fe(){const t=Ot(),n=Lt().getSession()||t.getSession();n&&function(t){let n={};"ok"===t.status&&(n={status:"exited"}),gt(t,n)}(n),Ue(),t.setSession()}function Ue(){const t=Ot(),n=Mt(),e=t.getSession();e&&n&&n.captureSession(e)}function He(t=!1){t?Fe():Ue()}function Be(t){const n=t.protocol?`${t.protocol}:`:"",e=t.port?`:${t.port}`:"";return`${n}//${t.host}${e}${t.path?`/${t.path}`:""}/api/`}function ze(t,n,e){return n||`${function(t){return`${Be(t)}${t.projectId}/envelope/`}(t)}?${function(t,n){const e={sentry_version:"7"};return t.publicKey&&(e.sentry_key=t.publicKey),n&&(e.sentry_client=`${n.name}/${n.version}`),new URLSearchParams(e).toString()}(t,e)}`}const We=[];function Je(t){const n=t.defaultIntegrations||[],e=t.integrations;let r;if(n.forEach(t=>{t.isDefaultInstance=!0}),Array.isArray(e))r=[...n,...e];else if("function"==typeof e){const t=e(n);r=Array.isArray(t)?t:[t]}else r=n;return function(t){const n={};return t.forEach(t=>{const{name:e}=t,r=n[e];r&&!r.isDefaultInstance&&t.isDefaultInstance||(n[e]=t)}),Object.values(n)}(r)}function Xe(t,n){for(const e of n)e?.afterAllSetup&&e.afterAllSetup(t)}function Ge(t,n,e){if(!e[n.name]){if(e[n.name]=n,-1===We.indexOf(n.name)&&"function"==typeof n.setupOnce&&(n.setupOnce(),We.push(n.name)),n.setup&&"function"==typeof n.setup&&n.setup(t),"function"==typeof n.preprocessEvent){const e=n.preprocessEvent.bind(n);t.on("preprocessEvent",(n,r)=>e(n,r,t))}if("function"==typeof n.processEvent){const e=n.processEvent.bind(n),r=Object.assign((n,r)=>e(n,r,t),{id:n.name});t.addEventProcessor(r)}}}const Ke=Symbol.for("SentryInternalError"),Ye=Symbol.for("SentryDoNotSendEventError");function Ve(t){return{message:t,[Ke]:!0}}function Ze(t){return{message:t,[Ye]:!0}}class Qe{constructor(t){if(this.it=t,this._integrations={},this.st=0,this.ct={},this.ut={},this.u=[],t.dsn&&(this.ft=un(t.dsn)),this.ft){const n=ze(this.ft,t.tunnel,t._metadata?t._metadata.sdk:void 0);this.dt=t.transport({tunnel:this.it.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,e){const r=ot();if(ut(t))return r;const o={event_id:r,...n};return this.lt(this.eventFromException(t,o).then(t=>this.ht(t,o,e))),o.event_id}captureMessage(t,n,e,r){const o={event_id:ot(),...e},i=M(t)?t:String(t),s=P(t)?this.eventFromMessage(i,n,o):this.eventFromException(t,o);return this.lt(s.then(t=>this.ht(t,o,r))),o.event_id}captureEvent(t,n,e){const r=ot();if(n?.originalException&&ut(n.originalException))return r;const o={event_id:r,...n},i=t.sdkProcessingMetadata||{},s=i.capturedSpanScope,c=i.capturedSpanIsolationScope;return this.lt(this.ht(t,o,s||e,c)),o.event_id}captureSession(t){this.sendSession(t),gt(t,{init:!1})}getDsn(){return this.ft}getOptions(){return this.it}getSdkMetadata(){return this.it._metadata}getTransport(){return this.dt}flush(t){const n=this.dt;return n?(this.emit("flush"),this.gt(t).then(e=>n.flush(t).then(t=>e&&t))):Ee(!0)}close(t){return this.flush(t).then(t=>(this.getOptions().enabled=!1,this.emit("close"),t))}getEventProcessors(){return this.u}addEventProcessor(t){this.u.push(t)}init(){(this.yt()||this.it.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this.vt()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];Ge(this,t,this._integrations),n||Xe(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let e=re(t,this.ft,this.it._metadata,this.it.tunnel);for(const t of n.attachments||[])e=Wn(e,Yn(t));const r=this.sendEnvelope(e);r&&r.then(n=>this.emit("afterSendEvent",t,n),null)}sendSession(t){const{release:n,environment:e=Mn}=this.it;if("aggregates"in t){const r=t.attrs||{};if(!r.release&&!n)return;r.release=r.release||n,r.environment=r.environment||e,t.attrs=r}else{if(!t.release&&!n)return;t.release=t.release||n,t.environment=t.environment||e}this.emit("beforeSendSession",t);const r=function(t,n,e,r){const o=Qn(e);return zn({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&n&&{dsn:sn(n)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this.ft,this.it._metadata,this.it.tunnel);this.sendEnvelope(r)}recordDroppedEvent(t,n,e=1){if(this.it.sendClientReports){const r=`${t}:${n}`;this.ct[r]=(this.ct[r]||0)+e}}on(t,n){const e=this.ut[t]=this.ut[t]||[];return e.push(n),()=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)}}emit(t,...n){const e=this.ut[t];e&&e.forEach(t=>t(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this.yt()&&this.dt?this.dt.send(t).then(null,t=>t):Ee({})}vt(){const{integrations:t}=this.it;this._integrations=function(t,n){const e={};return n.forEach(n=>{n&&Ge(t,n,e)}),e}(this,t),Xe(this,t)}bt(t,n){let e="fatal"===n.level,r=!1;const o=n.exception?.values;if(o){r=!0;for(const t of o){const n=t.mechanism;if(!1===n?.handled){e=!0;break}}}const i="ok"===t.status;(i&&0===t.errors||i&&e)&&(gt(t,{...e&&{status:"crashed"},errors:t.errors||Number(r||e)}),this.captureSession(t))}gt(t){return new ke(n=>{let e=0;const r=setInterval(()=>{0==this.st?(clearInterval(r),n(!0)):(e+=1,t&&e>=t&&(clearInterval(r),n(!1)))},1)})}yt(){return!1!==this.getOptions().enabled&&void 0!==this.dt}_t(t,n,e,r){const o=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i?.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||r.setLastEventId(t.event_id||n.event_id),Ce(o,t,n,e,this,r).then(t=>{if(null===t)return t;this.emit("postprocessEvent",t,n),t.contexts={trace:Pt(e),...t.contexts};const r=Dn(this,e);return t.sdkProcessingMetadata={dynamicSamplingContext:r,...t.sdkProcessingMetadata},t})}ht(t,n={},e=Lt(),r=Ot()){return this.St(t,n,e,r).then(t=>t.event_id,t=>{})}St(t,n,e,r){const o=this.getOptions(),{sampleRate:i}=o,s=nr(t),c=tr(t),a=t.type||"error",u=`before send for type \`${a}\``,f=void 0===i?void 0:fn(i);if(c&&"number"==typeof f&&Math.random()>f)return this.recordDroppedEvent("sample_rate","error"),Te(Ze(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));const d="replay_event"===a?"replay":a;return this._t(t,n,e,r).then(t=>{if(null===t)throw this.recordDroppedEvent("event_processor",d),Ze("An event processor returned `null`, will not send event.");if(n.data&&!0===n.data.__sentry__)return t;const e=function(t,n,e,r){const{beforeSend:o,beforeSendTransaction:i,beforeSendSpan:s,ignoreSpans:c}=n;let a=e;if(tr(a)&&o)return o(a,r);if(nr(a)){if(s||c){const n=function(t){const{trace_id:n,parent_span_id:e,span_id:r,status:o,origin:i,data:s,op:c}=t.contexts?.trace??{};return{data:s??{},description:t.transaction,op:c,parent_span_id:e,span_id:r??"",start_timestamp:t.start_timestamp??0,status:o,timestamp:t.timestamp,trace_id:n??"",origin:i,profile_id:s?.[Wt],exclusive_time:s?.[Jt],measurements:t.measurements,is_segment:!0}}(a);if(c?.length&&te(n,c))return null;if(s){const t=s(n);t?a=yt(e,{type:"transaction",timestamp:(u=t).timestamp,start_timestamp:u.start_timestamp,transaction:u.description,contexts:{trace:{trace_id:u.trace_id,span_id:u.span_id,parent_span_id:u.parent_span_id,op:u.op,status:u.status,origin:u.origin,data:{...u.data,...u.profile_id&&{[Wt]:u.profile_id},...u.exclusive_time&&{[Jt]:u.exclusive_time}}}},measurements:u.measurements}):Ln()}if(a.spans){const n=[],e=a.spans;for(const t of e)if(c?.length&&te(t,c))ne(e,t);else if(s){const e=s(t);e?n.push(e):(Ln(),n.push(t))}else n.push(t);const r=a.spans.length-n.length;r&&t.recordDroppedEvent("before_send","span",r),a.spans=n}}if(i){if(a.spans){const t=a.spans.length;a.sdkProcessingMetadata={...e.sdkProcessingMetadata,spanCountBeforeProcessing:t}}return i(a,r)}}var u;return a}(this,o,t,n);return function(t,n){const e=`${n} must return \`null\` or a valid event.`;if(D(t))return t.then(t=>{if(!A(t)&&null!==t)throw Ve(e);return t},t=>{throw Ve(`${n} rejected with ${t}`)});if(!A(t)&&null!==t)throw Ve(e);return t}(e,u)}).then(o=>{if(null===o){if(this.recordDroppedEvent("before_send",d),s){const n=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",n)}throw Ze(`${u} returned \`null\`, will not send event.`)}const i=e.getSession()||r.getSession();if(c&&i&&this.bt(i,o),s){const t=(o.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(o.spans?o.spans.length:0);t>0&&this.recordDroppedEvent("before_send","span",t)}const a=o.transaction_info;if(s&&a&&o.transaction!==t.transaction){const t="custom";o.transaction_info={...a,source:t}}return this.sendEvent(o,n),o}).then(null,t=>{if((n=t)&&"object"==typeof n&&Ye in n||function(t){return!!t&&"object"==typeof t&&Ke in t}(t))throw t;var n;throw this.captureException(t,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:t}),Ve(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)})}lt(t){this.st++,t.then(t=>(this.st--,t),t=>(this.st--,t))}wt(){const t=this.ct;return this.ct={},Object.entries(t).map(([t,n])=>{const[e,r]=t.split(":");return{reason:e,category:r,quantity:n}})}Et(){const t=this.wt();if(0===t.length)return;if(!this.ft)return;const n=(e=t,zn((r=this.it.tunnel&&sn(this.ft))?{dsn:r}:{},[[{type:"client_report"},{timestamp:ft(),discarded_events:e}]]));var e,r;this.sendEnvelope(n)}}function tr(t){return void 0===t.type}function nr(t){return"transaction"===t.type}function er(t,n){const e=function(t){return rr().get(t)}(t)??[];if(0===e.length)return;const r=t.getOptions(),o=function(t,n,e,r){const o={};return n?.sdk&&(o.sdk={name:n.sdk.name,version:n.sdk.version}),e&&r&&(o.dsn=sn(r)),zn(o,[(i=t,[{type:"log",item_count:i.length,content_type:"application/vnd.sentry.items.log+json"},{items:i}])]);var i}(e,r._metadata,r.tunnel,t.getDsn());rr().set(t,[]),t.emit("flushLogs"),t.sendEnvelope(o)}function rr(){return i("clientToLogBufferMap",()=>new WeakMap)}function or(t){Lt().setClient(t)}const ir=Symbol.for("SentryBufferFullError");function sr(t){const n=[];function e(t){return n.splice(n.indexOf(t),1)[0]||Promise.resolve(void 0)}return{$:n,add:function(r){if(!(void 0===t||n.length<t))return Te(ir);const o=r();return-1===n.indexOf(o)&&n.push(o),o.then(()=>e(o)).then(null,()=>e(o).then(null,()=>{})),o},drain:function(t){return new ke((e,r)=>{let o=n.length;if(!o)return e(!0);const i=setTimeout(()=>{t&&t>0&&e(!1)},t);n.forEach(t=>{Ee(t).then(()=>{--o||(clearTimeout(i),e(!0))},r)})})}}}function cr(t,{statusCode:n,headers:e},r=Date.now()){const o={...t},i=e?.["x-sentry-rate-limits"],s=e?.["retry-after"];if(i)for(const t of i.trim().split(",")){const[n,e,,,i]=t.split(":",5),s=parseInt(n,10),c=1e3*(isNaN(s)?60:s);if(e)for(const t of e.split(";"))"metric_bucket"===t&&i&&!i.split(";").includes("custom")||(o[t]=r+c);else o.all=r+c}else s?o.all=r+function(t,n=Date.now()){const e=parseInt(`${t}`,10);if(!isNaN(e))return 1e3*e;const r=Date.parse(`${t}`);return isNaN(r)?6e4:r-n}(s,r):429===n&&(o.all=r+6e4);return o}function ar(t,n,e=sr(t.bufferSize||64)){let r={};return{send:function(o){const i=[];if(Jn(o,(n,e)=>{const o=Zn(e);!function(t,n,e=Date.now()){return function(t,n){return t[n]||t.all||0}(t,n)>e}(r,o)?i.push(n):t.recordDroppedEvent("ratelimit_backoff",o)}),0===i.length)return Ee({});const s=zn(o[0],i),c=n=>{Jn(s,(e,r)=>{t.recordDroppedEvent(n,Zn(r))})};return e.add(()=>n({body:Gn(s)}).then(t=>(r=cr(r,t),t),t=>{throw c("network_error"),t})).then(t=>t,t=>{if(t===ir)return c("queue_overflow"),Ee({});throw t})},flush:t=>e.drain(t)}}function ur(t){return"isRelative"in t}function fr(t,n){const e=t.indexOf("://")<=0&&0!==t.indexOf("//"),r=e?"thismessage:/":void 0;try{if("canParse"in URL&&!URL.canParse(t,r))return;const n=new URL(t,r);return e?{isRelative:e,pathname:n.pathname,search:n.search,hash:n.hash}:n}catch{}}function dr(t){if(ur(t))return t.pathname;const n=new URL(t);return n.search="",n.hash="",["80","443"].includes(n.port)&&(n.port=""),n.password&&(n.password="%filtered%"),n.username&&(n.username="%filtered%"),n.toString()}function lr(t){if(!t)return{};const n=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!n)return{};const e=n[6]||"",r=n[8]||"";return{host:n[4],path:n[5],protocol:n[2],search:e,hash:r,relative:n[5]+e+r}}function pr(t){"aggregates"in t?void 0===t.attrs?.ip_address&&(t.attrs={...t.attrs,ip_address:"{{auto}}"}):void 0===t.ipAddress&&(t.ipAddress="{{auto}}")}function hr(t={}){const n=t.client||Mt();if(!De()||!n)return{};const e=Rt(r());if(e.getTraceData)return e.getTraceData(t);const o=t.scope||Lt(),i=t.span||Rn(),s=i?yn(i):function(t){const{traceId:n,sampled:e,propagationSpanId:r}=t.getPropagationContext();return pn(n,r,e)}(o),c=nn(i?qn(i):Dn(n,o));return dn.test(s)?{"sentry-trace":s,baggage:c}:{}}const mr=100;function gr(t,n){const e=Mt(),r=Ot();if(!e)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=mr}=e.getOptions();if(i<=0)return;const s={timestamp:ft(),...t},c=o?a(()=>o(s,n)):s;null!==c&&(e.emit&&e.emit("beforeAddBreadcrumb",c,n),r.addBreadcrumb(c,i))}let yr;const vr=new WeakMap,br=()=>({name:"FunctionToString",setupOnce(){yr=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=tt(this),e=vr.has(Mt())&&void 0!==n?n:this;return yr.apply(e,t)}}catch{}},setup(t){vr.set(t,!0)}}),_r=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],Sr=(t={})=>{let n;return{name:"EventFilters",setup(e){const r=e.getOptions();n=Er(t,r)},processEvent(e,r,o){if(!n){const e=o.getOptions();n=Er(t,e)}return function(t,n){if(t.type){if("transaction"===t.type&&function(t,n){if(!n?.length)return!1;const e=t.transaction;return!!e&&Y(e,n)}(t,n.ignoreTransactions))return!0}else{if(function(t,n){if(!n?.length)return!1;return function(t){const n=[];t.message&&n.push(t.message);try{const e=t.exception.values[t.exception.values.length-1];e?.value&&(n.push(e.value),e.type&&n.push(`${e.type}: ${e.value}`))}catch{}return n}(t).some(t=>Y(t,n))}(t,n.ignoreErrors))return!0;if(function(t){if(!t.exception?.values?.length)return!1;return!t.message&&!t.exception.values.some(t=>t.stacktrace||t.type&&"Error"!==t.type||t.value)}(t))return!0;if(function(t,n){if(!n?.length)return!1;const e=Tr(t);return!!e&&Y(e,n)}(t,n.denyUrls))return!0;if(!function(t,n){if(!n?.length)return!0;const e=Tr(t);return!e||Y(e,n)}(t,n.allowUrls))return!0}return!1}(e,n)?null:e}}},wr=(t={})=>({...Sr(t),name:"InboundFilters"});function Er(t={},n={}){return{allowUrls:[...t.allowUrls||[],...n.allowUrls||[]],denyUrls:[...t.denyUrls||[],...n.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...n.ignoreErrors||[],...t.disableErrorDefaults?[]:_r],ignoreTransactions:[...t.ignoreTransactions||[],...n.ignoreTransactions||[]]}}function Tr(t){try{const n=[...t.exception?.values??[]].reverse().find(t=>void 0===t.mechanism?.parent_id&&t.stacktrace?.frames?.length),e=n?.stacktrace?.frames;return e?function(t=[]){for(let n=t.length-1;n>=0;n--){const e=t[n];if(e&&"<anonymous>"!==e.filename&&"[native code]"!==e.filename)return e.filename||null}return null}(e):null}catch{return null}}function kr(t,n,e,r,o,i){if(!o.exception?.values||!i||!q(i.originalException,Error))return;const s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;s&&(o.exception.values=$r(t,n,r,i.originalException,e,o.exception.values,s,0))}function $r(t,n,e,r,o,i,s,c){if(i.length>=e+1)return i;let a=[...i];if(q(r[o],Error)){xr(s,c);const i=t(n,r[o]),u=a.length;Ir(i,o,u,c),a=$r(t,n,e,r[o],o,[i,...a],i,u)}return Array.isArray(r.errors)&&r.errors.forEach((r,i)=>{if(q(r,Error)){xr(s,c);const u=t(n,r),f=a.length;Ir(u,`errors[${i}]`,f,c),a=$r(t,n,e,r,o,[u,...a],u,f)}}),a}function xr(t,n){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,..."AggregateError"===t.type&&{is_exception_group:!0},exception_id:n}}function Ir(t,n,e,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:n,exception_id:e,parent_id:r}}function Rr(){"console"in n&&s.forEach(function(t){t in n.console&&V(n.console,t,function(e){return c[t]=e,function(...e){S("console",{args:e,level:t});const r=c[t];r?.apply(n.console,e)}})})}function Lr(t){return"warn"===t?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}const Or=()=>{let t;return{name:"Dedupe",processEvent(n){if(n.type)return n;try{if(function(t,n){if(!n)return!1;if(function(t,n){const e=t.message,r=n.message;if(!e&&!r)return!1;if(e&&!r||!e&&r)return!1;if(e!==r)return!1;if(!Cr(t,n))return!1;if(!jr(t,n))return!1;return!0}(t,n))return!0;if(function(t,n){const e=Mr(n),r=Mr(t);if(!e||!r)return!1;if(e.type!==r.type||e.value!==r.value)return!1;if(!Cr(t,n))return!1;if(!jr(t,n))return!1;return!0}(t,n))return!0;return!1}(n,t))return null}catch{}return t=n}}};function jr(t,n){let e=g(t),r=g(n);if(!e&&!r)return!0;if(e&&!r||!e&&r)return!1;if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++){const n=r[t],o=e[t];if(n.filename!==o.filename||n.lineno!==o.lineno||n.colno!==o.colno||n.function!==o.function)return!1}return!0}function Cr(t,n){let e=t.fingerprint,r=n.fingerprint;if(!e&&!r)return!0;if(e&&!r||!e&&r)return!1;try{return!(e.join("")!==r.join(""))}catch{return!1}}function Mr(t){return t.exception?.values?.[0]}function Pr(t,n,e,r,o="auto.http.browser"){if(!t.fetchData)return;const{method:i,url:s}=t.fetchData,c=Cn()&&n(s);if(t.endTimestamp&&c){const n=t.fetchData.__span;if(!n)return;const e=r[n];return void(e&&(!function(t,n){if(n.response){Gt(t,n.response.status);const e=n.response?.headers?.get("content-length");if(e){const n=parseInt(e);n>0&&t.setAttribute("http.response_content_length",n)}}else n.error&&t.setStatus({code:2,message:"internal_error"});t.end()}(e,t),delete r[n]))}const a=!!Rn(),u=c&&a?le(function(t,n,e){const r=fr(t);return{name:r?`${n} ${dr(r)}`:n,attributes:Nr(t,r,n,e)}}(s,i,o)):new Fn;if(t.fetchData.__span=u.spanContext().spanId,r[u.spanContext().spanId]=u,e(t.fetchData.url)){const n=t.args[0],e=t.args[1]||{},r=function(t,n,e){const r=hr({span:e}),o=r["sentry-trace"],i=r.baggage;if(!o)return;const s=n.headers||(U(t)?t.headers:void 0);if(s){if(function(t){return"undefined"!=typeof Headers&&q(t,Headers)}(s)){const t=new Headers(s);if(t.get("sentry-trace")||t.set("sentry-trace",o),i){const n=t.get("baggage");n?Ar(n)||t.set("baggage",`${n},${i}`):t.set("baggage",i)}return t}if(Array.isArray(s)){const t=[...s];s.find(t=>"sentry-trace"===t[0])||t.push(["sentry-trace",o]);const n=s.find(t=>"baggage"===t[0]&&Ar(t[1]));return i&&!n&&t.push(["baggage",i]),t}{const t="sentry-trace"in s?s["sentry-trace"]:void 0,n="baggage"in s?s.baggage:void 0,e=n?Array.isArray(n)?[...n]:[n]:[],r=n&&(Array.isArray(n)?n.find(t=>Ar(t)):Ar(n));return i&&!r&&e.push(i),{...s,"sentry-trace":t??o,baggage:e.length>0?e.join(","):void 0}}}return{...r}}(n,e,Cn()&&a?u:void 0);r&&(t.args[1]=e,e.headers=r)}const f=Mt();if(f){const n={input:t.args,response:t.response,startTimestamp:t.startTimestamp,endTimestamp:t.endTimestamp};f.emit("beforeOutgoingRequestSpan",u,n)}return u}function Ar(t){return t.split(",").some(t=>t.trim().startsWith(Zt))}function Nr(t,n,e,r){const o={url:t,type:"fetch","http.method":e,[Ft]:r,[qt]:"http.client"};return n&&(ur(n)||(o["http.url"]=n.href,o["server.address"]=n.host),n.search&&(o["http.query"]=n.search),n.hash&&(o["http.fragment"]=n.hash)),o}function Dr(t){return void 0===t?void 0:t>=400&&t<500?"warning":t>=500?"error":void 0}const qr=n;function Fr(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Ur(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in qr))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}())return!1;if(Fr(qr.fetch))return!0;let t=!1;const n=qr.document;if(n&&"function"==typeof n.createElement)try{const e=n.createElement("iframe");e.hidden=!0,n.head.appendChild(e),e.contentWindow?.fetch&&(t=Fr(e.contentWindow.fetch)),n.head.removeChild(e)}catch(t){}return t}function Hr(t,n){const e="fetch";b(e,t),_(e,()=>Br(void 0,n))}function Br(t,e=!1){e&&!Ur()||V(n,"fetch",function(e){return function(...r){const o=new Error,{method:i,url:s}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[n,e]=t;return{url:Jr(n),method:Wr(e,"method")?String(e.method).toUpperCase():"GET"}}const n=t[0];return{url:Jr(n),method:Wr(n,"method")?String(n.method).toUpperCase():"GET"}}(r),c={args:r,fetchData:{method:i,url:s},startTimestamp:1e3*pt(),virtualError:o,headers:Xr(r)};return t||S("fetch",{...c}),e.apply(n,r).then(async n=>(t?t(n):S("fetch",{...c,endTimestamp:1e3*pt(),response:n}),n),t=>{if(S("fetch",{...c,endTimestamp:1e3*pt(),error:t}),R(t)&&void 0===t.stack&&(t.stack=o.stack,Z(t,"framesToPop",1)),t instanceof TypeError&&("Failed to fetch"===t.message||"Load failed"===t.message||"NetworkError when attempting to fetch resource."===t.message))try{const n=new URL(c.fetchData.url);t.message=`${t.message} (${n.host})`}catch{}throw t})}})}function zr(t){let n;try{n=t.clone()}catch{return}!async function(t,n){if(t?.body){const e=t.body,r=e.getReader(),o=setTimeout(()=>{e.cancel().then(null,()=>{})},9e4);let i=!0;for(;i;){let t;try{t=setTimeout(()=>{e.cancel().then(null,()=>{})},5e3);const{done:o}=await r.read();clearTimeout(t),o&&(n(),i=!1)}catch{i=!1}finally{clearTimeout(t)}}clearTimeout(o),r.releaseLock(),e.cancel().then(null,()=>{})}}(n,()=>{S("fetch-body-resolved",{endTimestamp:1e3*pt(),response:t})})}function Wr(t,n){return!!t&&"object"==typeof t&&!!t[n]}function Jr(t){return"string"==typeof t?t:t?Wr(t,"url")?t.url:t.toString?t.toString():"":""}function Xr(t){const[n,e]=t;try{if("object"==typeof e&&null!==e&&"headers"in e&&e.headers)return new Headers(e.headers);if(U(n))return new Headers(n.headers)}catch{}}const Gr=()=>{},Kr=["attachTo","createForm","createWidget","remove"],Yr=Object.assign(t=>(a(()=>{console.warn("You are using feedbackIntegration() even though this bundle does not include feedback.")}),{name:"Feedback",...Kr.reduce((t,n)=>(t[n]=Gr,t),{})}),{_isShim:!0}),Vr=["start","stop","flush"];const Zr=n;let Qr=0;function to(){return Qr>0}function no(t,n={}){if(!function(t){return"function"==typeof t}(t))return t;try{const n=t.__sentry_wrapped__;if(n)return"function"==typeof n?n:t;if(tt(t))return t}catch{return t}const sentryWrapped=function(...e){try{const r=e.map(t=>no(t,n));return t.apply(this,r)}catch(t){throw Qr++,setTimeout(()=>{Qr--}),Ct(r=>{r.addEventProcessor(t=>(n.mechanism&&(ct(t,void 0),at(t,n.mechanism)),t.extra={...t.extra,arguments:e},t)),captureException(t)}),t}};try{for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(sentryWrapped[n]=t[n])}catch{}Q(sentryWrapped,t),Z(t,"__sentry_wrapped__",sentryWrapped);try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch{}return sentryWrapped}function eo(){const t=W(),{referrer:n}=Zr.document||{},{userAgent:e}=Zr.navigator||{};return{url:t,headers:{...n&&{Referer:n},...e&&{"User-Agent":e}}}}function ro(t,n){const e=so(t,n),r={type:uo(n),value:fo(n)};return e.length&&(r.stacktrace={frames:e}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function oo(t,n,e,r){const o=Mt(),i=o?.getOptions().normalizeDepth,s=function(t){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const e=t[n];if(e instanceof Error)return e}return}(n),c={__serialized__:Hn(n,i)};if(s)return{exception:{values:[ro(t,s)]},extra:c};const a={exception:{values:[{type:N(n)?n.constructor.name:r?"UnhandledRejection":"Error",value:go(n,{isUnhandledRejection:r})}]},extra:c};if(e){const n=so(t,e);n.length&&(a.exception.values[0].stacktrace={frames:n})}return a}function io(t,n){return{exception:{values:[ro(t,n)]}}}function so(t,n){const e=n.stacktrace||n.stack||"",r=function(t){if(t&&co.test(t.message))return 1;return 0}(n),o=function(t){if("number"==typeof t.framesToPop)return t.framesToPop;return 0}(n);try{return t(e,r,o)}catch{}return[]}const co=/Minified React error #\d+;/i;function ao(t){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&t instanceof WebAssembly.Exception}function uo(t){const n=t?.name;if(!n&&ao(t)){return t.message&&Array.isArray(t.message)&&2==t.message.length?t.message[0]:"WebAssembly.Exception"}return n}function fo(t){const n=t?.message;return ao(t)?Array.isArray(t.message)&&2==t.message.length?t.message[1]:"wasm exception":n?n.error&&"string"==typeof n.error.message?n.error.message:n:"No error message"}function lo(t,n,e,r){const o=ho(t,n,e?.syntheticException||void 0,r);return at(o),o.level="error",e?.event_id&&(o.event_id=e.event_id),Ee(o)}function po(t,n,e="info",r,o){const i=mo(t,n,r?.syntheticException||void 0,o);return i.level=e,r?.event_id&&(i.event_id=r.event_id),Ee(i)}function ho(t,n,e,r,o){let i;if(O(n)&&n.error){return io(t,n.error)}if(j(n)||L(n,"DOMException")){const o=n;if("stack"in n)i=io(t,n);else{const n=o.name||(j(o)?"DOMError":"DOMException"),s=o.message?`${n}: ${o.message}`:n;i=mo(t,s,e,r),ct(i,s)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}if(R(n))return io(t,n);if(A(n)||N(n)){return i=oo(t,n,e,o),at(i,{synthetic:!0}),i}return i=mo(t,n,e,r),ct(i,`${n}`),at(i,{synthetic:!0}),i}function mo(t,n,e,r){const o={};if(r&&e){const r=so(t,e);r.length&&(o.exception={values:[{value:n,stacktrace:{frames:r}}]}),at(o,{synthetic:!0})}if(M(n)){const{__sentry_template_string__:t,__sentry_template_values__:e}=n;return o.logentry={message:t,params:e},o}return o.message=n,o}function go(t,{isUnhandledRejection:n}){const e=function(t,n=40){const e=Object.keys(nt(t));e.sort();const r=e[0];if(!r)return"[object has no keys]";if(r.length>=n)return X(r,n);for(let t=e.length;t>0;t--){const r=e.slice(0,t).join(", ");if(!(r.length>n))return t===e.length?r:X(r,n)}return""}(t),r=n?"promise rejection":"exception";if(O(t))return`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``;if(N(t)){return`Event \`${function(t){try{const n=Object.getPrototypeOf(t);return n?n.constructor.name:void 0}catch{}}(t)}\` (type=${t.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${e}`}class yo extends Qe{constructor(t){const n=(r=t,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:Zr.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...r});var r;!function(t,n,r=[n],o="npm"){const i=t._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${n}`,packages:r.map(t=>({name:`${o}:@sentry/${t}`,version:e})),version:e}),t._metadata=i}(n,"browser",["browser"],Zr.SENTRY_SDK_SOURCE||"cdn"),n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:n.sendDefaultPii?"auto":"never",...n._metadata.sdk.settings}),super(n);const{sendDefaultPii:o,sendClientReports:i,enableLogs:s}=this.it;Zr.document&&(i||s)&&Zr.document.addEventListener("visibilitychange",()=>{"hidden"===Zr.document.visibilityState&&(i&&this.Et(),s&&er(this))}),s&&(this.on("flush",()=>{er(this)}),this.on("afterCaptureLog",()=>{this.Tt&&clearTimeout(this.Tt),this.Tt=setTimeout(()=>{er(this)},5e3)})),o&&this.on("beforeSendSession",pr)}eventFromException(t,n){return lo(this.it.stackParser,t,n,this.it.attachStacktrace)}eventFromMessage(t,n="info",e){return po(this.it.stackParser,t,n,e,this.it.attachStacktrace)}_t(t,n,e,r){return t.platform=t.platform||"javascript",super._t(t,n,e,r)}}const vo=n,bo=(t,n,e,r)=>{let o,i;return s=>{n.value>=0&&(s||r)&&(i=n.value-(o??0),(i||void 0===o)&&(o=n.value,n.delta=i,n.rating=((t,n)=>t>n[1]?"poor":t>n[0]?"needs-improvement":"good")(n.value,e),t(n)))}},_o=(t=!0)=>{const n=vo.performance?.getEntriesByType?.("navigation")[0];if(!t||n&&n.responseStart>0&&n.responseStart<performance.now())return n},So=()=>{const t=_o();return t?.activationStart??0},wo=(t,n=-1)=>{const e=_o();let r="navigate";e&&(vo.document?.prerendering||So()>0?r="prerender":vo.document?.wasDiscarded?r="restore":e.type&&(r=e.type.replace(/_/g,"-")));return{name:t,value:n,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},Eo=new WeakMap;function To(t,n){return Eo.get(t)||Eo.set(t,new n),Eo.get(t)}class ko{constructor(){ko.prototype.__init.call(this),ko.prototype.__init2.call(this)}__init(){this.kt=0}__init2(){this.$t=[]}xt(t){if(t.hadRecentInput)return;const n=this.$t[0],e=this.$t[this.$t.length-1];this.kt&&n&&e&&t.startTime-e.startTime<1e3&&t.startTime-n.startTime<5e3?(this.kt+=t.value,this.$t.push(t)):(this.kt=t.value,this.$t=[t]),this.It?.(t)}}const $o=(t,n,e={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(t=>{Promise.resolve().then(()=>{n(t.getEntries())})});return r.observe({type:t,buffered:!0,...e}),r}}catch{}},xo=t=>{let n=!1;return()=>{n||(t(),n=!0)}};let Io=-1;const Ro=t=>{"hidden"===vo.document.visibilityState&&Io>-1&&(Io="visibilitychange"===t.type?t.timeStamp:0,Lo())},Lo=()=>{removeEventListener("visibilitychange",Ro,!0),removeEventListener("prerenderingchange",Ro,!0)},Oo=()=>{if(vo.document&&Io<0){const t=So(),n=vo.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>"hidden"===n.name&&n.startTime>t)[0]?.startTime;Io=n??("hidden"!==vo.document?.visibilityState||vo.document?.prerendering?1/0:0),addEventListener("visibilitychange",Ro,!0),addEventListener("prerenderingchange",Ro,!0)}return{get firstHiddenTime(){return Io}}},jo=t=>{vo.document?.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},Co=[1800,3e3],Mo=[.1,.25],Po=(t,n={})=>{((t,n={})=>{jo(()=>{const e=Oo(),r=wo("FCP");let o;const i=$o("paint",t=>{for(const n of t)"first-contentful-paint"===n.name&&(i.disconnect(),n.startTime<e.firstHiddenTime&&(r.value=Math.max(n.startTime-So(),0),r.entries.push(n),o(!0)))});i&&(o=bo(t,r,Co,n.reportAllChanges))})})(xo(()=>{const e=wo("CLS",0);let r;const o=To(n,ko),i=t=>{for(const n of t)o.xt(n);o.kt>e.value&&(e.value=o.kt,e.entries=o.$t,r())},s=$o("layout-shift",i);s&&(r=bo(t,e,Mo,n.reportAllChanges),vo.document?.addEventListener("visibilitychange",()=>{"hidden"===vo.document?.visibilityState&&(i(s.takeRecords()),r(!0))}),vo?.setTimeout?.(r))}))};let Ao=0,No=1/0,Do=0;const qo=t=>{t.forEach(t=>{t.interactionId&&(No=Math.min(No,t.interactionId),Do=Math.max(Do,t.interactionId),Ao=Do?(Do-No)/7+1:0)})};let Fo;const Uo=()=>Fo?Ao:performance.interactionCount||0,Ho=()=>{"interactionCount"in performance||Fo||(Fo=$o("event",qo,{type:"event",buffered:!0,durationThreshold:0}))};let Bo=0;class zo{constructor(){zo.prototype.__init.call(this),zo.prototype.__init2.call(this)}__init(){this.Rt=[]}__init2(){this.Lt=new Map}Ot(){Bo=Uo(),this.Rt.length=0,this.Lt.clear()}jt(){const t=Math.min(this.Rt.length-1,Math.floor((Uo()-Bo)/50));return this.Rt[t]}xt(t){if(this.Ct?.(t),!t.interactionId&&"first-input"!==t.entryType)return;const n=this.Rt.at(-1);let e=this.Lt.get(t.interactionId);if(e||this.Rt.length<10||t.duration>n.Mt){if(e?t.duration>e.Mt?(e.entries=[t],e.Mt=t.duration):t.duration===e.Mt&&t.startTime===e.entries[0].startTime&&e.entries.push(t):(e={id:t.interactionId,entries:[t],Mt:t.duration},this.Lt.set(e.id,e),this.Rt.push(e)),this.Rt.sort((t,n)=>n.Mt-t.Mt),this.Rt.length>10){const t=this.Rt.splice(10);for(const n of t)this.Lt.delete(n.id)}this.Pt?.(e)}}}const Wo=t=>{const n=n=>{"pagehide"!==n.type&&"hidden"!==vo.document?.visibilityState||t(n)};vo.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))},Jo=t=>{const n=vo.requestIdleCallback||vo.setTimeout;"hidden"===vo.document?.visibilityState?t():(n(t=xo(t)),Wo(t))},Xo=[200,500];class Go{xt(t){this.Ct?.(t)}}const Ko=[2500,4e3],Yo=[800,1800],Vo=t=>{vo.document?.prerendering?jo(()=>Vo(t)):"complete"!==vo.document?.readyState?addEventListener("load",()=>Vo(t),!0):setTimeout(t)},Zo={},Qo={};let ti,ni,ei,ri;function oi(t,n=!1){return li("cls",t,ai,ti,n)}function ii(t,n=!1){return li("lcp",t,ui,ni,n)}function si(t,n){return pi(t,n),Qo[t]||(!function(t){const n={};"event"===t&&(n.durationThreshold=0);$o(t,n=>{ci(t,{entries:n})},n)}(t),Qo[t]=!0),hi(t,n)}function ci(t,n){const e=Zo[t];if(e?.length)for(const t of e)try{t(n)}catch(t){}}function ai(){return Po(t=>{ci("cls",{metric:t}),ti=t},{reportAllChanges:!0})}function ui(){return((t,n={})=>{jo(()=>{const e=Oo(),r=wo("LCP");let o;const i=To(n,Go),s=t=>{n.reportAllChanges||(t=t.slice(-1));for(const n of t)i.xt(n),n.startTime<e.firstHiddenTime&&(r.value=Math.max(n.startTime-So(),0),r.entries=[n],o())},c=$o("largest-contentful-paint",s);if(c){o=bo(t,r,Ko,n.reportAllChanges);const e=xo(()=>{s(c.takeRecords()),c.disconnect(),o(!0)});for(const t of["keydown","click","visibilitychange"])vo.document&&addEventListener(t,()=>Jo(e),{capture:!0,once:!0})}})})(t=>{ci("lcp",{metric:t}),ni=t},{reportAllChanges:!0})}function fi(){return((t,n={})=>{const e=wo("TTFB"),r=bo(t,e,Yo,n.reportAllChanges);Vo(()=>{const t=_o();t&&(e.value=Math.max(t.responseStart-So(),0),e.entries=[t],r(!0))})})(t=>{ci("ttfb",{metric:t}),ei=t})}function di(){return((t,n={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&jo(()=>{Ho();const e=wo("INP");let r;const o=To(n,zo),i=t=>{Jo(()=>{for(const n of t)o.xt(n);const n=o.jt();n&&n.Mt!==e.value&&(e.value=n.Mt,e.entries=n.entries,r())})},s=$o("event",i,{durationThreshold:n.durationThreshold??40});r=bo(t,e,Xo,n.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),Wo(()=>{i(s.takeRecords()),r(!0)}))})})(t=>{ci("inp",{metric:t}),ri=t})}function li(t,n,e,r,o=!1){let i;return pi(t,n),Qo[t]||(i=e(),Qo[t]=!0),r&&n({metric:r}),hi(t,n,o?i:void 0)}function pi(t,n){Zo[t]=Zo[t]||[],Zo[t].push(n)}function hi(t,n,e){return()=>{e&&e();const r=Zo[t];if(!r)return;const o=r.indexOf(n);-1!==o&&r.splice(o,1)}}function mi(t){return"number"==typeof t&&isFinite(t)}function gi(t,n,e,{...r}){const o=Sn(t).start_timestamp;return o&&o>n&&"function"==typeof t.updateStartTime&&t.updateStartTime(n),pe(t,()=>{const t=le({startTime:n,...r});return t&&t.end(e),t})}function yi(t){const n=Mt();if(!n)return;const{name:e,transaction:r,attributes:o,startTime:i}=t,{release:s,environment:c,sendDefaultPii:a}=n.getOptions(),u=n.getIntegrationByName("Replay"),f=u?.getReplayId(),d=Lt(),l=d.getUser(),p=void 0!==l?l.email||l.id||l.ip_address:void 0;let h;try{h=d.getScopeData().contexts.profile.profile_id}catch{}return le({name:e,attributes:{release:s,environment:c,user:p||void 0,profile_id:h||void 0,replay_id:f||void 0,transaction:r,"user_agent.original":vo.navigator?.userAgent,"client.address":a?"{{auto}}":void 0,...o},startTime:i,experimental:{standalone:!0}})}function vi(){return vo.addEventListener&&vo.performance}function bi(t){return t/1e3}function _i(t){let n="unknown",e="unknown",r="";for(const o of t){if("/"===o){[n,e]=t.split("/");break}if(!isNaN(Number(o))){n="h"===r?"http":r,e=t.split(r)[1];break}r+=o}return r===t&&(n=r),{name:n,version:e}}function Si(t){try{return PerformanceObserver.supportedEntryTypes.includes(t)}catch{return!1}}function wi(t,n){let e,r=!1;function o(t){!r&&e&&n(t,e),r=!0}Wo(()=>{o("pagehide")});const i=t.on("beforeStartNavigationSpan",(t,n)=>{n?.isRedirect||(o("navigation"),Ei(i,s))}),s=t.on("afterStartPageLoadSpan",t=>{e=t.spanContext().spanId,Ei(s)})}function Ei(...t){t.forEach(t=>t&&setTimeout(t,0))}function Ti(t){let n,e=0;if(!Si("layout-shift"))return;const r=oi(({metric:t})=>{const r=t.entries[t.entries.length-1];r&&(e=t.value,n=r)},!0);wi(t,(t,o)=>{!function(t,n,e,r){const o=bi((ht()||0)+(n?.startTime||0)),i=Lt().getScopeData().transactionName,s=n?B(n.sources[0]?.node):"Layout shift",c={[Ft]:"auto.http.browser.cls",[qt]:"ui.webvital.cls",[Jt]:n?.duration||0,"sentry.pageload.span_id":e,"sentry.report_event":r};n?.sources&&n.sources.forEach((t,n)=>{c[`cls.source.${n+1}`]=B(t.node)});const a=yi({name:s,transaction:i,attributes:c,startTime:o});a&&(a.addEvent("cls",{[Ht]:"",[Bt]:t}),a.end(o))}(e,n,o,t),r()})}function ki(t){let n,e=0;if(!Si("largest-contentful-paint"))return;const r=ii(({metric:t})=>{const r=t.entries[t.entries.length-1];r&&(e=t.value,n=r)},!0);wi(t,(t,o)=>{!function(t,n,e,r){const o=bi((ht()||0)+(n?.startTime||0)),i=Lt().getScopeData().transactionName,s=n?B(n.element):"Largest contentful paint",c={[Ft]:"auto.http.browser.lcp",[qt]:"ui.webvital.lcp",[Jt]:0,"sentry.pageload.span_id":e,"sentry.report_event":r};n&&(n.element&&(c["lcp.element"]=B(n.element)),n.id&&(c["lcp.id"]=n.id),n.url&&(c["lcp.url"]=n.url.trim().slice(0,200)),null!=n.loadTime&&(c["lcp.loadTime"]=n.loadTime),null!=n.renderTime&&(c["lcp.renderTime"]=n.renderTime),null!=n.size&&(c["lcp.size"]=n.size));const a=yi({name:s,transaction:i,attributes:c,startTime:o});a&&(a.addEvent("lcp",{[Ht]:"millisecond",[Bt]:t}),a.end(o))}(e,n,o,t),r()})}let $i,xi,Ii=0,Ri={};function Li({recordClsStandaloneSpans:t,recordLcpStandaloneSpans:n,client:e}){const r=vi();if(r&&ht()){r.mark&&vo.performance.mark("sentry-tracing-init");const o=n?ki(e):ii(({metric:t})=>{const n=t.entries[t.entries.length-1];n&&(Ri.lcp={value:t.value,unit:"millisecond"},$i=n)},!0),i=li("ttfb",({metric:t})=>{t.entries[t.entries.length-1]&&(Ri.ttfb={value:t.value,unit:"millisecond"})},fi,ei),s=t?Ti(e):oi(({metric:t})=>{const n=t.entries[t.entries.length-1];n&&(Ri.cls={value:t.value,unit:""},xi=n)},!0);return()=>{o?.(),i(),s?.()}}return()=>{}}function Oi(t,n){const e=vi(),r=ht();if(!e?.getEntries||!r)return;const o=bi(r),i=e.getEntries(),{op:s,start_timestamp:c}=Sn(t);i.slice(Ii).forEach(e=>{const r=bi(e.startTime),i=bi(Math.max(0,e.duration));if(!("navigation"===s&&c&&o+r<c))switch(e.entryType){case"navigation":!function(t,n,e){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{ji(t,n,r,e)}),ji(t,n,"secureConnection",e,"TLS/SSL"),ji(t,n,"fetch",e,"cache"),ji(t,n,"domainLookup",e,"DNS"),function(t,n,e){const r=e+bi(n.requestStart),o=e+bi(n.responseEnd),i=e+bi(n.responseStart);n.responseEnd&&(gi(t,r,o,{op:"browser.request",name:n.name,attributes:{[Ft]:"auto.ui.browser.metrics"}}),gi(t,i,o,{op:"browser.response",name:n.name,attributes:{[Ft]:"auto.ui.browser.metrics"}}))}(t,n,e)}(t,e,o);break;case"mark":case"paint":case"measure":{!function(t,n,e,r,o,i){if(["mark","measure"].includes(n.entryType)&&Y(n.name,i))return;const s=_o(!1),c=bi(s?s.requestStart:0),a=o+Math.max(e,c),u=o+e,f=u+r,d={[Ft]:"auto.resource.browser.metrics"};a!==u&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=a);(function(t,n){try{const e=n.detail;if(!e)return;if("object"==typeof e){for(const[n,r]of Object.entries(e))if(r&&P(r))t[`sentry.browser.measure.detail.${n}`]=r;else if(void 0!==r)try{t[`sentry.browser.measure.detail.${n}`]=JSON.stringify(r)}catch{}return}if(P(e))return void(t["sentry.browser.measure.detail"]=e);try{t["sentry.browser.measure.detail"]=JSON.stringify(e)}catch{}}catch{}})(d,n),a<=f&&gi(t,a,f,{name:n.name,op:n.entryType,attributes:d})}(t,e,r,i,o,n.ignorePerformanceApiSpans);const s=Oo(),c=e.startTime<s.firstHiddenTime;"first-paint"===e.name&&c&&(Ri.fp={value:e.startTime,unit:"millisecond"}),"first-contentful-paint"===e.name&&c&&(Ri.fcp={value:e.startTime,unit:"millisecond"});break}case"resource":!function(t,n,e,r,o,i,s){if("xmlhttprequest"===n.initiatorType||"fetch"===n.initiatorType)return;const c=n.initiatorType?`resource.${n.initiatorType}`:"resource.other";if(s?.includes(c))return;const a=lr(e),u={[Ft]:"auto.resource.browser.metrics"};Ci(u,n,"transferSize","http.response_transfer_size"),Ci(u,n,"encodedBodySize","http.response_content_length"),Ci(u,n,"decodedBodySize","http.decoded_response_content_length");const f=n.deliveryType;null!=f&&(u["http.response_delivery_type"]=f);const d=n.renderBlockingStatus;d&&(u["resource.render_blocking_status"]=d);a.protocol&&(u["url.scheme"]=a.protocol.split(":").pop());a.host&&(u["server.address"]=a.host);if(u["url.same_origin"]=e.includes(vo.location.origin),null!=n.nextHopProtocol){const{name:t,version:e}=_i(n.nextHopProtocol);u["network.protocol.name"]=t,u["network.protocol.version"]=e}const l=i+r,p=l+o;gi(t,l,p,{name:e.replace(vo.location.origin,""),op:c,attributes:u})}(t,e,e.name,r,i,o,n.ignoreResourceSpans)}}),Ii=Math.max(i.length-1,0),function(t){const n=vo.navigator;if(!n)return;const e=n.connection;e&&(e.effectiveType&&t.setAttribute("effectiveConnectionType",e.effectiveType),e.type&&t.setAttribute("connectionType",e.type),mi(e.rtt)&&(Ri["connection.rtt"]={value:e.rtt,unit:"millisecond"}));mi(n.deviceMemory)&&t.setAttribute("deviceMemory",`${n.deviceMemory} GB`);mi(n.hardwareConcurrency)&&t.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency))}(t),"pageload"===s&&(function(t){const n=_o(!1);if(!n)return;const{responseStart:e,requestStart:r}=n;r<=e&&(t["ttfb.requestTime"]={value:e-r,unit:"millisecond"})}(Ri),n.recordClsOnPageloadSpan||delete Ri.cls,n.recordLcpOnPageloadSpan||delete Ri.lcp,Object.entries(Ri).forEach(([t,n])=>{oe(t,n.value,n.unit)}),t.setAttribute("performance.timeOrigin",o),t.setAttribute("performance.activationStart",So()),function(t,n){$i&&n.recordLcpOnPageloadSpan&&($i.element&&t.setAttribute("lcp.element",B($i.element)),$i.id&&t.setAttribute("lcp.id",$i.id),$i.url&&t.setAttribute("lcp.url",$i.url.trim().slice(0,200)),null!=$i.loadTime&&t.setAttribute("lcp.loadTime",$i.loadTime),null!=$i.renderTime&&t.setAttribute("lcp.renderTime",$i.renderTime),t.setAttribute("lcp.size",$i.size));xi?.sources&&n.recordClsOnPageloadSpan&&xi.sources.forEach((n,e)=>t.setAttribute(`cls.source.${e+1}`,B(n.node)))}(t,n)),$i=void 0,xi=void 0,Ri={}}function ji(t,n,e,r,o=e){const i=function(t){if("secureConnection"===t)return"connectEnd";if("fetch"===t)return"domainLookupStart";return`${t}End`}(e),s=n[i],c=n[`${e}Start`];c&&s&&gi(t,r+bi(c),r+bi(s),{op:`browser.${o}`,name:n.name,attributes:{[Ft]:"auto.ui.browser.metrics",..."redirect"===e&&null!=n.redirectCount?{"http.redirect_count":n.redirectCount}:{}}})}function Ci(t,n,e,r){const o=n[e];null!=o&&o<2147483647&&(t[r]=o)}const Mi=({entries:t})=>{const n=Rn(),e=n?In(n):void 0,r=e?Sn(e).description:Lt().getScopeData().transactionName;t.forEach(t=>{const n=t;if(!n.identifier)return;const e=n.name,o=n.renderTime,i=n.loadTime,[s,c]=i?[bi(i),"load-time"]:o?[bi(o),"render-time"]:[pt(),"entry-emission"],a="image-paint"===e?bi(Math.max(0,(o??0)-(i??0))):0,u={[Ft]:"auto.ui.browser.elementtiming",[qt]:"ui.elementtiming",[At]:"component","sentry.span_start_time_source":c,"sentry.transaction_name":r,"element.id":n.id,"element.type":n.element?.tagName?.toLowerCase()||"unknown","element.size":n.naturalWidth&&n.naturalHeight?`${n.naturalWidth}x${n.naturalHeight}`:void 0,"element.render_time":o,"element.load_time":i,"element.url":n.url||void 0,"element.identifier":n.identifier,"element.paint_type":e};de({name:`element[${n.identifier}]`,attributes:u,startTime:s,onlyIfParent:!0},t=>{t.end(s+a)})})};let Pi,Ai,Ni,Di;function qi(){if(!vo.document)return;const t=S.bind(null,"dom"),n=Fi(t,!0);vo.document.addEventListener("click",n,!1),vo.document.addEventListener("keypress",n,!1),["EventTarget","Node"].forEach(n=>{const e=vo,r=e[n]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(V(r,"addEventListener",function(n){return function(e,r,o){if("click"===e||"keypress"==e)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},i=r[e]=r[e]||{refCount:0};if(!i.handler){const r=Fi(t);i.handler=r,n.call(this,e,r,o)}i.refCount++}catch{}return n.call(this,e,r,o)}}),V(r,"removeEventListener",function(t){return function(n,e,r){if("click"===n||"keypress"==n)try{const e=this.__sentry_instrumentation_handlers__||{},o=e[n];o&&(o.refCount--,o.refCount<=0&&(t.call(this,n,o.handler,r),o.handler=void 0,delete e[n]),0===Object.keys(e).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return t.call(this,n,e,r)}}))})}function Fi(t,n=!1){return e=>{if(!e||e._sentryCaptured)return;const r=function(t){try{return t.target}catch{return null}}(e);if(function(t,n){return"keypress"===t&&(!n?.tagName||"INPUT"!==n.tagName&&"TEXTAREA"!==n.tagName&&!n.isContentEditable)}(e.type,r))return;Z(e,"_sentryCaptured",!0),r&&!r._sentryId&&Z(r,"_sentryId",ot());const o="keypress"===e.type?"input":e.type;if(!function(t){if(t.type!==Ai)return!1;try{if(!t.target||t.target._sentryId!==Ni)return!1}catch{}return!0}(e)){t({event:e,name:o,global:n}),Ai=e.type,Ni=r?r._sentryId:void 0}clearTimeout(Pi),Pi=vo.setTimeout(()=>{Ni=void 0,Ai=void 0},1e3)}}function Ui(t){const n="history";b(n,t),_(n,Hi)}function Hi(){function t(t){return function(...n){const e=n.length>2?n[2]:void 0;if(e){const r=Di,o=function(t){try{return new URL(t,vo.location.origin).toString()}catch{return t}}(String(e));if(Di=o,r===o)return t.apply(this,n);S("history",{from:r,to:o})}return t.apply(this,n)}}vo.addEventListener("popstate",()=>{const t=vo.location.href,n=Di;if(Di=t,n===t)return;S("history",{from:n,to:t})}),"history"in qr&&qr.history&&(V(vo.history,"pushState",t),V(vo.history,"replaceState",t))}const Bi={};function zi(t){Bi[t]=void 0}const Wi="__sentry_xhr_v3__";function Ji(t){b("xhr",t),_("xhr",Xi)}function Xi(){if(!vo.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(t,n,e){const r=new Error,o=1e3*pt(),i=C(e[0])?e[0].toUpperCase():void 0,s=function(t){if(C(t))return t;try{return t.toString()}catch{}return}(e[1]);if(!i||!s)return t.apply(n,e);n[Wi]={method:i,url:s,request_headers:{}},"POST"===i&&s.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const t=n[Wi];if(t&&4===n.readyState){try{t.status_code=n.status}catch{}S("xhr",{endTimestamp:1e3*pt(),startTimestamp:o,xhr:n,virtualError:r})}};return"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply:(t,n,e)=>(c(),t.apply(n,e))}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(t,n,e){const[r,o]=e,i=n[Wi];return i&&C(r)&&C(o)&&(i.request_headers[r.toLowerCase()]=o),t.apply(n,e)}}),t.apply(n,e)}}),t.send=new Proxy(t.send,{apply(t,n,e){const r=n[Wi];if(!r)return t.apply(n,e);void 0!==e[0]&&(r.body=e[0]);return S("xhr",{startTimestamp:1e3*pt(),xhr:n}),t.apply(n,e)}})}const Gi=[],Ki=new Map;function Yi(){if(vi()&&ht()){const t=li("inp",Zi,di,ri);return()=>{t()}}return()=>{}}const Vi={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"};const Zi=({metric:t})=>{if(null==t.value)return;const n=bi(t.value);if(n>60)return;const e=t.entries.find(n=>n.duration===t.value&&Vi[n.name]);if(!e)return;const{interactionId:r}=e,o=Vi[e.name],i=bi(ht()+e.startTime),s=Rn(),c=s?In(s):void 0,a=(null!=r?Ki.get(r):void 0)||c,u=a?Sn(a).description:Lt().getScopeData().transactionName,f=yi({name:B(e.target),transaction:u,attributes:{[Ft]:"auto.http.browser.inp",[qt]:`ui.interaction.${o}`,[Jt]:e.duration},startTime:i});f&&(f.addEvent("inp",{[Ht]:"millisecond",[Bt]:t.value}),f.end(i+n))};function Qi(t,n=function(t){const n=Bi[t];if(n)return n;let e=vo[t];if(Fr(e))return Bi[t]=e.bind(vo);const r=vo.document;if(r&&"function"==typeof r.createElement)try{const n=r.createElement("iframe");n.hidden=!0,r.head.appendChild(n);const o=n.contentWindow;o?.[t]&&(e=o[t]),r.head.removeChild(n)}catch(t){}return e?Bi[t]=e.bind(vo):e}("fetch")){let e=0,r=0;return ar(t,function(o){const i=o.body.length;e+=i,r++;const s={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:e<=6e4&&r<15,...t.fetchOptions};if(!n)return zi("fetch"),Te("No fetch implementation available");try{return n(t.url,s).then(t=>(e-=i,r--,{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}}))}catch(t){return zi("fetch"),e-=i,r--,Te(t)}})}function ts(t,n,e,r){const o={filename:t,function:"<anonymous>"===n?u:n,in_app:!0};return void 0!==e&&(o.lineno=e),void 0!==r&&(o.colno=r),o}const ns=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,es=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,rs=/\((\S*)(?::(\d+))(?::(\d+))\)/,os=/at (.+?) ?\(data:(.+?),/,is=[30,t=>{const n=t.match(os);if(n)return{filename:`<data:${n[2]}>`,function:n[1]};const e=ns.exec(t);if(e){const[,t,n,r]=e;return ts(t,u,+n,+r)}const r=es.exec(t);if(r){if(r[2]&&0===r[2].indexOf("eval")){const t=rs.exec(r[2]);t&&(r[2]=t[1],r[3]=t[2],r[4]=t[3])}const[t,n]=ys(r[1]||u,r[2]);return ts(n,t,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],ss=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,cs=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,as=[50,t=>{const n=ss.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){const t=cs.exec(n[3]);t&&(n[1]=n[1]||"eval",n[3]=t[1],n[4]=t[2],n[5]="")}let t=n[3],e=n[1]||u;return[e,t]=ys(e,t),ts(t,e,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}}],us=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,fs=[40,t=>{const n=us.exec(t);return n?ts(n[2],n[1]||u,+n[3],n[4]?+n[4]:void 0):void 0}],ds=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,ls=[10,t=>{const n=ds.exec(t);return n?ts(n[2],n[3]||u,+n[1]):void 0}],ps=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,hs=[20,t=>{const n=ps.exec(t);return n?ts(n[5],n[3]||n[4]||u,+n[1],+n[2]):void 0}],ms=[is,as],gs=l(...ms),ys=(t,n)=>{const e=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return e||r?[-1!==t.indexOf("@")?t.split("@")[0]:u,e?`safari-extension:${n}`:`safari-web-extension:${n}`]:[t,n]};const vs=1024,bs=(t={})=>{const n={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:"Breadcrumbs",setup(t){var e;n.console&&function(t){const n="console";b(n,t),_(n,Rr)}(function(t){return function(n){if(Mt()!==t)return;const e={category:"console",data:{arguments:n.args,logger:"console"},level:Lr(n.level),message:G(n.args," ")};if("assert"===n.level){if(!1!==n.args[0])return;e.message=`Assertion failed: ${G(n.args.slice(1)," ")||"console.assert"}`,e.data.arguments=n.args.slice(1)}gr(e,{input:n.args,level:n.level})}}(t)),n.dom&&(e=function(t,n){return function(e){if(Mt()!==t)return;let r,o,i="object"==typeof n?n.serializeAttribute:void 0,s="object"==typeof n&&"number"==typeof n.maxStringLength?n.maxStringLength:void 0;s&&s>vs&&(s=vs),"string"==typeof i&&(i=[i]);try{const t=e.event,n=function(t){return!!t&&!!t.target}(t)?t.target:t;r=B(n,{keyAttrs:i,maxStringLength:s}),o=J(n)}catch{r="<unknown>"}if(0===r.length)return;const c={category:`ui.${e.name}`,message:r};o&&(c.data={"ui.component_name":o}),gr(c,{event:e.event,name:e.name,global:e.global})}}(t,n.dom),b("dom",e),_("dom",qi)),n.xhr&&Ji(function(t){return function(n){if(Mt()!==t)return;const{startTimestamp:e,endTimestamp:r}=n,o=n.xhr[Wi];if(!e||!r||!o)return;const{method:i,url:s,status_code:c,body:a}=o,u={method:i,url:s,status_code:c},f={xhr:n.xhr,input:a,startTimestamp:e,endTimestamp:r},d={category:"xhr",data:u,type:"http",level:Dr(c)};t.emit("beforeOutgoingRequestBreadcrumb",d,f),gr(d,f)}}(t)),n.fetch&&Hr(function(t){return function(n){if(Mt()!==t)return;const{startTimestamp:e,endTimestamp:r}=n;if(r&&(!n.fetchData.url.match(/sentry_key/)||"POST"!==n.fetchData.method))if(n.error){const o=n.fetchData,i={data:n.error,input:n.args,startTimestamp:e,endTimestamp:r},s={category:"fetch",data:o,level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",s,i),gr(s,i)}else{const o=n.response,i={...n.fetchData,status_code:o?.status},s={input:n.args,response:o,startTimestamp:e,endTimestamp:r},c={category:"fetch",data:i,type:"http",level:Dr(i.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",c,s),gr(c,s)}}}(t)),n.history&&Ui(function(t){return function(n){if(Mt()!==t)return;let e=n.from,r=n.to;const o=lr(Zr.location.href);let i=e?lr(e):void 0;const s=lr(r);i?.path||(i=o),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),o.protocol===i.protocol&&o.host===i.host&&(e=i.relative),gr({category:"navigation",data:{from:e,to:r}})}}(t)),n.sentry&&t.on("beforeSendEvent",function(t){return function(n){Mt()===t&&gr({category:"sentry."+("transaction"===n.type?"transaction":"event"),event_id:n.event_id,level:n.level,message:st(n)},{event:n})}}(t))}}};const _s=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Ss=(t={})=>{const n={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...t};return{name:"BrowserApiErrors",setupOnce(){n.setTimeout&&V(Zr,"setTimeout",ws),n.setInterval&&V(Zr,"setInterval",ws),n.requestAnimationFrame&&V(Zr,"requestAnimationFrame",Es),n.XMLHttpRequest&&"XMLHttpRequest"in Zr&&V(XMLHttpRequest.prototype,"send",Ts);const t=n.eventTarget;if(t){(Array.isArray(t)?t:_s).forEach(t=>function(t,n){const e=Zr,r=e[t]?.prototype;if(!r?.hasOwnProperty?.("addEventListener"))return;V(r,"addEventListener",function(e){return function(r,o,i){try{"function"==typeof o.handleEvent&&(o.handleEvent=no(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:m(o),target:t},handled:!1,type:"instrument"}}))}catch{}return n.unregisterOriginalCallbacks&&function(t,n,e){t&&"object"==typeof t&&"removeEventListener"in t&&"function"==typeof t.removeEventListener&&t.removeEventListener(n,e)}(this,r,o),e.apply(this,[r,no(o,{mechanism:{data:{function:"addEventListener",handler:m(o),target:t},handled:!1,type:"instrument"}}),i])}}),V(r,"removeEventListener",function(t){return function(n,e,r){try{const o=e.__sentry_wrapped__;o&&t.call(this,n,o,r)}catch{}return t.call(this,n,e,r)}})}(t,n))}}}};function ws(t){return function(...n){const e=n[0];return n[0]=no(e,{mechanism:{data:{function:m(t)},handled:!1,type:"instrument"}}),t.apply(this,n)}}function Es(t){return function(n){return t.apply(this,[no(n,{mechanism:{data:{function:"requestAnimationFrame",handler:m(t)},handled:!1,type:"instrument"}})])}}function Ts(t){return function(...n){const e=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in e&&"function"==typeof e[t]&&V(e,t,function(n){const e={mechanism:{data:{function:t,handler:m(n)},handled:!1,type:"instrument"}},r=tt(n);return r&&(e.mechanism.data.handler=m(r)),no(n,e)})}),t.apply(this,n)}}const ks=()=>({name:"BrowserSession",setupOnce(){void 0!==Zr.document&&(qe({ignoreDuration:!0}),He(),Ui(({from:t,to:n})=>{void 0!==t&&t!==n&&(qe({ignoreDuration:!0}),He())}))}}),$s=(t={})=>{const n={onerror:!0,onunhandledrejection:!0,...t};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(t){n.onerror&&function(t){E(n=>{const{stackParser:e,attachStacktrace:r}=xs();if(Mt()!==t||to())return;const{msg:o,url:i,line:s,column:c,error:a}=n,f=function(t,n,e,r){const o=t.exception=t.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},c=s.stacktrace=s.stacktrace||{},a=c.frames=c.frames||[],f=r,d=e,l=function(t){if(!C(t)||0===t.length)return;if(t.startsWith("data:")){const n=t.match(/^data:([^;]+)/);return`<data:${n?n[1]:"text/javascript"}${t.includes("base64,")?",base64":""}>`}return t.slice(0,1024)}(n)??W();0===a.length&&a.push({colno:f,filename:l,function:u,in_app:!0,lineno:d});return t}(ho(e,a||o,void 0,r,!1),i,s,c);f.level="error",Ae(f,{originalException:a,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(t),n.onunhandledrejection&&function(t){$(n=>{const{stackParser:e,attachStacktrace:r}=xs();if(Mt()!==t||to())return;const o=function(t){if(P(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}(n),i=P(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:ho(e,o,void 0,r,!0);i.level="error",Ae(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(t)}}};function xs(){const t=Mt();return t?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Is=()=>({name:"HttpContext",preprocessEvent(t){if(!Zr.navigator&&!Zr.location&&!Zr.document)return;const n=eo(),e={...n.headers,...t.request?.headers};t.request={...n,...t.request,headers:e}}}),Rs=(t={})=>{const n=t.limit||5,e=t.key||"cause";return{name:"LinkedErrors",preprocessEvent(t,r,o){kr(ro,o.getOptions().stackParser,e,n,t,r)}}};function Ls(){return!!function(){if(void 0===Zr.window)return!1;const t=Zr;if(t.nw)return!1;const n=t.chrome||t.browser;if(!n?.runtime?.id)return!1;const e=W(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(Zr===Zr.top&&r.some(t=>e.startsWith(`${t}://`)))}()}function Os(t){return[wr(),br(),Ss(),bs(),$s(),Rs(),Or(),Is(),ks()]}const js={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",graphqlClientIntegration:"graphqlclient",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",browserProfilingIntegration:"browserprofiling",moduleMetadataIntegration:"modulemetadata"},Cs=Zr;const Ms="sentry_previous_trace",Ps="sentry.previous_trace";function As(t,{linkPreviousTrace:n,consistentTraceSampling:e}){const r="session-storage"===n;let o=r?function(){try{const t=Zr.sessionStorage?.getItem(Ms);return JSON.parse(t)}catch{return}}():void 0;t.on("spanStart",t=>{if(In(t)!==t)return;const n=Lt().getPropagationContext();o=function(t,n,e){const r=Sn(n);function o(){try{return Number(e.dsc?.sample_rate)??Number(r.data?.[Nt])}catch{return 0}}const i={spanContext:n.spanContext(),startTimestamp:r.start_timestamp,sampleRate:o(),sampleRand:e.sampleRand};if(!t)return i;const s=t.spanContext;if(s.traceId===r.trace_id)return t;Date.now()/1e3-t.startTimestamp<=3600&&(n.addLink({context:s,attributes:{[Xt]:"previous_trace"}}),n.setAttribute(Ps,`${s.traceId}-${s.spanId}-${Ns(s)?1:0}`));return i}(o,t,n),r&&function(t){try{Zr.sessionStorage.setItem(Ms,JSON.stringify(t))}catch(t){}}(o)});let i=!0;e&&t.on("beforeSampling",t=>{if(!o)return;const n=Lt(),e=n.getPropagationContext();i&&e.parentSpanId?i=!1:(n.setPropagationContext({...e,dsc:{...e.dsc,sample_rate:String(o.sampleRate),sampled:String(Ns(o.spanContext))},sampleRand:o.sampleRand}),t.parentSampled=Ns(o.spanContext),t.parentSampleRate=o.sampleRate,t.spanAttributes={...t.spanAttributes,[Dt]:o.sampleRate})})}function Ns(t){return 1===t.traceFlags}function Ds(t=0){return((ht()||performance.timeOrigin)+t)/1e3}const qs=new WeakMap,Fs=new Map,Us={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Hs(t,n){const{traceFetch:e,traceXHR:r,trackFetchStreamPerformance:o,shouldCreateSpanForRequest:i,enableHTTPTimings:s,tracePropagationTargets:c,onRequestSpanStart:a}={...Us,...n},u="function"==typeof i?i:t=>!0,f=t=>function(t,n){const e=W();if(e){let r,o;try{r=new URL(t,e),o=new URL(e).origin}catch{return!1}const i=r.origin===o;return n?Y(r.toString(),n)||i&&Y(r.pathname,n):i}{const e=!!t.match(/^\/(?!\/)/);return n?Y(t,n):e}}(t,c),d={};e&&(t.addEventProcessor(t=>("transaction"===t.type&&t.spans&&t.spans.forEach(t=>{if("http.client"===t.op){const n=Fs.get(t.span_id);n&&(t.timestamp=n/1e3,Fs.delete(t.span_id))}}),t)),o&&function(t){const n="fetch-body-resolved";b(n,t),_(n,()=>Br(zr))}(t=>{if(t.response){const n=qs.get(t.response);n&&t.endTimestamp&&Fs.set(n,t.endTimestamp)}}),Hr(t=>{const n=Pr(t,u,f,d);if(t.response&&t.fetchData.__span&&qs.set(t.response,t.fetchData.__span),n){const e=zs(t.fetchData.url),r=e?lr(e).host:void 0;n.setAttributes({"http.url":e,"server.address":r}),s&&Bs(n),a?.(n,{headers:t.headers})}})),r&&Ji(t=>{const n=function(t,n,e,r){const o=t.xhr,i=o?.[Wi];if(!o||o.__sentry_own_request__||!i)return;const{url:s,method:c}=i,a=Cn()&&n(s);if(t.endTimestamp&&a){const t=o.__sentry_xhr_span_id__;if(!t)return;const n=r[t];return void(n&&void 0!==i.status_code&&(Gt(n,i.status_code),n.end(),delete r[t]))}const u=zs(s),f=lr(u||s),d=(h=s,h.split(/[?#]/,1)[0]),l=!!Rn(),p=a&&l?le({name:`${c} ${d}`,attributes:{url:s,type:"xhr","http.method":c,"http.url":u,"server.address":f?.host,[Ft]:"auto.http.browser",[qt]:"http.client",...f?.search&&{"http.query":f?.search},...f?.hash&&{"http.fragment":f?.hash}}}):new Fn;var h;o.__sentry_xhr_span_id__=p.spanContext().spanId,r[o.__sentry_xhr_span_id__]=p,e(s)&&function(t,n){const{"sentry-trace":e,baggage:r}=hr({span:n});e&&function(t,n,e){const r=t.__sentry_xhr_v3__?.request_headers;if(r?.["sentry-trace"])return;try{if(t.setRequestHeader("sentry-trace",n),e){const n=r?.baggage;n&&n.split(",").some(t=>t.trim().startsWith("sentry-"))||t.setRequestHeader("baggage",e)}}catch{}}(t,e,r)}(o,Cn()&&l?p:void 0);const m=Mt();m&&m.emit("beforeOutgoingRequestSpan",p,t);return p}(t,u,f,d);if(n){let e;s&&Bs(n);try{e=new Headers(t.xhr.__sentry_xhr_v3__?.request_headers)}catch{}a?.(n,{headers:e})}})}function Bs(t){const{url:n}=Sn(t).data;if(!n||"string"!=typeof n)return;const e=si("resource",({entries:r})=>{r.forEach(r=>{if(function(t){return"resource"===t.entryType&&"initiatorType"in t&&"string"==typeof t.nextHopProtocol&&("fetch"===t.initiatorType||"xmlhttprequest"===t.initiatorType)}(r)&&r.name.endsWith(n)){(function(t){const n=[];if(null!=t.nextHopProtocol){const{name:e,version:r}=_i(t.nextHopProtocol);n.push(["network.protocol.version",r],["network.protocol.name",e])}return ht()?[...n,["http.request.redirect_start",Ds(t.redirectStart)],["http.request.fetch_start",Ds(t.fetchStart)],["http.request.domain_lookup_start",Ds(t.domainLookupStart)],["http.request.domain_lookup_end",Ds(t.domainLookupEnd)],["http.request.connect_start",Ds(t.connectStart)],["http.request.secure_connection_start",Ds(t.secureConnectionStart)],["http.request.connection_end",Ds(t.connectEnd)],["http.request.request_start",Ds(t.requestStart)],["http.request.response_start",Ds(t.responseStart)],["http.request.response_end",Ds(t.responseEnd)]]:n})(r).forEach(n=>t.setAttribute(...n)),setTimeout(e)}})})}function zs(t){try{return new URL(t,Zr.location.origin).href}catch{return}}const Ws={...Se,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{},...Us};function Js(t,n,e){t.emit("startPageLoadSpan",n,e),Lt().setTransactionName(n.name);const r=Ys(t);return r&&t.emit("afterStartPageLoadSpan",r),r}function Xs(t,n,e){const{url:r,isRedirect:o}=e||{};t.emit("beforeStartNavigationSpan",n,{isRedirect:o}),t.emit("startNavigationSpan",n,{isRedirect:o});const i=Lt();return i.setTransactionName(n.name),r&&!o&&i.setSDKProcessingMetadata({normalizedRequest:{...eo(),url:r}}),Ys(t)}function Gs(t){const n=Zr.document,e=n?.querySelector(`meta[name=${t}]`);return e?.getAttribute("content")||void 0}const Ks="_sentry_idleSpan";function Ys(t){return t[Ks]}function Vs(t,n){Z(t,Ks,n)}const Zs=1.5;return jn(),t.BrowserClient=yo,t.SDK_VERSION=e,t.SEMANTIC_ATTRIBUTE_SENTRY_OP=qt,t.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN=Ft,t.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE=Nt,t.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE=At,t.Scope=Et,t.WINDOW=Zr,t.addBreadcrumb=gr,t.addEventProcessor=function(t){Ot().addEventProcessor(t)},t.addIntegration=function(t){const n=Mt();n&&n.addIntegration(t)},t.breadcrumbsIntegration=bs,t.browserApiErrorsIntegration=Ss,t.browserTracingIntegration=(t={})=>{const e={name:void 0,source:void 0},r=Zr.document,{enableInp:o,enableElementTiming:i,enableLongTask:s,enableLongAnimationFrame:c,_experiments:{enableInteractions:a,enableStandaloneClsSpans:u,enableStandaloneLcpSpans:f},beforeStartSpan:d,idleTimeout:l,finalTimeout:p,childSpanTimeout:h,markBackgroundSpan:m,traceFetch:g,traceXHR:y,trackFetchStreamPerformance:v,shouldCreateSpanForRequest:b,enableHTTPTimings:_,ignoreResourceSpans:S,ignorePerformanceApiSpans:w,instrumentPageLoad:E,instrumentNavigation:T,detectRedirects:k,linkPreviousTrace:$,consistentTraceSampling:x,onRequestSpanStart:I}={...Ws,...t};let R,L;function O(t,n,o=!0){const i="pageload"===n.op,s=d?d(n):n,c=s.attributes||{};if(n.name!==s.name&&(c[At]="custom",s.attributes=c),!o){const t=ft();return void le({...s,startTime:t}).end(t)}e.name=s.name,e.source=c[At];const a=we(s,{idleTimeout:l,finalTimeout:p,childSpanTimeout:h,disableAutoFinish:i,beforeSpanEnd:n=>{R?.(),Oi(n,{recordClsOnPageloadSpan:!u,recordLcpOnPageloadSpan:!f,ignoreResourceSpans:S,ignorePerformanceApiSpans:w}),Vs(t,void 0);const e=Lt(),r=e.getPropagationContext();e.setPropagationContext({...r,traceId:a.spanContext().traceId,sampled:wn(a),dsc:qn(n)})}});function m(){r&&["interactive","complete"].includes(r.readyState)&&t.emit("idleSpanEnableAutoFinish",a)}Vs(t,a),i&&r&&(r.addEventListener("readystatechange",()=>{m()}),m())}return{name:"BrowserTracing",setup(t){if(jn(),R=Li({recordClsStandaloneSpans:u||!1,recordLcpStandaloneSpans:f||!1,client:t}),o&&Yi(),i&&vi()&&ht()&&si("element",Mi),c&&n.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?new PerformanceObserver(t=>{const n=Rn();if(n)for(const e of t.getEntries()){if(!e.scripts[0])continue;const t=bi(ht()+e.startTime),{start_timestamp:r,op:o}=Sn(n);if("navigation"===o&&r&&t<r)continue;const i=bi(e.duration),s={[Ft]:"auto.ui.browser.metrics"},c=e.scripts[0],{invoker:a,invokerType:u,sourceURL:f,sourceFunctionName:d,sourceCharPosition:l}=c;s["browser.script.invoker"]=a,s["browser.script.invoker_type"]=u,f&&(s["code.filepath"]=f),d&&(s["code.function"]=d),-1!==l&&(s["browser.script.source_char_position"]=l),gi(n,t,t+i,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:s})}}).observe({type:"long-animation-frame",buffered:!0}):s&&si("longtask",({entries:t})=>{const n=Rn();if(!n)return;const{op:e,start_timestamp:r}=Sn(n);for(const o of t){const t=bi(ht()+o.startTime),i=bi(o.duration);"navigation"===e&&r&&t<r||gi(n,t,t+i,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[Ft]:"auto.ui.browser.metrics"}})}}),a&&si("event",({entries:t})=>{const n=Rn();if(n)for(const e of t)if("click"===e.name){const t=bi(ht()+e.startTime),r=bi(e.duration),o={name:B(e.target),op:`ui.interaction.${e.name}`,startTime:t,attributes:{[Ft]:"auto.ui.browser.metrics"}},i=J(e.target);i&&(o.attributes["ui.component_name"]=i),gi(n,t,t+r,o)}}),k&&r){const t=()=>{L=pt()};addEventListener("click",t,{capture:!0}),addEventListener("keydown",t,{capture:!0,passive:!0})}function e(){const n=Ys(t);n&&!Sn(n).timestamp&&(n.setAttribute(Ut,"cancelled"),n.end())}t.on("startNavigationSpan",(n,r)=>{if(Mt()!==t)return;if(r?.isRedirect)return void O(t,{op:"navigation.redirect",...n},!1);L=void 0,e(),Ot().setPropagationContext({traceId:vt(),sampleRand:Math.random()});const o=Lt();o.setPropagationContext({traceId:vt(),sampleRand:Math.random()}),o.setSDKProcessingMetadata({normalizedRequest:void 0}),O(t,{op:"navigation",...n})}),t.on("startPageLoadSpan",(n,r={})=>{if(Mt()!==t)return;e();const o=ln(r.sentryTrace||Gs("sentry-trace"),r.baggage||Gs("baggage")),i=Lt();i.setPropagationContext(o),i.setSDKProcessingMetadata({normalizedRequest:eo()}),O(t,{op:"pageload",...n})})},afterAllSetup(t){let n=W();if("off"!==$&&As(t,{linkPreviousTrace:$,consistentTraceSampling:x}),Zr.location){if(E){const n=ht();Js(t,{name:Zr.location.pathname,startTime:n?n/1e3:void 0,attributes:{[At]:"url",[Ft]:"auto.pageload.browser"}})}T&&Ui(({to:e,from:r})=>{if(void 0===r&&-1!==n?.indexOf(e))return void(n=void 0);n=void 0;const o=fr(e),i=Ys(t),s=i&&k&&function(t,n){const e=Sn(t),r=ft(),o=e.start_timestamp;if(r-o>Zs)return!1;if(n&&r-n<=Zs)return!1;return!0}(i,L);Xs(t,{name:o?.pathname||Zr.location.pathname,attributes:{[At]:"url",[Ft]:"auto.navigation.browser"}},{url:e,isRedirect:s})})}m&&Zr.document&&Zr.document.addEventListener("visibilitychange",()=>{const t=Rn();if(!t)return;const n=In(t);if(Zr.document.hidden&&n){const t="cancelled",{status:e}=Sn(n);e||n.setStatus({code:2,message:t}),n.setAttribute("sentry.cancellation_reason","document.hidden"),n.end()}}),a&&function(t,n,e,r,o){const i=Zr.document;let s;const c=()=>{const i="ui.action.click",c=Ys(t);if(c){const t=Sn(c).op;if(["navigation","pageload"].includes(t))return}s&&(s.setAttribute(Ut,"interactionInterrupted"),s.end(),s=void 0),o.name&&(s=we({name:o.name,op:i,attributes:{[At]:o.source||"url"}},{idleTimeout:n,finalTimeout:e,childSpanTimeout:r}))};i&&addEventListener("click",c,{capture:!0})}(t,l,p,h,e),o&&function(){const t=({entries:t})=>{const n=Rn(),e=n&&In(n);t.forEach(t=>{if(!function(t){return"duration"in t}(t)||!e)return;const n=t.interactionId;if(null!=n&&!Ki.has(n)){if(Gi.length>10){const t=Gi.shift();Ki.delete(t)}Gi.push(n),Ki.set(n,e)}})};si("event",t),si("first-input",t)}(),Hs(t,{traceFetch:g,traceXHR:y,trackFetchStreamPerformance:v,tracePropagationTargets:t.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:b,enableHTTPTimings:_,onRequestSpanStart:I})}}},t.captureEvent=Ae,t.captureException=captureException,t.captureFeedback=function(t,n={},e=Lt()){const{message:r,name:o,email:i,url:s,source:c,associatedEventId:a,tags:u}=t,f={contexts:{feedback:{contact_email:i,name:o,message:r,url:s,source:c,associated_event_id:a}},type:"feedback",level:"info",tags:u},d=e?.getClient()||Mt();return d&&d.emit("beforeSendFeedback",f,n),e.captureEvent(f,n)},t.captureMessage=function(t,n){const e="string"==typeof n?n:void 0,r="string"!=typeof n?{captureContext:n}:void 0;return Lt().captureMessage(t,e,r)},t.captureSession=He,t.chromeStackLineParser=is,t.close=async function(t){const n=Mt();return n?n.close(t):Promise.resolve(!1)},t.continueTrace=(t,n)=>{const e=Rt(r());if(e.continueTrace)return e.continueTrace(t,n);const{sentryTrace:o,baggage:i}=t,s=Mt(),c=tn(i);return s&&!function(t,n){const e=an(t);return(!n||!e||n===e)&&(!t.getOptions().strictTraceContinuation||!(n&&!e||!n&&e))}(s,c?.org_id)?he(n):Ct(t=>{const e=ln(o,i);return t.setPropagationContext(e),n()})},t.createTransport=ar,t.createUserFeedbackEnvelope=function(t,{metadata:n,tunnel:e,dsn:r}){const o={event_id:t.event_id,sent_at:(new Date).toISOString(),...n?.sdk&&{sdk:{name:n.sdk.name,version:n.sdk.version}},...!!e&&!!r&&{dsn:sn(r)}},i=function(t){return[{type:"user_report"},t]}(t);return zn(o,[i])},t.dedupeIntegration=Or,t.defaultStackLineParsers=ms,t.defaultStackParser=gs,t.endSession=Fe,t.eventFiltersIntegration=Sr,t.eventFromException=lo,t.eventFromMessage=po,t.exceptionFromError=ro,t.feedbackAsyncIntegration=Yr,t.feedbackIntegration=Yr,t.flush=async function(t){const n=Mt();return n?n.flush(t):Promise.resolve(!1)},t.forceLoad=function(){},t.functionToStringIntegration=br,t.geckoStackLineParser=as,t.getActiveSpan=Rn,t.getClient=Mt,t.getCurrentScope=Lt,t.getDefaultIntegrations=Os,t.getGlobalScope=jt,t.getIsolationScope=Ot,t.getRootSpan=In,t.getSpanDescendants=xn,t.getTraceData=hr,t.globalHandlersIntegration=$s,t.httpContextIntegration=Is,t.inboundFiltersIntegration=wr,t.init=function(t={}){const n=!t.skipBrowserExtensionCheck&&Ls(),e={...t,enabled:!n&&t.enabled,stackParser:(r=t.stackParser||gs,Array.isArray(r)?l(...r):r),integrations:Je({integrations:t.integrations,defaultIntegrations:null==t.defaultIntegrations?Os():t.defaultIntegrations}),transport:t.transport||Qi};var r;return function(t,n){!0===n.debug&&a(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}),Lt().update(n.initialScope);const e=new t(n);return or(e),e.init(),e}(yo,e)},t.isEnabled=De,t.isInitialized=function(){return!!Mt()},t.lastEventId=Ne,t.lazyLoadIntegration=async function(t,n){const r=js[t],o=Cs.Sentry=Cs.Sentry||{};if(!r)throw new Error(`Cannot lazy load integration: ${t}`);const i=o[t];if("function"==typeof i&&!("_isShim"in i))return i;const s=function(t){const n=Mt(),r=n?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${e}/${t}.min.js`,r).toString()}(r),c=Zr.document.createElement("script");c.src=s,c.crossOrigin="anonymous",c.referrerPolicy="strict-origin",n&&c.setAttribute("nonce",n);const a=new Promise((t,n)=>{c.addEventListener("load",()=>t()),c.addEventListener("error",n)}),u=Zr.document.currentScript,f=Zr.document.body||Zr.document.head||u?.parentElement;if(!f)throw new Error(`Could not find parent element to insert lazy-loaded ${t} script`);f.appendChild(c);try{await a}catch{throw new Error(`Error when loading integration: ${t}`)}const d=o[t];if("function"!=typeof d)throw new Error(`Could not load integration: ${t}`);return d},t.linkedErrorsIntegration=Rs,t.makeFetchTransport=Qi,t.onLoad=function(t){t()},t.opera10StackLineParser=ls,t.opera11StackLineParser=hs,t.parameterize=function(t,...n){const e=new String(String.raw(t,...n));return e.__sentry_template_string__=t.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),e.__sentry_template_values__=n,e},t.replayIntegration=function(t){return a(()=>{console.warn("You are using replayIntegration() even though this bundle does not include replay.")}),{name:"Replay",...Vr.reduce((t,n)=>(t[n]=Gr,t),{})}},t.setContext=function(t,n){Ot().setContext(t,n)},t.setCurrentClient=or,t.setExtra=function(t,n){Ot().setExtra(t,n)},t.setExtras=function(t){Ot().setExtras(t)},t.setMeasurement=oe,t.setTag=function(t,n){Ot().setTag(t,n)},t.setTags=function(t){Ot().setTags(t)},t.setUser=function(t){Ot().setUser(t)},t.showReportDialog=function(t={}){const n=Zr.document,e=n?.head||n?.body;if(!e)return;const r=Lt(),o=Mt(),i=o?.getDsn();if(!i)return;const s={...t,user:{...r.getUser(),...t.user},eventId:t.eventId||Ne()},c=Zr.document.createElement("script");c.async=!0,c.crossOrigin="anonymous",c.src=function(t,n){const e=un(t);if(!e)return"";const r=`${Be(e)}embed/error-page/`;let o=`dsn=${sn(e)}`;for(const t in n)if("dsn"!==t&&"onClose"!==t)if("user"===t){const t=n.user;if(!t)continue;t.name&&(o+=`&name=${encodeURIComponent(t.name)}`),t.email&&(o+=`&email=${encodeURIComponent(t.email)}`)}else o+=`&${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`;return`${r}?${o}`}(i,s);const{onLoad:a,onClose:u}=s;if(a&&(c.onload=a),u){const t=n=>{if("__sentry_reportdialog_closed__"===n.data)try{u()}finally{Zr.removeEventListener("message",t)}};Zr.addEventListener("message",t)}e.appendChild(c)},t.spanToBaggageHeader=function(t){return nn(qn(t))},t.spanToJSON=Sn,t.spanToTraceHeader=yn,t.startBrowserTracingNavigationSpan=Xs,t.startBrowserTracingPageLoadSpan=Js,t.startInactiveSpan=le,t.startNewTrace=he,t.startSession=qe,t.startSpan=de,t.startSpanManual=function(t,n){const e=ye();if(e.startSpanManual)return e.startSpanManual(t,n);const r=ge(t),{forceTransaction:o,parentSpan:i,scope:s}=t,c=s?.clone();return Ct(c,()=>_e(i)(()=>{const e=Lt(),s=be(e,i),c=t.onlyIfParent&&!s?new Fn:me({parentSpan:s,spanArguments:r,forceTransaction:o,scope:e});return St(e,c),ue(()=>n(c,()=>c.end()),()=>{const{status:t}=Sn(c);!c.isRecording()||t&&"ok"!==t||c.setStatus({code:2,message:"internal_error"})})}))},t.suppressTracing=function(t){const n=ye();return n.suppressTracing?n.suppressTracing(t):Ct(n=>{n.setSDKProcessingMetadata({[fe]:!0});const e=t();return n.setSDKProcessingMetadata({[fe]:void 0}),e})},t.updateSpanName=function(t,n){t.updateName(n),t.setAttributes({[At]:"custom",[zt]:n})},t.winjsStackLineParser=fs,t.withActiveSpan=pe,t.withIsolationScope=function(...t){const n=Rt(r());if(2===t.length){const[e,r]=t;return e?n.withSetIsolationScope(e,r):n.withIsolationScope(r)}return n.withIsolationScope(t[0])},t.withScope=Ct,t}({});
|
|
//# sourceMappingURL=bundle.tracing.min.js.map
|