girder-sentry 5.0.13.dev27__tar.gz → 5.0.14.dev2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of girder-sentry might be problematic. Click here for more details.

Files changed (22) hide show
  1. {girder_sentry-5.0.13.dev27 → girder_sentry-5.0.14.dev2}/PKG-INFO +1 -1
  2. girder_sentry-5.0.14.dev2/girder_sentry/web_client/dist/girder-plugin-sentry.umd.cjs +15 -0
  3. {girder_sentry-5.0.13.dev27 → girder_sentry-5.0.14.dev2}/girder_sentry.egg-info/PKG-INFO +1 -1
  4. girder_sentry-5.0.14.dev2/girder_sentry.egg-info/scm_version.json +8 -0
  5. girder_sentry-5.0.13.dev27/girder_sentry/web_client/dist/girder-plugin-sentry.umd.cjs +0 -15
  6. girder_sentry-5.0.13.dev27/girder_sentry.egg-info/scm_version.json +0 -8
  7. {girder_sentry-5.0.13.dev27 → girder_sentry-5.0.14.dev2}/MANIFEST.in +0 -0
  8. {girder_sentry-5.0.13.dev27 → girder_sentry-5.0.14.dev2}/girder_sentry/__init__.py +0 -0
  9. {girder_sentry-5.0.13.dev27 → girder_sentry-5.0.14.dev2}/girder_sentry/rest.py +0 -0
  10. {girder_sentry-5.0.13.dev27 → girder_sentry-5.0.14.dev2}/girder_sentry/settings.py +0 -0
  11. {girder_sentry-5.0.13.dev27 → girder_sentry-5.0.14.dev2}/girder_sentry/web_client/dist/style.css +0 -0
  12. {girder_sentry-5.0.13.dev27 → girder_sentry-5.0.14.dev2}/girder_sentry.egg-info/SOURCES.txt +0 -0
  13. {girder_sentry-5.0.13.dev27 → girder_sentry-5.0.14.dev2}/girder_sentry.egg-info/dependency_links.txt +0 -0
  14. {girder_sentry-5.0.13.dev27 → girder_sentry-5.0.14.dev2}/girder_sentry.egg-info/entry_points.txt +0 -0
  15. {girder_sentry-5.0.13.dev27 → girder_sentry-5.0.14.dev2}/girder_sentry.egg-info/not-zip-safe +0 -0
  16. {girder_sentry-5.0.13.dev27 → girder_sentry-5.0.14.dev2}/girder_sentry.egg-info/requires.txt +0 -0
  17. {girder_sentry-5.0.13.dev27 → girder_sentry-5.0.14.dev2}/girder_sentry.egg-info/scm_file_list.json +0 -0
  18. {girder_sentry-5.0.13.dev27 → girder_sentry-5.0.14.dev2}/girder_sentry.egg-info/top_level.txt +0 -0
  19. {girder_sentry-5.0.13.dev27 → girder_sentry-5.0.14.dev2}/plugin.cmake +0 -0
  20. {girder_sentry-5.0.13.dev27 → girder_sentry-5.0.14.dev2}/pyproject.toml +0 -0
  21. {girder_sentry-5.0.13.dev27 → girder_sentry-5.0.14.dev2}/setup.cfg +0 -0
  22. {girder_sentry-5.0.13.dev27 → girder_sentry-5.0.14.dev2}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: girder-sentry
3
- Version: 5.0.13.dev27
3
+ Version: 5.0.14.dev2
4
4
  Summary: Allow the automatic tracking of issues using Sentry.
5
5
  Maintainer: Kitware, Inc.
6
6
  Maintainer-email: kitware@kitware.com
@@ -0,0 +1,15 @@
1
+ (function(e){typeof define==`function`&&define.amd?define([],e):e()})(function(){var e=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,t=globalThis,n=`10.67.0`;function r(){return i(t),t}function i(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||`10.67.0`,t[n]=t[`10.67.0`]||{}}function a(e,r,i=t){let a=i.__SENTRY__=i.__SENTRY__||{},o=a[n]=a[`10.67.0`]||{};return o[e]||(o[e]=r())}var o=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],s=`Sentry Logger `,c={};function l(e){if(!(`console`in t))return e();let n=t.console,r={},i=Object.keys(c);i.forEach(e=>{let t=c[e];r[e]=n[e],n[e]=t});try{return e()}finally{i.forEach(e=>{n[e]=r[e]})}}function u(){re().enabled=!0}function d(){re().enabled=!1}function f(){return re().enabled}function p(...e){ne(`log`,...e)}function ee(...e){ne(`warn`,...e)}function te(...e){ne(`error`,...e)}function ne(n,...r){e&&f()&&l(()=>{t.console[n](`${s}[${n}]:`,...r)})}function re(){return e?a(`loggerSettings`,()=>({enabled:!1})):{enabled:!1}}var m={enable:u,disable:d,isEnabled:f,log:p,warn:ee,error:te},ie=50,ae=/\(error: (.*)\)/,oe=/captureMessage|captureException/;function se(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let i=[],a=e.split(`
2
+ `);for(let e=n;e<a.length;e++){let n=a[e];n.length>1024&&(n=n.slice(0,1024));let o=ae.test(n)?n.replace(ae,`$1`):n;if(!o.includes(`Error: `)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=ie+r)break}}return le(i.slice(r))}}function ce(e){return Array.isArray(e)?se(...e):e}function le(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(ue(t).function||``)&&t.pop(),t.reverse(),oe.test(ue(t).function||``)&&(t.pop(),oe.test(ue(t).function||``)&&t.pop()),t.slice(0,ie).map(e=>({...e,filename:e.filename||ue(t).filename,function:e.function||`?`}))}function ue(e){return e[e.length-1]||{}}var de=`<anonymous>`;function h(e){try{return!e||typeof e!=`function`?de:e.name||de}catch{return de}}function fe(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}var g={},pe={};function _(e,t){return g[e]=g[e]||[],g[e].push(t),()=>{let n=g[e];if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}function v(t,n){if(!pe[t]){pe[t]=!0;try{n()}catch(n){e&&m.error(`Error while instrumenting ${t}`,n)}}}function y(t,n){let r=t&&g[t];if(r)for(let i of r)try{i(n)}catch(n){e&&m.error(`Error while triggering instrumentation handler.
3
+ Type: ${t}
4
+ Name: ${h(i)}
5
+ Error:`,n)}}var me=null;function he(e){let t=`error`;_(t,e),v(t,ge)}function ge(){me=t.onerror,t.onerror=function(e,t,n,r,i){return y(`error`,{column:r,error:i,line:n,msg:e,url:t}),me?me.apply(this,arguments):!1},t.onerror.__SENTRY_INSTRUMENTED__=!0}var _e=null;function ve(e){let t=`unhandledrejection`;_(t,e),v(t,ye)}function ye(){_e=t.onunhandledrejection,t.onunhandledrejection=function(e){return y(`unhandledrejection`,e),!_e||_e.apply(this,arguments)},t.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var be=Object.prototype.toString;function xe(e){switch(be.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return w(e,Error)}}function b(e,t){return be.call(e)===`[object ${t}]`}function Se(e){return b(e,`ErrorEvent`)}function Ce(e){return b(e,`DOMError`)}function we(e){return b(e,`DOMException`)}function x(e){return b(e,`String`)}function Te(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function S(e){return e===null||Te(e)||typeof e!=`object`&&typeof e!=`function`}function Ee(e){return b(e,`Object`)}function De(e){return typeof e==`object`&&!!e}function Oe(e){return typeof Event<`u`&&w(e,Event)}function ke(e){return b(e,`RegExp`)}function C(e){return!!(e?.then&&typeof e.then==`function`)}function w(e,t){try{return e instanceof t}catch{return!1}}function Ae(e){return typeof Request<`u`&&w(e,Request)}function T(t,n,r){if(!(n in t))return;let i=t[n];if(typeof i!=`function`)return;let a=r(i);typeof a==`function`&&je(a,i);try{t[n]=a}catch{e&&m.log(`Failed to replace method "${n}" in object`,t)}}function E(t,n,r){try{Object.defineProperty(t,n,{value:r,writable:!0,configurable:!0})}catch{e&&m.log(`Failed to add non-enumerable property "${String(n)}" to object`,t)}}function je(e,t){try{e.prototype=t.prototype=t.prototype||{},E(e,`__sentry_original__`,t)}catch{}}function Me(e){return e.__sentry_original__}function Ne(e){if(xe(e))return{message:e.message,name:e.name,stack:e.stack,...Pe(e)};if(Oe(e)){let{type:t,target:n,currentTarget:r,detail:i}=e;return{type:t,target:n,currentTarget:r,...i?{detail:i}:{},...Pe(e)}}return e}function Pe(e){return De(e)?Object.fromEntries(Object.entries(e)):{}}function Fe(e){let t=Object.keys(Ne(e));return t.sort(),t[0]?t.join(`, `):`[object has no keys]`}var D;function Ie(e){if(D!==void 0)return D?D(e):e();let n=Symbol.for(`__SENTRY_SAFE_RANDOM_ID_WRAPPER__`),r=t;return n in r&&typeof r[n]==`function`?(D=r[n],D(e)):(D=null,e())}function Le(){return Ie(()=>Math.random())}function O(){return Ie(()=>Date.now())}var Re=Symbol.for(`sentry.skipNormalization`),ze=Symbol.for(`sentry.overrideNormalizationDepth`);function Be(e){return!!e[Re]}function Ve(e){let t=e[ze];return typeof t==`number`?t:void 0}var He;function Ue(e){He=e}function k(e,t=100,n=1/0){try{return Ge(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function We(e,t=3,n=100*1024){let r=k(e,t);return Ye(r)>n?We(e,t-1,n):r}function Ge(e,t,n=1/0,r=1/0,i=Xe()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=Ke(e,t);if(!s.startsWith(`[object `))return s;if(Be(t))return t;let c=Ve(t),l=c===void 0?n:c;if(l===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let u=t;if(u&&typeof u.toJSON==`function`)try{return Ge(``,u.toJSON(),l-1,r,i)}catch{}let d=Array.isArray(t)?[]:{},f=0,p=Ne(t);for(let e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(f>=r){d[e]=`[MaxProperties ~]`;break}let t=p[e];d[e]=Ge(e,t,l-1,r,i),f++}return o(t),d}function Ke(e,t){try{if(He){let e=He(t);if(e)return e}return typeof global<`u`&&t===global?`[Global]`:typeof t==`number`&&!Number.isFinite(t)?`[${t}]`:typeof t==`function`?`[Function: ${h(t)}]`:typeof t==`symbol`?`[${String(t)}]`:typeof t==`bigint`?`[BigInt: ${String(t)}]`:`[object ${qe(t)}]`}catch(e){return`**non-serializable** (${e})`}}function qe(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function Je(e){return~-encodeURI(e).split(/%..|./).length}function Ye(e){return Je(JSON.stringify(e))}function Xe(){let e=new WeakSet;function t(t){return e.has(t)?!0:(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}function Ze(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Qe(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];S(r)?n.push(String(r)):r instanceof Error?n.push(r.message?`${r.name}: ${r.message}`:r.name):n.push(Ke(void 0,r))}return n.join(t)}function $e(e,t,n=!1){return x(e)?ke(t)?t.test(e):x(t)?n?e===t:e.includes(t):typeof t==`function`&&t(e):!1}function et(e,t=[],n=!1){for(let r of t)if($e(e,r,n))return!0;return!1}function tt(){let e=t;return e.crypto||e.msCrypto}var nt;function rt(){return Le()*16}function A(e=tt()){try{if(e?.randomUUID)return Ie(()=>e.randomUUID()).replace(/-/g,``)}catch{}return nt||=`10000000100040008000100000000000`,nt.replace(/[018]/g,e=>(e^(rt()&15)>>e/4).toString(16))}function it(e){return e.exception?.values?.[0]}function j(e){let{message:t,event_id:n}=e;if(t)return t;let r=it(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function at(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function M(e,t){let n=it(e);if(!n)return;let r={type:`generic`,handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&`data`in t){let e={...i?.data,...t.data};n.mechanism.data=e}}function ot(e){if(st(e))return!0;try{E(e,`__sentry_captured__`,!0)}catch{}return!1}function st(e){try{return e.__sentry_captured__}catch{}}var ct=1e3;function N(){return O()/ct}function lt(){let{performance:e}=t;if(!e?.now||!e.timeOrigin)return N;let n=e.timeOrigin;return()=>(n+Ie(()=>e.now()))/ct}var ut;function P(){return(ut??=lt())()}function dt(e){let t=P(),n={sid:A(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>pt(n)};return e&&F(n,e),n}function F(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||P(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:A()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function ft(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),F(e,n)}function pt(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function mt(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=mt(r[e],t[e],n-1));return r}function ht(){return A()}function gt(){return A().substring(16)}function _t(e){try{let n=t.WeakRef;if(typeof n==`function`)return new n(e)}catch{}return e}function vt(e){if(e){if(typeof e==`object`&&`deref`in e&&typeof e.deref==`function`)try{return e.deref()}catch{return}return e}}var yt=`_sentrySpan`;function bt(e,t){t?E(e,yt,_t(t)):delete e[yt]}function xt(e){return vt(e[yt])}var St=100,I=class t{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:ht(),sampleRand:Le()}}clone(){let e=new t;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._attributes={...this._attributes},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,e._conversationId=this._conversationId,bt(e,xt(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&F(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let n=typeof e==`function`?e(this):e,{tags:r,attributes:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u,conversationId:d}=(n instanceof t?n.getScopeData():Ee(n)?e:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,bt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ht(),sampleRand:Le()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:St;if(n<=0)return this;let r={timestamp:N(),...e,message:e.message?Ze(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent(`buffer_overflow`,`log_item`)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:xt(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=mt(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n?.event_id||A();if(!this._client)return e&&m.warn(`No client configured on scope - will not capture exception!`),r;let i=Error(`Sentry syntheticException`);return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){let i=r?.event_id||A();if(!this._client)return e&&m.warn(`No client configured on scope - will not capture message!`),i;let a=r?.syntheticException??Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:a,...r,event_id:i},this),i}captureEvent(t,n){let r=t.event_id||n?.event_id||A();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(e&&m.warn(`No client configured on scope - will not capture event!`),r)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}};function Ct(){return a(`defaultCurrentScope`,()=>new I)}function wt(){return a(`defaultIsolationScope`,()=>new I)}var Tt=e=>e instanceof Promise&&!e[Et],Et=Symbol(`chained PromiseLike`),Dt=(e,t,n)=>{let r=e.then(e=>(t(e),e),e=>{throw n(e),e});return Tt(r)&&Tt(e)?r:Ot(e,r)},Ot=(e,t)=>{if(!t)return e;let n=!1;for(let r in e){if(r in t)continue;n=!0;let i=e[r];typeof i==`function`?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Et]:!0}),t},kt=class{constructor(e,t){let n;n=e||new I;let r;r=t||new I,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return C(n)?Dt(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function L(){let e=i(r());return e.stack=e.stack||new kt(Ct(),wt())}function At(e){return L().withScope(e)}function jt(e,t){let n=L();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Mt(e){return L().withScope(()=>e(L().getIsolationScope()))}function Nt(){return{withIsolationScope:Mt,withScope:At,withSetScope:jt,withSetIsolationScope:(e,t)=>Mt(t),getCurrentScope:()=>L().getScope(),getIsolationScope:()=>L().getIsolationScope()}}function Pt(e){let t=i(e);return t.acs?t.acs:Nt()}function Ft(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.keys(e).includes(`value`)}function It(e,t){let{value:n,unit:r}=Ft(e)?e:{value:e,unit:void 0},i=Rt(n),a=r&&typeof r==`string`?{unit:r}:{};if(i)return{...i,...a};if(!t||t===`skip-undefined`&&n===void 0)return;let o=``;try{o=JSON.stringify(n)??``}catch{}return{value:o,type:`string`,...a}}function Lt(e,t=!1){let n={};for(let[r,i]of Object.entries(e??{})){let e=It(i,t);e&&(n[r]=e)}return n}function Rt(e){if(Array.isArray(e))return{value:e,type:`array`};let t=typeof e==`string`?`string`:typeof e==`boolean`?`boolean`:typeof e==`number`&&!Number.isNaN(e)?Number.isInteger(e)?`integer`:`double`:null;if(t)return{value:e,type:t}}var zt;function Bt(){return zt?.()}function R(){return Pt(r()).getCurrentScope()}function z(){return Pt(r()).getIsolationScope()}function Vt(){return a(`globalScope`,()=>new I)}function Ht(...e){let t=Pt(r());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function B(){return R().getClient()}function Ut(e){let t=Bt();if(t)return{trace_id:t.traceId,span_id:t.spanId};let{traceId:n,parentSpanId:r,propagationSpanId:i}=e.getPropagationContext(),a={trace_id:n,span_id:i||gt()};return r&&(a.parent_span_id=r),a}var Wt=`sentry.op`,Gt=`sentry.origin`,Kt=`sentry.profile_id`,qt=`sentry.exclusive_time`,Jt=`gen_ai.conversation.id`,Yt=`_sentryScope`,Xt=`_sentryIsolationScope`;function Zt(e){let t=e;return{scope:t[Yt],isolationScope:vt(t[Xt])}}function Qt(e){let t=$t(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(`sentry-`)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function $t(e){if(!(!e||!x(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=en(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):en(e)}function en(e){return e.split(`,`).map(e=>{let t=e.indexOf(`=`);return t===-1?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}var tn=/^o(\d+)\./,nn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function rn(e){return e===`http`||e===`https`}function V(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function an(e){let t=nn.exec(e);if(!t){l(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,u=s,d=u.split(`/`);if(d.length>1&&(c=d.slice(0,-1).join(`/`),u=d.pop()),u){let e=u.match(/^\d+/);e&&(u=e[0])}return on({host:a,pass:i,path:c,projectId:u,port:o,protocol:n,publicKey:r})}function on(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function sn(t){if(!e)return!0;let{port:n,projectId:r,protocol:i}=t;return[`protocol`,`publicKey`,`host`,`projectId`].find(e=>t[e]?!1:(m.error(`Invalid Sentry Dsn: ${e} missing`),!0))?!1:r.match(/^\d+$/)?rn(i)?n&&isNaN(parseInt(n,10))?(m.error(`Invalid Sentry Dsn: Invalid port ${n}`),!1):!0:(m.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),!1):(m.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function cn(e){return e.match(tn)?.[1]}function ln(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=cn(n)),r}function un(e){let t=typeof e==`string`?an(e):on(e);if(!(!t||!sn(t)))return t}function dn(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}var fn=!1;function pn(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:_n(e).parent_span_id,a=Zt(e).scope;return{parent_span_id:i,span_id:r?a?.getPropagationContext().propagationSpanId||gt():t,trace_id:n}}function mn(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:n===1,attributes:i,...r}))}function hn(e){return typeof e==`number`?gn(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?gn(e.getTime()):P()}function gn(e){return e>9999999999?e/1e3:e}function _n(e){if(xn(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(bn(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:vn(e),start_timestamp:hn(i),timestamp:hn(o)||void 0,status:Cn(s),op:r[Wt],origin:r[Gt],links:mn(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function vn(e){return`parentSpanId`in e?e.parentSpanId:`parentSpanContext`in e?e.parentSpanContext?.spanId:void 0}function yn(e){return{...e,attributes:Lt(e.attributes),links:e.links?.map(e=>({...e,attributes:Lt(e.attributes)}))}}function bn(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function xn(e){return typeof e.getSpanJSON==`function`}function Sn(e){let{traceFlags:t}=e.spanContext();return t===1}function Cn(e){if(!(!e||e.code===0))return e.code===1?`ok`:e.message||`internal_error`}var wn=`_sentryRootSpan`,Tn=En;function En(e){return e[wn]||e}function Dn(){fn||=(l(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),!0)}function On(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=e||B()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function kn(e){m.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function An(t,n){if(!n?.length)return!1;for(let r of n){if(Nn(r)){if(t.description&&$e(t.description,r))return e&&kn(t),!0;continue}let n=!!r.attributes&&Object.keys(r.attributes).length>0;if(!r.name&&!r.op&&!n)continue;let i=!r.name||t.description&&$e(t.description,r.name),a=!r.op||t.op&&$e(t.op,r.op),o=!r.attributes||Object.entries(r.attributes).every(([e,n])=>jn(t.attributes?.[e],n));if(i&&a&&o)return e&&kn(t),!0}return!1}function jn(e,t){return typeof e==`string`&&(typeof t==`string`||t instanceof RegExp)?$e(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function Mn(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function Nn(e){return typeof e==`string`||e instanceof RegExp}var Pn=Symbol.for(`sentry.nonRecordingSpan`);function Fn(e){return!!e&&e[Pn]===!0}var In=`production`,Ln=`_frozenDsc`;function Rn(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||`production`,release:n.release,public_key:r,trace_id:e,org_id:ln(t)};return t.emit(`createDsc`,i),i}function zn(e,t){let n=t.getPropagationContext();return n.dsc||Rn(n.traceId,e)}function Bn(e){let t=B();if(!t)return{};let n=Tn(e),r=_n(n),i=r.data,a=n.spanContext().traceState,o=a?.get(`sentry.sample_rate`)??i[`sentry.sample_rate`]??i[`sentry.previous_trace_sample_rate`];function s(e){return(typeof o==`number`||typeof o==`string`)&&(e.sample_rate=`${o}`),e}let c=n[Ln];if(c)return s(c);let l=Fn(n),u=l&&n.dropReason===`ignored`;if(l&&(!On(t.getOptions())||u)){let e=Zt(n).scope;if(e){let n={...zn(t,e)};return u&&(n.sampled=`false`),s(n)}}let d=a?.get(`sentry.dsc`),f=d&&Qt(d);if(f)return s(f);let p=Rn(e.spanContext().traceId,t),ee=i[`sentry.source`]??i[`sentry.segment.name.source`],te=r.description;return ee!==`url`&&te&&(p.transaction=te),On()&&(p.sampled=String(Sn(n)),p.sample_rand=a?.get(`sentry.sample_rand`)??Zt(n).scope?.getPropagationContext().sampleRand.toString()),s(p),t.emit(`createDsc`,p,n),p}function Vn(e){return!!e&&typeof e==`function`&&`_streamed`in e&&!!e._streamed}function H(e,t=[]){return[e,t]}function Hn(e,t){let[n,r]=e;return[n,[...r,t]]}function Un(e,t){let n=e[1];for(let e of n){let n=e[0].type;if(t(e,n))return!0}return!1}function Wn(e,t){return Un(e,(e,n)=>t.includes(n))}function Gn(e){let n=i(t);return n.encodePolyfill?n.encodePolyfill(e):new TextEncoder().encode(e)}function Kn(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[Gn(r),e]:r.push(typeof e==`string`?Gn(e):e)}for(let e of n){let[t,n]=e;if(i(`
6
+ ${JSON.stringify(t)}
7
+ `),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(k(n))}i(e)}}return typeof r==`string`?r:qn(r)}function qn(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function Jn(e){let t=typeof e.data==`string`?Gn(e.data):e.data;return[{type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Yn={sessions:`session`,event:`error`,client_report:`internal`,user_report:`default`,profile_chunk:`profile`,replay_event:`replay`,replay_recording:`replay`,check_in:`monitor`,raw_security:`security`,log:`log_item`,trace_metric:`metric`};function Xn(e){return e in Yn}function Zn(e){return Xn(e)?Yn[e]:e}function Qn(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function $n(e,t,n,r){let i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(O()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:V(r)},...i&&{trace:i}}}function er(e,t){if(!t)return e;let n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function tr(e,t,n,r){let i=Qn(n);return H({sent_at:new Date(O()).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:V(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}function nr(e,t,n,r){let i=Qn(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;er(e,n?.sdk);let o=$n(e,i,r,t);return delete e.sdkProcessingMetadata,H(o,[[{type:a},e]])}function rr(e){return e.getOptions().traceLifecycle===`stream`}function ir(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;sr(e,t),r&&ur(e,r),dr(e,n),cr(e,i),lr(e,a)}function ar(e,t){let{extra:n,tags:r,attributes:i,user:a,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:ee,span:te}=t;U(e,`extra`,n),U(e,`tags`,r),U(e,`attributes`,i),U(e,`user`,a),U(e,`contexts`,o),e.sdkProcessingMetadata=mt(e.sdkProcessingMetadata,c,2),s&&(e.level=s),ee&&(e.transactionName=ee),te&&(e.span=te),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function U(e,t,n){e[t]=mt(e[t],n,1)}function or(e,t){let n=Vt().getScopeData();return e&&ar(n,e.getScopeData()),t&&ar(n,t.getScopeData()),n}function sr(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(a).length&&(e.contexts={...a,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)}function cr(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function lr(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function ur(e,t){e.contexts={trace:pn(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Bn(t),...e.sdkProcessingMetadata};let n=_n(Tn(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}function dr(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function fr(e,t){let n=e.attributes??={};Object.entries(t).forEach(([e,t])=>{t!=null&&!(e in n)&&(n[e]=t)})}var pr=0,mr=1,hr=2;function W(e){return new _r(t=>{t(e)})}function gr(e){return new _r((t,n)=>{n(e)})}var _r=class e{constructor(e){this._state=pr,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{if(i){n(r);return}e(r)})})}_executeHandlers(){if(this._state===pr)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===mr&&e[1](this._value),this._state===hr&&e[2](this._value),!0)})}_runExecutor(e){let t=(e,t)=>{if(this._state===pr){if(C(t)){t.then(n,r);return}this._state=e,this._value=t,this._executeHandlers()}},n=e=>{t(mr,e)},r=e=>{t(hr,e)};try{e(n,r)}catch(e){r(e)}}};function vr(e,t,n,r=0){try{let i=yr(t,n,e,r);return C(i)?i:W(i)}catch(e){return gr(e)}}function yr(t,n,r,i){let a=r[i];if(!t||!a)return t;let o=a({...t},n);return e&&o===null&&m.log(`Event processor "${a.id||`?`}" dropped event`),C(o)?o.then(e=>yr(e,n,r,i+1)):yr(o,n,r,i+1)}var G,br,xr,K;function Sr(e){let n=t._sentryDebugIds,r=t._debugIds;if(!n&&!r)return{};let i=n?Object.keys(n):[],a=r?Object.keys(r):[];if(K&&i.length===br&&a.length===xr)return K;br=i.length,xr=a.length,K={},G||={};let o=(t,n)=>{for(let r of t){let t=n[r],i=G?.[r];if(i&&K&&t)K[i[0]]=t,G&&(G[r]=[i[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let i=n[e]?.filename;if(i&&K&&G){K[i]=t,G[r]=[i,t];break}}}}};return n&&o(i,n),r&&o(a,r),K}function Cr(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||A(),timestamp:t.timestamp||N()},l=n.integrations||e.integrations.map(e=>e.name);wr(c,e),Dr(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&Tr(c,e.stackParser);let u=kr(r,n.captureContext);n.mechanism&&M(c,n.mechanism);let d=i?i.getEventProcessors():[],f=or(a,u),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),ir(c,f);let ee=[...d,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?W(c):vr(ee,c,n)).then(e=>(e&&Er(e),typeof o==`number`&&o>0?Or(e,o,s):e))}function wr(e,t){let{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||`production`,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);let o=e.request;o?.url&&a&&(o.url=Ze(o.url,a)),a&&e.exception?.values?.forEach(e=>{e.value&&=Ze(e.value,a)})}function Tr(e,t){let n=Sr(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}function Er(e){let t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})})}function Dr(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Or(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:k(e.data,t,n)}}))},...e.user&&{user:k(e.user,t,n)},...e.contexts&&{contexts:k(e.contexts,t,n)},...e.extra&&{extra:k(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=k(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:k(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=k(e.contexts.flags,3,n)),r}function kr(e,t){if(!t)return e;let n=e?e.clone():new I;return n.update(t),n}function Ar(e){if(e)return jr(e)||Nr(e)?{captureContext:e}:e}function jr(e){return e instanceof I||typeof e==`function`}var Mr=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`propagationContext`];function Nr(e){return Object.keys(e).some(e=>Mr.includes(e))}function Pr(e,t){return R().captureException(e,Ar(t))}function Fr(e,t){return R().captureEvent(e,t)}function Ir(e){let n=z(),{user:r}=or(n,R()),{userAgent:i}=t.navigator||{},a=dt({user:r,...i&&{userAgent:i},...e}),o=n.getSession();return o?.status===`ok`&&F(o,{status:`exited`}),Lr(),n.setSession(a),a}function Lr(){let e=z(),t=R().getSession()||e.getSession();t&&ft(t),Rr(),e.setSession()}function Rr(){let e=z(),t=B(),n=e.getSession();n&&t&&t.captureSession(n)}function zr(e=!1){if(e){Lr();return}Rr()}function Br(e){return typeof e==`object`&&typeof e.unref==`function`&&e.unref(),e}function Vr(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function Hr(e){return`${Vr(e)}${e.projectId}/envelope/`}function Ur(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Wr(e,t,n){return t||`${Hr(e)}?${Ur(e,n)}`}var Gr=[];function Kr(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}function qr(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n==`function`){let e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return Kr(r)}function Jr(e,t){let n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&Xr(e,t,n)}),n}function Yr(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Xr(t,n,r){if(r[n.name]){e&&m.log(`Integration skipped because it was already installed: ${n.name}`);return}if(r[n.name]=n,!Gr.includes(n.name)&&typeof n.setupOnce==`function`&&(n.setupOnce(),Gr.push(n.name)),n.setup&&typeof n.setup==`function`&&n.setup(t),typeof n.preprocessEvent==`function`){let e=n.preprocessEvent.bind(n);t.on(`preprocessEvent`,(n,r)=>e(n,r,t))}if(typeof n.processEvent==`function`){let e=n.processEvent.bind(n),r=Object.assign((n,r)=>e(n,r,t),{id:n.name});t.addEventProcessor(r)}[`processSpan`,`processSegmentSpan`].forEach(e=>{let r=n[e];typeof r==`function`&&t.on(e,e=>r.call(n,e,t))}),e&&m.log(`Integration installed: ${n.name}`)}function q(e){return e}function Zr(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function Qr(){return`npm`}function $r(){return!Zr()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function ei(){return typeof window<`u`&&(!$r()||ti())}function ti(){return t.process?.type===`renderer`}function ni(e,t){let n=t?`auto`:`never`;return[{type:`log`,item_count:e.length,content_type:`application/vnd.sentry.items.log+json`},{version:2,...ei()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function ri(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=V(r)),H(a,[ni(e,i)])}function ii(e,t){let n=t??ai(e)??[];if(n.length===0)return;let r=e.getOptions(),i=ri(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);oi().set(e,[]),e.emit(`flushLogs`),e.sendEnvelope(i)}function ai(e){return oi().get(e)}function oi(){return a(`clientToLogBufferMap`,()=>new WeakMap)}function si(e,t){let n=t?`auto`:`never`;return[{type:`trace_metric`,item_count:e.length,content_type:`application/vnd.sentry.items.trace-metric+json`},{version:2,...ei()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function ci(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=V(r)),H(a,[si(e,i)])}function li(e,t){let n=t??ui(e)??[];if(n.length===0)return;let r=e.getOptions(),i=ci(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);di().set(e,[]),e.emit(`flushMetrics`),e.sendEnvelope(i)}function ui(e){return di().get(e)}function di(){return a(`clientToMetricBufferMap`,()=>new WeakMap)}function fi(e){return yn({trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||``,start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:!e.status||e.status===`ok`||e.status===`cancelled`?`ok`:`error`,is_segment:!1,attributes:{...e.data},links:e.links})}function pi(e,t){if(e.type!==`transaction`||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||t.getOptions().streamGenAiSpans===!1||rr(t))return;let n=[],r=[];for(let t of e.spans)t.op?.startsWith(`gen_ai.`)?n.push(fi(t)):r.push(t);if(n.length===0)return;e.spans=r;let i=t.getDataCollectionOptions().userInfo?`auto`:`never`;return[{type:`span`,item_count:n.length,content_type:`application/vnd.sentry.items.span.v2+json`},{version:2,...ei()&&{ingest_settings:{infer_ip:i,infer_user_agent:i}},items:n}]}var mi=Symbol.for(`SentryBufferFullError`);function hi(e=100){let t=new Set;function n(){return t.size<e}function r(e){t.delete(e)}function i(e){if(!n())return gr(mi);let i=e();return t.add(i),i.then(()=>r(i),()=>r(i)),i}function a(e){if(!t.size)return W(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;let r=[n,new Promise(t=>Br(setTimeout(()=>t(!1),e)))];return Promise.race(r)}return{get $(){return Array.from(t)},add:i,drain:a}}var gi=60*1e3;function _i(e,t=O()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?gi:r-t}function vi(e,t){return e[t]||e.all||0}function yi(e,t,n=O()){return vi(e,t)>n}function bi(e,{statusCode:t,headers:n},r=O()){let i={...e},a=n?.[`x-sentry-rate-limits`],o=n?.[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=(isNaN(o)?60:o)*1e3;if(!n)i.all=r+s;else for(let e of n.split(`;`))e===`metric_bucket`?(!a||a.split(`;`).includes(`custom`))&&(i[e]=r+s):i[e]=r+s}else o?i.all=r+_i(o,r):t===429&&(i.all=r+60*1e3);return i}function xi(t,n,r=hi(t.bufferSize||64)){let i={},a=e=>r.drain(e);function o(a){let o=[];if(Un(a,(e,n)=>{let r=Zn(n);yi(i,r)?t.recordDroppedEvent(`ratelimit_backoff`,r):o.push(e)}),o.length===0)return Promise.resolve({});let s=H(a[0],o),c=n=>{if(Wn(s,[`client_report`])){e&&m.warn(`Dropping client report. Will not send outcomes (reason: ${n}).`);return}Un(s,(e,r)=>{t.recordDroppedEvent(n,Zn(r))})};return r.add(()=>n({body:Kn(s)}).then(t=>t.statusCode===413?(e&&m.error(`Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.`),c(`send_error`),t):(e&&t.statusCode!==void 0&&(t.statusCode<200||t.statusCode>=300)&&m.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),i=bi(i,t),t),t=>{throw c(`network_error`),e&&m.error(`Encountered error running transport request:`,t),t})).then(e=>e,t=>{if(t===mi)return e&&m.error(`Skipped sending event because buffer is full.`),c(`queue_overflow`),Promise.resolve({});throw t})}return{send:o,flush:a}}function Si(e,t,n){let r=[{type:`client_report`},{timestamp:n||N(),discarded_events:e}];return H(t?{dsn:t}:{},[r])}function Ci(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function wi(e){let{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:a,data:o,op:s}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:s,parent_span_id:n,span_id:r??``,start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??``,origin:a,profile_id:o?.[Kt],exclusive_time:o?.[qt],measurements:e.measurements,is_segment:!0}}function Ti(e){return{type:`transaction`,timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{"sentry.profile_id":e.profile_id},...e.exclusive_time&&{"sentry.exclusive_time":e.exclusive_time}}}},measurements:e.measurements}}var Ei=[`forwarded`,`-ip`,`remote-`,`via`,`-user`];function Di(e){return e===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:Ei},httpHeaders:{request:{deny:Ei},response:{deny:Ei}},httpBodies:[],urlQueryParams:{deny:Ei},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7}}var Oi={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:5};function ki(e){let t=e.dataCollection==null?Di(e.sendDefaultPii):Oi,n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:n.httpHeaders?.request??t.httpHeaders.request,response:n.httpHeaders?.response??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,urlQueryParams:n.urlQueryParams??n.queryParams??t.urlQueryParams,graphQL:{document:n.graphQL?.document??t.graphQL.document,variables:n.graphQL?.variables??t.graphQL.variables},genAI:{inputs:n.genAI?.inputs??t.genAI.inputs,outputs:n.genAI?.outputs??t.genAI.outputs},databaseQueryData:n.databaseQueryData??t.databaseQueryData,stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}var Ai=`Not capturing exception because it's already been captured.`,ji=`Discarded session because of missing or non-string release`,Mi=Symbol.for(`SentryInternalError`),Ni=Symbol.for(`SentryDoNotSendEventError`),Pi=5e3;function Fi(e){return{message:e,[Mi]:!0}}function Ii(e){return{message:e,[Ni]:!0}}function Li(e){return De(e)&&Mi in e}function Ri(e){return De(e)&&Ni in e}function zi(e,t,n,r,i){let a=0,o,s=!1;e.on(n,()=>{a=0,clearTimeout(o),s=!1}),e.on(t,t=>{if(a+=r(t),a>=8e5)i(e);else if(!s){let t=e.getOptions()._flushInterval??Pi;t>0&&(s=!0,o=Br(setTimeout(()=>{i(e)},t)))}}),e.on(`flush`,()=>{i(e)})}var Bi=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=hi(t.transportOptions?.bufferSize??64),this._dataCollection=ki(t),t.dsn?this._dsn=un(t.dsn):e&&m.warn(`No DSN provided, client will not send events.`),this._dsn){let e=Wr(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&zi(this,`afterCaptureLog`,`flushLogs`,qi,ii),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&zi(this,`afterCaptureMetric`,`flushMetrics`,Ki,li)}captureException(t,n,r){let i=A();if(ot(t))return e&&m.log(Ai),i;let a={event_id:i,...n};return this._process(()=>this.eventFromException(t,a).then(e=>this._captureEvent(e,a,r)).then(e=>e),`error`),a.event_id}captureMessage(e,t,n,r){let i={event_id:A(),...n},a=Te(e)?e:String(e),o=S(e),s=o?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>s.then(e=>this._captureEvent(e,i,r)),o?`unknown`:`error`),i.event_id}captureEvent(t,n,r){let i=A();if(n?.originalException&&ot(n.originalException))return e&&m.log(Ai),i;let a={event_id:i,...n},o=t.sdkProcessingMetadata||{},s=o.capturedSpanScope,c=o.capturedSpanIsolationScope,l=Vi(t.type);return this._process(()=>this._captureEvent(t,a,s||r,c),l),a.event_id}captureSession(e){this.sendSession(e),F(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){let t=this._transport;if(this.emit(`flush`),!t)return!0;let n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){let t=await this.flush(e);return this.getOptions().enabled=!1,this.emit(`close`),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith(`Spotlight`)))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){let t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),Xr(this,e,this._integrations),t||Yr(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=pi(e,this),r=nr(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])r=Hn(r,Jn(e));n&&(r=Hn(r,n)),this.sendEnvelope(r).then(t=>this.emit(`afterSendEvent`,e,t))}sendSession(t){let{release:n,environment:r=In}=this._options;if(`aggregates`in t){let i=t.attrs||{};if(!i.release&&!n){e&&m.warn(ji);return}i.release=i.release||n,i.environment=i.environment||r,t.attrs=i}else{if(!t.release&&!n){e&&m.warn(ji);return}t.release=t.release||n,t.environment=t.environment||r}this.emit(`beforeSendSession`,t);let i=tr(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){let i=`${t}:${n}`;e&&m.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:``}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(e,t){let n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(t){if(this.emit(`beforeEnvelope`,t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(t){return e&&m.error(`Error while sending envelope:`,t),{}}return e&&m.error(`Transport disabled`),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=Jr(this,e),Yr(this,e)}_updateSessionFromEvent(e,t){let n=t.level===`fatal`,r=!1,i=t.exception?.values;if(i){r=!0,n=!1;for(let e of i)if(e.mechanism?.handled===!1){n=!0;break}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(F(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r){let i=this.getOptions(),a=this.getIntegrationNames();return!t.integrations&&a.length&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Cr(i,e,t,n,this,r).then(e=>e===null?e:(this.emit(`postprocessEvent`,e,t),e.contexts={trace:{...e.contexts?.trace,...Ut(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:zn(this,n),...e.sdkProcessingMetadata},e))}_captureEvent(t,n={},r=R(),i=z()){return e&&Wi(t)&&m.log(`Captured error event \`${Ci(t)[0]||`<unknown>`}\``),this._processEvent(t,n,r,i).then(e=>e.event_id,t=>{e&&(Ri(t)?m.log(t.message):Li(t)?m.warn(t.message):m.warn(t))})}_processEvent(e,t,n,r){let i=this.getOptions(),{sampleRate:a}=i,o=Gi(e),s=Wi(e),c=`before send for type \`${e.type||`error`}\``,l=a===void 0?void 0:dn(a);if(s&&typeof l==`number`&&Le()>l)return this.recordDroppedEvent(`sample_rate`,`error`),gr(Ii(`Discarding event because it's not included in the random sample (sampling rate = ${a})`));let u=Vi(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(e===null)throw this.recordDroppedEvent(`event_processor`,u),Ii("An event processor returned `null`, will not send event.");return t.data?.__sentry__===!0?e:Hi(Ui(this,i,e,t),c)}).then(i=>{if(i===null){if(this.recordDroppedEvent(`before_send`,u),o){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw Ii(`${c} returned \`null\`, will not send event.`)}let a=n.getSession()||r.getSession();if(s&&a&&this._updateSessionFromEvent(a,i),o){let e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let l=i.transaction_info;return o&&l&&i.transaction!==e.transaction&&(i.transaction_info={...l,source:`custom`}),this.sendEvent(i,t),i}).then(null,e=>{throw Ri(e)||Li(e)?e:(this.captureException(e,{mechanism:{handled:!1,type:`internal`},data:{__sentry__:!0},originalException:e}),Fi(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
8
+ Reason: ${e}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===mi&&this.recordDroppedEvent(`queue_overflow`,t),e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){e&&m.log(`Flushing outcomes...`);let t=this._clearOutcomes();if(t.length===0){e&&m.log(`No outcomes to send`);return}if(!this._dsn){e&&m.log(`No dsn provided, will not send outcomes`);return}e&&m.log(`Sending outcomes:`,t);let n=Si(t,this._options.tunnel&&V(this._dsn));this.sendEnvelope(n)}};function Vi(e){return e===`replay_event`?`replay`:e||`error`}function Hi(e,t){let n=`${t} must return \`null\` or a valid event.`;if(C(e))return e.then(e=>{if(!Ee(e)&&e!==null)throw Fi(n);return e},e=>{throw Fi(`${t} rejected with ${e}`)});if(!Ee(e)&&e!==null)throw Fi(n);return e}function Ui(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,ignoreSpans:o}=t,s=!Vn(t.beforeSendSpan)&&t.beforeSendSpan,c=n;if(Wi(c)&&i)return i(c,r);if(Gi(c)){if(s||o){let t=wi(c);if(o?.length&&An({description:t.description,op:t.op,attributes:t.data},o))return null;if(s){let e=s(t);e?c=mt(n,Ti(e)):Dn()}if(c.spans){let t=[],n=c.spans;for(let e of n){if(o?.length&&An({description:e.description,op:e.op,attributes:e.data},o)){Mn(n,e);continue}if(s){let n=s(e);n?t.push(n):(Dn(),t.push(e))}else t.push(e)}let r=c.spans.length-t.length;r&&e.recordDroppedEvent(`before_send`,`span`,r),c.spans=t}}if(a){if(c.spans){let e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(c,r)}}return c}function Wi(e){return e.type===void 0}function Gi(e){return e.type===`transaction`}function Ki(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Ji(e.attributes)}function qi(e){let t=0;return e.message&&(t+=e.message.length*2),t+Ji(e.attributes)}function Ji(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*Yi(e[0]):S(e)?t+=Yi(e):t+=100}),t}function Yi(e){return typeof e==`string`?e.length*2:typeof e==`number`?8:typeof e==`boolean`?4:0}function Xi(t,n){n.debug===!0&&(e?m.enable():l(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),R().update(n.initialScope);let r=new t(n);return Zi(r),r.init(),r}function Zi(e){R().setClient(e)}function Qi(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function $i(e,t=!0){if(e.startsWith(`data:`)){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:`text/plain`,i=e.includes(`;base64,`),a=e.indexOf(`,`),o=``;if(t&&a!==-1){let t=e.slice(a+1);o=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?`,base64`:``}${o?`,${o}`:``}`}return e}function ea(e){`aggregates`in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:`{{auto}}`}):e.ipAddress===void 0&&(e.ipAddress=`{{auto}}`)}function ta(e,t,r=[t],i=`npm`){let a=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};a.name||(a.name=`sentry.javascript.${t}`,a.packages=r.map(e=>({name:`${i}:@sentry/${e}`,version:n})),a.version=n)}var na=100;function J(e,t){let n=B(),r=z();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=na}=n.getOptions();if(a<=0)return;let o={timestamp:N(),...e},s=i?l(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var ra=`FunctionToString`,ia=new WeakMap,aa=q((()=>({name:ra,setupOnce(){let e=Function.prototype.toString;try{Function.prototype.toString=new Proxy(e,{apply(e,t,n){let r=Me(t),i=t;try{ia.has(B())&&r&&(i=r)}catch{}return Reflect.apply(e,i,n)}})}catch{}},setup(e){ia.set(e,!0)}}))),oa=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],sa=`EventFilters`,ca=q((e={})=>{let t;return{name:sa,setup(n){t=ua(e,n.getOptions())},processEvent(n,r,i){return t||=ua(e,i.getOptions()),da(n,t)?null:n}}}),la=q(((e={})=>({...ca(e),name:`InboundFilters`})));function ua(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:oa],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function da(t,n){if(!t.type){if(fa(t,n.ignoreErrors))return e&&m.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
9
+ Event: ${j(t)}`),!0;if(va(t))return e&&m.warn(`Event dropped due to not having an error message, error type or stacktrace.
10
+ Event: ${j(t)}`),!0;if(ma(t,n.denyUrls))return e&&m.warn(`Event dropped due to being matched by \`denyUrls\` option.
11
+ Event: ${j(t)}.
12
+ Url: ${_a(t)}`),!0;if(!ha(t,n.allowUrls))return e&&m.warn(`Event dropped due to not being matched by \`allowUrls\` option.
13
+ Event: ${j(t)}.
14
+ Url: ${_a(t)}`),!0}else if(t.type===`transaction`&&pa(t,n.ignoreTransactions))return e&&m.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
15
+ Event: ${j(t)}`),!0;return!1}function fa(e,t){return t?.length?Ci(e).some(e=>et(e,t)):!1}function pa(e,t){if(!t?.length)return!1;let n=e.transaction;return n?et(n,t):!1}function ma(e,t){if(!t?.length)return!1;let n=_a(e);return n?et(n,t):!1}function ha(e,t){if(!t?.length)return!0;let n=_a(e);return!n||et(n,t)}function ga(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}function _a(t){try{let e=[...t.exception?.values??[]].reverse().find(e=>e.mechanism?.parent_id===void 0&&e.stacktrace?.frames?.length)?.stacktrace?.frames;return e?ga(e):null}catch{return e&&m.error(`Cannot extract url for event ${j(t)}`),null}}function va(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value):!1}function ya(e,t,n,r,i,a){if(!i.exception?.values||!a||!w(a.originalException,Error))return;let o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=ba(e,t,r,a.originalException,n,i.exception.values,o,0))}function ba(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(w(r[i],Error)){Sa(o,s,r);let a=e(t,r[i]),l=c.length;Ca(a,i,l,s),c=ba(e,t,n,r[i],i,[a,...c],a,l)}return xa(r)&&r.errors.forEach((a,l)=>{if(w(a,Error)){Sa(o,s,r);let u=e(t,a),d=c.length;Ca(u,`errors[${l}]`,d,s),c=ba(e,t,n,a,i,[u,...c],u,d)}}),c}function xa(e){return Array.isArray(e.errors)}function Sa(e,t,n){e.mechanism={handled:!0,type:`auto.core.linked_errors`,...xa(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Ca(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function wa(e){return xe(e)&&`__sentry_fetch_url_host__`in e&&typeof e.__sentry_fetch_url_host__==`string`}function Ta(e){return wa(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var Ea=new Set([]);function Da(e){let t=`console`,n=_(t,e);return v(t,ka),n}var Oa=new Set;function ka(){`console`in t&&o.forEach(function(n){Oa.has(n)||!(n in t.console)||(Oa.add(n),T(t.console,n,function(r){return c[n]=r,function(...r){let i=r[0],a=c[n],o=Ea.size&&typeof i==`string`&&et(i,Ea);o||y(`console`,{args:r,level:n}),(!o||e&&m.isEnabled())&&a?.apply(t.console,r)}}))})}function Aa(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var ja=`Dedupe`,Ma=q((()=>{let t;return{name:ja,processEvent(n){if(n.type)return n;try{if(Na(n,t))return e&&m.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return t=n}}}));function Na(e,t){return t?!!(Pa(e,t)||Fa(e,t)):!1}function Pa(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!La(e,t)||!Ia(e,t))}function Fa(e,t){let n=Ra(t),r=Ra(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!La(e,t)||!Ia(e,t))}function Ia(e,t){let n=fe(e),r=fe(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function La(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join(``)===r.join(``)}catch{return!1}}function Ra(e){return e.exception?.values?.[0]}var za=`ConversationId`,Ba=q((()=>({name:za,setup(e){e.on(`spanStart`,e=>{let t=R().getScopeData(),n=z().getScopeData(),r=t.conversationId||n.conversationId;if(r){let{op:t,data:n,description:i}=_n(e);if(!t?.startsWith(`gen_ai.`)&&!n[`ai.operationId`]&&!i?.startsWith(`ai.`))return;e.setAttribute(Jt,r)}})}})));function Va(e){if(e!==void 0){if(e>=400&&e<500)return`warning`;if(e>=500)return`error`}}var Ha=t;function Ua(){return`history`in Ha&&!!Ha.history}function Wa(){if(!(`fetch`in Ha))return!1;try{return new Headers,new Request(`data:,`),new Response,!0}catch{return!1}}function Ga(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Ka(){if(typeof EdgeRuntime==`string`)return!0;if(!Wa())return!1;if(Ga(Ha.fetch))return!0;let t=!1,n=Ha.document;if(n&&typeof n.createElement==`function`)try{let e=n.createElement(`iframe`);e.hidden=!0,n.head.appendChild(e),e.contentWindow?.fetch&&(t=Ga(e.contentWindow.fetch)),n.head.removeChild(e)}catch(t){e&&m.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,t)}return t}function qa(e,t){let n=`fetch`,r=_(n,e);return v(n,()=>Ja(void 0,t)),r}function Ja(e,n=!1){n&&!Ka()||T(t,`fetch`,function(n){return function(...r){let i=Error(),{method:a,url:o}=Za(r),s={args:r,fetchData:{method:a,url:o},startTimestamp:P()*1e3,virtualError:i,headers:Qa(r)};return e||y(`fetch`,{...s}),n.apply(t,r).then(async t=>(e?e(t):y(`fetch`,{...s,endTimestamp:P()*1e3,response:t}),t),e=>{y(`fetch`,{...s,endTimestamp:P()*1e3,error:e}),xe(e)&&e.stack===void 0&&(e.stack=i.stack,E(e,`framesToPop`,1));let t=B()?.getOptions().enhanceFetchErrorMessages??`always`;if(t!==!1&&e instanceof TypeError&&(e.message===`Failed to fetch`||e.message===`Load failed`||e.message===`NetworkError when attempting to fetch resource.`))try{let n=new URL(s.fetchData.url).host;t===`always`?e.message=`${e.message} (${n})`:E(e,`__sentry_fetch_url_host__`,n)}catch{}throw e})}})}function Ya(e,t){return De(e)&&!!e[t]}function Xa(e){return typeof e==`string`?e:e?Ya(e,`url`)?e.url:e.toString?e.toString():``:``}function Za(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:Xa(t),method:Ya(n,`method`)?String(n.method).toUpperCase():Ae(t)&&Ya(t,`method`)?String(t.method).toUpperCase():`GET`}}let t=e[0];return{url:Xa(t),method:Ya(t,`method`)?String(t.method).toUpperCase():`GET`}}function Qa(e){let[t,n]=e;try{if(typeof n==`object`&&n&&`headers`in n&&n.headers)return new Headers(n.headers);if(Ae(t))return new Headers(t.headers)}catch{}}var $a=t;function eo(){try{return $a.document.location.href}catch{return``}}function to(e,t=5){if(!$a.HTMLElement)return null;let n=e;for(let e=0;e<t;e++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}var Y=t,no=0;function ro(){return no>0}function io(){no++,setTimeout(()=>{no--})}function X(e,n={}){function r(e){return typeof e==`function`}if(!r(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,`__sentry_wrapped__`)){let t=e.__sentry_wrapped__;return typeof t==`function`?t:e}if(Me(e))return e}catch{return e}let i=function(...r){t._sentryWrappedDepth=(t._sentryWrappedDepth||0)+1;try{let t=r.map(e=>X(e,n));return e.apply(this,t)}catch(e){throw io(),Ht(t=>{t.addEventProcessor(e=>(n.mechanism&&(at(e,void 0,void 0),M(e,n.mechanism)),e.extra={...e.extra,arguments:r},e)),Pr(e)}),e}finally{t._sentryWrappedDepth=(t._sentryWrappedDepth||0)-1}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])}catch{}je(i,e),E(e,`__sentry_wrapped__`,i);try{Object.getOwnPropertyDescriptor(i,`name`).configurable&&Object.defineProperty(i,"name",{get(){return e.name}})}catch{}return i}function ao(){let e=eo(),{referrer:t}=Y.document||{},{userAgent:n}=Y.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function oo(e,t){let n=lo(e,t),r={type:ho(t),value:go(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function so(e,t,n,r){let i=B()?.getOptions().normalizeDepth,a=Co(t),o={__serialized__:We(t,i)};if(a)return{exception:{values:[oo(e,a)]},extra:o};let s={exception:{values:[{type:Oe(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:xo(t,{isUnhandledRejection:r})}]},extra:o};if(n){let t=lo(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}function co(e,t){return{exception:{values:[oo(e,t)]}}}function lo(e,t){let n=t.stacktrace||t.stack||``,r=fo(t),i=po(t);try{return e(n,r,i)}catch{}return[]}var uo=/Minified React error #\d+;/i;function fo(e){return e&&uo.test(e.message)?1:0}function po(e){return typeof e.framesToPop==`number`?e.framesToPop:0}function mo(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function ho(e){let t=e?.name;return!t&&mo(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function go(e){let t=e?.message;return mo(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:`wasm exception`:t?t.error&&typeof t.error.message==`string`?Ta(t.error):Ta(e):`No error message`}function _o(e,t,n,r){let i=yo(e,t,n?.syntheticException||void 0,r);return M(i),i.level=`error`,n?.event_id&&(i.event_id=n.event_id),W(i)}function vo(e,t,n=`info`,r,i){let a=bo(e,t,r?.syntheticException||void 0,i);return a.level=n,r?.event_id&&(a.event_id=r.event_id),W(a)}function yo(e,t,n,r,i){let a;if(Se(t)&&t.error)return co(e,t.error);if(Ce(t)||we(t)){let i=t;if(`stack`in t){a=co(e,t);let i=a.exception?.values?.[0];if(r&&n&&i&&!i.stacktrace){let t=lo(e,n);t.length&&(i.stacktrace={frames:t},M(a,{synthetic:!0}))}}else{let t=i.name||(Ce(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=bo(e,o,n,r),at(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return xe(t)?co(e,t):Ee(t)||Oe(t)?(a=so(e,t,n,i),M(a,{synthetic:!0}),a):(a=bo(e,t,n,r),at(a,`${t}`,void 0),M(a,{synthetic:!0}),a)}function bo(e,t,n,r){let i={};if(r&&n){let r=lo(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),M(i,{synthetic:!0})}if(Te(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function xo(e,{isUnhandledRejection:t}){let n=Fe(e),r=t?`promise rejection`:`exception`;return Se(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Oe(e)?`Event \`${So(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function So(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Co(e){return Object.values(e).find(e=>e instanceof Error)}var wo=class extends Bi{constructor(e){let t=To(e);ta(t,`browser`,[`browser`],Y.SENTRY_SDK_SOURCE||Qr()),super(t);let{userInfo:n}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:n?`auto`:`never`,...t._metadata.sdk.settings});let{sendClientReports:r}=this._options;Y.document&&Y.document.addEventListener(`visibilitychange`,()=>{Y.document.visibilityState===`hidden`&&(r&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),n&&this.on(`beforeSendSession`,ea)}eventFromException(e,t){return _o(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return vo(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n,r)}};function To(e){return{release:typeof __SENTRY_RELEASE__==`string`?__SENTRY_RELEASE__:Y.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var Eo=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,Z=t;function Do(e,t,n){Z.document&&Z.addEventListener(e,t,n)}function Oo(e,t,n){Z.document&&Z.removeEventListener(e,t,n)}var ko=e=>{let t=!1;return()=>{t||=(e(),!0)}},Ao=e=>{let t=Z.requestIdleCallback||Z.setTimeout;Z.document?.visibilityState===`hidden`?e():(e=ko(e),Do(`visibilitychange`,e,{once:!0,capture:!0}),Do(`pagehide`,e,{once:!0,capture:!0}),t(()=>{e(),Oo(`visibilitychange`,e,{capture:!0}),Oo(`pagehide`,e,{capture:!0})}))},jo=80,Q={};try{typeof Node<`u`&&(Q.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,`parentNode`).get),typeof Element<`u`&&(Q.tagName=Object.getOwnPropertyDescriptor(Element.prototype,`tagName`).get,Q.id=Object.getOwnPropertyDescriptor(Element.prototype,`id`).get,Q.className=Object.getOwnPropertyDescriptor(Element.prototype,`className`).get,Q.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<`u`&&(Q.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,`dataset`).get)}catch{}function $(e,t,n){let r=Q[t];if(r)try{return r.call(e,n)}catch{}let i=e[t];return typeof i==`function`?i.call(e,n):i}function Mo(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||jo;for(;n&&i++<5&&(o=No(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=$(n,`parentNode`);return r.reverse().join(` > `)}catch{return`<unknown>`}}function No(e,t){let n=[],r=$(e,`tagName`);if(!r)return``;if(typeof HTMLElement<`u`&&e instanceof HTMLElement){let t=$(e,`dataset`);if(t){if(t.sentryComponent)return t.sentryComponent;if(t.sentryElement)return t.sentryElement}}n.push(r.toLowerCase());let i=t?.length?t.filter(t=>$(e,`getAttribute`,t)).map(t=>[t,$(e,`getAttribute`,t)]):null;if(i?.length)i.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{let t=$(e,`id`);t&&n.push(`#${t}`);let r=$(e,`className`);if(r&&x(r)){let e=r.split(/\s+/);for(let t of e)n.push(`.${t}`)}}for(let t of[`aria-label`,`type`,`name`,`title`,`alt`]){let r=$(e,`getAttribute`,t);r&&n.push(`[${t}="${r}"]`)}return n.join(``)}var Po=1e3,Fo,Io,Lo;function Ro(e){_(`dom`,e),v(`dom`,zo)}function zo(){if(!Z.document)return;let e=y.bind(null,`dom`),t=Ho(e,!0);Z.document.addEventListener(`click`,t,!1),Z.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=Z[t]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(T(n,`addEventListener`,function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=Ho(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),T(n,`removeEventListener`,function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),Object.keys(n).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function Bo(e){if(e.type!==Io)return!1;try{if(!e.target||e.target._sentryId!==Lo)return!1}catch{}return!0}function Vo(e,t){return e===`keypress`?!t?.tagName||!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!1}function Ho(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=Uo(n);if(Vo(n.type,r))return;E(n,`_sentryCaptured`,!0),r&&!r._sentryId&&E(r,`_sentryId`,A());let i=n.type===`keypress`?`input`:n.type;Bo(n)||(e({event:n,name:i,global:t}),Io=n.type,Lo=r?r._sentryId:void 0),clearTimeout(Fo),Fo=Z.setTimeout(()=>{Lo=void 0,Io=void 0},Po)}}function Uo(e){try{return e.target}catch{return null}}var Wo;function Go(e){let t=`history`;_(t,e),v(t,Ko)}function Ko(){if(Z.addEventListener(`popstate`,()=>{let e=Z.location.href,t=Wo;Wo=e,t!==e&&y(`history`,{from:t,to:e})}),!Ua())return;function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=Wo,i=qo(String(n));if(Wo=i,r===i)return e.apply(this,t);y(`history`,{from:r,to:i})}return e.apply(this,t)}}T(Z.history,`pushState`,e),T(Z.history,`replaceState`,e)}function qo(e){try{return new URL(e,Z.location.origin).toString()}catch{return e}}var Jo={};function Yo(e){let t=Jo[e];if(t)return t;let n=Z[e];if(Ga(n))return Jo[e]=n.bind(Z);let r=Z.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){Eo&&m.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(Jo[e]=n.bind(Z))}function Xo(e){Jo[e]=void 0}var Zo=`__sentry_xhr_v3__`;function Qo(e){_(`xhr`,e),v(`xhr`,$o)}function $o(){if(!Z.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=P()*1e3,a=x(n[0])?n[0].toUpperCase():void 0,o=es(n[1]);if(!a||!o)return e.apply(t,n);t[Zo]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[Zo];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}y(`xhr`,{endTimestamp:P()*1e3,startTimestamp:i,xhr:t,virtualError:r}),t.removeEventListener(`readystatechange`,s)}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return s(),e.apply(t,n)}}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[Zo];return a&&x(r)&&x(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[Zo];return r?(n[0]!==void 0&&(r.body=n[0]),y(`xhr`,{startTimestamp:P()*1e3,xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function es(e){if(x(e))return e;try{return e.toString()}catch{}}function ts(e){if(typeof Element>`u`)return!1;try{return e instanceof Element}catch{return!1}}var ns=40;function rs(e,t=Yo(`fetch`)){let n=0,r=0;async function i(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`strict-origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,o);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get(`X-Sentry-Rate-Limits`),"retry-after":n.headers.get(`Retry-After`)}}}catch(e){throw Xo(`fetch`),e}finally{n-=a,r--}}return xi(e,i,hi(e.bufferSize||ns))}var is=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,as=30,os=50;function ss(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?`?`:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var cs=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,ls=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,us=/\((\S*)(?::(\d+))(?::(\d+))\)/,ds=/at (.+?) ?\(data:(.+?),/,fs=[as,e=>{let t=e.match(ds);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=cs.exec(e);if(n){let[,e,t,r]=n;return ss(e,`?`,+t,+r)}let r=ls.exec(e);if(r){if(r[2]?.indexOf(`eval`)===0){let e=us.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=gs(r[1]||`?`,r[2]);return ss(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],ps=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ms=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,hs=se(fs,[os,e=>{let t=ps.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=ms.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||`?`;return[n,e]=gs(n,e),ss(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),gs=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?`?`:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},_s=1024,vs=`Breadcrumbs`,ys=q(((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:vs,setup(e){t.console&&Da(Ss(e)),t.dom&&Ro(xs(e,t.dom)),t.xhr&&Qo(Cs(e)),t.fetch&&qa(ws(e)),t.history&&Go(Ts(e)),t.sentry&&e.on(`beforeSendEvent`,bs(e))}}}));function bs(e){return function(t){B()===e&&J({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:j(t)},{event:t})}}function xs(e,t){return function(n){if(B()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>_s&&(is&&m.warn(`\`dom.maxStringLength\` cannot exceed ${_s}, but a value of ${o} was configured. Sentry will use ${_s} instead.`),o=_s),typeof a==`string`&&(a=[a]);try{let e=n.event,t=Es(e)?e.target:e;r=Mo(t,{keyAttrs:a,maxStringLength:o}),i=to(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),J(s,{event:n.event,name:n.name,global:n.global})}}function Ss(e){return function(t){if(B()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:Aa(t.level),message:Qe(t.args,` `)};if(t.level===`assert`)if(t.args[0]===!1)n.message=`Assertion failed: ${Qe(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1);else return;J(n,{input:t.args,level:t.level})}}function Cs(e){return function(t){if(B()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[Zo];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:`xhr`,data:l,type:`http`,level:Va(s)};e.emit(`beforeOutgoingRequestBreadcrumb`,d,u),J(d,u)}}function ws(e){return function(t){if(B()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`))if(t.error){let i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:`fetch`,data:t.fetchData,level:`error`,type:`http`};e.emit(`beforeOutgoingRequestBreadcrumb`,a,i),J(a,i)}else{let i=t.response,a={...t.fetchData,status_code:i?.status},o={input:t.args,response:i,startTimestamp:n,endTimestamp:r},s={category:`fetch`,data:a,type:`http`,level:Va(a.status_code)};e.emit(`beforeOutgoingRequestBreadcrumb`,s,o),J(s,o)}}}function Ts(e){return function(t){if(B()!==e)return;let n=t.from,r=t.to,i=Qi(Y.location.href),a=n?Qi(n):void 0,o=Qi(r);a?.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),J({category:`navigation`,data:{from:n,to:r}})}}function Es(e){return!!e&&!!e.target}var Ds=`EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload`.split(`,`),Os=`BrowserApiErrors`,ks=q(((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:Os,setupOnce(){t.setTimeout&&T(Y,`setTimeout`,As),t.setInterval&&T(Y,`setInterval`,As),t.requestAnimationFrame&&T(Y,`requestAnimationFrame`,js),t.XMLHttpRequest&&`XMLHttpRequest`in Y&&T(XMLHttpRequest.prototype,`send`,Ms);let e=t.eventTarget;e&&(Array.isArray(e)?e:Ds).forEach(e=>Ns(e,t))}}}));function As(e){return function(...t){let n=t[0];return t[0]=X(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${h(e)}`}}),e.apply(this,t)}}function js(e){return function(t){return e.apply(this,[X(t,{mechanism:{data:{handler:h(e)},handled:!1,type:`auto.browser.browserapierrors.requestAnimationFrame`}})])}}function Ms(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&T(n,e,function(t){let n={mechanism:{data:{handler:h(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=Me(t);return r&&(n.mechanism.data.handler=h(r)),X(t,n)})}),e.apply(this,t)}}function Ns(e,t){let n=Y[e]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(T(n,`addEventListener`,function(n){return function(r,i,a){try{Ps(i)&&(i.handleEvent=X(i.handleEvent,{mechanism:{data:{handler:h(i),target:e},handled:!1,type:`auto.browser.browserapierrors.handleEvent`}}))}catch{}return t.unregisterOriginalCallbacks&&Fs(this,r,i),n.apply(this,[r,X(i,{mechanism:{data:{handler:h(i),target:e},handled:!1,type:`auto.browser.browserapierrors.addEventListener`}}),a])}}),T(n,`removeEventListener`,function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,`__sentry_wrapped__`)){let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}}catch{}return e.call(this,t,n,r)}}))}function Ps(e){return typeof e.handleEvent==`function`}function Fs(e,t,n){e&&typeof e==`object`&&`removeEventListener`in e&&typeof e.removeEventListener==`function`&&e.removeEventListener(t,n)}var Is=q((e={})=>{let t=e.lifecycle??`route`;return{name:`BrowserSession`,setupOnce(){if(Y.document===void 0){is&&m.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Ir({ignoreDuration:!0});let e=!1;Ao(()=>{e||=(zr(),!0)});let n=z(),r=n.getUser();n.addScopeListener(t=>{let n=t.getUser();(r?.id!==n?.id||r?.ip_address!==n?.ip_address)&&(r=n,e&&zr())}),t===`route`&&Go(({from:t,to:n})=>{t!==n&&(Ir({ignoreDuration:!0}),zr(),e=!0)})}}}),Ls=`CultureContext`,Rs=q((()=>({name:Ls,preprocessEvent(e){let t=zs();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){let t=zs();t&&fr(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})));function zs(){try{let e=Y.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var Bs=`GlobalHandlers`,Vs=q(((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:Bs,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(Hs(e),qs(`onerror`)),t.onunhandledrejection&&(Us(e),qs(`onunhandledrejection`))}}}));function Hs(e){he(t=>{let{stackParser:n,attachStacktrace:r}=Js();if(B()!==e||ro())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=Ks(yo(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,Fr(l,{originalException:c,mechanism:{handled:!1,type:`auto.browser.global_handlers.onerror`}})})}function Us(e){ve(t=>{let{stackParser:n,attachStacktrace:r}=Js();if(B()!==e||ro())return;let i=Ws(t),a=S(i)?Gs(i):yo(n,i,void 0,r,!0);a.level=`error`,Fr(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.global_handlers.onunhandledrejection`}})})}function Ws(e){if(S(e))return e;try{if(`reason`in e)return e.reason;if(`detail`in e&&`reason`in e.detail)return e.detail.reason}catch{}return e}function Gs(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Ks(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:Ys(t)??eo(),function:`?`,in_app:!0}),e}function qs(e){is&&m.log(`Global Handler attached: ${e}`)}function Js(){return B()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Ys(e){if(!(!x(e)||e.length===0))return e.startsWith(`data:`)?`<${$i(e,!1)}>`:e}var Xs=q(()=>({name:`HttpContext`,preprocessEvent(e){if(!Y.navigator&&!Y.location&&!Y.document)return;let t=ao(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){let t=e.attributes?.[Wt];if(!Y.navigator&&!Y.location&&!Y.document)return;let n=ao();fr(e,{"url.full":t===`http.client`?void 0:n.url,"http.request.header.user_agent":n.headers[`User-Agent`],"http.request.header.referer":n.headers.Referer})}})),Zs=`cause`,Qs=5,$s=`LinkedErrors`,ec=q(((e={})=>{let t=e.limit||Qs,n=e.key||Zs;return{name:$s,preprocessEvent(e,r,i){ya(oo,i.getOptions().stackParser,n,t,e,r)}}})),tc=/^HTML(\w*)Element$/;function nc(e){if(typeof window<`u`&&e===window)return`[Window]`;if(typeof document<`u`&&e===document)return`[Document]`;if(ts(e)){let t=rc(e);if(tc.test(t))return`[HTMLElement: ${Mo(e)}]`}}function rc(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function ic(){return ac()?(is&&l(()=>{console.error(`[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/`)}),!0):!1}function ac(){if(Y.window===void 0)return!1;let e=Y;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let t=eo();return!(Y===Y.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}function oc(e){return[la(),aa(),Ba(),ks(),ys(),Vs(),ec(),Ma(),Xs(),Rs(),Is()]}function sc(e={}){let t=!e.skipBrowserExtensionCheck&&ic(),n=e.defaultIntegrations==null?oc():e.defaultIntegrations,r={...e,enabled:!t&&e.enabled,stackParser:ce(e.stackParser||hs),integrations:qr({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||rs};return Ue(nc),Xi(wo,r)}function cc(e){var t=``;return t+=`<div class="g-config-breadcrumb-container"></div><p class="g-sentry-description">To track errors in Sentry, enter your Sentry project DSNs here.</p><form id="g-sentry-server-form" role="form"><div class="form-group"><label class="control-label" for="g-sentry-server-dsn">Sentry Server DSN</label><input class="input-sm form-control" id="g-sentry-server-dsn" type="text" placeholder="Tracking ID"/></div><p class="g-validation-failed-message" id="g-sentry-server-error-message"></p><input class="btn btn-sm btn-primary" type="submit" value="Save"/></form><form id="g-sentry-client-form" role="form"><div class="form-group"><label class="control-label" for="g-sentry-client-dsn">Sentry Client DSN</label><input class="input-sm form-control" id="g-sentry-client-dsn" type="text" placeholder="Tracking ID"/></div><p class="g-validation-failed-message" id="g-sentry-client-error-message"></p><input class="btn btn-sm btn-primary" type="submit" value="Save"/></form>`,t}var lc=girder.views.widgets.PluginConfigBreadcrumbWidget,uc=girder.views.View,{restRequest:dc}=girder.rest,fc=girder.events,pc=uc.extend({events:{"submit #g-sentry-server-form":function(e){e.preventDefault(),this.$(`#g-sentry-server-error-message`).empty(),this._saveSettings([{key:`sentry.backend_dsn`,value:this.$(`#g-sentry-server-dsn`).val().trim()}],{errorTarget:`#g-sentry-server-error-message`})},"submit #g-sentry-client-form":function(e){e.preventDefault(),this.$(`#g-sentry-client-error-message`).empty(),this._saveSettings([{key:`sentry.frontend_dsn`,value:this.$(`#g-sentry-client-dsn`).val().trim()}],{errorTarget:`#g-sentry-client-error-message`})}},initialize:function(){dc({method:`GET`,url:`system/setting`,data:{list:JSON.stringify([`sentry.backend_dsn`,`sentry.frontend_dsn`])}}).done(e=>{this.render(),this.$(`#g-sentry-server-dsn`).val(e[`sentry.backend_dsn`]),this.$(`#g-sentry-client-dsn`).val(e[`sentry.frontend_dsn`])})},render:function(){return this.$el.html(cc()),this.breadcrumb||=new lc({pluginName:`Sentry`,el:this.$(`.g-config-breadcrumb-container`),parentView:this}).render(),this},_saveSettings:function(e,t){dc({method:`PUT`,url:`system/setting`,data:{list:JSON.stringify(e)},error:null}).done(()=>{fc.trigger(`g:alert`,{icon:`ok`,text:`Settings saved.`,type:`success`,timeout:4e3})}).fail(e=>{this.$(t.errorTarget).text(e.responseJSON.message)})}}),mc=girder.router,hc=girder.events,{exposePluginConfig:gc}=girder.utilities.PluginUtils;gc(`sentry`,`plugins/sentry/config`),mc.route(`plugins/sentry/config`,`SentryConfig`,function(){hc.trigger(`g:navigateTo`,pc)});var _c=girder.events,{restRequest:vc}=girder.rest;_c.on(`g:appload.after`,function(){vc({method:`GET`,url:`sentry/dsn`}).done(e=>{e.sentry_dsn&&sc({dsn:e.sentry_dsn})})})});
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: girder-sentry
3
- Version: 5.0.13.dev27
3
+ Version: 5.0.14.dev2
4
4
  Summary: Allow the automatic tracking of issues using Sentry.
5
5
  Maintainer: Kitware, Inc.
6
6
  Maintainer-email: kitware@kitware.com
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "5.0.13",
3
+ "distance": 2,
4
+ "node": "ge61074f4c7eb6966e404834cf6e7cd9f8d8e2379",
5
+ "dirty": false,
6
+ "branch": "master",
7
+ "node_date": "2026-07-22"
8
+ }
@@ -1,15 +0,0 @@
1
- (function(e){typeof define==`function`&&define.amd?define([],e):e()})(function(){var e=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,t=globalThis,n=`10.65.0`;function r(){return i(t),t}function i(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||`10.65.0`,t[n]=t[`10.65.0`]||{}}function a(e,r,i=t){let a=i.__SENTRY__=i.__SENTRY__||{},o=a[n]=a[`10.65.0`]||{};return o[e]||(o[e]=r())}var o=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],s=`Sentry Logger `,c={};function l(e){if(!(`console`in t))return e();let n=t.console,r={},i=Object.keys(c);i.forEach(e=>{let t=c[e];r[e]=n[e],n[e]=t});try{return e()}finally{i.forEach(e=>{n[e]=r[e]})}}function u(){re().enabled=!0}function d(){re().enabled=!1}function f(){return re().enabled}function p(...e){ne(`log`,...e)}function ee(...e){ne(`warn`,...e)}function te(...e){ne(`error`,...e)}function ne(n,...r){e&&f()&&l(()=>{t.console[n](`${s}[${n}]:`,...r)})}function re(){return e?a(`loggerSettings`,()=>({enabled:!1})):{enabled:!1}}var m={enable:u,disable:d,isEnabled:f,log:p,warn:ee,error:te},ie=50,ae=/\(error: (.*)\)/,oe=/captureMessage|captureException/;function se(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let i=[],a=e.split(`
2
- `);for(let e=n;e<a.length;e++){let n=a[e];n.length>1024&&(n=n.slice(0,1024));let o=ae.test(n)?n.replace(ae,`$1`):n;if(!o.includes(`Error: `)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=ie+r)break}}return le(i.slice(r))}}function ce(e){return Array.isArray(e)?se(...e):e}function le(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(ue(t).function||``)&&t.pop(),t.reverse(),oe.test(ue(t).function||``)&&(t.pop(),oe.test(ue(t).function||``)&&t.pop()),t.slice(0,ie).map(e=>({...e,filename:e.filename||ue(t).filename,function:e.function||`?`}))}function ue(e){return e[e.length-1]||{}}var de=`<anonymous>`;function h(e){try{return!e||typeof e!=`function`?de:e.name||de}catch{return de}}function fe(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}var pe={},me={};function g(e,t){return pe[e]=pe[e]||[],pe[e].push(t),()=>{let n=pe[e];if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}function _(t,n){if(!me[t]){me[t]=!0;try{n()}catch(n){e&&m.error(`Error while instrumenting ${t}`,n)}}}function v(t,n){let r=t&&pe[t];if(r)for(let i of r)try{i(n)}catch(n){e&&m.error(`Error while triggering instrumentation handler.
3
- Type: ${t}
4
- Name: ${h(i)}
5
- Error:`,n)}}var he=null;function ge(e){let t=`error`;g(t,e),_(t,_e)}function _e(){he=t.onerror,t.onerror=function(e,t,n,r,i){return v(`error`,{column:r,error:i,line:n,msg:e,url:t}),he?he.apply(this,arguments):!1},t.onerror.__SENTRY_INSTRUMENTED__=!0}var ve=null;function ye(e){let t=`unhandledrejection`;g(t,e),_(t,be)}function be(){ve=t.onunhandledrejection,t.onunhandledrejection=function(e){return v(`unhandledrejection`,e),!ve||ve.apply(this,arguments)},t.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var xe=Object.prototype.toString;function Se(e){switch(xe.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return S(e,Error)}}function y(e,t){return xe.call(e)===`[object ${t}]`}function Ce(e){return y(e,`ErrorEvent`)}function we(e){return y(e,`DOMError`)}function Te(e){return y(e,`DOMException`)}function b(e){return y(e,`String`)}function Ee(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function x(e){return e===null||Ee(e)||typeof e!=`object`&&typeof e!=`function`}function De(e){return y(e,`Object`)}function Oe(e){return typeof e==`object`&&!!e}function ke(e){return typeof Event<`u`&&S(e,Event)}function Ae(e){return y(e,`RegExp`)}function je(e){return!!(e?.then&&typeof e.then==`function`)}function S(e,t){try{return e instanceof t}catch{return!1}}function Me(e){return typeof Request<`u`&&S(e,Request)}function C(t,n,r){if(!(n in t))return;let i=t[n];if(typeof i!=`function`)return;let a=r(i);typeof a==`function`&&Ne(a,i);try{t[n]=a}catch{e&&m.log(`Failed to replace method "${n}" in object`,t)}}function w(t,n,r){try{Object.defineProperty(t,n,{value:r,writable:!0,configurable:!0})}catch{e&&m.log(`Failed to add non-enumerable property "${String(n)}" to object`,t)}}function Ne(e,t){try{e.prototype=t.prototype=t.prototype||{},w(e,`__sentry_original__`,t)}catch{}}function Pe(e){return e.__sentry_original__}function Fe(e){if(Se(e))return{message:e.message,name:e.name,stack:e.stack,...Ie(e)};if(ke(e)){let{type:t,target:n,currentTarget:r,detail:i}=e;return{type:t,target:n,currentTarget:r,...i?{detail:i}:{},...Ie(e)}}return e}function Ie(e){return Oe(e)?Object.fromEntries(Object.entries(e)):{}}function Le(e){let t=Object.keys(Fe(e));return t.sort(),t[0]?t.join(`, `):`[object has no keys]`}var T;function Re(e){if(T!==void 0)return T?T(e):e();let n=Symbol.for(`__SENTRY_SAFE_RANDOM_ID_WRAPPER__`),r=t;return n in r&&typeof r[n]==`function`?(T=r[n],T(e)):(T=null,e())}function ze(){return Re(()=>Math.random())}function E(){return Re(()=>Date.now())}var Be=Symbol.for(`sentry.skipNormalization`),Ve=Symbol.for(`sentry.overrideNormalizationDepth`);function He(e){return!!e[Be]}function Ue(e){let t=e[Ve];return typeof t==`number`?t:void 0}var We;function Ge(e){We=e}function D(e,t=100,n=1/0){try{return qe(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Ke(e,t=3,n=100*1024){let r=D(e,t);return Ze(r)>n?Ke(e,t-1,n):r}function qe(e,t,n=1/0,r=1/0,i=Qe()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=Je(e,t);if(!s.startsWith(`[object `))return s;if(He(t))return t;let c=Ue(t),l=c===void 0?n:c;if(l===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let u=t;if(u&&typeof u.toJSON==`function`)try{return qe(``,u.toJSON(),l-1,r,i)}catch{}let d=Array.isArray(t)?[]:{},f=0,p=Fe(t);for(let e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(f>=r){d[e]=`[MaxProperties ~]`;break}let t=p[e];d[e]=qe(e,t,l-1,r,i),f++}return o(t),d}function Je(e,t){try{if(We){let e=We(t);if(e)return e}return typeof global<`u`&&t===global?`[Global]`:typeof t==`number`&&!Number.isFinite(t)?`[${t}]`:typeof t==`function`?`[Function: ${h(t)}]`:typeof t==`symbol`?`[${String(t)}]`:typeof t==`bigint`?`[BigInt: ${String(t)}]`:`[object ${Ye(t)}]`}catch(e){return`**non-serializable** (${e})`}}function Ye(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function Xe(e){return~-encodeURI(e).split(/%..|./).length}function Ze(e){return Xe(JSON.stringify(e))}function Qe(){let e=new WeakSet;function t(t){return e.has(t)?!0:(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}function $e(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function et(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];x(r)?n.push(String(r)):r instanceof Error?n.push(r.message?`${r.name}: ${r.message}`:r.name):n.push(Je(void 0,r))}return n.join(t)}function O(e,t,n=!1){return b(e)?Ae(t)?t.test(e):b(t)?n?e===t:e.includes(t):typeof t==`function`&&t(e):!1}function tt(e,t=[],n=!1){for(let r of t)if(O(e,r,n))return!0;return!1}function nt(){let e=t;return e.crypto||e.msCrypto}var rt;function it(){return ze()*16}function k(e=nt()){try{if(e?.randomUUID)return Re(()=>e.randomUUID()).replace(/-/g,``)}catch{}return rt||=`10000000100040008000100000000000`,rt.replace(/[018]/g,e=>(e^(it()&15)>>e/4).toString(16))}function at(e){return e.exception?.values?.[0]}function A(e){let{message:t,event_id:n}=e;if(t)return t;let r=at(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function ot(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function j(e,t){let n=at(e);if(!n)return;let r={type:`generic`,handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&`data`in t){let e={...i?.data,...t.data};n.mechanism.data=e}}function st(e){if(ct(e))return!0;try{w(e,`__sentry_captured__`,!0)}catch{}return!1}function ct(e){try{return e.__sentry_captured__}catch{}}var lt=1e3;function ut(){return E()/lt}function dt(){let{performance:e}=t;if(!e?.now||!e.timeOrigin)return ut;let n=e.timeOrigin;return()=>(n+Re(()=>e.now()))/lt}var ft;function M(){return(ft??=dt())()}function pt(e){let t=M(),n={sid:k(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>ht(n)};return e&&N(n,e),n}function N(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||M(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:k()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function mt(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),N(e,n)}function ht(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function P(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=P(r[e],t[e],n-1));return r}function gt(){return k()}function _t(){return k().substring(16)}function vt(e){try{let n=t.WeakRef;if(typeof n==`function`)return new n(e)}catch{}return e}function yt(e){if(e){if(typeof e==`object`&&`deref`in e&&typeof e.deref==`function`)try{return e.deref()}catch{return}return e}}var bt=`_sentrySpan`;function xt(e,t){t?w(e,bt,vt(t)):delete e[bt]}function St(e){return yt(e[bt])}var Ct=100,F=class t{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:gt(),sampleRand:ze()}}clone(){let e=new t;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._attributes={...this._attributes},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,e._conversationId=this._conversationId,xt(e,St(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&N(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let n=typeof e==`function`?e(this):e,{tags:r,attributes:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u,conversationId:d}=(n instanceof t?n.getScopeData():De(n)?e:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,xt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:gt(),sampleRand:ze()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:Ct;if(n<=0)return this;let r={timestamp:ut(),...e,message:e.message?$e(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent(`buffer_overflow`,`log_item`)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:St(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=P(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n?.event_id||k();if(!this._client)return e&&m.warn(`No client configured on scope - will not capture exception!`),r;let i=Error(`Sentry syntheticException`);return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){let i=r?.event_id||k();if(!this._client)return e&&m.warn(`No client configured on scope - will not capture message!`),i;let a=r?.syntheticException??Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:a,...r,event_id:i},this),i}captureEvent(t,n){let r=t.event_id||n?.event_id||k();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(e&&m.warn(`No client configured on scope - will not capture event!`),r)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}};function wt(){return a(`defaultCurrentScope`,()=>new F)}function Tt(){return a(`defaultIsolationScope`,()=>new F)}var Et=e=>e instanceof Promise&&!e[Dt],Dt=Symbol(`chained PromiseLike`),Ot=(e,t,n)=>{let r=e.then(e=>(t(e),e),e=>{throw n(e),e});return Et(r)&&Et(e)?r:kt(e,r)},kt=(e,t)=>{if(!t)return e;let n=!1;for(let r in e){if(r in t)continue;n=!0;let i=e[r];typeof i==`function`?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Dt]:!0}),t},At=class{constructor(e,t){let n;n=e||new F;let r;r=t||new F,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return je(n)?Ot(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function I(){let e=i(r());return e.stack=e.stack||new At(wt(),Tt())}function jt(e){return I().withScope(e)}function Mt(e,t){let n=I();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Nt(e){return I().withScope(()=>e(I().getIsolationScope()))}function Pt(){return{withIsolationScope:Nt,withScope:jt,withSetScope:Mt,withSetIsolationScope:(e,t)=>Nt(t),getCurrentScope:()=>I().getScope(),getIsolationScope:()=>I().getIsolationScope()}}function Ft(e){let t=i(e);return t.acs?t.acs:Pt()}function It(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.keys(e).includes(`value`)}function Lt(e,t){let{value:n,unit:r}=It(e)?e:{value:e,unit:void 0},i=zt(n),a=r&&typeof r==`string`?{unit:r}:{};if(i)return{...i,...a};if(!t||t===`skip-undefined`&&n===void 0)return;let o=``;try{o=JSON.stringify(n)??``}catch{}return{value:o,type:`string`,...a}}function Rt(e,t=!1){let n={};for(let[r,i]of Object.entries(e??{})){let e=Lt(i,t);e&&(n[r]=e)}return n}function zt(e){if(Array.isArray(e))return{value:e,type:`array`};let t=typeof e==`string`?`string`:typeof e==`boolean`?`boolean`:typeof e==`number`&&!Number.isNaN(e)?Number.isInteger(e)?`integer`:`double`:null;if(t)return{value:e,type:t}}var Bt;function Vt(){return Bt?.()}function L(){return Ft(r()).getCurrentScope()}function R(){return Ft(r()).getIsolationScope()}function Ht(){return a(`globalScope`,()=>new F)}function Ut(...e){let t=Ft(r());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function z(){return L().getClient()}function Wt(e){let t=Vt();if(t)return{trace_id:t.traceId,span_id:t.spanId};let{traceId:n,parentSpanId:r,propagationSpanId:i}=e.getPropagationContext(),a={trace_id:n,span_id:i||_t()};return r&&(a.parent_span_id=r),a}var Gt=`sentry.op`,Kt=`sentry.origin`,qt=`sentry.profile_id`,Jt=`sentry.exclusive_time`,Yt=`gen_ai.conversation.id`,Xt=`_sentryScope`,Zt=`_sentryIsolationScope`;function Qt(e){let t=e;return{scope:t[Xt],isolationScope:yt(t[Zt])}}function $t(e){let t=en(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(`sentry-`)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function en(e){if(!(!e||!b(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=tn(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):tn(e)}function tn(e){return e.split(`,`).map(e=>{let t=e.indexOf(`=`);return t===-1?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}var nn=/^o(\d+)\./,rn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function an(e){return e===`http`||e===`https`}function B(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function on(e){let t=rn.exec(e);if(!t){l(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,u=s,d=u.split(`/`);if(d.length>1&&(c=d.slice(0,-1).join(`/`),u=d.pop()),u){let e=u.match(/^\d+/);e&&(u=e[0])}return sn({host:a,pass:i,path:c,projectId:u,port:o,protocol:n,publicKey:r})}function sn(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function cn(t){if(!e)return!0;let{port:n,projectId:r,protocol:i}=t;return[`protocol`,`publicKey`,`host`,`projectId`].find(e=>t[e]?!1:(m.error(`Invalid Sentry Dsn: ${e} missing`),!0))?!1:r.match(/^\d+$/)?an(i)?n&&isNaN(parseInt(n,10))?(m.error(`Invalid Sentry Dsn: Invalid port ${n}`),!1):!0:(m.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),!1):(m.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function ln(e){return e.match(nn)?.[1]}function un(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=ln(n)),r}function dn(e){let t=typeof e==`string`?on(e):sn(e);if(!(!t||!cn(t)))return t}function fn(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}var pn=!1;function mn(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:vn(e).parent_span_id,a=Qt(e).scope;return{parent_span_id:i,span_id:r?a?.getPropagationContext().propagationSpanId||_t():t,trace_id:n}}function hn(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:n===1,attributes:i,...r}))}function gn(e){return typeof e==`number`?_n(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?_n(e.getTime()):M()}function _n(e){return e>9999999999?e/1e3:e}function vn(e){if(Sn(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(xn(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:yn(e),start_timestamp:gn(i),timestamp:gn(o)||void 0,status:wn(s),op:r[Gt],origin:r[Kt],links:hn(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function yn(e){return`parentSpanId`in e?e.parentSpanId:`parentSpanContext`in e?e.parentSpanContext?.spanId:void 0}function bn(e){return{...e,attributes:Rt(e.attributes),links:e.links?.map(e=>({...e,attributes:Rt(e.attributes)}))}}function xn(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Sn(e){return typeof e.getSpanJSON==`function`}function Cn(e){let{traceFlags:t}=e.spanContext();return t===1}function wn(e){if(!(!e||e.code===0))return e.code===1?`ok`:e.message||`internal_error`}var Tn=`_sentryRootSpan`,En=Dn;function Dn(e){return e[Tn]||e}function On(){pn||=(l(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),!0)}function kn(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=e||z()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function An(e){m.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function jn(t,n){if(!n?.length)return!1;for(let r of n){if(Pn(r)){if(t.description&&O(t.description,r))return e&&An(t),!0;continue}let n=!!r.attributes&&Object.keys(r.attributes).length>0;if(!r.name&&!r.op&&!n)continue;let i=!r.name||t.description&&O(t.description,r.name),a=!r.op||t.op&&O(t.op,r.op),o=!r.attributes||Object.entries(r.attributes).every(([e,n])=>Mn(t.attributes?.[e],n));if(i&&a&&o)return e&&An(t),!0}return!1}function Mn(e,t){return typeof e==`string`&&(typeof t==`string`||t instanceof RegExp)?O(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function Nn(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function Pn(e){return typeof e==`string`||e instanceof RegExp}var Fn=Symbol.for(`sentry.nonRecordingSpan`);function In(e){return!!e&&e[Fn]===!0}var Ln=`production`,Rn=`_frozenDsc`;function zn(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||`production`,release:n.release,public_key:r,trace_id:e,org_id:un(t)};return t.emit(`createDsc`,i),i}function Bn(e,t){let n=t.getPropagationContext();return n.dsc||zn(n.traceId,e)}function Vn(e){let t=z();if(!t)return{};let n=En(e),r=vn(n),i=r.data,a=n.spanContext().traceState,o=a?.get(`sentry.sample_rate`)??i[`sentry.sample_rate`]??i[`sentry.previous_trace_sample_rate`];function s(e){return(typeof o==`number`||typeof o==`string`)&&(e.sample_rate=`${o}`),e}let c=n[Rn];if(c)return s(c);if(In(n)&&!kn(t.getOptions())){let e=Qt(n).scope;if(e)return s({...Bn(t,e)})}let l=a?.get(`sentry.dsc`),u=l&&$t(l);if(u)return s(u);let d=zn(e.spanContext().traceId,t),f=i[`sentry.source`]??i[`sentry.span.source`],p=r.description;return f!==`url`&&p&&(d.transaction=p),kn()&&(d.sampled=String(Cn(n)),d.sample_rand=a?.get(`sentry.sample_rand`)??Qt(n).scope?.getPropagationContext().sampleRand.toString()),s(d),t.emit(`createDsc`,d,n),d}function Hn(e){return!!e&&typeof e==`function`&&`_streamed`in e&&!!e._streamed}function V(e,t=[]){return[e,t]}function Un(e,t){let[n,r]=e;return[n,[...r,t]]}function Wn(e,t){let n=e[1];for(let e of n){let n=e[0].type;if(t(e,n))return!0}return!1}function Gn(e,t){return Wn(e,(e,n)=>t.includes(n))}function Kn(e){let n=i(t);return n.encodePolyfill?n.encodePolyfill(e):new TextEncoder().encode(e)}function qn(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[Kn(r),e]:r.push(typeof e==`string`?Kn(e):e)}for(let e of n){let[t,n]=e;if(i(`
6
- ${JSON.stringify(t)}
7
- `),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(D(n))}i(e)}}return typeof r==`string`?r:Jn(r)}function Jn(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function Yn(e){let t=typeof e.data==`string`?Kn(e.data):e.data;return[{type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Xn={sessions:`session`,event:`error`,client_report:`internal`,user_report:`default`,profile_chunk:`profile`,replay_event:`replay`,replay_recording:`replay`,check_in:`monitor`,raw_security:`security`,log:`log_item`,trace_metric:`metric`};function Zn(e){return e in Xn}function Qn(e){return Zn(e)?Xn[e]:e}function $n(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function er(e,t,n,r){let i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(E()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:B(r)},...i&&{trace:i}}}function tr(e,t){if(!t)return e;let n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function nr(e,t,n,r){let i=$n(n);return V({sent_at:new Date(E()).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:B(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}function rr(e,t,n,r){let i=$n(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;tr(e,n?.sdk);let o=er(e,i,r,t);return delete e.sdkProcessingMetadata,V(o,[[{type:a},e]])}function ir(e){return e.getOptions().traceLifecycle===`stream`}function ar(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;cr(e,t),r&&dr(e,r),fr(e,n),lr(e,i),ur(e,a)}function or(e,t){let{extra:n,tags:r,attributes:i,user:a,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:ee,span:te}=t;H(e,`extra`,n),H(e,`tags`,r),H(e,`attributes`,i),H(e,`user`,a),H(e,`contexts`,o),e.sdkProcessingMetadata=P(e.sdkProcessingMetadata,c,2),s&&(e.level=s),ee&&(e.transactionName=ee),te&&(e.span=te),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function H(e,t,n){e[t]=P(e[t],n,1)}function sr(e,t){let n=Ht().getScopeData();return e&&or(n,e.getScopeData()),t&&or(n,t.getScopeData()),n}function cr(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(a).length&&(e.contexts={...a,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)}function lr(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function ur(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function dr(e,t){e.contexts={trace:mn(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Vn(t),...e.sdkProcessingMetadata};let n=vn(En(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}function fr(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function pr(e,t){let n=e.attributes??={};Object.entries(t).forEach(([e,t])=>{t!=null&&!(e in n)&&(n[e]=t)})}var mr=0,hr=1,gr=2;function U(e){return new vr(t=>{t(e)})}function _r(e){return new vr((t,n)=>{n(e)})}var vr=class e{constructor(e){this._state=mr,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{if(i){n(r);return}e(r)})})}_executeHandlers(){if(this._state===mr)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===hr&&e[1](this._value),this._state===gr&&e[2](this._value),!0)})}_runExecutor(e){let t=(e,t)=>{if(this._state===mr){if(je(t)){t.then(n,r);return}this._state=e,this._value=t,this._executeHandlers()}},n=e=>{t(hr,e)},r=e=>{t(gr,e)};try{e(n,r)}catch(e){r(e)}}};function yr(e,t,n,r=0){try{let i=br(t,n,e,r);return je(i)?i:U(i)}catch(e){return _r(e)}}function br(t,n,r,i){let a=r[i];if(!t||!a)return t;let o=a({...t},n);return e&&o===null&&m.log(`Event processor "${a.id||`?`}" dropped event`),je(o)?o.then(e=>br(e,n,r,i+1)):br(o,n,r,i+1)}var W,xr,Sr,G;function Cr(e){let n=t._sentryDebugIds,r=t._debugIds;if(!n&&!r)return{};let i=n?Object.keys(n):[],a=r?Object.keys(r):[];if(G&&i.length===xr&&a.length===Sr)return G;xr=i.length,Sr=a.length,G={},W||={};let o=(t,n)=>{for(let r of t){let t=n[r],i=W?.[r];if(i&&G&&t)G[i[0]]=t,W&&(W[r]=[i[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let i=n[e]?.filename;if(i&&G&&W){G[i]=t,W[r]=[i,t];break}}}}};return n&&o(i,n),r&&o(a,r),G}function wr(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||k(),timestamp:t.timestamp||ut()},l=n.integrations||e.integrations.map(e=>e.name);Tr(c,e),Or(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&Er(c,e.stackParser);let u=Ar(r,n.captureContext);n.mechanism&&j(c,n.mechanism);let d=i?i.getEventProcessors():[],f=sr(a,u),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),ar(c,f);let ee=[...d,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?U(c):yr(ee,c,n)).then(e=>(e&&Dr(e),typeof o==`number`&&o>0?kr(e,o,s):e))}function Tr(e,t){let{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||`production`,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);let o=e.request;o?.url&&a&&(o.url=$e(o.url,a)),a&&e.exception?.values?.forEach(e=>{e.value&&=$e(e.value,a)})}function Er(e,t){let n=Cr(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}function Dr(e){let t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})})}function Or(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function kr(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:D(e.data,t,n)}}))},...e.user&&{user:D(e.user,t,n)},...e.contexts&&{contexts:D(e.contexts,t,n)},...e.extra&&{extra:D(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=D(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:D(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=D(e.contexts.flags,3,n)),r}function Ar(e,t){if(!t)return e;let n=e?e.clone():new F;return n.update(t),n}function jr(e){if(e)return Mr(e)||Pr(e)?{captureContext:e}:e}function Mr(e){return e instanceof F||typeof e==`function`}var Nr=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`propagationContext`];function Pr(e){return Object.keys(e).some(e=>Nr.includes(e))}function Fr(e,t){return L().captureException(e,jr(t))}function Ir(e,t){return L().captureEvent(e,t)}function Lr(e){let n=R(),{user:r}=sr(n,L()),{userAgent:i}=t.navigator||{},a=pt({user:r,...i&&{userAgent:i},...e}),o=n.getSession();return o?.status===`ok`&&N(o,{status:`exited`}),Rr(),n.setSession(a),a}function Rr(){let e=R(),t=L().getSession()||e.getSession();t&&mt(t),zr(),e.setSession()}function zr(){let e=R(),t=z(),n=e.getSession();n&&t&&t.captureSession(n)}function Br(e=!1){if(e){Rr();return}zr()}function Vr(e){return typeof e==`object`&&typeof e.unref==`function`&&e.unref(),e}function Hr(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function Ur(e){return`${Hr(e)}${e.projectId}/envelope/`}function Wr(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Gr(e,t,n){return t||`${Ur(e)}?${Wr(e,n)}`}var Kr=[];function qr(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}function Jr(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n==`function`){let e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return qr(r)}function Yr(e,t){let n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&Zr(e,t,n)}),n}function Xr(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Zr(t,n,r){if(r[n.name]){e&&m.log(`Integration skipped because it was already installed: ${n.name}`);return}if(r[n.name]=n,!Kr.includes(n.name)&&typeof n.setupOnce==`function`&&(n.setupOnce(),Kr.push(n.name)),n.setup&&typeof n.setup==`function`&&n.setup(t),typeof n.preprocessEvent==`function`){let e=n.preprocessEvent.bind(n);t.on(`preprocessEvent`,(n,r)=>e(n,r,t))}if(typeof n.processEvent==`function`){let e=n.processEvent.bind(n),r=Object.assign((n,r)=>e(n,r,t),{id:n.name});t.addEventProcessor(r)}[`processSpan`,`processSegmentSpan`].forEach(e=>{let r=n[e];typeof r==`function`&&t.on(e,e=>r.call(n,e,t))}),e&&m.log(`Integration installed: ${n.name}`)}function K(e){return e}function Qr(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function $r(){return`npm`}function ei(){return!Qr()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function ti(){return typeof window<`u`&&(!ei()||ni())}function ni(){return t.process?.type===`renderer`}function ri(e,t){let n=t?`auto`:`never`;return[{type:`log`,item_count:e.length,content_type:`application/vnd.sentry.items.log+json`},{version:2,...ti()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function ii(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=B(r)),V(a,[ri(e,i)])}function ai(e,t){let n=t??oi(e)??[];if(n.length===0)return;let r=e.getOptions(),i=ii(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);si().set(e,[]),e.emit(`flushLogs`),e.sendEnvelope(i)}function oi(e){return si().get(e)}function si(){return a(`clientToLogBufferMap`,()=>new WeakMap)}function ci(e,t){let n=t?`auto`:`never`;return[{type:`trace_metric`,item_count:e.length,content_type:`application/vnd.sentry.items.trace-metric+json`},{version:2,...ti()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function li(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=B(r)),V(a,[ci(e,i)])}function ui(e,t){let n=t??di(e)??[];if(n.length===0)return;let r=e.getOptions(),i=li(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);fi().set(e,[]),e.emit(`flushMetrics`),e.sendEnvelope(i)}function di(e){return fi().get(e)}function fi(){return a(`clientToMetricBufferMap`,()=>new WeakMap)}function pi(e){return bn({trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||``,start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:!e.status||e.status===`ok`||e.status===`cancelled`?`ok`:`error`,is_segment:!1,attributes:{...e.data},links:e.links})}function mi(e,t){if(e.type!==`transaction`||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||t.getOptions().streamGenAiSpans===!1||ir(t))return;let n=[],r=[];for(let t of e.spans)t.op?.startsWith(`gen_ai.`)?n.push(pi(t)):r.push(t);if(n.length===0)return;e.spans=r;let i=t.getDataCollectionOptions().userInfo?`auto`:`never`;return[{type:`span`,item_count:n.length,content_type:`application/vnd.sentry.items.span.v2+json`},{version:2,...ti()&&{ingest_settings:{infer_ip:i,infer_user_agent:i}},items:n}]}var hi=Symbol.for(`SentryBufferFullError`);function gi(e=100){let t=new Set;function n(){return t.size<e}function r(e){t.delete(e)}function i(e){if(!n())return _r(hi);let i=e();return t.add(i),i.then(()=>r(i),()=>r(i)),i}function a(e){if(!t.size)return U(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;let r=[n,new Promise(t=>Vr(setTimeout(()=>t(!1),e)))];return Promise.race(r)}return{get $(){return Array.from(t)},add:i,drain:a}}var _i=60*1e3;function vi(e,t=E()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?_i:r-t}function yi(e,t){return e[t]||e.all||0}function bi(e,t,n=E()){return yi(e,t)>n}function xi(e,{statusCode:t,headers:n},r=E()){let i={...e},a=n?.[`x-sentry-rate-limits`],o=n?.[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=(isNaN(o)?60:o)*1e3;if(!n)i.all=r+s;else for(let e of n.split(`;`))e===`metric_bucket`?(!a||a.split(`;`).includes(`custom`))&&(i[e]=r+s):i[e]=r+s}else o?i.all=r+vi(o,r):t===429&&(i.all=r+60*1e3);return i}function Si(t,n,r=gi(t.bufferSize||64)){let i={},a=e=>r.drain(e);function o(a){let o=[];if(Wn(a,(e,n)=>{let r=Qn(n);bi(i,r)?t.recordDroppedEvent(`ratelimit_backoff`,r):o.push(e)}),o.length===0)return Promise.resolve({});let s=V(a[0],o),c=n=>{if(Gn(s,[`client_report`])){e&&m.warn(`Dropping client report. Will not send outcomes (reason: ${n}).`);return}Wn(s,(e,r)=>{t.recordDroppedEvent(n,Qn(r))})};return r.add(()=>n({body:qn(s)}).then(t=>t.statusCode===413?(e&&m.error(`Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.`),c(`send_error`),t):(e&&t.statusCode!==void 0&&(t.statusCode<200||t.statusCode>=300)&&m.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),i=xi(i,t),t),t=>{throw c(`network_error`),e&&m.error(`Encountered error running transport request:`,t),t})).then(e=>e,t=>{if(t===hi)return e&&m.error(`Skipped sending event because buffer is full.`),c(`queue_overflow`),Promise.resolve({});throw t})}return{send:o,flush:a}}function Ci(e,t,n){let r=[{type:`client_report`},{timestamp:n||ut(),discarded_events:e}];return V(t?{dsn:t}:{},[r])}function wi(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Ti(e){let{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:a,data:o,op:s}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:s,parent_span_id:n,span_id:r??``,start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??``,origin:a,profile_id:o?.[qt],exclusive_time:o?.[Jt],measurements:e.measurements,is_segment:!0}}function Ei(e){return{type:`transaction`,timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{"sentry.profile_id":e.profile_id},...e.exclusive_time&&{"sentry.exclusive_time":e.exclusive_time}}}},measurements:e.measurements}}var Di=[`forwarded`,`-ip`,`remote-`,`via`,`-user`];function Oi(e){return e===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:Di},httpHeaders:{request:{deny:Di},response:{deny:Di}},httpBodies:[],queryParams:{deny:Di},genAI:{inputs:!1,outputs:!1},stackFrameVariables:!0,frameContextLines:7}}var ki={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5};function Ai(e){let t=e.dataCollection==null?Oi(e.sendDefaultPii):ki,n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:n.httpHeaders?.request??t.httpHeaders.request,response:n.httpHeaders?.response??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,queryParams:n.queryParams??t.queryParams,genAI:{inputs:n.genAI?.inputs??t.genAI.inputs,outputs:n.genAI?.outputs??t.genAI.outputs},stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}var ji=`Not capturing exception because it's already been captured.`,Mi=`Discarded session because of missing or non-string release`,Ni=Symbol.for(`SentryInternalError`),Pi=Symbol.for(`SentryDoNotSendEventError`),Fi=5e3;function Ii(e){return{message:e,[Ni]:!0}}function Li(e){return{message:e,[Pi]:!0}}function Ri(e){return Oe(e)&&Ni in e}function zi(e){return Oe(e)&&Pi in e}function Bi(e,t,n,r,i){let a=0,o,s=!1;e.on(n,()=>{a=0,clearTimeout(o),s=!1}),e.on(t,t=>{if(a+=r(t),a>=8e5)i(e);else if(!s){let t=e.getOptions()._flushInterval??Fi;t>0&&(s=!0,o=Vr(setTimeout(()=>{i(e)},t)))}}),e.on(`flush`,()=>{i(e)})}var Vi=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=gi(t.transportOptions?.bufferSize??64),this._dataCollection=Ai(t),t.dsn?this._dsn=dn(t.dsn):e&&m.warn(`No DSN provided, client will not send events.`),this._dsn){let e=Gr(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&Bi(this,`afterCaptureLog`,`flushLogs`,Ji,ai),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Bi(this,`afterCaptureMetric`,`flushMetrics`,qi,ui)}captureException(t,n,r){let i=k();if(st(t))return e&&m.log(ji),i;let a={event_id:i,...n};return this._process(()=>this.eventFromException(t,a).then(e=>this._captureEvent(e,a,r)).then(e=>e),`error`),a.event_id}captureMessage(e,t,n,r){let i={event_id:k(),...n},a=Ee(e)?e:String(e),o=x(e),s=o?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>s.then(e=>this._captureEvent(e,i,r)),o?`unknown`:`error`),i.event_id}captureEvent(t,n,r){let i=k();if(n?.originalException&&st(n.originalException))return e&&m.log(ji),i;let a={event_id:i,...n},o=t.sdkProcessingMetadata||{},s=o.capturedSpanScope,c=o.capturedSpanIsolationScope,l=Hi(t.type);return this._process(()=>this._captureEvent(t,a,s||r,c),l),a.event_id}captureSession(e){this.sendSession(e),N(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){let t=this._transport;if(this.emit(`flush`),!t)return!0;let n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){ai(this);let t=await this.flush(e);return this.getOptions().enabled=!1,this.emit(`close`),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith(`Spotlight`)))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){let t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),Zr(this,e,this._integrations),t||Xr(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=mi(e,this),r=rr(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])r=Un(r,Yn(e));n&&(r=Un(r,n)),this.sendEnvelope(r).then(t=>this.emit(`afterSendEvent`,e,t))}sendSession(t){let{release:n,environment:r=Ln}=this._options;if(`aggregates`in t){let i=t.attrs||{};if(!i.release&&!n){e&&m.warn(Mi);return}i.release=i.release||n,i.environment=i.environment||r,t.attrs=i}else{if(!t.release&&!n){e&&m.warn(Mi);return}t.release=t.release||n,t.environment=t.environment||r}this.emit(`beforeSendSession`,t);let i=nr(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){let i=`${t}:${n}`;e&&m.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:``}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(e,t){let n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(t){if(this.emit(`beforeEnvelope`,t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(t){return e&&m.error(`Error while sending envelope:`,t),{}}return e&&m.error(`Transport disabled`),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=Yr(this,e),Xr(this,e)}_updateSessionFromEvent(e,t){let n=t.level===`fatal`,r=!1,i=t.exception?.values;if(i){r=!0,n=!1;for(let e of i)if(e.mechanism?.handled===!1){n=!0;break}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(N(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r){let i=this.getOptions(),a=this.getIntegrationNames();return!t.integrations&&a.length&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),wr(i,e,t,n,this,r).then(e=>e===null?e:(this.emit(`postprocessEvent`,e,t),e.contexts={trace:{...e.contexts?.trace,...Wt(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Bn(this,n),...e.sdkProcessingMetadata},e))}_captureEvent(t,n={},r=L(),i=R()){return e&&Gi(t)&&m.log(`Captured error event \`${wi(t)[0]||`<unknown>`}\``),this._processEvent(t,n,r,i).then(e=>e.event_id,t=>{e&&(zi(t)?m.log(t.message):Ri(t)?m.warn(t.message):m.warn(t))})}_processEvent(e,t,n,r){let i=this.getOptions(),{sampleRate:a}=i,o=Ki(e),s=Gi(e),c=`before send for type \`${e.type||`error`}\``,l=a===void 0?void 0:fn(a);if(s&&typeof l==`number`&&ze()>l)return this.recordDroppedEvent(`sample_rate`,`error`),_r(Li(`Discarding event because it's not included in the random sample (sampling rate = ${a})`));let u=Hi(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(e===null)throw this.recordDroppedEvent(`event_processor`,u),Li("An event processor returned `null`, will not send event.");return t.data?.__sentry__===!0?e:Ui(Wi(this,i,e,t),c)}).then(i=>{if(i===null){if(this.recordDroppedEvent(`before_send`,u),o){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw Li(`${c} returned \`null\`, will not send event.`)}let a=n.getSession()||r.getSession();if(s&&a&&this._updateSessionFromEvent(a,i),o){let e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let l=i.transaction_info;return o&&l&&i.transaction!==e.transaction&&(i.transaction_info={...l,source:`custom`}),this.sendEvent(i,t),i}).then(null,e=>{throw zi(e)||Ri(e)?e:(this.captureException(e,{mechanism:{handled:!1,type:`internal`},data:{__sentry__:!0},originalException:e}),Ii(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
8
- Reason: ${e}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===hi&&this.recordDroppedEvent(`queue_overflow`,t),e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){e&&m.log(`Flushing outcomes...`);let t=this._clearOutcomes();if(t.length===0){e&&m.log(`No outcomes to send`);return}if(!this._dsn){e&&m.log(`No dsn provided, will not send outcomes`);return}e&&m.log(`Sending outcomes:`,t);let n=Ci(t,this._options.tunnel&&B(this._dsn));this.sendEnvelope(n)}};function Hi(e){return e===`replay_event`?`replay`:e||`error`}function Ui(e,t){let n=`${t} must return \`null\` or a valid event.`;if(je(e))return e.then(e=>{if(!De(e)&&e!==null)throw Ii(n);return e},e=>{throw Ii(`${t} rejected with ${e}`)});if(!De(e)&&e!==null)throw Ii(n);return e}function Wi(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,ignoreSpans:o}=t,s=!Hn(t.beforeSendSpan)&&t.beforeSendSpan,c=n;if(Gi(c)&&i)return i(c,r);if(Ki(c)){if(s||o){let t=Ti(c);if(o?.length&&jn({description:t.description,op:t.op,attributes:t.data},o))return null;if(s){let e=s(t);e?c=P(n,Ei(e)):On()}if(c.spans){let t=[],n=c.spans;for(let e of n){if(o?.length&&jn({description:e.description,op:e.op,attributes:e.data},o)){Nn(n,e);continue}if(s){let n=s(e);n?t.push(n):(On(),t.push(e))}else t.push(e)}let r=c.spans.length-t.length;r&&e.recordDroppedEvent(`before_send`,`span`,r),c.spans=t}}if(a){if(c.spans){let e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(c,r)}}return c}function Gi(e){return e.type===void 0}function Ki(e){return e.type===`transaction`}function qi(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Yi(e.attributes)}function Ji(e){let t=0;return e.message&&(t+=e.message.length*2),t+Yi(e.attributes)}function Yi(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*Xi(e[0]):x(e)?t+=Xi(e):t+=100}),t}function Xi(e){return typeof e==`string`?e.length*2:typeof e==`number`?8:typeof e==`boolean`?4:0}function Zi(t,n){n.debug===!0&&(e?m.enable():l(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),L().update(n.initialScope);let r=new t(n);return Qi(r),r.init(),r}function Qi(e){L().setClient(e)}function $i(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function ea(e,t=!0){if(e.startsWith(`data:`)){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:`text/plain`,i=e.includes(`;base64,`),a=e.indexOf(`,`),o=``;if(t&&a!==-1){let t=e.slice(a+1);o=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?`,base64`:``}${o?`,${o}`:``}`}return e}function ta(e){`aggregates`in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:`{{auto}}`}):e.ipAddress===void 0&&(e.ipAddress=`{{auto}}`)}function na(e,t,r=[t],i=`npm`){let a=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};a.name||(a.name=`sentry.javascript.${t}`,a.packages=r.map(e=>({name:`${i}:@sentry/${e}`,version:n})),a.version=n)}var ra=100;function q(e,t){let n=z(),r=R();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=ra}=n.getOptions();if(a<=0)return;let o={timestamp:ut(),...e},s=i?l(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var ia,aa=`FunctionToString`,oa=new WeakMap,sa=K((()=>({name:aa,setupOnce(){ia=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Pe(this),n=oa.has(z())&&t!==void 0?t:this;return ia.apply(n,e)}}catch{}},setup(e){oa.set(e,!0)}}))),ca=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],la=`EventFilters`,ua=K((e={})=>{let t;return{name:la,setup(n){t=fa(e,n.getOptions())},processEvent(n,r,i){return t||=fa(e,i.getOptions()),pa(n,t)?null:n}}}),da=K(((e={})=>({...ua(e),name:`InboundFilters`})));function fa(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:ca],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function pa(t,n){if(!t.type){if(ma(t,n.ignoreErrors))return e&&m.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
9
- Event: ${A(t)}`),!0;if(ba(t))return e&&m.warn(`Event dropped due to not having an error message, error type or stacktrace.
10
- Event: ${A(t)}`),!0;if(ga(t,n.denyUrls))return e&&m.warn(`Event dropped due to being matched by \`denyUrls\` option.
11
- Event: ${A(t)}.
12
- Url: ${ya(t)}`),!0;if(!_a(t,n.allowUrls))return e&&m.warn(`Event dropped due to not being matched by \`allowUrls\` option.
13
- Event: ${A(t)}.
14
- Url: ${ya(t)}`),!0}else if(t.type===`transaction`&&ha(t,n.ignoreTransactions))return e&&m.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
15
- Event: ${A(t)}`),!0;return!1}function ma(e,t){return t?.length?wi(e).some(e=>tt(e,t)):!1}function ha(e,t){if(!t?.length)return!1;let n=e.transaction;return n?tt(n,t):!1}function ga(e,t){if(!t?.length)return!1;let n=ya(e);return n?tt(n,t):!1}function _a(e,t){if(!t?.length)return!0;let n=ya(e);return!n||tt(n,t)}function va(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}function ya(t){try{let e=[...t.exception?.values??[]].reverse().find(e=>e.mechanism?.parent_id===void 0&&e.stacktrace?.frames?.length)?.stacktrace?.frames;return e?va(e):null}catch{return e&&m.error(`Cannot extract url for event ${A(t)}`),null}}function ba(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value):!1}function xa(e,t,n,r,i,a){if(!i.exception?.values||!a||!S(a.originalException,Error))return;let o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=Sa(e,t,r,a.originalException,n,i.exception.values,o,0))}function Sa(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(S(r[i],Error)){wa(o,s,r);let a=e(t,r[i]),l=c.length;Ta(a,i,l,s),c=Sa(e,t,n,r[i],i,[a,...c],a,l)}return Ca(r)&&r.errors.forEach((a,l)=>{if(S(a,Error)){wa(o,s,r);let u=e(t,a),d=c.length;Ta(u,`errors[${l}]`,d,s),c=Sa(e,t,n,a,i,[u,...c],u,d)}}),c}function Ca(e){return Array.isArray(e.errors)}function wa(e,t,n){e.mechanism={handled:!0,type:`auto.core.linked_errors`,...Ca(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Ta(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function Ea(e){return Se(e)&&`__sentry_fetch_url_host__`in e&&typeof e.__sentry_fetch_url_host__==`string`}function Da(e){return Ea(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var Oa=new Set([]);function ka(e){let t=`console`,n=g(t,e);return _(t,Aa),n}function Aa(){`console`in t&&o.forEach(function(n){n in t.console&&C(t.console,n,function(r){return c[n]=r,function(...r){let i=r[0],a=c[n],o=Oa.size&&typeof i==`string`&&tt(i,Oa);o||v(`console`,{args:r,level:n}),(!o||e&&m.isEnabled())&&a?.apply(t.console,r)}})})}function ja(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var Ma=`Dedupe`,Na=K((()=>{let t;return{name:Ma,processEvent(n){if(n.type)return n;try{if(Pa(n,t))return e&&m.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return t=n}}}));function Pa(e,t){return t?!!(Fa(e,t)||Ia(e,t)):!1}function Fa(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Ra(e,t)||!La(e,t))}function Ia(e,t){let n=za(t),r=za(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Ra(e,t)||!La(e,t))}function La(e,t){let n=fe(e),r=fe(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function Ra(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join(``)===r.join(``)}catch{return!1}}function za(e){return e.exception?.values?.[0]}var Ba=`ConversationId`,Va=K((()=>({name:Ba,setup(e){e.on(`spanStart`,e=>{let t=L().getScopeData(),n=R().getScopeData(),r=t.conversationId||n.conversationId;if(r){let{op:t,data:n,description:i}=vn(e);if(!t?.startsWith(`gen_ai.`)&&!n[`ai.operationId`]&&!i?.startsWith(`ai.`))return;e.setAttribute(Yt,r)}})}})));function Ha(e){if(e!==void 0){if(e>=400&&e<500)return`warning`;if(e>=500)return`error`}}var Ua=t;function Wa(){return`history`in Ua&&!!Ua.history}function Ga(){if(!(`fetch`in Ua))return!1;try{return new Headers,new Request(`data:,`),new Response,!0}catch{return!1}}function Ka(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function qa(){if(typeof EdgeRuntime==`string`)return!0;if(!Ga())return!1;if(Ka(Ua.fetch))return!0;let t=!1,n=Ua.document;if(n&&typeof n.createElement==`function`)try{let e=n.createElement(`iframe`);e.hidden=!0,n.head.appendChild(e),e.contentWindow?.fetch&&(t=Ka(e.contentWindow.fetch)),n.head.removeChild(e)}catch(t){e&&m.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,t)}return t}function Ja(e,t){let n=`fetch`,r=g(n,e);return _(n,()=>Ya(void 0,t)),r}function Ya(e,n=!1){n&&!qa()||C(t,`fetch`,function(n){return function(...r){let i=Error(),{method:a,url:o}=Qa(r),s={args:r,fetchData:{method:a,url:o},startTimestamp:M()*1e3,virtualError:i,headers:$a(r)};return e||v(`fetch`,{...s}),n.apply(t,r).then(async t=>(e?e(t):v(`fetch`,{...s,endTimestamp:M()*1e3,response:t}),t),e=>{v(`fetch`,{...s,endTimestamp:M()*1e3,error:e}),Se(e)&&e.stack===void 0&&(e.stack=i.stack,w(e,`framesToPop`,1));let t=z()?.getOptions().enhanceFetchErrorMessages??`always`;if(t!==!1&&e instanceof TypeError&&(e.message===`Failed to fetch`||e.message===`Load failed`||e.message===`NetworkError when attempting to fetch resource.`))try{let n=new URL(s.fetchData.url).host;t===`always`?e.message=`${e.message} (${n})`:w(e,`__sentry_fetch_url_host__`,n)}catch{}throw e})}})}function Xa(e,t){return Oe(e)&&!!e[t]}function Za(e){return typeof e==`string`?e:e?Xa(e,`url`)?e.url:e.toString?e.toString():``:``}function Qa(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:Za(t),method:Xa(n,`method`)?String(n.method).toUpperCase():Me(t)&&Xa(t,`method`)?String(t.method).toUpperCase():`GET`}}let t=e[0];return{url:Za(t),method:Xa(t,`method`)?String(t.method).toUpperCase():`GET`}}function $a(e){let[t,n]=e;try{if(typeof n==`object`&&n&&`headers`in n&&n.headers)return new Headers(n.headers);if(Me(t))return new Headers(t.headers)}catch{}}var eo=t;function to(){try{return eo.document.location.href}catch{return``}}function no(e,t=5){if(!eo.HTMLElement)return null;let n=e;for(let e=0;e<t;e++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}var J=t,ro=0;function io(){return ro>0}function ao(){ro++,setTimeout(()=>{ro--})}function Y(e,n={}){function r(e){return typeof e==`function`}if(!r(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,`__sentry_wrapped__`)){let t=e.__sentry_wrapped__;return typeof t==`function`?t:e}if(Pe(e))return e}catch{return e}let i=function(...r){t._sentryWrappedDepth=(t._sentryWrappedDepth||0)+1;try{let t=r.map(e=>Y(e,n));return e.apply(this,t)}catch(e){throw ao(),Ut(t=>{t.addEventProcessor(e=>(n.mechanism&&(ot(e,void 0,void 0),j(e,n.mechanism)),e.extra={...e.extra,arguments:r},e)),Fr(e)}),e}finally{t._sentryWrappedDepth=(t._sentryWrappedDepth||0)-1}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])}catch{}Ne(i,e),w(e,`__sentry_wrapped__`,i);try{Object.getOwnPropertyDescriptor(i,`name`).configurable&&Object.defineProperty(i,"name",{get(){return e.name}})}catch{}return i}function oo(){let e=to(),{referrer:t}=J.document||{},{userAgent:n}=J.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function so(e,t){let n=uo(e,t),r={type:go(t),value:_o(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function co(e,t,n,r){let i=z()?.getOptions().normalizeDepth,a=wo(t),o={__serialized__:Ke(t,i)};if(a)return{exception:{values:[so(e,a)]},extra:o};let s={exception:{values:[{type:ke(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:So(t,{isUnhandledRejection:r})}]},extra:o};if(n){let t=uo(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}function lo(e,t){return{exception:{values:[so(e,t)]}}}function uo(e,t){let n=t.stacktrace||t.stack||``,r=po(t),i=mo(t);try{return e(n,r,i)}catch{}return[]}var fo=/Minified React error #\d+;/i;function po(e){return e&&fo.test(e.message)?1:0}function mo(e){return typeof e.framesToPop==`number`?e.framesToPop:0}function ho(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function go(e){let t=e?.name;return!t&&ho(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function _o(e){let t=e?.message;return ho(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:`wasm exception`:t?t.error&&typeof t.error.message==`string`?Da(t.error):Da(e):`No error message`}function vo(e,t,n,r){let i=bo(e,t,n?.syntheticException||void 0,r);return j(i),i.level=`error`,n?.event_id&&(i.event_id=n.event_id),U(i)}function yo(e,t,n=`info`,r,i){let a=xo(e,t,r?.syntheticException||void 0,i);return a.level=n,r?.event_id&&(a.event_id=r.event_id),U(a)}function bo(e,t,n,r,i){let a;if(Ce(t)&&t.error)return lo(e,t.error);if(we(t)||Te(t)){let i=t;if(`stack`in t){a=lo(e,t);let i=a.exception?.values?.[0];if(r&&n&&i&&!i.stacktrace){let t=uo(e,n);t.length&&(i.stacktrace={frames:t},j(a,{synthetic:!0}))}}else{let t=i.name||(we(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=xo(e,o,n,r),ot(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return Se(t)?lo(e,t):De(t)||ke(t)?(a=co(e,t,n,i),j(a,{synthetic:!0}),a):(a=xo(e,t,n,r),ot(a,`${t}`,void 0),j(a,{synthetic:!0}),a)}function xo(e,t,n,r){let i={};if(r&&n){let r=uo(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),j(i,{synthetic:!0})}if(Ee(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function So(e,{isUnhandledRejection:t}){let n=Le(e),r=t?`promise rejection`:`exception`;return Ce(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:ke(e)?`Event \`${Co(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Co(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function wo(e){return Object.values(e).find(e=>e instanceof Error)}var To=class extends Vi{constructor(e){let t=Eo(e);na(t,`browser`,[`browser`],J.SENTRY_SDK_SOURCE||$r()),super(t);let{userInfo:n}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:n?`auto`:`never`,...t._metadata.sdk.settings});let{sendClientReports:r}=this._options;J.document&&J.document.addEventListener(`visibilitychange`,()=>{J.document.visibilityState===`hidden`&&(r&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),n&&this.on(`beforeSendSession`,ta)}eventFromException(e,t){return vo(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return yo(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n,r)}};function Eo(e){return{release:typeof __SENTRY_RELEASE__==`string`?__SENTRY_RELEASE__:J.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var Do=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,X=t;function Oo(e,t,n){X.document&&X.addEventListener(e,t,n)}function ko(e,t,n){X.document&&X.removeEventListener(e,t,n)}var Ao=e=>{let t=!1;return()=>{t||=(e(),!0)}},jo=e=>{let t=X.requestIdleCallback||X.setTimeout;X.document?.visibilityState===`hidden`?e():(e=Ao(e),Oo(`visibilitychange`,e,{once:!0,capture:!0}),Oo(`pagehide`,e,{once:!0,capture:!0}),t(()=>{e(),ko(`visibilitychange`,e,{capture:!0}),ko(`pagehide`,e,{capture:!0})}))},Mo=80,Z={};try{typeof Node<`u`&&(Z.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,`parentNode`).get),typeof Element<`u`&&(Z.tagName=Object.getOwnPropertyDescriptor(Element.prototype,`tagName`).get,Z.id=Object.getOwnPropertyDescriptor(Element.prototype,`id`).get,Z.className=Object.getOwnPropertyDescriptor(Element.prototype,`className`).get,Z.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<`u`&&(Z.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,`dataset`).get)}catch{}function Q(e,t,n){let r=Z[t];if(r)try{return r.call(e,n)}catch{}let i=e[t];return typeof i==`function`?i.call(e,n):i}function No(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||Mo;for(;n&&i++<5&&(o=Po(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=Q(n,`parentNode`);return r.reverse().join(` > `)}catch{return`<unknown>`}}function Po(e,t){let n=[],r=Q(e,`tagName`);if(!r)return``;if(typeof HTMLElement<`u`&&e instanceof HTMLElement){let t=Q(e,`dataset`);if(t){if(t.sentryComponent)return t.sentryComponent;if(t.sentryElement)return t.sentryElement}}n.push(r.toLowerCase());let i=t?.length?t.filter(t=>Q(e,`getAttribute`,t)).map(t=>[t,Q(e,`getAttribute`,t)]):null;if(i?.length)i.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{let t=Q(e,`id`);t&&n.push(`#${t}`);let r=Q(e,`className`);if(r&&b(r)){let e=r.split(/\s+/);for(let t of e)n.push(`.${t}`)}}for(let t of[`aria-label`,`type`,`name`,`title`,`alt`]){let r=Q(e,`getAttribute`,t);r&&n.push(`[${t}="${r}"]`)}return n.join(``)}var Fo=1e3,Io,Lo,Ro;function zo(e){g(`dom`,e),_(`dom`,Bo)}function Bo(){if(!X.document)return;let e=v.bind(null,`dom`),t=Uo(e,!0);X.document.addEventListener(`click`,t,!1),X.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=X[t]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(C(n,`addEventListener`,function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=Uo(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),C(n,`removeEventListener`,function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),Object.keys(n).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function Vo(e){if(e.type!==Lo)return!1;try{if(!e.target||e.target._sentryId!==Ro)return!1}catch{}return!0}function Ho(e,t){return e===`keypress`?!t?.tagName||!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!1}function Uo(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=Wo(n);if(Ho(n.type,r))return;w(n,`_sentryCaptured`,!0),r&&!r._sentryId&&w(r,`_sentryId`,k());let i=n.type===`keypress`?`input`:n.type;Vo(n)||(e({event:n,name:i,global:t}),Lo=n.type,Ro=r?r._sentryId:void 0),clearTimeout(Io),Io=X.setTimeout(()=>{Ro=void 0,Lo=void 0},Fo)}}function Wo(e){try{return e.target}catch{return null}}var Go;function Ko(e){let t=`history`;g(t,e),_(t,qo)}function qo(){if(X.addEventListener(`popstate`,()=>{let e=X.location.href,t=Go;Go=e,t!==e&&v(`history`,{from:t,to:e})}),!Wa())return;function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=Go,i=Jo(String(n));if(Go=i,r===i)return e.apply(this,t);v(`history`,{from:r,to:i})}return e.apply(this,t)}}C(X.history,`pushState`,e),C(X.history,`replaceState`,e)}function Jo(e){try{return new URL(e,X.location.origin).toString()}catch{return e}}var Yo={};function Xo(e){let t=Yo[e];if(t)return t;let n=X[e];if(Ka(n))return Yo[e]=n.bind(X);let r=X.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){Do&&m.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(Yo[e]=n.bind(X))}function Zo(e){Yo[e]=void 0}var $=`__sentry_xhr_v3__`;function Qo(e){g(`xhr`,e),_(`xhr`,$o)}function $o(){if(!X.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=M()*1e3,a=b(n[0])?n[0].toUpperCase():void 0,o=es(n[1]);if(!a||!o)return e.apply(t,n);t[$]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[$];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}v(`xhr`,{endTimestamp:M()*1e3,startTimestamp:i,xhr:t,virtualError:r})}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return s(),e.apply(t,n)}}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[$];return a&&b(r)&&b(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[$];return r?(n[0]!==void 0&&(r.body=n[0]),v(`xhr`,{startTimestamp:M()*1e3,xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function es(e){if(b(e))return e;try{return e.toString()}catch{}}function ts(e){if(typeof Element>`u`)return!1;try{return e instanceof Element}catch{return!1}}var ns=40;function rs(e,t=Xo(`fetch`)){let n=0,r=0;async function i(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`strict-origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,o);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get(`X-Sentry-Rate-Limits`),"retry-after":n.headers.get(`Retry-After`)}}}catch(e){throw Zo(`fetch`),e}finally{n-=a,r--}}return Si(e,i,gi(e.bufferSize||ns))}var is=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,as=30,os=50;function ss(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?`?`:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var cs=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,ls=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,us=/\((\S*)(?::(\d+))(?::(\d+))\)/,ds=/at (.+?) ?\(data:(.+?),/,fs=[as,e=>{let t=e.match(ds);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=cs.exec(e);if(n){let[,e,t,r]=n;return ss(e,`?`,+t,+r)}let r=ls.exec(e);if(r){if(r[2]?.indexOf(`eval`)===0){let e=us.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=gs(r[1]||`?`,r[2]);return ss(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],ps=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ms=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,hs=se(fs,[os,e=>{let t=ps.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=ms.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||`?`;return[n,e]=gs(n,e),ss(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),gs=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?`?`:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},_s=1024,vs=`Breadcrumbs`,ys=K(((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:vs,setup(e){t.console&&ka(Ss(e)),t.dom&&zo(xs(e,t.dom)),t.xhr&&Qo(Cs(e)),t.fetch&&Ja(ws(e)),t.history&&Ko(Ts(e)),t.sentry&&e.on(`beforeSendEvent`,bs(e))}}}));function bs(e){return function(t){z()===e&&q({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:A(t)},{event:t})}}function xs(e,t){return function(n){if(z()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>_s&&(is&&m.warn(`\`dom.maxStringLength\` cannot exceed ${_s}, but a value of ${o} was configured. Sentry will use ${_s} instead.`),o=_s),typeof a==`string`&&(a=[a]);try{let e=n.event,t=Es(e)?e.target:e;r=No(t,{keyAttrs:a,maxStringLength:o}),i=no(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),q(s,{event:n.event,name:n.name,global:n.global})}}function Ss(e){return function(t){if(z()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:ja(t.level),message:et(t.args,` `)};if(t.level===`assert`)if(t.args[0]===!1)n.message=`Assertion failed: ${et(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1);else return;q(n,{input:t.args,level:t.level})}}function Cs(e){return function(t){if(z()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[$];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:`xhr`,data:l,type:`http`,level:Ha(s)};e.emit(`beforeOutgoingRequestBreadcrumb`,d,u),q(d,u)}}function ws(e){return function(t){if(z()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`))if(t.error){let i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:`fetch`,data:t.fetchData,level:`error`,type:`http`};e.emit(`beforeOutgoingRequestBreadcrumb`,a,i),q(a,i)}else{let i=t.response,a={...t.fetchData,status_code:i?.status},o={input:t.args,response:i,startTimestamp:n,endTimestamp:r},s={category:`fetch`,data:a,type:`http`,level:Ha(a.status_code)};e.emit(`beforeOutgoingRequestBreadcrumb`,s,o),q(s,o)}}}function Ts(e){return function(t){if(z()!==e)return;let n=t.from,r=t.to,i=$i(J.location.href),a=n?$i(n):void 0,o=$i(r);a?.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),q({category:`navigation`,data:{from:n,to:r}})}}function Es(e){return!!e&&!!e.target}var Ds=`EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload`.split(`,`),Os=`BrowserApiErrors`,ks=K(((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:Os,setupOnce(){t.setTimeout&&C(J,`setTimeout`,As),t.setInterval&&C(J,`setInterval`,As),t.requestAnimationFrame&&C(J,`requestAnimationFrame`,js),t.XMLHttpRequest&&`XMLHttpRequest`in J&&C(XMLHttpRequest.prototype,`send`,Ms);let e=t.eventTarget;e&&(Array.isArray(e)?e:Ds).forEach(e=>Ns(e,t))}}}));function As(e){return function(...t){let n=t[0];return t[0]=Y(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${h(e)}`}}),e.apply(this,t)}}function js(e){return function(t){return e.apply(this,[Y(t,{mechanism:{data:{handler:h(e)},handled:!1,type:`auto.browser.browserapierrors.requestAnimationFrame`}})])}}function Ms(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&C(n,e,function(t){let n={mechanism:{data:{handler:h(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=Pe(t);return r&&(n.mechanism.data.handler=h(r)),Y(t,n)})}),e.apply(this,t)}}function Ns(e,t){let n=J[e]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(C(n,`addEventListener`,function(n){return function(r,i,a){try{Ps(i)&&(i.handleEvent=Y(i.handleEvent,{mechanism:{data:{handler:h(i),target:e},handled:!1,type:`auto.browser.browserapierrors.handleEvent`}}))}catch{}return t.unregisterOriginalCallbacks&&Fs(this,r,i),n.apply(this,[r,Y(i,{mechanism:{data:{handler:h(i),target:e},handled:!1,type:`auto.browser.browserapierrors.addEventListener`}}),a])}}),C(n,`removeEventListener`,function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,`__sentry_wrapped__`)){let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}}catch{}return e.call(this,t,n,r)}}))}function Ps(e){return typeof e.handleEvent==`function`}function Fs(e,t,n){e&&typeof e==`object`&&`removeEventListener`in e&&typeof e.removeEventListener==`function`&&e.removeEventListener(t,n)}var Is=K((e={})=>{let t=e.lifecycle??`route`;return{name:`BrowserSession`,setupOnce(){if(J.document===void 0){is&&m.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Lr({ignoreDuration:!0});let e=!1;jo(()=>{e||=(Br(),!0)});let n=R(),r=n.getUser();n.addScopeListener(t=>{let n=t.getUser();(r?.id!==n?.id||r?.ip_address!==n?.ip_address)&&(r=n,e&&Br())}),t===`route`&&Ko(({from:t,to:n})=>{t!==n&&(Lr({ignoreDuration:!0}),Br(),e=!0)})}}}),Ls=`CultureContext`,Rs=K((()=>({name:Ls,preprocessEvent(e){let t=zs();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){let t=zs();t&&pr(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})));function zs(){try{let e=J.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var Bs=`GlobalHandlers`,Vs=K(((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:Bs,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(Hs(e),qs(`onerror`)),t.onunhandledrejection&&(Us(e),qs(`onunhandledrejection`))}}}));function Hs(e){ge(t=>{let{stackParser:n,attachStacktrace:r}=Js();if(z()!==e||io())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=Ks(bo(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,Ir(l,{originalException:c,mechanism:{handled:!1,type:`auto.browser.global_handlers.onerror`}})})}function Us(e){ye(t=>{let{stackParser:n,attachStacktrace:r}=Js();if(z()!==e||io())return;let i=Ws(t),a=x(i)?Gs(i):bo(n,i,void 0,r,!0);a.level=`error`,Ir(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.global_handlers.onunhandledrejection`}})})}function Ws(e){if(x(e))return e;try{if(`reason`in e)return e.reason;if(`detail`in e&&`reason`in e.detail)return e.detail.reason}catch{}return e}function Gs(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Ks(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:Ys(t)??to(),function:`?`,in_app:!0}),e}function qs(e){is&&m.log(`Global Handler attached: ${e}`)}function Js(){return z()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Ys(e){if(!(!b(e)||e.length===0))return e.startsWith(`data:`)?`<${ea(e,!1)}>`:e}var Xs=K(()=>({name:`HttpContext`,preprocessEvent(e){if(!J.navigator&&!J.location&&!J.document)return;let t=oo(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){let t=e.attributes?.[Gt];if(!J.navigator&&!J.location&&!J.document)return;let n=oo();pr(e,{"url.full":t===`http.client`?void 0:n.url,"http.request.header.user_agent":n.headers[`User-Agent`],"http.request.header.referer":n.headers.Referer})}})),Zs=`cause`,Qs=5,$s=`LinkedErrors`,ec=K(((e={})=>{let t=e.limit||Qs,n=e.key||Zs;return{name:$s,preprocessEvent(e,r,i){xa(so,i.getOptions().stackParser,n,t,e,r)}}})),tc=/^HTML(\w*)Element$/;function nc(e){if(typeof window<`u`&&e===window)return`[Window]`;if(typeof document<`u`&&e===document)return`[Document]`;if(ts(e)){let t=rc(e);if(tc.test(t))return`[HTMLElement: ${No(e)}]`}}function rc(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function ic(){return ac()?(is&&l(()=>{console.error(`[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/`)}),!0):!1}function ac(){if(J.window===void 0)return!1;let e=J;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let t=to();return!(J===J.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}function oc(e){return[da(),sa(),Va(),ks(),ys(),Vs(),ec(),Na(),Xs(),Rs(),Is()]}function sc(e={}){let t=!e.skipBrowserExtensionCheck&&ic(),n=e.defaultIntegrations==null?oc():e.defaultIntegrations,r={...e,enabled:!t&&e.enabled,stackParser:ce(e.stackParser||hs),integrations:Jr({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||rs};return Ge(nc),Zi(To,r)}function cc(e){var t=``;return t+=`<div class="g-config-breadcrumb-container"></div><p class="g-sentry-description">To track errors in Sentry, enter your Sentry project DSNs here.</p><form id="g-sentry-server-form" role="form"><div class="form-group"><label class="control-label" for="g-sentry-server-dsn">Sentry Server DSN</label><input class="input-sm form-control" id="g-sentry-server-dsn" type="text" placeholder="Tracking ID"/></div><p class="g-validation-failed-message" id="g-sentry-server-error-message"></p><input class="btn btn-sm btn-primary" type="submit" value="Save"/></form><form id="g-sentry-client-form" role="form"><div class="form-group"><label class="control-label" for="g-sentry-client-dsn">Sentry Client DSN</label><input class="input-sm form-control" id="g-sentry-client-dsn" type="text" placeholder="Tracking ID"/></div><p class="g-validation-failed-message" id="g-sentry-client-error-message"></p><input class="btn btn-sm btn-primary" type="submit" value="Save"/></form>`,t}var lc=girder.views.widgets.PluginConfigBreadcrumbWidget,uc=girder.views.View,{restRequest:dc}=girder.rest,fc=girder.events,pc=uc.extend({events:{"submit #g-sentry-server-form":function(e){e.preventDefault(),this.$(`#g-sentry-server-error-message`).empty(),this._saveSettings([{key:`sentry.backend_dsn`,value:this.$(`#g-sentry-server-dsn`).val().trim()}],{errorTarget:`#g-sentry-server-error-message`})},"submit #g-sentry-client-form":function(e){e.preventDefault(),this.$(`#g-sentry-client-error-message`).empty(),this._saveSettings([{key:`sentry.frontend_dsn`,value:this.$(`#g-sentry-client-dsn`).val().trim()}],{errorTarget:`#g-sentry-client-error-message`})}},initialize:function(){dc({method:`GET`,url:`system/setting`,data:{list:JSON.stringify([`sentry.backend_dsn`,`sentry.frontend_dsn`])}}).done(e=>{this.render(),this.$(`#g-sentry-server-dsn`).val(e[`sentry.backend_dsn`]),this.$(`#g-sentry-client-dsn`).val(e[`sentry.frontend_dsn`])})},render:function(){return this.$el.html(cc()),this.breadcrumb||=new lc({pluginName:`Sentry`,el:this.$(`.g-config-breadcrumb-container`),parentView:this}).render(),this},_saveSettings:function(e,t){dc({method:`PUT`,url:`system/setting`,data:{list:JSON.stringify(e)},error:null}).done(()=>{fc.trigger(`g:alert`,{icon:`ok`,text:`Settings saved.`,type:`success`,timeout:4e3})}).fail(e=>{this.$(t.errorTarget).text(e.responseJSON.message)})}}),mc=girder.router,hc=girder.events,{exposePluginConfig:gc}=girder.utilities.PluginUtils;gc(`sentry`,`plugins/sentry/config`),mc.route(`plugins/sentry/config`,`SentryConfig`,function(){hc.trigger(`g:navigateTo`,pc)});var _c=girder.events,{restRequest:vc}=girder.rest;_c.on(`g:appload.after`,function(){vc({method:`GET`,url:`sentry/dsn`}).done(e=>{e.sentry_dsn&&sc({dsn:e.sentry_dsn})})})});
@@ -1,8 +0,0 @@
1
- {
2
- "tag": "5.0.12",
3
- "distance": 27,
4
- "node": "gb493589055ff787576ebbdbb8989a127f066c88e",
5
- "dirty": false,
6
- "branch": "master",
7
- "node_date": "2026-07-21"
8
- }